fdo#39468: Translated German comments in core/tools

Change-Id: I5b6fd5712f08dae180bdd3b57b63713946b82433
This commit is contained in:
Oliver Günther
2012-08-12 01:01:00 +02:00
committed by Philipp Riemer
parent bf222b4985
commit c8b7aa5513
29 changed files with 261 additions and 311 deletions

View File

@@ -136,13 +136,13 @@ void MkFilter::Filter()
rtl::OString aLine(aLineBuf); rtl::OString aLine(aLineBuf);
if (aLine.indexOf(rtl::OString(RTL_CONSTASCII_STRINGPARAM("mkfilter1"))) != -1) if (aLine.indexOf(rtl::OString(RTL_CONSTASCII_STRINGPARAM("mkfilter1"))) != -1)
{ {
// Zeilen unterdruecken // surpress lines
fprintf( stderr, "mkfilter1\n" ); fprintf( stderr, "mkfilter1\n" );
nState = 0; nState = 0;
} }
else if (aLine.indexOf(rtl::OString(RTL_CONSTASCII_STRINGPARAM("unroll begin"))) != -1) else if (aLine.indexOf(rtl::OString(RTL_CONSTASCII_STRINGPARAM("unroll begin"))) != -1)
{ {
// Zeilen raus schreiben mit ersetzen von $(TNR) nach int n // Print lines while replacing $(TNR) with int n
fprintf( stderr, "\nunroll begin\n" ); fprintf( stderr, "\nunroll begin\n" );
nState = 1; nState = 1;
} }
@@ -182,19 +182,19 @@ void MkFilter::Filter()
pTnrLst->push_back( pMkLine ); pTnrLst->push_back( pMkLine );
} }
else { else {
/* Zeilen ignorieren */; /* Skip these lines */;
} }
} // End Of File } // End Of File
fprintf( stderr, "\n" ); fprintf( stderr, "\n" );
// das File wieder ausgegeben // Output file again
size_t nLines = pLst->size(); size_t nLines = pLst->size();
for ( size_t j=0; j<nLines; j++ ) for ( size_t j=0; j<nLines; j++ )
{ {
MkLine *pLine = (*pLst)[ j ]; MkLine *pLine = (*pLst)[ j ];
if ( pLine->bHier ) if ( pLine->bHier )
{ {
// die List n - Mal abarbeiten // Iterate list n times
for ( sal_uInt16 n=1; n<11; n++) for ( sal_uInt16 n=1; n<11; n++)
{ {
size_t nCount = pLine->pPrivateTnrLst->size(); size_t nCount = pLine->pPrivateTnrLst->size();

View File

@@ -26,8 +26,7 @@
/********************************************************************* /*********************************************************************
* *
* Die Klasse SimpleConfig kann benutzt werden, um aus einer Textdatei * This class can be used for extracting tokens from a file
* alle Tokens zu lesen
* *
*********************************************************************/ *********************************************************************/

View File

@@ -32,20 +32,20 @@ typedef void* PVOID;
class CBlock class CBlock
{ {
private: private:
CBlock* pPrev; // Vorheriger Block CBlock* pPrev; // Previous block
CBlock* pNext; // Naechster Block CBlock* pNext; // Next block
sal_uInt16 nSize; // Groesse des Blocks sal_uInt16 nSize; // block size
sal_uInt16 nCount; // Anzahl Pointer sal_uInt16 nCount; // number of pointers
void** pNodes; // Pointer auf die Daten void** pNodes; // stores node pointers
#if defined DBG_UTIL #if defined DBG_UTIL
static char const * DbgCheckCBlock(void const *); static char const * DbgCheckCBlock(void const *);
#endif #endif
public: public:
// Fuer List-Container // used for list container
CBlock( sal_uInt16 nSize, CBlock* pPrev, CBlock* pNext ); CBlock( sal_uInt16 nSize, CBlock* pPrev, CBlock* pNext );
// Fuer Array-Container // used for array container
CBlock( sal_uInt16 nSize, CBlock* pPrev ); CBlock( sal_uInt16 nSize, CBlock* pPrev );
// Copy-Ctor // Copy-Ctor
CBlock( const CBlock& r, CBlock* pPrev ); CBlock( const CBlock& r, CBlock* pPrev );
@@ -78,7 +78,7 @@ private:
|* |*
|* CBlock::GetObject() |* CBlock::GetObject()
|* |*
|* Beschreibung Gibt einen Pointer aus dem Block zurueck |* Description Returns a node pointer given a block index
|* |*
*************************************************************************/ *************************************************************************/
@@ -91,16 +91,15 @@ inline void* CBlock::GetObject( sal_uInt16 nIndex ) const
|* |*
|* Container::ImpGetObject() |* Container::ImpGetObject()
|* |*
|* Beschreibung Wir gehen davon aus, das Pointer in der Regel |* Description A pointer is often located in the first block,
|* sich im ersten Block befindet und schalten |* thus check this position before calling GetObject
|* deshalb eine Inline-Methode davor
|* |*
*************************************************************************/ *************************************************************************/
inline void* Container::ImpGetObject( sal_uIntPtr nIndex ) const inline void* Container::ImpGetObject( sal_uIntPtr nIndex ) const
{ {
if ( pFirstBlock && (nIndex < pFirstBlock->Count()) ) if ( pFirstBlock && (nIndex < pFirstBlock->Count()) )
// Item innerhalb des gefundenen Blocks zurueckgeben // Return item within the found block
return pFirstBlock->GetObject( (sal_uInt16)nIndex ); return pFirstBlock->GetObject( (sal_uInt16)nIndex );
else else
return GetObject( nIndex ); return GetObject( nIndex );
@@ -110,8 +109,7 @@ inline void* Container::ImpGetObject( sal_uIntPtr nIndex ) const
|* |*
|* Container::ImpGetOnlyNodes() |* Container::ImpGetOnlyNodes()
|* |*
|* Beschreibung Wenn es nur einen Block gibt, wird davon |* Description If only one block exists, return its data array
|* das Daten-Array zurueckgegeben
|* |*
*************************************************************************/ *************************************************************************/

View File

@@ -23,15 +23,11 @@
#include <tools/tools.h> #include <tools/tools.h>
#include <tools/string.hxx> #include <tools/string.hxx>
// ------------------------------ // Debug methode for Strings
// - Debug-Methoden fuer String -
// ------------------------------
const char* DbgCheckUniString( const void* pString ); const char* DbgCheckUniString( const void* pString );
// ------------------------------- // Helper functions for Strings
// - Hilfsfunktionen fuer String -
// -------------------------------
xub_StrLen ImplStringLen( const sal_Char* pStr ); xub_StrLen ImplStringLen( const sal_Char* pStr );
xub_StrLen ImplStringLen( const sal_Unicode* pStr ); xub_StrLen ImplStringLen( const sal_Unicode* pStr );

View File

@@ -20,7 +20,6 @@
#ifndef _B3D_B3DTRANS_HXX #ifndef _B3D_B3DTRANS_HXX
#define _B3D_B3DTRANS_HXX #define _B3D_B3DTRANS_HXX
// Zu verwendender DephRange des Z-Buffers
#define ZBUFFER_DEPTH_RANGE ((double)(256L * 256L * 256L)) #define ZBUFFER_DEPTH_RANGE ((double)(256L * 256L * 256L))
#include <basegfx/matrix/b3dhommatrix.hxx> #include <basegfx/matrix/b3dhommatrix.hxx>
@@ -30,13 +29,8 @@
#include <basegfx/point/b2dpoint.hxx> #include <basegfx/point/b2dpoint.hxx>
#include <tools/toolsdllapi.h> #include <tools/toolsdllapi.h>
// Vorausdeklarationen
/************************************************************************* // Supported methods for setting/keeping the aspect ratio
|*
|* Unterstuetzte Methoden, um das Seitenverhaeltnis einzuhalten
|*
\************************************************************************/
enum Base3DRatio enum Base3DRatio
{ {
@@ -45,11 +39,7 @@ enum Base3DRatio
Base3DRatioMiddle Base3DRatioMiddle
}; };
/************************************************************************* // Supported projection types
|*
|* Typ der Projektion
|*
\************************************************************************/
enum Base3DProjectionType enum Base3DProjectionType
{ {
@@ -57,11 +47,7 @@ enum Base3DProjectionType
Base3DProjectionTypePerspective Base3DProjectionTypePerspective
}; };
/************************************************************************* // Transformation sets for 3D output
|*
|* Transformationen fuer alle 3D Ausgaben
|*
\************************************************************************/
class TOOLS_DLLPUBLIC B3dTransformationSet class TOOLS_DLLPUBLIC B3dTransformationSet
{ {
@@ -81,13 +67,13 @@ private:
// Texture Matrices // Texture Matrices
basegfx::B2DHomMatrix maTexture; basegfx::B2DHomMatrix maTexture;
// Speziell zum Umwandeln von Punkten Objekt -> Device // Special transformation set for converting Object -> Device
basegfx::B3DHomMatrix maObjectToDevice; basegfx::B3DHomMatrix maObjectToDevice;
// Transponierte Inverse fuer Vectortransformationen // Transposed and inversed matrix for vector transformations
basegfx::B3DHomMatrix maInvTransObjectToEye; basegfx::B3DHomMatrix maInvTransObjectToEye;
// Transformation World->View // Transformation for World->View
basegfx::B3DHomMatrix maMatFromWorldToView; basegfx::B3DHomMatrix maMatFromWorldToView;
basegfx::B3DHomMatrix maInvMatFromWorldToView; basegfx::B3DHomMatrix maInvMatFromWorldToView;
@@ -95,7 +81,7 @@ private:
basegfx::B3DVector maScale; basegfx::B3DVector maScale;
basegfx::B3DVector maTranslate; basegfx::B3DVector maTranslate;
// ViewPlane DeviceRectangle (vom Benutzer gesetzt) // ViewPlane DeviceRectangle (user-defined)
double mfLeftBound; double mfLeftBound;
double mfRightBound; double mfRightBound;
double mfBottomBound; double mfBottomBound;
@@ -105,22 +91,22 @@ private:
double mfNearBound; double mfNearBound;
double mfFarBound; double mfFarBound;
// Seitenverhaeltnis der 3D Abbildung (Y / X) // Aspect ratio of 3D transformation (Y / X)
// default ist 1:1 -> 1.0 // default: 1:1 -> 1.0
// Deaktivieren mit 0.0 als Wert // Disable with value 0.0
double mfRatio; double mfRatio;
// Der gesetzte Ausgabebereich (in logischen Koordinaten) // Viewport area in logical coordinates
// und der dazugehoerige sichtbare Bereich
Rectangle maViewportRectangle; Rectangle maViewportRectangle;
// Visible area within viewport
Rectangle maVisibleRectangle; Rectangle maVisibleRectangle;
// Die tatsaechlich von CalcViewport gesetzten Abmessungen // Actual coordinates as set by CalcViewport
// des sichtbaren Bereichs (in logischen Koordinaten) // of visible viewport area (logical coordinates)
Rectangle maSetBound; Rectangle maSetBound;
// Methode zur Aufrechterhaltung des Seitenverhaeltnisses // Method of keeping defined aspect ratio
// default ist Base3DRatioGrow // default: Base3DRatioGrow
Base3DRatio meRatio; Base3DRatio meRatio;
// Flags // Flags
@@ -134,7 +120,6 @@ public:
B3dTransformationSet(); B3dTransformationSet();
virtual ~B3dTransformationSet(); virtual ~B3dTransformationSet();
// Zurueck auf Standard
void Reset(); void Reset();
// ObjectTrans // ObjectTrans
@@ -156,12 +141,12 @@ public:
// Texture // Texture
const basegfx::B2DHomMatrix& GetTexture() { return maTexture; } const basegfx::B2DHomMatrix& GetTexture() { return maTexture; }
// Seitenverhaeltnis und Modus zu dessen Aufrechterhaltung // aspect ratio accessors and the defined method of keeping defined aspect ratio
double GetRatio() { return mfRatio; } double GetRatio() { return mfRatio; }
void SetRatio(double fNew=1.0); void SetRatio(double fNew=1.0);
Base3DRatio GetRatioMode() { return meRatio; } Base3DRatio GetRatioMode() { return meRatio; }
// Parameter der ViewportTransformation // Parameters of ViewportTransformation
void SetDeviceRectangle(double fL=-1.0, double fR=1.0, double fB=-1.0, double fT=1.0, sal_Bool bBroadCastChange=sal_True); void SetDeviceRectangle(double fL=-1.0, double fR=1.0, double fB=-1.0, double fT=1.0, sal_Bool bBroadCastChange=sal_True);
double GetDeviceRectangleWidth() const { return mfRightBound - mfLeftBound; } double GetDeviceRectangleWidth() const { return mfRightBound - mfLeftBound; }
double GetDeviceRectangleHeight() const { return mfTopBound - mfBottomBound; } double GetDeviceRectangleHeight() const { return mfTopBound - mfBottomBound; }
@@ -174,7 +159,7 @@ public:
const Rectangle& GetViewportRectangle() { return maViewportRectangle; } const Rectangle& GetViewportRectangle() { return maViewportRectangle; }
void CalcViewport(); void CalcViewport();
// Direkter Zugriff auf verschiedene Transformationen // Direct accessors for miscellaneous transformations
const basegfx::B3DPoint WorldToEyeCoor(const basegfx::B3DPoint& rVec); const basegfx::B3DPoint WorldToEyeCoor(const basegfx::B3DPoint& rVec);
const basegfx::B3DPoint EyeToWorldCoor(const basegfx::B3DPoint& rVec); const basegfx::B3DPoint EyeToWorldCoor(const basegfx::B3DPoint& rVec);
@@ -204,12 +189,10 @@ protected:
}; };
/************************************************************************* /*************************************************************************
|* Viewport for B3D
|* |*
|* Viewport fuer B3D |* Uses a simplified model, in which a point
|* |* is described using a View Reference Point (VRP)
|* Verwendet wird hier ein vereinfachtes System, bei dem der abzubildende
|* Punkt durch VRP repraesentiert wird
|*
\************************************************************************/ \************************************************************************/
class TOOLS_DLLPUBLIC B3dViewport : public B3dTransformationSet class TOOLS_DLLPUBLIC B3dViewport : public B3dTransformationSet
@@ -237,11 +220,7 @@ protected:
void CalcOrientation(); void CalcOrientation();
}; };
/************************************************************************* // B3D camera
|*
|* Kamera fuer B3D
|*
\************************************************************************/
class TOOLS_DLLPUBLIC B3dCamera : public B3dViewport class TOOLS_DLLPUBLIC B3dCamera : public B3dViewport
{ {
@@ -262,17 +241,14 @@ public:
sal_Bool bUseFocLen = sal_False); sal_Bool bUseFocLen = sal_False);
virtual ~B3dCamera(); virtual ~B3dCamera();
// Positionen
const basegfx::B3DPoint& GetPosition() const { return aPosition; } const basegfx::B3DPoint& GetPosition() const { return aPosition; }
const basegfx::B3DVector& GetLookAt() const { return aLookAt; } const basegfx::B3DVector& GetLookAt() const { return aLookAt; }
// Brennweite in mm // Focal length in mm
double GetFocalLength() const { return fFocalLength; } double GetFocalLength() const { return fFocalLength; }
// Neigung links/rechts
double GetBankAngle() const { return fBankAngle; } double GetBankAngle() const { return fBankAngle; }
// FocalLength Flag
sal_Bool GetUseFocalLength() const { return (sal_Bool)bUseFocalLength; } sal_Bool GetUseFocalLength() const { return (sal_Bool)bUseFocalLength; }
protected: protected:

View File

@@ -48,7 +48,7 @@ class TOOLS_DLLPUBLIC BigInt
private: private:
long nVal; long nVal;
unsigned short nNum[MAX_DIGITS]; unsigned short nNum[MAX_DIGITS];
sal_uInt8 nLen : 5; // Aktuelle Laenge sal_uInt8 nLen : 5; // current length
sal_Bool bIsNeg : 1, // Is Sign negative sal_Bool bIsNeg : 1, // Is Sign negative
bIsBig : 1, // sal_True == BigInt bIsBig : 1, // sal_True == BigInt
bIsSet : 1; // Not "Null" (not not 0) bIsSet : 1; // Not "Null" (not not 0)

View File

@@ -51,7 +51,7 @@ public:
~SvCacheStream(); ~SvCacheStream();
void SetFilename( const String& rFN ) void SetFilename( const String& rFN )
{ aFileName = rFN; } // darf nur vom FilenameHdl gerufen werden! { aFileName = rFN; } // call only from FilenameHdl
const String& GetFilename() const { return aFileName; } const String& GetFilename() const { return aFileName; }
void SwapOut(); void SwapOut();
@@ -61,7 +61,7 @@ public:
sal_Bool IsPersistent() { return bPersistent != 0; } sal_Bool IsPersistent() { return bPersistent != 0; }
void SetPersistence( sal_Bool b = sal_True ) { bPersistent = b; } void SetPersistence( sal_Bool b = sal_True ) { bPersistent = b; }
void SetSwapStream( SvStream *p ) void SetSwapStream( SvStream *p )
{ pSwapStream = p; } // darf nur vom FilenameHdl gerufen werden! { pSwapStream = p; } // call only from FilenameHdl
}; };
#endif #endif

View File

@@ -30,7 +30,6 @@ class CBlock;
// - Container - // - Container -
// ------------- // -------------
// Maximale Blockgroesse
#define CONTAINER_MAXBLOCKSIZE ((sal_uInt16)0x3FF0) #define CONTAINER_MAXBLOCKSIZE ((sal_uInt16)0x3FF0)
#define CONTAINER_APPEND ULONG_MAX #define CONTAINER_APPEND ULONG_MAX

View File

@@ -46,8 +46,6 @@
#ifdef DBG_UTIL #ifdef DBG_UTIL
// --- Dbg-Daten ---
typedef void (*DbgPrintLine)( const sal_Char* pLine ); typedef void (*DbgPrintLine)( const sal_Char* pLine );
typedef const sal_Char* (*DbgUsr)(const void* pThis ); typedef const sal_Char* (*DbgUsr)(const void* pThis );
typedef void (*DbgTestSolarMutexProc)(); typedef void (*DbgTestSolarMutexProc)();
@@ -102,8 +100,7 @@ struct DbgDataType
sal_Char const * pName; sal_Char const * pName;
}; };
// --- Dbg-Prototypen --- // Dbg prototypes
#define DBG_FUNC_DEBUGSTART 1 #define DBG_FUNC_DEBUGSTART 1
#define DBG_FUNC_DEBUGEND 2 #define DBG_FUNC_DEBUGEND 2
#define DBG_FUNC_GLOBALDEBUGEND 3 #define DBG_FUNC_GLOBALDEBUGEND 3
@@ -307,8 +304,7 @@ inline void DbgPrintFile( const sal_Char* pLine )
DbgFunc( DBG_FUNC_PRINTFILE, (void*)(sal_Char*)pLine ); DbgFunc( DBG_FUNC_PRINTFILE, (void*)(sal_Char*)pLine );
} }
// --- Dbg-Output --- // Dbg output
#define DBG_OUT_TRACE 1 #define DBG_OUT_TRACE 1
#define DBG_OUT_WARNING 2 #define DBG_OUT_WARNING 2
#define DBG_OUT_ERROR 3 #define DBG_OUT_ERROR 3
@@ -320,7 +316,7 @@ TOOLS_DLLPUBLIC void DbgOutTypef( sal_uInt16 nOutType, const sal_Char* pFStr, ..
TOOLS_DLLPUBLIC void DbgOutf( const sal_Char* pFStr, ... ); TOOLS_DLLPUBLIC void DbgOutf( const sal_Char* pFStr, ... );
TOOLS_DLLPUBLIC void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... ); TOOLS_DLLPUBLIC void ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... );
// --- Dbg-Test-Functions --- // Dbg test functions
#define DBG_PROF_START 1 #define DBG_PROF_START 1
#define DBG_PROF_STOP 2 #define DBG_PROF_STOP 2
@@ -364,7 +360,7 @@ public:
} }
}; };
// --- Dbg-Defines (intern) --- // (internally used) defines
#define DBG_FUNC( aName ) DbgName_##aName() #define DBG_FUNC( aName ) DbgName_##aName()
#define DBG_NAME( aName ) static DbgDataType aImpDbgData_##aName = { 0, #aName }; \ #define DBG_NAME( aName ) static DbgDataType aImpDbgData_##aName = { 0, #aName }; \
@@ -372,7 +368,7 @@ public:
#define DBG_NAMEEX_VISIBILITY( aName, vis ) vis DbgDataType* DBG_FUNC( aName ); #define DBG_NAMEEX_VISIBILITY( aName, vis ) vis DbgDataType* DBG_FUNC( aName );
#define DBG_NAMEEX( aName ) DBG_NAMEEX_VISIBILITY( aName, ) #define DBG_NAMEEX( aName ) DBG_NAMEEX_VISIBILITY( aName, )
// --- Dbg-Defines (extern) --- // (externally used) defines
#define DBG_DEBUGSTART() DbgDebugStart() #define DBG_DEBUGSTART() DbgDebugStart()
#define DBG_DEBUGEND() DbgDebugEnd() #define DBG_DEBUGEND() DbgDebugEnd()
@@ -443,7 +439,7 @@ do \
DbgTestSolarMutex(); \ DbgTestSolarMutex(); \
} while(0) } while(0)
// --- Dbg-Defines (An/Ausschlaten) --- // en-/disable debug defines
#define DBG_INSTOUTTRACE( nOut ) \ #define DBG_INSTOUTTRACE( nOut ) \
do \ do \

View File

@@ -32,7 +32,7 @@ Warning || || |
| || || || | | || || || |
Dynamic || || | Dynamic || || |
| || || | | || || |
Subsystembereiche | | Subsystemarea| || |
| || | | || |
| || | | || |
| || | | || |
@@ -294,7 +294,7 @@ inline sal_uIntPtr ERRCODE_TOERROR( sal_uIntPtr x )
#define SVSTREAM_DISK_FULL ERRCODE_IO_OUTOFSPACE #define SVSTREAM_DISK_FULL ERRCODE_IO_OUTOFSPACE
// Fuer die EditEngine: // For the EditEngine:
#define SVSTREAM_ERRBASE_USER ERRCODE_AREA_LIB1 #define SVSTREAM_ERRBASE_USER ERRCODE_AREA_LIB1
#define PRINTER_OK ERRCODE_NONE #define PRINTER_OK ERRCODE_NONE

View File

@@ -129,7 +129,7 @@ typedef sal_uInt16 FontEmphasisMark;
#define EMPHASISMARK_POS_ABOVE ((FontEmphasisMark)0x1000) #define EMPHASISMARK_POS_ABOVE ((FontEmphasisMark)0x1000)
#define EMPHASISMARK_POS_BELOW ((FontEmphasisMark)0x2000) #define EMPHASISMARK_POS_BELOW ((FontEmphasisMark)0x2000)
// Only for kompability // Only for compability
#define EMPHASISMARK_DOTS_ABOVE (EMPHASISMARK_DOT | EMPHASISMARK_POS_ABOVE) #define EMPHASISMARK_DOTS_ABOVE (EMPHASISMARK_DOT | EMPHASISMARK_POS_ABOVE)
#define EMPHASISMARK_DOTS_BELOW (EMPHASISMARK_DOT | EMPHASISMARK_POS_BELOW) #define EMPHASISMARK_DOTS_BELOW (EMPHASISMARK_DOT | EMPHASISMARK_POS_BELOW)
#define EMPHASISMARK_SIDE_DOTS (EMPHASISMARK_ACCENT | EMPHASISMARK_POS_ABOVE) #define EMPHASISMARK_SIDE_DOTS (EMPHASISMARK_ACCENT | EMPHASISMARK_POS_ABOVE)

View File

@@ -63,7 +63,7 @@ typedef int DirEntryKind;
#define FSYS_KIND_BLOCK ((DirEntryKind) 8) #define FSYS_KIND_BLOCK ((DirEntryKind) 8)
#define FSYS_KIND_CHAR ((DirEntryKind) 16) #define FSYS_KIND_CHAR ((DirEntryKind) 16)
#define FSYS_KIND_WILD ((DirEntryKind) 32) #define FSYS_KIND_WILD ((DirEntryKind) 32)
#define FSYS_KIND_BLOCK_REMOTE ((DirEntryKind) 64) //TPF: fuer RFS #define FSYS_KIND_BLOCK_REMOTE ((DirEntryKind) 64)
#define FSYS_KIND_REMOVEABLE ((DirEntryKind) 128) #define FSYS_KIND_REMOVEABLE ((DirEntryKind) 128)
#define FSYS_KIND_FIXED ((DirEntryKind) 256) #define FSYS_KIND_FIXED ((DirEntryKind) 256)
#define FSYS_KIND_REMOTE ((DirEntryKind) 512) #define FSYS_KIND_REMOTE ((DirEntryKind) 512)
@@ -92,11 +92,11 @@ typedef ::std::vector< FSysSort > FSysSortList;
enum DirEntryFlag enum DirEntryFlag
{ {
FSYS_FLAG_NORMAL, FSYS_FLAG_NORMAL,
FSYS_FLAG_VOLUME, // Dir( FSYS_FLAG_VOLUME ) und GetDevice() FSYS_FLAG_VOLUME, // Dir( FSYS_FLAG_VOLUME ) and GetDevice()
FSYS_FLAG_ABSROOT, // z.B. "a:\" oder "\" FSYS_FLAG_ABSROOT, // e.g. "a:\" or "\"
FSYS_FLAG_RELROOT, // z.B. "a:", "a:." oder "." FSYS_FLAG_RELROOT, // e.g. "a:", "a:." or "."
FSYS_FLAG_CURRENT = FSYS_FLAG_RELROOT, // Synonym fuer FSYS_FLAG_RELROOT FSYS_FLAG_CURRENT = FSYS_FLAG_RELROOT, // Synonym for FSYS_FLAG_RELROOT
FSYS_FLAG_PARENT, // z.B. ".." FSYS_FLAG_PARENT, // e.g. ".."
FSYS_FLAG_INVALID FSYS_FLAG_INVALID
}; };
@@ -122,7 +122,7 @@ typedef int FSysAction;
// clashes // clashes
#define FSYS_ACTION_STANDARD 0 #define FSYS_ACTION_STANDARD 0
// Fuer RFS // RFS
#define RFS_IDENTIFIER "-rfs-" #define RFS_IDENTIFIER "-rfs-"
typedef sal_uIntPtr FSysError; typedef sal_uIntPtr FSysError;
@@ -373,10 +373,10 @@ class TOOLS_DLLPUBLIC Dir : public DirEntry
{ {
friend struct DirReader_Impl; friend struct DirReader_Impl;
DirReader_Impl* pReader; // systemabhaengig DirReader_Impl* pReader; // is system-dependent
DirEntryList* pLst; DirEntryList* pLst;
FSysSortList* pSortLst; // NULL, wenn kein Sort gefordert FSysSortList* pSortLst; // NULL if no sorting requested
FileStatList* pStatLst; // NULL, wenn keine Stat's benoetigt FileStatList* pStatLst; // NULL if no stats requested
WildCard aNameMask; WildCard aNameMask;
DirEntryKind eAttrMask; DirEntryKind eAttrMask;

View File

@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
/* nicht geschuetz, muss als gegenstueck zu prestl.h includet werden */ /* not protected, must be included together with prestl.h! */
#if defined WNT #if defined WNT
@@ -27,7 +27,7 @@
#undef Rectangle #undef Rectangle
#undef DELETE #undef DELETE
/* Hilfe-Ids umbenennen */ /* rename help IDs */
#define WIN_HELP_INDEX 0x0003 #define WIN_HELP_INDEX 0x0003
#define WIN_HELP_HELPONHELP 0x0004 #define WIN_HELP_HELPONHELP 0x0004
#undef HELP_INDEX #undef HELP_INDEX
@@ -206,7 +206,6 @@
#define WIN_FindWindow FindWindow #define WIN_FindWindow FindWindow
#endif #endif
// keine Yield-Definition
#undef Yield #undef Yield
/* new StretchBlt() Modes (simpler names) */ /* new StretchBlt() Modes (simpler names) */
@@ -229,7 +228,7 @@ extern "C"
#endif #endif
// Konfl<EFBFBD>kt mit den Tools-Pair vermeiden // avoid conflict with Pair in tools
#undef Pair #undef Pair
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -17,9 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
/* nicht geschuetzt, darf nur einmal includet werden */ /* not protected, do only include once! */
// Konfl<EFBFBD>kt mit den Tools-Pair vermeiden // avoid conflict with pair in tools
#define Pair StlPair #define Pair StlPair
#if defined WNT #if defined WNT

View File

@@ -155,46 +155,45 @@ typedef std::map<SvPersistBase*, sal_uIntPtr> PersistBaseMap;
//========================================================================= //=========================================================================
class SvStream; class SvStream;
class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
/* [Beschreibung]
Mit dieser Klasse k"onnen Laufzeit Objektstrukturen gespeichert /** Persistent Stream
und geladen werden. Es m"ussen immer alle beteiligten Objekte
gespeichert oder geladen werden. Um die Objekte automatisch
laden zu k"onnen, wird eine Factory f"ur jede Klasse von Objekten,
die im Stream vorkommen k"onnen, ben"otigt. Die Liste aller Klassen
wird in einem <SvClassManager> Objekt gespeichert und dem
SvPersistStream "ubergeben, wenn er erzeugt wird.
Weiterhin wird die M"oglichkeit geboten sal_uInt32 Werte komprimiert
zu schreiben und zu lesen (<SvPersistStream::WriteCompressed>,
<SvPersistStream::ReadCompressed>).
Es gibt auch die drei Hilfsmethoden <SvPersistStream::WriteDummyLen>,
<SvPersistStream::WriteLen> und <SvPersistStream::ReadLen> um eine
L"ange vor das Objekt zu schreiben.
[Beispiel] This class provides accessor to storing and loading runtime objects.
All dependent objects have to be stored as well.
In order to load objects automatically, every object class must
provide a Factory method to read an object from stream.
The list of all classes is stored in a <SvClassManager> object
and is sent to SvPersistStream upon initialization.
By using the Method SvPersistStream::WriteCompressed and
SvPersistStream::ReadCompressed, compressed sal_uInt32 values may be
written to / read from the Stream.
Several helper methods exists for writing and reading
object lengths to the stream: SvPersistStream::WriteDummyLen,
SvPersistStream::WriteLen and SvPersistStream::ReadLen.
Ein konkretes Beispiel ist im Konstruktor beschrieben. [Example]
Objekt A verweist auf B, dieses auf C und das wieder auf A.
C verweist auf D.
Die Reihenfolge beim Speichern und Laden ist egal, sie muss nur One example is described in the constructor.
gleich sein: Assume a ring-like dependency, where A referenes B,
Speichern: Laden: B itself references C, and C references to both D and A.
A,B,C,D A,B,C,D richtig
B,A,C,D B,A,C,D richtig
C,A,B,D A,B,C,D falsch
A,B,C,D A,B,C falsch
[Anmerkung] The order of the objects upon saving and loading does not matter,
as long objects are loaded in the same order they were stored.
Das Dateiformat zwischen DBG_UTIL und !DBG_UTIL ist unterschiedlich, Saving: Loading:
kann aber von beiden Versionen gelesen werden. A,B,C,D A,B,C,D correct
B,A,C,D B,A,C,D correct
C,A,B,D A,B,C,D wrong
A,B,C,D A,B,C wrong
@note The file formats DBG_UTIL and !DBG_UTIL differ, but we can read from
both versions.
*/ */
class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
{ {
SvClassManager & rClassMgr; SvClassManager & rClassMgr;
SvStream * pStm; SvStream * pStm;
PersistBaseMap aPTable; // Pointer und Key gedreht PersistBaseMap aPTable; // reversed pointer and key
SvPersistUIdx aPUIdx; SvPersistUIdx aPUIdx;
sal_uIntPtr nStartIdx; sal_uIntPtr nStartIdx;
const SvPersistStream * pRefStm; const SvPersistStream * pRefStm;
@@ -239,8 +238,7 @@ public:
TOOLS_DLLPUBLIC friend SvPersistStream& operator << (SvPersistStream &, SvPersistBase *); TOOLS_DLLPUBLIC friend SvPersistStream& operator << (SvPersistStream &, SvPersistBase *);
TOOLS_DLLPUBLIC friend SvPersistStream& operator >> (SvPersistStream &, SvPersistBase * &); TOOLS_DLLPUBLIC friend SvPersistStream& operator >> (SvPersistStream &, SvPersistBase * &);
// Objekte halten ihre Id's w"ahrend geladen und // Objects maintain their IDs while storing and loading to/from stream
// gespeichert werden.
friend SvStream& operator >> ( SvStream &, SvPersistStream & ); friend SvStream& operator >> ( SvStream &, SvPersistStream & );
friend SvStream& operator << ( SvStream &, SvPersistStream & ); friend SvStream& operator << ( SvStream &, SvPersistStream & );
}; };

View File

@@ -22,9 +22,9 @@
#include <tools/rcid.h> #include <tools/rcid.h>
// Definition der Struktur die alle "Window"-Resourcen haben // Defines for all "Window" resources.
// Hier sind die Fensterstyles definiert die nicht in WinBits sind // (Here are all window styles that are not in WinBits)
#define RSC_EXTRAMAPUNIT 0xFFFF //Wert nicht veraendern!!! #define RSC_EXTRAMAPUNIT 0xFFFF // do not change that value!
typedef short RSWND_STYLE; typedef short RSWND_STYLE;
#define RSWND_DISABLED 0x01 #define RSWND_DISABLED 0x01
@@ -44,26 +44,26 @@ typedef short RSWND_STYLE;
#define WINDOW_BORDER_STYLE 0x2000 #define WINDOW_BORDER_STYLE 0x2000
#define WINDOW_HELPID 0x4000 #define WINDOW_HELPID 0x4000
// Definition der Struktur die alle "WorkWindow"-Resourcen haben // For "WorkWindow" resources:
#define WORKWIN_SHOWNORMAL 0 #define WORKWIN_SHOWNORMAL 0
#define WORKWIN_SHOWMINIMIZED 1 #define WORKWIN_SHOWMINIMIZED 1
#define WORKWIN_SHOWMAXIMIZED 2 #define WORKWIN_SHOWMAXIMIZED 2
// Definition der Struktur der FixedBitmap-Resource. // For "FixedBitmap" resource:
#define RSC_FIXEDBITMAP_BITMAP 0x0001 #define RSC_FIXEDBITMAP_BITMAP 0x0001
// Definition der Struktur der FixedImage-Resource. // For "FixedImage" resource:
#define RSC_FIXEDIMAGE_IMAGE 0x0001 #define RSC_FIXEDIMAGE_IMAGE 0x0001
// Definition der Struktur des MenuButtons // For "MenuButton" resources:
#define RSCMENUBUTTON_MENU 0x01 #define RSCMENUBUTTON_MENU 0x01
// Definition der Struktur die alle Menu-Resourcen haben // For all menu resources:
#define RSC_MENU_ITEMS 0x01 #define RSC_MENU_ITEMS 0x01
#define RSC_MENU_TEXT 0x02 #define RSC_MENU_TEXT 0x02
#define RSC_MENU_DEFAULTITEMID 0x04 #define RSC_MENU_DEFAULTITEMID 0x04
// Hier sind die MenuItem-Resourceoptionen definiert // "MenuItem" resource options:
#define RSC_MENUITEM_SEPARATOR 0x001 #define RSC_MENUITEM_SEPARATOR 0x001
#define RSC_MENUITEM_ID 0x002 #define RSC_MENUITEM_ID 0x002
#define RSC_MENUITEM_STATUS 0x004 #define RSC_MENUITEM_STATUS 0x004
@@ -77,11 +77,11 @@ typedef short RSWND_STYLE;
#define RSC_MENUITEM_DISABLE 0x400 #define RSC_MENUITEM_DISABLE 0x400
#define RSC_MENUITEM_COMMAND 0x800 #define RSC_MENUITEM_COMMAND 0x800
// Hier sind die AccelKey-Resourceoptionen definiert // "AccelKey" resource options:
#define ACCELITEM_ACCEL 0x01 #define ACCELITEM_ACCEL 0x01
#define ACCELITEM_KEY 0x02 #define ACCELITEM_KEY 0x02
// Definition der Struktur die alle "Field"-Resourcen haben // For "Field" resources:
#define PATTERNFORMATTER_STRICTFORMAT 0x01 #define PATTERNFORMATTER_STRICTFORMAT 0x01
#define PATTERNFORMATTER_EDITMASK 0x02 #define PATTERNFORMATTER_EDITMASK 0x02
#define PATTERNFORMATTER_LITTERALMASK 0x04 #define PATTERNFORMATTER_LITTERALMASK 0x04
@@ -130,7 +130,7 @@ typedef short RSWND_STYLE;
#define TIMEFIELD_FIRST 0x01 #define TIMEFIELD_FIRST 0x01
#define TIMEFIELD_LAST 0x02 #define TIMEFIELD_LAST 0x02
// Definition der Struktur die alle "ToolBoxItem"-Resourcen haben // For "ToolBoxItem" resources:
#define RSC_TOOLBOXITEM_ID 0x0001 #define RSC_TOOLBOXITEM_ID 0x0001
#define RSC_TOOLBOXITEM_TYPE 0x0002 #define RSC_TOOLBOXITEM_TYPE 0x0002
#define RSC_TOOLBOXITEM_STATUS 0x0004 #define RSC_TOOLBOXITEM_STATUS 0x0004
@@ -145,7 +145,7 @@ typedef short RSWND_STYLE;
#define RSC_TOOLBOXITEM_COMMAND 0x0800 #define RSC_TOOLBOXITEM_COMMAND 0x0800
#define RSC_TOOLBOXITEM_MENUSTRINGS 0x1000 #define RSC_TOOLBOXITEM_MENUSTRINGS 0x1000
// Definition der Struktur die alle ToolBox-Resourcen haben // For "ToolBox" resources:
#define RSC_TOOLBOX_BUTTONTYPE 0x01 #define RSC_TOOLBOX_BUTTONTYPE 0x01
#define RSC_TOOLBOX_ALIGN 0x02 #define RSC_TOOLBOX_ALIGN 0x02
#define RSC_TOOLBOX_LINECOUNT 0x04 #define RSC_TOOLBOX_LINECOUNT 0x04
@@ -155,45 +155,45 @@ typedef short RSWND_STYLE;
#define RSC_TOOLBOX_ITEMIMAGELIST 0x40 #define RSC_TOOLBOX_ITEMIMAGELIST 0x40
#define RSC_TOOLBOX_ITEMLIST 0x80 #define RSC_TOOLBOX_ITEMLIST 0x80
// Definition der Struktur die alle MoreButton-Resourcen haben // For "MoreButton" resources:
#define RSC_MOREBUTTON_STATE 0x01 #define RSC_MOREBUTTON_STATE 0x01
#define RSC_MOREBUTTON_MAPUNIT 0x02 #define RSC_MOREBUTTON_MAPUNIT 0x02
#define RSC_MOREBUTTON_DELTA 0x04 #define RSC_MOREBUTTON_DELTA 0x04
// Definition der Struktur die alle FloatingWindow-Resourcen haben // For "FloatingWindow" resources:
#define RSC_FLOATINGWINDOW_WHMAPMODE 0x01 #define RSC_FLOATINGWINDOW_WHMAPMODE 0x01
#define RSC_FLOATINGWINDOW_WIDTH 0x02 #define RSC_FLOATINGWINDOW_WIDTH 0x02
#define RSC_FLOATINGWINDOW_HEIGHT 0x04 #define RSC_FLOATINGWINDOW_HEIGHT 0x04
#define RSC_FLOATINGWINDOW_ZOOMIN 0x08 #define RSC_FLOATINGWINDOW_ZOOMIN 0x08
// Definition der Struktur die alle DockingWindow-Resourcen haben // For "DockingWindow" resources:
#define RSC_DOCKINGWINDOW_XYMAPMODE 0x01 #define RSC_DOCKINGWINDOW_XYMAPMODE 0x01
#define RSC_DOCKINGWINDOW_X 0x02 #define RSC_DOCKINGWINDOW_X 0x02
#define RSC_DOCKINGWINDOW_Y 0x04 #define RSC_DOCKINGWINDOW_Y 0x04
#define RSC_DOCKINGWINDOW_FLOATING 0x08 #define RSC_DOCKINGWINDOW_FLOATING 0x08
// Definition der Struktur die alle "TabControlItem"-Resourcen haben // For "TabControlItem" resources:
#define RSC_TABCONTROLITEM_ID 0x0001 #define RSC_TABCONTROLITEM_ID 0x0001
#define RSC_TABCONTROLITEM_TEXT 0x0002 #define RSC_TABCONTROLITEM_TEXT 0x0002
#define RSC_TABCONTROLITEM_PAGERESID 0x0008 #define RSC_TABCONTROLITEM_PAGERESID 0x0008
// Definition der Struktur die alle TabControl-Resourcen haben // For "TabControl" resources:
#define RSC_TABCONTROL_ITEMLIST 0x01 #define RSC_TABCONTROL_ITEMLIST 0x01
// Definition der Struktur des ImageButtons // For "ImageButtons":
#define RSC_IMAGEBUTTON_IMAGE 0x01 #define RSC_IMAGEBUTTON_IMAGE 0x01
#define RSC_IMAGEBUTTON_SYMBOL 0x02 #define RSC_IMAGEBUTTON_SYMBOL 0x02
#define RSC_IMAGEBUTTON_STATE 0x04 #define RSC_IMAGEBUTTON_STATE 0x04
// Definition der Struktur des ImageRadioButtons // For "ImageRadioButtons":
#define RSC_IMAGERADIOBUTTON_IMAGE 0x01 #define RSC_IMAGERADIOBUTTON_IMAGE 0x01
// Definition der Struktur des Image // For "Image":
#define RSC_IMAGE_IMAGEBITMAP 0x01 #define RSC_IMAGE_IMAGEBITMAP 0x01
#define RSC_IMAGE_MASKBITMAP 0x02 #define RSC_IMAGE_MASKBITMAP 0x02
#define RSC_IMAGE_MASKCOLOR 0x04 #define RSC_IMAGE_MASKCOLOR 0x04
// Definition der Struktur des Image // For "ImageList":
#define RSC_IMAGELIST_IMAGEBITMAP 0x01 #define RSC_IMAGELIST_IMAGEBITMAP 0x01
#define RSC_IMAGELIST_MASKBITMAP 0x02 #define RSC_IMAGELIST_MASKBITMAP 0x02
#define RSC_IMAGELIST_MASKCOLOR 0x04 #define RSC_IMAGELIST_MASKCOLOR 0x04

View File

@@ -79,7 +79,6 @@ class TOOLS_DLLPUBLIC Resource
rtl::OString ReadByteStringRes() rtl::OString ReadByteStringRes()
{ return m_pResMgr->ReadByteString(); } { return m_pResMgr->ReadByteString(); }
// Gibt die Resource frei (this-Zeiger fuer Fehlerueberpruefung)
// free the resource from m_pResMgr's stack (pass this ptr for validation) // free the resource from m_pResMgr's stack (pass this ptr for validation)
void FreeResource() void FreeResource()
{ m_pResMgr->PopContext( this ); } { m_pResMgr->PopContext( this ); }

View File

@@ -22,25 +22,24 @@
#include <tools/resid.hxx> #include <tools/resid.hxx>
// Definition der Versionsnummer // Definition of the version number
#define RSCVERSION_ID 200U #define RSCVERSION_ID 200U
// Definition eines ungueltige Identifiers. // Definition of an invalid identifier
#define RC_NO_ID (sal_uInt32(0xFFFFFFFF)) #define RC_NO_ID (sal_uInt32(0xFFFFFFFF))
// Dies sind die Resourcetypen // Resource types
// Mindestens 0x100 wegen MS-Windows Resourcetypen // Minimum is 0x100 due to MS-Windows resource types
//#define RSC_NOTYPE 0x100 // (RSC_NOTYPE=0x100) is defined in resid.hxx
//RSC_NOTYPE wird in resid.hxx definiert
#define RSC_BYNAME (RSC_NOTYPE + 0x01) #define RSC_BYNAME (RSC_NOTYPE + 0x01)
#define RSC_VERSIONCONTROL (RSC_NOTYPE + 0x02) // Versionskontrolle #define RSC_VERSIONCONTROL (RSC_NOTYPE + 0x02) // Version control
#define RSC_RESOURCE (RSC_NOTYPE + 0x10) #define RSC_RESOURCE (RSC_NOTYPE + 0x10)
#define RSC_STRING (RSC_NOTYPE + 0x11) #define RSC_STRING (RSC_NOTYPE + 0x11)
#define RSC_BITMAP (RSC_NOTYPE + 0x13) #define RSC_BITMAP (RSC_NOTYPE + 0x13)
#define RSC_ACCEL (RSC_NOTYPE + 0x1a) #define RSC_ACCEL (RSC_NOTYPE + 0x1a)
#define RSC_ACCELITEM (RSC_NOTYPE + 0x1b)// nur intern #define RSC_ACCELITEM (RSC_NOTYPE + 0x1b) // only used internally
#define RSC_MENU (RSC_NOTYPE + 0x1c) #define RSC_MENU (RSC_NOTYPE + 0x1c)
#define RSC_MENUITEM (RSC_NOTYPE + 0x1d)// nur intern #define RSC_MENUITEM (RSC_NOTYPE + 0x1d) // only used internally
#define RSC_KEYCODE (RSC_NOTYPE + 0x1f) #define RSC_KEYCODE (RSC_NOTYPE + 0x1f)
#define RSC_TIME (RSC_NOTYPE + 0x20) #define RSC_TIME (RSC_NOTYPE + 0x20)
#define RSC_DATE (RSC_NOTYPE + 0x21) #define RSC_DATE (RSC_NOTYPE + 0x21)
@@ -115,13 +114,12 @@
#define RSC_TREELISTBOX (RSC_NOTYPE + 0x78) #define RSC_TREELISTBOX (RSC_NOTYPE + 0x78)
#define RSC_STRINGARRAY (RSC_NOTYPE + 0x79) #define RSC_STRINGARRAY (RSC_NOTYPE + 0x79)
// (RSC_NOTYPE + 0x200) - (RSC_NOTYPE + 0x300) fuer Sfx reserviert // (RSC_NOTYPE + 0x200) - (RSC_NOTYPE + 0x300) reserved for Sfx
#define RT_SYS_BITMAP (RSC_NOTYPE + 0xf2) #define RT_SYS_BITMAP (RSC_NOTYPE + 0xf2)
#define RT_SYS_STRING (RSC_NOTYPE + 0xf3) // Sonderbehandlung #define RT_SYS_STRING (RSC_NOTYPE + 0xf3) // special case
#define RT_SYS_FILE (RSC_NOTYPE + 0xf4) // nicht implementiert #define RT_SYS_FILE (RSC_NOTYPE + 0xf4) // not implemented
// (RSC_NOTYPE + 0x200) - (RSC_NOTYPE + 0x300) fuer Sfx reserviert
#endif // _RCID_H #endif // _RCID_H

View File

@@ -220,7 +220,7 @@ class SvCompatWeakBase
public: public:
SvCompatWeakHdl* GetHdl() { return _xHdl; } SvCompatWeakHdl* GetHdl() { return _xHdl; }
// Wg CompilerWarnung nicht ueber Initializer // does not use Initalizer due to compiler warnings
SvCompatWeakBase( void* pObj ) { _xHdl = new SvCompatWeakHdl( pObj ); } SvCompatWeakBase( void* pObj ) { _xHdl = new SvCompatWeakHdl( pObj ); }
~SvCompatWeakBase() { _xHdl->ResetWeakBase(); } ~SvCompatWeakBase() { _xHdl->ResetWeakBase(); }
}; };

View File

@@ -34,20 +34,20 @@ class InternalResMgr;
// - RSHEADER_TYPE - // - RSHEADER_TYPE -
// ----------------- // -----------------
// Definition der Struktur, aus denen die Resource aufgebaut ist // Defines structure used to build resource
struct RSHEADER_TYPE struct RSHEADER_TYPE
{ {
private: private:
sal_uInt32 nId; // Identifier der Resource sal_uInt32 nId; // Identifier of resource
RESOURCE_TYPE nRT; // Resource Typ RESOURCE_TYPE nRT; // Resource type
sal_uInt32 nGlobOff; // Globaler Offset sal_uInt32 nGlobOff; // Global offset
sal_uInt32 nLocalOff; // Lokaler Offset sal_uInt32 nLocalOff; // Local offset
public: public:
inline sal_uInt32 GetId(); // Identifier der Resource inline sal_uInt32 GetId(); // Identifier of resource
inline RESOURCE_TYPE GetRT(); // Resource Typ inline RESOURCE_TYPE GetRT(); // Resource type
inline sal_uInt32 GetGlobOff(); // Globaler Offset inline sal_uInt32 GetGlobOff(); // Global offset
inline sal_uInt32 GetLocalOff(); // Lokaler Offset inline sal_uInt32 GetLocalOff(); // Local offset
}; };
// ---------- // ----------
@@ -60,9 +60,9 @@ typedef rtl::OUString (*ResHookProc)( const rtl::OUString& rStr );
// - ResMgr - // - ResMgr -
// ---------- // ----------
// Initialisierung // Initialization
#define RC_NOTYPE 0x00 #define RC_NOTYPE 0x00
// Globale Resource // Global resource
#define RC_GLOBAL 0x01 #define RC_GLOBAL 0x01
#define RC_AUTORELEASE 0x02 #define RC_AUTORELEASE 0x02
#define RC_NOTFOUND 0x04 #define RC_NOTFOUND 0x04
@@ -134,11 +134,11 @@ private:
ResMgr(const ResMgr&); ResMgr(const ResMgr&);
ResMgr& operator=(const ResMgr&); ResMgr& operator=(const ResMgr&);
public: public:
static void DestroyAllResMgr(); // Wird gerufen, wenn App beendet wird static void DestroyAllResMgr(); // Called upon app shutdown
~ResMgr(); ~ResMgr();
// Sprachabhaengige Resource Library // Language-dependent resource library
static const sal_Char* GetLang( LanguageType& eLanguage, sal_uInt16 nPrio = 0 ); //depricated! see "tools/source/rc/resmgr.cxx" static const sal_Char* GetLang( LanguageType& eLanguage, sal_uInt16 nPrio = 0 ); //depricated! see "tools/source/rc/resmgr.cxx"
static ResMgr* SearchCreateResMgr( const sal_Char* pPrefixName, static ResMgr* SearchCreateResMgr( const sal_Char* pPrefixName,
com::sun::star::lang::Locale& rLocale ); com::sun::star::lang::Locale& rLocale );
@@ -147,23 +147,23 @@ public:
rtl::OUString(), rtl::OUString(),
rtl::OUString())); rtl::OUString()));
// Testet ob Resource noch da ist // Test whether resource still exists
void TestStack( const Resource * ); void TestStack( const Resource * );
// ist Resource verfuegbar // Returns whether resource is available
sal_Bool IsAvailable( const ResId& rId, sal_Bool IsAvailable( const ResId& rId,
const Resource* = NULL) const; const Resource* = NULL) const;
// Resource suchen und laden // Search and load resource, given its ID
sal_Bool GetResource( const ResId& rId, const Resource * = NULL ); sal_Bool GetResource( const ResId& rId, const Resource * = NULL );
static void * GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr ); static void * GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr );
// Kontext freigeben // Free resource context
void PopContext( const Resource* = NULL ); void PopContext( const Resource* = NULL );
// Resourcezeiger erhoehen // Increment resource pointer
void* Increment( sal_uInt32 nSize ); void* Increment( sal_uInt32 nSize );
// Groesse ein Objektes in der Resource // Size of an object within the resource
static sal_uInt32 GetObjSize( RSHEADER_TYPE* pHT ) static sal_uInt32 GetObjSize( RSHEADER_TYPE* pHT )
{ return( pHT->GetGlobOff() ); } { return( pHT->GetGlobOff() ); }
@@ -172,24 +172,23 @@ public:
// returns a byte string and its length out of the resource // returns a byte string and its length out of the resource
static sal_uInt32 GetByteString( rtl::OString& rStr, const sal_uInt8* pStr ); static sal_uInt32 GetByteString( rtl::OString& rStr, const sal_uInt8* pStr );
// Groesse eines Strings in der Resource // returns the size of a string in the resource
static sal_uInt32 GetStringSize( sal_uInt32 nLen ) static sal_uInt32 GetStringSize( sal_uInt32 nLen )
{ nLen++; return (nLen + nLen%2); } { nLen++; return (nLen + nLen%2); }
static sal_uInt32 GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen ); static sal_uInt32 GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen );
// return a int64 // return a int64
static sal_uInt64 GetUInt64( void* pDatum ); static sal_uInt64 GetUInt64( void* pDatum );
// Gibt einen long zurueck // return a long
static sal_Int32 GetLong( void * pLong ); static sal_Int32 GetLong( void * pLong );
// return a short // return a short
static sal_Int16 GetShort( void * pShort ); static sal_Int16 GetShort( void * pShort );
// Gibt einen Zeiger auf die Resource zurueck // return a pointer to the resource
void * GetClass(); void * GetClass();
RSHEADER_TYPE * CreateBlock( const ResId & rId ); RSHEADER_TYPE * CreateBlock( const ResId & rId );
// Gibt die verbleibende Groesse zurueck
sal_uInt32 GetRemainSize(); sal_uInt32 GetRemainSize();
const rtl::OUString&GetFileName() const; const rtl::OUString&GetFileName() const;

View File

@@ -105,25 +105,24 @@ typedef void* (*TypeId)();
//------------------------------------------------------------------------- //-------------------------------------------------------------------------
// Die (exemplarischen) Makros fuer die Anwendung ( hier fuer // Exemplary application macros for pointers
// Pointer, kann aber nach dem gleichen Strickmuster fuer // (can be extended for use with references)
// Referenzen erweitert werden.
// PTR_CAST: sicheres Casten eines Pointers auf einen Pointer
// einer abgeleiteten Klasse. Liefert im Fehlerfall einen
// Nullpointer (wahrscheinlich die haeufigste Anwendung)
// //
// T: Typ, auf den gecastet werden soll // PTR_CAST: Safe pointer casting to a derived class.
// p: Pointer, der gecastet werden soll // Returns NULL pointer on cast error.
//
// T: Target type to cast into
// p: Pointer to be cast into T
#define PTR_CAST( T, pObj ) \ #define PTR_CAST( T, pObj ) \
( pObj && (pObj)->IsA( TYPE(T) ) ? (T*)(pObj) : 0 ) ( pObj && (pObj)->IsA( TYPE(T) ) ? (T*)(pObj) : 0 )
// Abfrage, ob ein Objekt eine bestimmte Klasse als // Check whether object pObj has a Base Class T
// Basisklasse hat (oder genau von dieser Klasse ist) // (or if pObj is an instance of T)
#define HAS_BASE( T, pObj ) \ #define HAS_BASE( T, pObj ) \
( pObj && (pObj)->IsA( TYPE(T) ) ) ( pObj && (pObj)->IsA( TYPE(T) ) )
// Abfrage, ob ein Pointer auf ein Objekt eines bestimmten // Check whether a pointer is targetting
// Typs zeigt // an object of type T.
#define IS_TYPE(T,pObj) \ #define IS_TYPE(T,pObj) \
( pObj && (pObj)->Type() == TYPE(T) ) ( pObj && (pObj)->Type() == TYPE(T) )

View File

@@ -57,7 +57,7 @@ public:
static SimpleResMgr* Create( const sal_Char* pPrefixName, static SimpleResMgr* Create( const sal_Char* pPrefixName,
::com::sun::star::lang::Locale aLocale = ::com::sun::star::lang::Locale( rtl::OUString(), ::com::sun::star::lang::Locale aLocale = ::com::sun::star::lang::Locale( rtl::OUString(),
rtl::OUString(), rtl::OUString(),
rtl::OUString()));// nur in VCL rtl::OUString()));// only in VCL
bool IsValid() const { return m_pResImpl != NULL; } bool IsValid() const { return m_pResImpl != NULL; }

View File

@@ -230,25 +230,24 @@ class TOOLS_DLLPUBLIC SvStream
private: private:
// LockBytes Interface // LockBytes Interface
void* pImp; // unused void* pImp; // unused
SvLockBytesRef xLockBytes; // Default Implmentierung SvLockBytesRef xLockBytes; // Default implementation
sal_Size nActPos; // sal_Size nActPos; //
// Puffer-Verwaltung // Puffer-Verwaltung
sal_uInt8* pRWBuf; // Zeigt auf Read/Write-Puffer sal_uInt8* pRWBuf; // Points to read/write buffer
sal_uInt8* pBufPos; // pRWBuf + nBufActualPos sal_uInt8* pBufPos; // pRWBuf + nBufActualPos
sal_uInt16 nBufSize; // Allozierte Groesse des Puffers sal_uInt16 nBufSize; // Allocated size of buffer
sal_uInt16 nBufActualLen; // Laenge des beschriebenen Teils des Puffers sal_uInt16 nBufActualLen; // Length of used segment of puffer
// Entspricht nBufSize, wenn EOF nicht // = nBufSize, if EOF did not occur
// ueberschritten wurde sal_uInt16 nBufActualPos; // current position in buffer (0..nBufSize-1)
sal_uInt16 nBufActualPos; // aktuelle Position im Puffer (0..nBufSize-1) sal_uInt16 nBufFree; // number of free slots in buffer to IO of type eIOMode
sal_uInt16 nBufFree; // freier Platz im Puffer fuer IO vom Typ eIOMode
unsigned int eIOMode:2; // STREAM_IO_* unsigned int eIOMode:2; // STREAM_IO_*
// Error-Codes, Konvertierung, Komprimierung, ... // Error codes, conversion, compression, ...
int bIsDirty:1; // sal_True: Stream != Pufferinhalt int bIsDirty:1; // sal_True: Stream != buffer content
int bIsConsistent:1;// sal_False: Buffer enthaelt Daten, die NICHT int bIsConsistent:1;// sal_False: Buffer contains data, which were
// per PutData in den abgeleiteten Stream // NOT allowed to be written by PutData
// geschrieben werden duerfen (siehe PutBack) // into the derived stream (cf. PutBack)
int bSwap:1; int bSwap:1;
int bIsEof:1; int bIsEof:1;
sal_uInt32 nError; sal_uInt32 nError;
@@ -257,21 +256,21 @@ private:
LineEnd eLineDelimiter; LineEnd eLineDelimiter;
CharSet eStreamCharSet; CharSet eStreamCharSet;
// Verschluesselung // Encryption
rtl::OString m_aCryptMaskKey; // aCryptMaskKey.getLength != 0 -> Verschluesselung rtl::OString m_aCryptMaskKey; // aCryptMaskKey.getLength != 0 -> Encryption used
unsigned char nCryptMask; unsigned char nCryptMask;
// Userdata // Userdata
long nVersion; // for external use long nVersion; // for external use
// Hilfsmethoden // helper methods
TOOLS_DLLPRIVATE void ImpInit(); TOOLS_DLLPRIVATE void ImpInit();
SvStream ( const SvStream& rStream ); // not implemented SvStream ( const SvStream& rStream ); // not implemented
SvStream& operator=( const SvStream& rStream ); // not implemented SvStream& operator=( const SvStream& rStream ); // not implemented
protected: protected:
sal_Size nBufFilePos; // Fileposition von pBuf[0] sal_Size nBufFilePos; // File position of pBuf[0]
sal_uInt16 eStreamMode; sal_uInt16 eStreamMode;
sal_Bool bIsWritable; sal_Bool bIsWritable;
@@ -284,7 +283,7 @@ protected:
void ClearError(); void ClearError();
void ClearBuffer(); void ClearBuffer();
// verschluesselt & schreibt blockweise // encrypt and write in blocks
sal_Size CryptAndWriteBuffer( const void* pStart, sal_Size nLen ); sal_Size CryptAndWriteBuffer( const void* pStart, sal_Size nLen );
sal_Bool EncryptBuffer( void* pStart, sal_Size nLen ); sal_Bool EncryptBuffer( void* pStart, sal_Size nLen );
@@ -487,7 +486,7 @@ public:
long GetVersion() { return nVersion; } long GetVersion() { return nVersion; }
void SetVersion( long n ) { nVersion = n; } void SetVersion( long n ) { nVersion = n; }
friend SvStream& operator<<( SvStream& rStr, SvStrPtr f ); // fuer Manips friend SvStream& operator<<( SvStream& rStr, SvStrPtr f ); // for Manips
//end of input seen during previous i/o operation //end of input seen during previous i/o operation
bool eof() const { return bIsEof; } bool eof() const { return bIsEof; }
@@ -694,7 +693,7 @@ protected:
virtual void FlushData(); virtual void FlushData();
public: public:
// Schaltet bei fehlgeschlagenem Schreiboeffnen auf Lesen zurueck // Switches to Read StreamMode on failed attempt of Write opening
SvFileStream( const String& rFileName, StreamMode eOpenMode ); SvFileStream( const String& rFileName, StreamMode eOpenMode );
SvFileStream(); SvFileStream();
~SvFileStream(); ~SvFileStream();
@@ -737,25 +736,24 @@ protected:
virtual void SetSize( sal_Size nSize ); virtual void SetSize( sal_Size nSize );
virtual void FlushData(); virtual void FlushData();
// AllocateMemory muss folgende Variable mitpflegen: // AllocateMemory must update pBuf accordingly
// - pBuf: Adresse des neuen Blocks // - pBuf: Address of new block
virtual sal_Bool AllocateMemory( sal_Size nSize ); virtual sal_Bool AllocateMemory( sal_Size nSize );
// ReAllocateMemory muss folgende Variablen mitpflegen: // ReAllocateMemory must update the following variables:
// - pBuf: Adresse des neuen Blocks // - pBuf: Address of new block
// - nEndOfData: Muss auf nNewSize-1L gesetzt werden, wenn ausserhalb des Blocks // - nEndOfData: Set to nNewSize-1L if outside of block
// Muss auf 0 gesetzt werden, wenn neuer Block 0 Byte gross // Set to 0 if new block size is 0 bytes
// - nSize: Neue Groesse des Blocks // - nSize: New block size
// - nPos: Muss auf 0 gesetzt werden, wenn ausserhalb des Blocks // - nPos: Set to 0 if position outside of block
virtual sal_Bool ReAllocateMemory( long nDiff ); virtual sal_Bool ReAllocateMemory( long nDiff );
// wird aufgerufen, wenn dem Stream der Speicher gehoert oder wenn // is called when this stream allocated the buffer
// der Speicher in der Groesse veraendert wird. // or the buffer is resized.
// FreeMemory muss folgende Variablen mitpflegen: // FreeMemory may need to NULL handles in derived classes
// - in abgeleiteten Klassen muessen ggf. Handles genullt werden
virtual void FreeMemory(); virtual void FreeMemory();
SvMemoryStream(void*) { } // Fuer unsere Subklassen SvMemoryStream(void*) { } // for sub-classes
public: public:
SvMemoryStream( void* pBuf, sal_Size nSize, StreamMode eMode); SvMemoryStream( void* pBuf, sal_Size nSize, StreamMode eMode);
@@ -784,14 +782,13 @@ public:
// - SvDataCopyStream - // - SvDataCopyStream -
// -------------------- // --------------------
// AB 10.5.1996: Diese Klasse bildet die Basis fuer Klassen, die mittels // This class is the foundation for all classes that use SvData for
// SvData (SO2\DTRANS.HXX/CXX) transportiert werden sollen, z.B. Graphik // transportation (e.g., graphics).
// Die abgeleiteten Klassen muessen die virtuellen Funktionen ueberladen.
class TOOLS_DLLPUBLIC SvDataCopyStream class TOOLS_DLLPUBLIC SvDataCopyStream
{ {
public: public:
// mehrfaches Aufrufen von Load und Assign erlaubt // repeated execution of Load or Assign is allowed
TYPEINFO(); TYPEINFO();
virtual ~SvDataCopyStream(){} virtual ~SvDataCopyStream(){}
virtual void Load( SvStream & ) = 0; virtual void Load( SvStream & ) = 0;

View File

@@ -90,11 +90,11 @@ enum StringCompare { COMPARE_LESS = -1, COMPARE_EQUAL = 0, COMPARE_GREATER = 1 }
// ----------------------------------------------------------------------- // -----------------------------------------------------------------------
// ------------------------ // ------------------------
// - Interne String-Daten - // Internal String data
// ------------------------ // ------------------------
// Daten vom String, mit denen der String verwaltet wird // Data used for the management of this String
// Nur fuer Debug-Zwecke (darf nie direkt einem String zugewiesen werden) // use only for debugging purposes (never assign to String directly!)
#ifdef SAL_W32 #ifdef SAL_W32
#pragma pack(push, 4) #pragma pack(push, 4)
@@ -102,7 +102,7 @@ enum StringCompare { COMPARE_LESS = -1, COMPARE_EQUAL = 0, COMPARE_GREATER = 1 }
typedef struct _UniStringData typedef struct _UniStringData
{ {
sal_Int32 mnRefCount; // Referenz counter sal_Int32 mnRefCount; // reference counter
sal_Int32 mnLen; // Length of the String sal_Int32 mnLen; // Length of the String
sal_Unicode maStr[1]; // CharArray (String) sal_Unicode maStr[1]; // CharArray (String)
} UniStringData; } UniStringData;

View File

@@ -119,7 +119,7 @@ typedef sal_uInt16 WindowType;
typedef sal_Int64 WinBits; typedef sal_Int64 WinBits;
// Window-Bits fuer Window // Window-Bits for Window
#define WB_CLIPCHILDREN ((WinBits)0x00000001) #define WB_CLIPCHILDREN ((WinBits)0x00000001)
#define WB_DIALOGCONTROL ((WinBits)0x00000002) #define WB_DIALOGCONTROL ((WinBits)0x00000002)
#define WB_NODIALOGCONTROL ((WinBits)0x00000004) #define WB_NODIALOGCONTROL ((WinBits)0x00000004)
@@ -129,7 +129,7 @@ typedef sal_Int64 WinBits;
#define WB_3DLOOK ((WinBits)0x00000040) #define WB_3DLOOK ((WinBits)0x00000040)
#define WB_AUTOSIZE ((WinBits)0x00000080) #define WB_AUTOSIZE ((WinBits)0x00000080)
// Window-Bits fuer SystemWindows // Window-Bits for SystemWindows
#define WB_MOVEABLE ((WinBits)0x00000100) #define WB_MOVEABLE ((WinBits)0x00000100)
#define WB_ROLLABLE ((WinBits)0x00000200) #define WB_ROLLABLE ((WinBits)0x00000200)
#define WB_CLOSEABLE ((WinBits)0x00000400) #define WB_CLOSEABLE ((WinBits)0x00000400)
@@ -149,7 +149,7 @@ typedef sal_Int64 WinBits;
#define WB_SYSTEMCHILDWINDOW ((WinBits)SAL_CONST_INT64(0x8000000000)) #define WB_SYSTEMCHILDWINDOW ((WinBits)SAL_CONST_INT64(0x8000000000))
#define WB_SIZEMOVE (WB_SIZEABLE | WB_MOVEABLE) #define WB_SIZEMOVE (WB_SIZEABLE | WB_MOVEABLE)
// Standard-Window-Bits fuer ChildWindows // Standard-Window-Bits for ChildWindows
#define WB_TABSTOP ((WinBits)0x00000100) #define WB_TABSTOP ((WinBits)0x00000100)
#define WB_NOTABSTOP ((WinBits)0x00000200) #define WB_NOTABSTOP ((WinBits)0x00000200)
#define WB_GROUP ((WinBits)0x00000400) #define WB_GROUP ((WinBits)0x00000400)

View File

@@ -134,7 +134,7 @@ Date::Date( DateInitSystem )
SYSTEMTIME aDateTime; SYSTEMTIME aDateTime;
GetLocalTime( &aDateTime ); GetLocalTime( &aDateTime );
// Datum zusammenbauen // Combine to date
nDate = ((sal_uIntPtr)aDateTime.wDay) + nDate = ((sal_uIntPtr)aDateTime.wDay) +
(((sal_uIntPtr)aDateTime.wMonth)*100) + (((sal_uIntPtr)aDateTime.wMonth)*100) +
(((sal_uIntPtr)aDateTime.wYear)*10000); (((sal_uIntPtr)aDateTime.wYear)*10000);
@@ -142,10 +142,10 @@ Date::Date( DateInitSystem )
time_t nTmpTime; time_t nTmpTime;
struct tm aTime; struct tm aTime;
// Zeit ermitteln // get current time
nTmpTime = time( 0 ); nTmpTime = time( 0 );
// Datum zusammenbauen // compute date
if ( localtime_r( &nTmpTime, &aTime ) ) if ( localtime_r( &nTmpTime, &aTime ) )
{ {
nDate = ((sal_uIntPtr)aTime.tm_mday) + nDate = ((sal_uIntPtr)aTime.tm_mday) +
@@ -217,9 +217,9 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
short n1WDay = (short)Date( 1, 1, GetYear() ).GetDayOfWeek(); short n1WDay = (short)Date( 1, 1, GetYear() ).GetDayOfWeek();
short nDayOfYear = (short)GetDayOfYear(); short nDayOfYear = (short)GetDayOfYear();
// Wochentage beginnen bei 0, deshalb einen abziehen // weekdays start at 0, thus decrement one
nDayOfYear--; nDayOfYear--;
// StartDay beruecksichtigen // account for StartDay
n1WDay = (n1WDay+(7-(short)eStartDay)) % 7; n1WDay = (n1WDay+(7-(short)eStartDay)) % 7;
if (nMinimumNumberOfDaysInWeek < 1 || 7 < nMinimumNumberOfDaysInWeek) if (nMinimumNumberOfDaysInWeek < 1 || 7 < nMinimumNumberOfDaysInWeek)
@@ -231,8 +231,8 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
if ( nMinimumNumberOfDaysInWeek == 1 ) if ( nMinimumNumberOfDaysInWeek == 1 )
{ {
nWeek = ((n1WDay+nDayOfYear)/7) + 1; nWeek = ((n1WDay+nDayOfYear)/7) + 1;
// 53te-Woche nur dann, wenn wir nicht schon in der ersten // Set to 53rd week only if we're not in the
// Woche des neuen Jahres liegen // first week of the new year
if ( nWeek == 54 ) if ( nWeek == 54 )
nWeek = 1; nWeek = 1;
else if ( nWeek == 53 ) else if ( nWeek == 53 )
@@ -247,8 +247,7 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
else if ( nMinimumNumberOfDaysInWeek == 7 ) else if ( nMinimumNumberOfDaysInWeek == 7 )
{ {
nWeek = ((n1WDay+nDayOfYear)/7); nWeek = ((n1WDay+nDayOfYear)/7);
// Erste Woche eines Jahres entspricht der letzen Woche des // First week of a year is equal to the last week of the previous year
// vorherigen Jahres
if ( nWeek == 0 ) if ( nWeek == 0 )
{ {
Date aLastDatePrevYear( 31, 12, GetYear()-1 ); Date aLastDatePrevYear( 31, 12, GetYear()-1 );
@@ -284,8 +283,8 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
nWeek = (nDayOfYear + n1WDay) / 7; nWeek = (nDayOfYear + n1WDay) / 7;
if ( nWeek == 53 ) if ( nWeek == 53 )
{ {
// naechster x_Sonntag == erster x_Sonntag im neuen Jahr // next x_Sonntag == first x_Sonntag in the new year
// == noch gleiche Woche // == still the same week!
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() ); long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
nTempDays += 6 - (GetDayOfWeek()+(7-(short)eStartDay)) % 7; nTempDays += 6 - (GetDayOfWeek()+(7-(short)eStartDay)) % 7;
sal_uInt16 nDay; sal_uInt16 nDay;

View File

@@ -78,7 +78,7 @@ public:
sal_uIntPtr Count() const { return nCount; } sal_uIntPtr Count() const { return nCount; }
}; };
// --- Datentypen --- // data types
#define DBG_MAXNAME 28 #define DBG_MAXNAME 28
@@ -157,7 +157,7 @@ struct DebugData
DBG_TEST_XTOR_EXIT | DBG_TEST_XTOR_REPORT ) DBG_TEST_XTOR_EXIT | DBG_TEST_XTOR_REPORT )
// ------------------------------ // ------------------------------
// - statische Verwaltungsdaten - // - static maintenance variables -
// ------------------------------ // ------------------------------
static DebugData aDebugData; static DebugData aDebugData;
@@ -637,7 +637,7 @@ static DebugData* GetDebugData()
{ {
aDebugData.bInit = sal_True; aDebugData.bInit = sal_True;
// Default Debug-Namen setzen // set default debug names
DbgGetLogFileName( aDebugData.aDbgData.aDebugName ); DbgGetLogFileName( aDebugData.aDbgData.aDebugName );
// DEBUG.INI-File // DEBUG.INI-File
@@ -718,7 +718,7 @@ static DebugData* GetDebugData()
OSL_TRACE( "getcwd failed with error %s", strerror(errno) ); OSL_TRACE( "getcwd failed with error %s", strerror(errno) );
} }
// Daten initialisieren // initialize debug data
if ( aDebugData.aDbgData.nTestFlags & DBG_TEST_XTOR ) if ( aDebugData.aDbgData.nTestFlags & DBG_TEST_XTOR )
aDebugData.pXtorList = new PointerList; aDebugData.pXtorList = new PointerList;
if ( aDebugData.aDbgData.nTestFlags & DBG_TEST_PROFILING ) if ( aDebugData.aDbgData.nTestFlags & DBG_TEST_PROFILING )
@@ -780,7 +780,7 @@ static FILETYPE ImplDbgInitFile()
pTime = localtime( &nTime ); pTime = localtime( &nTime );
#endif #endif
// Header ausgeben // print header
FilePrintF( pDebugFile, "******************************************************************************%s", FILE_LINEEND ); FilePrintF( pDebugFile, "******************************************************************************%s", FILE_LINEEND );
FilePrintF( pDebugFile, "%s%s", pData->aDbgData.aDebugName, FILE_LINEEND ); FilePrintF( pDebugFile, "%s%s", pData->aDbgData.aDebugName, FILE_LINEEND );
if ( pTime ) if ( pTime )
@@ -898,11 +898,11 @@ static void DebugDeInit()
pData->bOslIsHooked = sal_False; pData->bOslIsHooked = sal_False;
} }
// Statistik-Ausgaben immer in File // Output statistics trace data to file
nOldOut = pData->aDbgData.nTraceOut; nOldOut = pData->aDbgData.nTraceOut;
pData->aDbgData.nTraceOut = DBG_OUT_FILE; pData->aDbgData.nTraceOut = DBG_OUT_FILE;
// Xtor-Liste ausgeben // output Xtor list
if ( pData->pXtorList && pData->pXtorList->Count() && if ( pData->pXtorList && pData->pXtorList->Count() &&
(pData->aDbgData.nTestFlags & DBG_TEST_XTOR_REPORT) ) (pData->aDbgData.nTestFlags & DBG_TEST_XTOR_REPORT) )
{ {
@@ -917,7 +917,7 @@ static void DebugDeInit()
XtorType* pXtorData = (XtorType*)pData->pXtorList->Get( i ); XtorType* pXtorData = (XtorType*)pData->pXtorList->Get( i );
if ( pXtorData->bTest ) if ( pXtorData->bTest )
{ {
// Static-Objekte dazurechnen // Add static objects
pXtorData->nDtorCalls += pXtorData->nStatics; pXtorData->nDtorCalls += pXtorData->nStatics;
if ( pXtorData->nStatics && (pXtorData->nDtorCalls > pXtorData->nCtorCalls) ) if ( pXtorData->nStatics && (pXtorData->nDtorCalls > pXtorData->nCtorCalls) )
pXtorData->nDtorCalls = pXtorData->nCtorCalls; pXtorData->nDtorCalls = pXtorData->nCtorCalls;
@@ -931,7 +931,7 @@ static void DebugDeInit()
DbgOutf( "==============================================================================" ); DbgOutf( "==============================================================================" );
} }
// Aufraeumen // free XtorList
if ( pData->pXtorList ) if ( pData->pXtorList )
{ {
for( i = 0, nCount = pData->pXtorList->Count(); i < nCount; i++ ) for( i = 0, nCount = pData->pXtorList->Count(); i < nCount; i++ )
@@ -943,11 +943,11 @@ static void DebugDeInit()
pData->pXtorList = NULL; pData->pXtorList = NULL;
} }
// Alles auf sal_False setzen, damit globale Variablen nicht das // Set everything to sal_False, as global variables
// System zum Abstuerzen bringt. Dabei muessen aber die // may cause a system crash otherwise.
// Memory-Flags erhalten bleiben, da sonst new/delete in globalen // Maintain memory flags, as otherwise new/delete calls
// Variablen abstuerzen, da die Pointeranpassung dann nicht mehr richtig // for global variables will crash,
// funktioniert // as pointer alignment won't work then.
pData->aDbgData.nTraceOut = nOldOut; pData->aDbgData.nTraceOut = nOldOut;
pData->aDbgData.nTestFlags &= DBG_TEST_PROFILING; pData->aDbgData.nTestFlags &= DBG_TEST_PROFILING;
pData->aDbgPrintUserChannels.clear(); pData->aDbgPrintUserChannels.clear();
@@ -966,11 +966,11 @@ static void DebugGlobalDeInit()
sal_uIntPtr nCount; sal_uIntPtr nCount;
sal_uIntPtr nOldOut; sal_uIntPtr nOldOut;
// Statistik-Ausgaben immer in File // Output statistics trace data to file
nOldOut = pData->aDbgData.nTraceOut; nOldOut = pData->aDbgData.nTraceOut;
pData->aDbgData.nTraceOut = DBG_OUT_FILE; pData->aDbgData.nTraceOut = DBG_OUT_FILE;
// Profileliste ausgeben // output profile liste
if ( pData->pProfList && pData->pProfList->Count() ) if ( pData->pProfList && pData->pProfList->Count() )
{ {
DbgOutf( "------------------------------------------------------------------------------" ); DbgOutf( "------------------------------------------------------------------------------" );
@@ -991,7 +991,7 @@ static void DebugGlobalDeInit()
DbgOutf( "==============================================================================" ); DbgOutf( "==============================================================================" );
} }
// Aufraeumen // free profile list
if ( pData->pProfList ) if ( pData->pProfList )
{ {
for( i = 0, nCount = pData->pProfList->Count(); i < nCount; i++ ) for( i = 0, nCount = pData->pProfList->Count(); i < nCount; i++ )
@@ -1003,7 +1003,7 @@ static void DebugGlobalDeInit()
pData->pProfList = NULL; pData->pProfList = NULL;
} }
// Profiling-Flags ausschalten // disable profiling flags
pData->aDbgData.nTraceOut = nOldOut; pData->aDbgData.nTraceOut = nOldOut;
pData->aDbgData.nTestFlags &= ~DBG_TEST_PROFILING; pData->aDbgData.nTestFlags &= ~DBG_TEST_PROFILING;
} }
@@ -1031,7 +1031,7 @@ static void DebugXTorInfo( sal_Char* pBuf )
sal_uIntPtr i; sal_uIntPtr i;
sal_uIntPtr nCount; sal_uIntPtr nCount;
// Xtor-Liste ausgeben // output Xtor list
if ( pData->pXtorList && pData->pXtorList->Count() && if ( pData->pXtorList && pData->pXtorList->Count() &&
(pData->aDbgData.nTestFlags & DBG_TEST_XTOR_REPORT) ) (pData->aDbgData.nTestFlags & DBG_TEST_XTOR_REPORT) )
{ {
@@ -1219,7 +1219,6 @@ DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc )
void DbgProf( sal_uInt16 nAction, DbgDataType* pDbgData ) void DbgProf( sal_uInt16 nAction, DbgDataType* pDbgData )
{ {
// Ueberhaupt Profiling-Test an
DebugData* pData = ImplGetDebugData(); DebugData* pData = ImplGetDebugData();
if ( !(pData->aDbgData.nTestFlags & DBG_TEST_PROFILING) ) if ( !(pData->aDbgData.nTestFlags & DBG_TEST_PROFILING) )
@@ -1315,7 +1314,7 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
{ {
DebugData* pData = ImplGetDebugData(); DebugData* pData = ImplGetDebugData();
// Schnell-Test // quick test
if ( !(pData->aDbgData.nTestFlags & DBG_TEST_XTOR) ) if ( !(pData->aDbgData.nTestFlags & DBG_TEST_XTOR) )
return; return;
@@ -1351,10 +1350,10 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
: nAct == DBG_XTOR_DTOR ? "Enter Dtor from class " : nAct == DBG_XTOR_DTOR ? "Enter Dtor from class "
: "Enter method from class ") << pDbgData->pName); : "Enter method from class ") << pDbgData->pName);
// Sind noch Xtor-Tests als Trace an // If some Xtor-tests are still tracing
if ( pData->aDbgData.nTestFlags & DBG_TEST_XTOR_EXTRA ) if ( pData->aDbgData.nTestFlags & DBG_TEST_XTOR_EXTRA )
{ {
// DBG_CTOR-Aufruf vor allen anderen DBG_XTOR-Aufrufen // call DBG_CTOR before all other DBG_XTOR calls
if ( ((nAction & ~DBG_XTOR_DTOROBJ) != DBG_XTOR_CTOR) && !pDbgData->pData ) if ( ((nAction & ~DBG_XTOR_DTOROBJ) != DBG_XTOR_CTOR) && !pDbgData->pData )
{ {
SAL_WARN( SAL_WARN(
@@ -1364,7 +1363,7 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
return; return;
} }
// Testen, ob This-Pointer gueltig // Test if the pointer is still valid
if ( pData->aDbgData.nTestFlags & DBG_TEST_XTOR_THIS ) if ( pData->aDbgData.nTestFlags & DBG_TEST_XTOR_THIS )
{ {
if ( (pData->aDbgData.nTestFlags & DBG_TEST_XTOR_EXIT) || if ( (pData->aDbgData.nTestFlags & DBG_TEST_XTOR_EXIT) ||
@@ -1388,7 +1387,7 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
} }
} }
// Function-Test durchfuehren und Verwaltungsdaten updaten // execute function test and update maintenance data
const sal_Char* pMsg = NULL; const sal_Char* pMsg = NULL;
switch ( nAction & ~DBG_XTOR_DTOROBJ ) switch ( nAction & ~DBG_XTOR_DTOROBJ )
{ {
@@ -1446,7 +1445,6 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
break; break;
} }
// Gegebenenfalls Fehlermeldung ausgeben
SAL_WARN_IF( SAL_WARN_IF(
pMsg, "tools.debug", pMsg, "tools.debug",
"Error-Msg from Object " << pThis << " in class " "Error-Msg from Object " << pThis << " in class "
@@ -1537,7 +1535,7 @@ void DbgOut( const sal_Char* pMsg, sal_uInt16 nDbgOut, const sal_Char* pFile, sa
strcat( aBufOut, pFile ); strcat( aBufOut, pFile );
strcat( aBufOut, " at Line " ); strcat( aBufOut, " at Line " );
// Line in String umwandeln und dranhaengen // Convert line to String and append
sal_Char aLine[9]; sal_Char aLine[9];
sal_Char* pLine = &aLine[7]; sal_Char* pLine = &aLine[7];
sal_uInt16 i; sal_uInt16 i;

View File

@@ -68,7 +68,7 @@ struct DirReader_Impl
bInUse( sal_False ) bInUse( sal_False )
{ {
// nur den String der Memer-Var nehmen! // only use the String from Memer-Var
#if defined(UNX) //for further eplanation see DirReader_Impl::Read() in unx.cxx #if defined(UNX) //for further eplanation see DirReader_Impl::Read() in unx.cxx
pDosDir = NULL; pDosDir = NULL;
@@ -77,7 +77,7 @@ struct DirReader_Impl
pDosDir = opendir( aBypass.getStr() ); pDosDir = opendir( aBypass.getStr() );
#endif #endif
// Parent f"ur die neuen DirEntries ermitteln // Determine parents for new DirEntries
pParent = pDir->GetFlag() == FSYS_FLAG_NORMAL || pParent = pDir->GetFlag() == FSYS_FLAG_NORMAL ||
pDir->GetFlag() == FSYS_FLAG_ABSROOT pDir->GetFlag() == FSYS_FLAG_ABSROOT
? pDir ? pDir
@@ -88,20 +88,20 @@ struct DirReader_Impl
~DirReader_Impl() ~DirReader_Impl()
{ if( pDosDir ) closedir( pDosDir ); } { if( pDosDir ) closedir( pDosDir ); }
// die folgenden sind systemabh"angig implementiert // Init and Read are system-independent
sal_uInt16 Init(); // initialisiert, liest ggf. devices sal_uInt16 Init(); // initializes (and if necessary reads devices)
sal_uInt16 Read(); // liest 1 Eintrag, F2ugt ein falls ok sal_uInt16 Read(); // Reads one entry and appends it if ok
}; };
//-------------------------------------------------------------------- //--------------------------------------------------------------------
struct FileCopier_Impl struct FileCopier_Impl
{ {
FSysAction nActions; // was zu tun ist (Copy/Move/recur) FSysAction nActions; // action command (Copy/Move/recur)
Link aErrorLink; // bei Fehlern zu rufen Link aErrorLink; // link to call upon errors
ErrCode eErr; // aktueller Fehlercode im Error-Handler ErrCode eErr; // current errorcode in the handler
const DirEntry* pErrSource; // fuer Error-Handler falls Source-Fehler const DirEntry* pErrSource; // for error handlers in case of Source error
const DirEntry* pErrTarget; // fuer Error-Handler falls Target-Fehler const DirEntry* pErrTarget; // for error handlers in case of Target error
FileCopier_Impl() FileCopier_Impl()
: nActions( 0 ), eErr( 0 ), : nActions( 0 ), eErr( 0 ),

View File

@@ -190,9 +190,9 @@ DirEntryStack::~DirEntryStack()
|* |*
|* ImpCheckDirEntry() |* ImpCheckDirEntry()
|* |*
|* Beschreibung Pruefung eines DirEntry fuer DBG_UTIL |* Description Check DirEntry for DBG_UTIL
|* Parameter void* p Zeiger auf den DirEntry |* Parameter void* p Pointer to DirEntry
|* Return-Wert char* Fehlermeldungs-TExtension oder NULL |* Return-Valu char* Error-TExtension or NULL
|* |*
*************************************************************************/ *************************************************************************/
@@ -212,7 +212,7 @@ const char* ImpCheckDirEntry( const void* p )
|* |*
|* ImplCutPath() |* ImplCutPath()
|* |*
|* Beschreibung Fuegt ... ein, damit maximal nMaxChars lang |* Description Insert "..." for max length of nMaxChars
|* |*
*************************************************************************/ *************************************************************************/
@@ -226,7 +226,7 @@ rtl::OString ImplCutPath( const rtl::OString& rStr, sal_Int32 nMax, char cAccDel
if( nBegin == -1 ) if( nBegin == -1 )
nBegin = 0; nBegin = 0;
else else
nMaxPathLen += 2; // fuer Prefix <Laufwerk>: nMaxPathLen += 2; // Prefix <Disk>:
while( aCutPath.getLength() > nMaxPathLen ) while( aCutPath.getLength() > nMaxPathLen )
{ {
@@ -271,7 +271,7 @@ FSysError DirEntry::ImpParseName( const rtl::OString& rPfad )
#if defined(WNT) #if defined(WNT)
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry ); DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
// die einzelnen Namen auf einen Stack packen // put single names onto stack
String aPfad(rtl::OStringToOUString(rPfad, osl_getThreadTextEncoding())); String aPfad(rtl::OStringToOUString(rPfad, osl_getThreadTextEncoding()));
DirEntryStack aStack; DirEntryStack aStack;