[Libreoffice-commits] core.git: svtools/source
Luc Castermans
luc.castermans at gmail.com
Thu Jan 9 10:03:53 PST 2014
svtools/source/misc/ehdl.cxx | 51 +++++++++++++--------------
svtools/source/misc/embedhlp.cxx | 21 +++++------
svtools/source/misc/imap.cxx | 73 +++++++++++++++++++--------------------
svtools/source/misc/imap2.cxx | 12 +++---
svtools/source/misc/itemdel.cxx | 8 ++--
5 files changed, 83 insertions(+), 82 deletions(-)
New commits:
commit 561775d5b533f25d6f07c6c4793b8c64afa47920
Author: Luc Castermans <luc.castermans at gmail.com>
Date: Tue Jan 7 21:47:08 2014 +0100
translated German comments
Change-Id: Ie08b9e12f990b244806379ff29cf33cd0fab847a
Reviewed-on: https://gerrit.libreoffice.org/7300
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/svtools/source/misc/ehdl.cxx b/svtools/source/misc/ehdl.cxx
index dea65e3..204deef 100644
--- a/svtools/source/misc/ehdl.cxx
+++ b/svtools/source/misc/ehdl.cxx
@@ -31,17 +31,17 @@
//=========================================================================
static sal_uInt16 aWndFunc(
- Window *pWin, // Parent des Dialoges
+ Window *pWin, // Parent of the dialog
sal_uInt16 nFlags,
- const OUString &rErr, // Fehlertext
- const OUString &rAction) // Actiontext
+ const OUString &rErr, // error text
+ const OUString &rAction) // action text
-/* [Beschreibung]
+/* [Description]
- Bringt eine Fehlerbox auf den Schirm. Je nach nFlags werden
- Error/ Info usw. Boxen mit den gewuenschten Buttons angezeigt
+ Draw an errorbox on the screen. Depending on nFlags
+ Error/Info etc. boxes with the requested buttosn are shown.
- Rueckgabewert ist der gedrueckte Button
+ Returnvalue is the button pressed
*/
@@ -49,7 +49,7 @@ static sal_uInt16 aWndFunc(
{
SolarMutexGuard aGuard;
- // aus den Flags die benoetigten WinBits ermitteln
+ // determine necessary WinBits from the flags
WinBits eBits=0;
if ( (ERRCODE_BUTTON_CANCEL|ERRCODE_BUTTON_RETRY) == (nFlags & (ERRCODE_BUTTON_CANCEL|ERRCODE_BUTTON_RETRY)) )
eBits = WB_RETRY_CANCEL;
@@ -167,9 +167,9 @@ SfxErrorHandler::~SfxErrorHandler()
bool SfxErrorHandler::CreateString(
const ErrorInfo *pErr, OUString &rStr, sal_uInt16& nFlags) const
-/* [Beschreibung]
+/* [Description]
- Der Fehlerstring fuer die ErrorInfo pErr wird zusammengesetzt.
+ Assemble error string for the ErrorInfo pErr.
*/
@@ -213,10 +213,10 @@ bool SfxErrorHandler::CreateString(
class ResString: public OUString
-/* [Beschreibung]
+/* [Description]
- Hilfsklasse zum Auslesen eines Strings und optionaler ExtraData aus
- einer String Resource.
+ Helpclass to read a string and optional ExtraData from
+ a string Resource.
*/
@@ -246,9 +246,9 @@ ResString::ResString(ResId & rId):
struct ErrorResource_Impl : private Resource
-/* [Beschreibung]
+/* [Description]
- Hilfsklasse zum Zugriff auf String SubResourcen einer Resource
+ Helpclass for access to string sub-resources of a resource
*/
{
@@ -268,10 +268,10 @@ struct ErrorResource_Impl : private Resource
sal_Bool SfxErrorHandler::GetClassString(sal_uLong lClassId, OUString &rStr) const
-/* [Beschreibung]
+/* [Description]
- Erzeugt den String fuer die Klasse des Fehlers. Wird immer aus der
- Resource des Sfx gelesen
+ Creates the string for the class of the error. Will always
+ be read from the resource of the Sfx.
*/
@@ -297,9 +297,9 @@ sal_Bool SfxErrorHandler::GetClassString(sal_uLong lClassId, OUString &rStr) con
sal_Bool SfxErrorHandler::GetMessageString(
sal_uLong lErrId, OUString &rStr, sal_uInt16 &nFlags) const
-/* [Beschreibung]
+/* [Description]
- Erzeugt den String fuer die Ausgabe in einer MessageBox
+ Creates the string to output a message box
*/
@@ -327,9 +327,10 @@ sal_Bool SfxErrorHandler::GetMessageString(
sal_Bool SfxErrorHandler::GetErrorString(
sal_uLong lErrId, OUString &rStr, sal_uInt16 &nFlags) const
-/* [Beschreibung]
- Erzeugt den Fehlerstring fuer den eigentlichen Fehler ohne
- dessen Klasse
+/* [Description]
+
+ Creates the error string for the actual error
+ without its class
*/
@@ -395,9 +396,9 @@ SfxErrorContext::SfxErrorContext(
bool SfxErrorContext::GetString(sal_uLong nErrId, OUString &rStr)
-/* [Beschreibung]
+/* [Description]
- Baut die Beschreibung eines ErrorContextes auf
+ Constructs the description of a error context
*/
{
diff --git a/svtools/source/misc/embedhlp.cxx b/svtools/source/misc/embedhlp.cxx
index 918b941..c5da4be 100644
--- a/svtools/source/misc/embedhlp.cxx
+++ b/svtools/source/misc/embedhlp.cxx
@@ -640,8 +640,9 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt
pOut->SetFont( aFnt );
Point aPt;
- // Nun den Text so skalieren, dass er in das Rect passt.
- // Wir fangen mit der Defaultsize an und gehen 1-AppFont runter
+
+ // Now scale text such that it fits in the rectangle
+ // We start with the default size and decrease 1-AppFont
for( sal_uInt16 i = 8; i > 2; i-- )
{
aPt.X() = (rRect.GetWidth() - pOut->GetTextWidth( rText )) / 2;
@@ -652,7 +653,7 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt
if( aPt.Y() < 0 ) bTiny = true, aPt.Y() = 0;
if( bTiny )
{
- // heruntergehen bei kleinen Bildern
+ // decrease for small images
aFnt.SetSize( Size( 0, aAppFontSz.Height() * i / 8 ) );
pOut->SetFont( aFnt );
}
@@ -668,23 +669,23 @@ void EmbeddedObjectRef::DrawPaintReplacement( const Rectangle &rRect, const OUSt
aPt.Y() = nHeight;
Point aP = rRect.TopLeft();
Size aBmpSize = aBmp.GetSizePixel();
- // Bitmap einpassen
+ // fit bitmap in
if( nHeight * 10 / nWidth
> aBmpSize.Height() * 10 / aBmpSize.Width() )
{
- // nach der Breite ausrichten
- // Proportion beibehalten
+ // adjust to the width
+ // keep proportions
long nH = nWidth * aBmpSize.Height() / aBmpSize.Width();
- // zentrieren
+ // center
aP.Y() += (nHeight - nH) / 2;
nHeight = nH;
}
else
{
- // nach der H"ohe ausrichten
- // Proportion beibehalten
+ // adjust to the height
+ // keep proportions
long nW = nHeight * aBmpSize.Width() / aBmpSize.Height();
- // zentrieren
+ // center
aP.X() += (nWidth - nW) / 2;
nWidth = nW;
}
diff --git a/svtools/source/misc/imap.cxx b/svtools/source/misc/imap.cxx
index 7efa9ca..06d588a 100644
--- a/svtools/source/misc/imap.cxx
+++ b/svtools/source/misc/imap.cxx
@@ -68,7 +68,7 @@ IMapObject::IMapObject( const OUString& rURL, const OUString& rAltText, const OU
/******************************************************************************
|*
-|* Freigabe des internen Speichers
+|* release internal memory
|*
\******************************************************************************/
@@ -105,7 +105,7 @@ void IMapObject::Write( SvStream& rOStm, const OUString& rBaseURL ) const
/******************************************************************************
|*
-|* Binaer-Import
+|* Binary import
|*
\******************************************************************************/
@@ -114,7 +114,7 @@ void IMapObject::Read( SvStream& rIStm, const OUString& rBaseURL )
IMapCompat* pCompat;
rtl_TextEncoding nTextEncoding;
- // Typ und Version ueberlesen wir
+ // read on type and version
rIStm.SeekRel( 2 );
rIStm >> nReadVersion;
rIStm >> nTextEncoding;
@@ -123,18 +123,18 @@ void IMapObject::Read( SvStream& rIStm, const OUString& rBaseURL )
rIStm >> bActive;
aTarget = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding);
- // URL absolut machen
+ // make URL absolute
aURL = URIHelper::SmartRel2Abs( INetURLObject(rBaseURL), aURL, URIHelper::GetMaybeFileHdl(), true, false, INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS );
pCompat = new IMapCompat( rIStm, STREAM_READ );
ReadIMapObject( rIStm );
- // ab Version 4 lesen wir eine EventListe
+ // from version 4 onwards we read a eventlist
if ( nReadVersion >= 0x0004 )
{
aEventList.Read(rIStm);
- // ab Version 5 kann ein Objektname vorhanden sein
+ // from version 5 onwards an objectname could be available
if ( nReadVersion >= 0x0005 )
aName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, nTextEncoding);
}
@@ -176,7 +176,7 @@ void IMapRectangleObject::ImpConstruct( const Rectangle& rRect, sal_Bool bPixel
/******************************************************************************
|*
-|* Binaer-Export
+|* Binary export
|*
\******************************************************************************/
@@ -188,7 +188,7 @@ void IMapRectangleObject::WriteIMapObject( SvStream& rOStm ) const
/******************************************************************************
|*
-|* Binaer-Import
+|* Binary import
|*
\******************************************************************************/
@@ -200,7 +200,7 @@ void IMapRectangleObject::ReadIMapObject( SvStream& rIStm )
/******************************************************************************
|*
-|* Typ-Rueckgabe
+|* return type
|*
\******************************************************************************/
@@ -212,7 +212,7 @@ sal_uInt16 IMapRectangleObject::GetType() const
/******************************************************************************
|*
-|* Hit-Test
+|* Hit test
|*
\******************************************************************************/
@@ -284,7 +284,7 @@ void IMapCircleObject::ImpConstruct( const Point& rCenter, sal_uLong nRad, sal_B
/******************************************************************************
|*
-|* Binaer-Export
+|* Binary export
|*
\******************************************************************************/
@@ -299,7 +299,7 @@ void IMapCircleObject::WriteIMapObject( SvStream& rOStm ) const
/******************************************************************************
|*
-|* Binaer-Import
+|* Binary import
|*
\******************************************************************************/
@@ -316,7 +316,7 @@ void IMapCircleObject::ReadIMapObject( SvStream& rIStm )
/******************************************************************************
|*
-|* Typ-Rueckgabe
+|* return type
|*
\******************************************************************************/
@@ -425,7 +425,7 @@ void IMapPolygonObject::ImpConstruct( const Polygon& rPoly, sal_Bool bPixel )
/******************************************************************************
|*
-|* Binaer-Export
+|* Binary export
|*
\******************************************************************************/
@@ -439,7 +439,7 @@ void IMapPolygonObject::WriteIMapObject( SvStream& rOStm ) const
/******************************************************************************
|*
-|* Binaer-Import
+|* Binary import
|*
\******************************************************************************/
@@ -447,7 +447,7 @@ void IMapPolygonObject::ReadIMapObject( SvStream& rIStm )
{
rIStm >> aPoly;
- // Version >= 2 hat zusaetzlich Ellipsen-Information
+ // Version >= 2 has additional ellipses information
if ( nReadVersion >= 2 )
{
rIStm >> bEllipse;
@@ -458,7 +458,7 @@ void IMapPolygonObject::ReadIMapObject( SvStream& rIStm )
/******************************************************************************
|*
-|* Typ-Rueckgabe
+|* return type
|*
\******************************************************************************/
@@ -470,7 +470,7 @@ sal_uInt16 IMapPolygonObject::GetType() const
/******************************************************************************
|*
-|* Hit-Test
+|* hit test
|*
\******************************************************************************/
@@ -628,7 +628,7 @@ ImageMap::~ImageMap()
/******************************************************************************
|*
-|* Freigabe des internen Speichers
+|* release internal memory
|*
\******************************************************************************/
@@ -644,7 +644,7 @@ void ImageMap::ClearImageMap()
/******************************************************************************
|*
-|* Zuweisungsoperator
+|* assignment operator
|*
\******************************************************************************/
@@ -685,7 +685,7 @@ ImageMap& ImageMap::operator=( const ImageMap& rImageMap )
/******************************************************************************
|*
-|* Vergleichsoperator I
+|* compare operator I
|*
\******************************************************************************/
@@ -747,7 +747,7 @@ sal_Bool ImageMap::operator==( const ImageMap& rImageMap )
/******************************************************************************
|*
-|* Vergleichsoperator II
+|* compare operator II
|*
\******************************************************************************/
@@ -759,7 +759,7 @@ sal_Bool ImageMap::operator!=( const ImageMap& rImageMap )
/******************************************************************************
|*
-|* Freigabe des internen Speichers
+|* release internal memory
|*
\******************************************************************************/
@@ -771,7 +771,7 @@ sal_uInt16 ImageMap::GetVersion() const
/******************************************************************************
|*
-|* Einfuegen eines neuen Objekts
+|* insert new object
|*
\******************************************************************************/
@@ -799,7 +799,7 @@ void ImageMap::InsertIMapObject( const IMapObject& rIMapObject )
/******************************************************************************
|*
-|* Hit-Test
+|* hit test
|*
\******************************************************************************/
@@ -811,8 +811,7 @@ IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize,
Point aRelPoint( rTotalSize.Width() * rRelHitPoint.X() / rDisplaySize.Width(),
rTotalSize.Height() * rRelHitPoint.Y() / rDisplaySize.Height() );
- // Falls Flags zur Spiegelung etc. angegeben sind, wird
- // der zu pruefende Punkt vor der Pruefung entspr. transformiert
+ // transform point to check before checking if flags to mirror etc. are set,
if ( nFlags )
{
if ( nFlags & IMAP_MIRROR_HORZ )
@@ -822,7 +821,7 @@ IMapObject* ImageMap::GetHitIMapObject( const Size& rTotalSize,
aRelPoint.Y() = rTotalSize.Height() - aRelPoint.Y();
}
- // Alle Objekte durchlaufen und HitTest ausfuehren
+ // walk over all objects and execute HitTest
IMapObject* pObj = NULL;
for( size_t i = 0, n = maList.size(); i < n; ++i ) {
if ( maList[ i ]->IsHit( aRelPoint ) ) {
@@ -865,7 +864,7 @@ void ImageMap::Scale( const Fraction& rFracX, const Fraction& rFracY )
/******************************************************************************
|*
-|* Objekte nacheinander wegschreiben
+|* sequentially write objects
|*
\******************************************************************************/
@@ -884,7 +883,7 @@ void ImageMap::ImpWriteImageMap( SvStream& rOStm, const OUString& rBaseURL ) con
/******************************************************************************
|*
-|* Objekte nacheinander lesen
+|* sequentially read objects
|*
\******************************************************************************/
@@ -933,7 +932,7 @@ void ImageMap::ImpReadImageMap( SvStream& rIStm, size_t nCount, const OUString&
/******************************************************************************
|*
-|* Binaer speichern
+|* store binary
|*
\******************************************************************************/
@@ -947,7 +946,7 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
rOStm.SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- // MagicCode schreiben
+ // write MagicCode
rOStm << IMAPMAGIC;
rOStm << GetVersion();
write_lenPrefixed_uInt8s_FromOUString<sal_uInt16>(rOStm, aImageName, eEncoding);
@@ -957,7 +956,7 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
pCompat = new IMapCompat( rOStm, STREAM_WRITE );
- // hier kann in neueren Versionen eingefuegt werden
+ // here one can insert in newer versions
delete pCompat;
@@ -969,7 +968,7 @@ void ImageMap::Write( SvStream& rOStm, const OUString& rBaseURL ) const
/******************************************************************************
|*
-|* Binaer laden
+|* load binary
|*
\******************************************************************************/
@@ -986,10 +985,10 @@ void ImageMap::Read( SvStream& rIStm, const OUString& rBaseURL )
{
IMapCompat* pCompat;
- // alten Inhalt loeschen
+ // delete old content
ClearImageMap();
- // Version ueberlesen wir
+ // read on version
rIStm.SeekRel( 2 );
aName = read_lenPrefixed_uInt8s_ToOUString<sal_uInt16>(rIStm, osl_getThreadTextEncoding());
@@ -999,7 +998,7 @@ void ImageMap::Read( SvStream& rIStm, const OUString& rBaseURL )
pCompat = new IMapCompat( rIStm, STREAM_READ );
- // hier kann in neueren Versionen gelesen werden
+ // here one can read in newer versions
delete pCompat;
ImpReadImageMap( rIStm, nCount, rBaseURL );
diff --git a/svtools/source/misc/imap2.cxx b/svtools/source/misc/imap2.cxx
index b045557..d7f7422 100644
--- a/svtools/source/misc/imap2.cxx
+++ b/svtools/source/misc/imap2.cxx
@@ -238,7 +238,7 @@ sal_uLong ImageMap::Read( SvStream& rIStm, sal_uLong nFormat, const OUString& rB
sal_uLong ImageMap::ImpReadCERN( SvStream& rIStm, const OUString& rBaseURL )
{
- // alten Inhalt loeschen
+ // delete old content
ClearImageMap();
OString aStr;
@@ -258,7 +258,7 @@ void ImageMap::ImpReadCERNLine( const OString& rLine, const OUString& rBaseURL
const char* pStr = aStr.getStr();
char cChar = *pStr++;
- // Anweisung finden
+ // find instruction
OStringBuffer aBuf;
while( ( cChar >= 'a' ) && ( cChar <= 'z' ) && NOTEOL( cChar ) )
{
@@ -380,7 +380,7 @@ OUString ImageMap::ImpReadCERNURL( const char** ppStr, const OUString& rBaseURL
sal_uLong ImageMap::ImpReadNCSA( SvStream& rIStm, const OUString& rBaseURL )
{
- // alten Inhalt loeschen
+ // delete old content
ClearImageMap();
OString aStr;
@@ -400,7 +400,7 @@ void ImageMap::ImpReadNCSALine( const OString& rLine, const OUString& rBaseURL )
const char* pStr = aStr.getStr();
char cChar = *pStr++;
- // Anweisung finden
+ // find instruction
OStringBuffer aBuf;
while( ( cChar >= 'a' ) && ( cChar <= 'z' ) && NOTEOL( cChar ) )
{
@@ -512,8 +512,8 @@ sal_uLong ImageMap::ImpDetectFormat( SvStream& rIStm )
rIStm.Read( cMagic, sizeof( cMagic ) );
- // Falls wir kein internes Format haben,
- // untersuchen wir das Format
+ // if we do not have an internal formats
+ // we check the format
if ( memcmp( cMagic, IMAPMAGIC, sizeof( cMagic ) ) )
{
long nCount = 128;
diff --git a/svtools/source/misc/itemdel.cxx b/svtools/source/misc/itemdel.cxx
index 731ea25..0e89b8b 100644
--- a/svtools/source/misc/itemdel.cxx
+++ b/svtools/source/misc/itemdel.cxx
@@ -53,10 +53,10 @@ SfxItemDesruptor_Impl::SfxItemDesruptor_Impl( SfxPoolItem *pItemToDesrupt ):
{
DBG_CTOR(SfxItemDesruptor_Impl, 0);
- DBG_ASSERT( 0 == pItem->GetRefCount(), "desrupting pooled item" );
+ DBG_ASSERT( 0 == pItem->GetRefCount(), "disrupting pooled item" );
pItem->SetKind( SFX_ITEMS_DELETEONIDLE );
- // im Idle abarbeiten
+ // process in Idle
GetpApp()->InsertIdleHdl( aLink, 1 );
}
@@ -65,12 +65,12 @@ SfxItemDesruptor_Impl::~SfxItemDesruptor_Impl()
{
DBG_DTOR(SfxItemDesruptor_Impl, 0);
- // aus Idle-Handler austragen
+ // remove from Idle-Handler
GetpApp()->RemoveIdleHdl( aLink );
// reset RefCount (was set to SFX_ITEMS_SPECIAL before!)
pItem->SetRefCount( 0 );
- //DBG_CHKOBJ( pItem, SfxPoolItem, 0 );
+
delete pItem;
}
More information about the Libreoffice-commits
mailing list