fdo#39468: Translated German comments in core/tools
Change-Id: I5b6fd5712f08dae180bdd3b57b63713946b82433
This commit is contained in:
committed by
Philipp Riemer
parent
bf222b4985
commit
c8b7aa5513
@@ -136,13 +136,13 @@ void MkFilter::Filter()
|
||||
rtl::OString aLine(aLineBuf);
|
||||
if (aLine.indexOf(rtl::OString(RTL_CONSTASCII_STRINGPARAM("mkfilter1"))) != -1)
|
||||
{
|
||||
// Zeilen unterdruecken
|
||||
// surpress lines
|
||||
fprintf( stderr, "mkfilter1\n" );
|
||||
nState = 0;
|
||||
}
|
||||
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" );
|
||||
nState = 1;
|
||||
}
|
||||
@@ -182,19 +182,19 @@ void MkFilter::Filter()
|
||||
pTnrLst->push_back( pMkLine );
|
||||
}
|
||||
else {
|
||||
/* Zeilen ignorieren */;
|
||||
/* Skip these lines */;
|
||||
}
|
||||
} // End Of File
|
||||
fprintf( stderr, "\n" );
|
||||
|
||||
// das File wieder ausgegeben
|
||||
// Output file again
|
||||
size_t nLines = pLst->size();
|
||||
for ( size_t j=0; j<nLines; j++ )
|
||||
{
|
||||
MkLine *pLine = (*pLst)[ j ];
|
||||
if ( pLine->bHier )
|
||||
{
|
||||
// die List n - Mal abarbeiten
|
||||
// Iterate list n times
|
||||
for ( sal_uInt16 n=1; n<11; n++)
|
||||
{
|
||||
size_t nCount = pLine->pPrivateTnrLst->size();
|
||||
|
@@ -26,8 +26,7 @@
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
* Die Klasse SimpleConfig kann benutzt werden, um aus einer Textdatei
|
||||
* alle Tokens zu lesen
|
||||
* This class can be used for extracting tokens from a file
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
|
@@ -32,20 +32,20 @@ typedef void* PVOID;
|
||||
class CBlock
|
||||
{
|
||||
private:
|
||||
CBlock* pPrev; // Vorheriger Block
|
||||
CBlock* pNext; // Naechster Block
|
||||
sal_uInt16 nSize; // Groesse des Blocks
|
||||
sal_uInt16 nCount; // Anzahl Pointer
|
||||
void** pNodes; // Pointer auf die Daten
|
||||
CBlock* pPrev; // Previous block
|
||||
CBlock* pNext; // Next block
|
||||
sal_uInt16 nSize; // block size
|
||||
sal_uInt16 nCount; // number of pointers
|
||||
void** pNodes; // stores node pointers
|
||||
|
||||
#if defined DBG_UTIL
|
||||
static char const * DbgCheckCBlock(void const *);
|
||||
#endif
|
||||
|
||||
public:
|
||||
// Fuer List-Container
|
||||
// used for list container
|
||||
CBlock( sal_uInt16 nSize, CBlock* pPrev, CBlock* pNext );
|
||||
// Fuer Array-Container
|
||||
// used for array container
|
||||
CBlock( sal_uInt16 nSize, CBlock* pPrev );
|
||||
// Copy-Ctor
|
||||
CBlock( const CBlock& r, CBlock* pPrev );
|
||||
@@ -78,7 +78,7 @@ private:
|
||||
|*
|
||||
|* 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()
|
||||
|*
|
||||
|* Beschreibung Wir gehen davon aus, das Pointer in der Regel
|
||||
|* sich im ersten Block befindet und schalten
|
||||
|* deshalb eine Inline-Methode davor
|
||||
|* Description A pointer is often located in the first block,
|
||||
|* thus check this position before calling GetObject
|
||||
|*
|
||||
*************************************************************************/
|
||||
|
||||
inline void* Container::ImpGetObject( sal_uIntPtr nIndex ) const
|
||||
{
|
||||
if ( pFirstBlock && (nIndex < pFirstBlock->Count()) )
|
||||
// Item innerhalb des gefundenen Blocks zurueckgeben
|
||||
// Return item within the found block
|
||||
return pFirstBlock->GetObject( (sal_uInt16)nIndex );
|
||||
else
|
||||
return GetObject( nIndex );
|
||||
@@ -110,8 +109,7 @@ inline void* Container::ImpGetObject( sal_uIntPtr nIndex ) const
|
||||
|*
|
||||
|* Container::ImpGetOnlyNodes()
|
||||
|*
|
||||
|* Beschreibung Wenn es nur einen Block gibt, wird davon
|
||||
|* das Daten-Array zurueckgegeben
|
||||
|* Description If only one block exists, return its data array
|
||||
|*
|
||||
*************************************************************************/
|
||||
|
||||
|
@@ -23,15 +23,11 @@
|
||||
#include <tools/tools.h>
|
||||
#include <tools/string.hxx>
|
||||
|
||||
// ------------------------------
|
||||
// - Debug-Methoden fuer String -
|
||||
// ------------------------------
|
||||
// Debug methode for Strings
|
||||
|
||||
const char* DbgCheckUniString( const void* pString );
|
||||
|
||||
// -------------------------------
|
||||
// - Hilfsfunktionen fuer String -
|
||||
// -------------------------------
|
||||
// Helper functions for Strings
|
||||
|
||||
xub_StrLen ImplStringLen( const sal_Char* pStr );
|
||||
xub_StrLen ImplStringLen( const sal_Unicode* pStr );
|
||||
|
@@ -20,7 +20,6 @@
|
||||
#ifndef _B3D_B3DTRANS_HXX
|
||||
#define _B3D_B3DTRANS_HXX
|
||||
|
||||
// Zu verwendender DephRange des Z-Buffers
|
||||
#define ZBUFFER_DEPTH_RANGE ((double)(256L * 256L * 256L))
|
||||
|
||||
#include <basegfx/matrix/b3dhommatrix.hxx>
|
||||
@@ -30,13 +29,8 @@
|
||||
#include <basegfx/point/b2dpoint.hxx>
|
||||
#include <tools/toolsdllapi.h>
|
||||
|
||||
// Vorausdeklarationen
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* Unterstuetzte Methoden, um das Seitenverhaeltnis einzuhalten
|
||||
|*
|
||||
\************************************************************************/
|
||||
// Supported methods for setting/keeping the aspect ratio
|
||||
|
||||
enum Base3DRatio
|
||||
{
|
||||
@@ -45,11 +39,7 @@ enum Base3DRatio
|
||||
Base3DRatioMiddle
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* Typ der Projektion
|
||||
|*
|
||||
\************************************************************************/
|
||||
// Supported projection types
|
||||
|
||||
enum Base3DProjectionType
|
||||
{
|
||||
@@ -57,11 +47,7 @@ enum Base3DProjectionType
|
||||
Base3DProjectionTypePerspective
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* Transformationen fuer alle 3D Ausgaben
|
||||
|*
|
||||
\************************************************************************/
|
||||
// Transformation sets for 3D output
|
||||
|
||||
class TOOLS_DLLPUBLIC B3dTransformationSet
|
||||
{
|
||||
@@ -81,13 +67,13 @@ private:
|
||||
// Texture Matrices
|
||||
basegfx::B2DHomMatrix maTexture;
|
||||
|
||||
// Speziell zum Umwandeln von Punkten Objekt -> Device
|
||||
// Special transformation set for converting Object -> Device
|
||||
basegfx::B3DHomMatrix maObjectToDevice;
|
||||
|
||||
// Transponierte Inverse fuer Vectortransformationen
|
||||
// Transposed and inversed matrix for vector transformations
|
||||
basegfx::B3DHomMatrix maInvTransObjectToEye;
|
||||
|
||||
// Transformation World->View
|
||||
// Transformation for World->View
|
||||
basegfx::B3DHomMatrix maMatFromWorldToView;
|
||||
basegfx::B3DHomMatrix maInvMatFromWorldToView;
|
||||
|
||||
@@ -95,7 +81,7 @@ private:
|
||||
basegfx::B3DVector maScale;
|
||||
basegfx::B3DVector maTranslate;
|
||||
|
||||
// ViewPlane DeviceRectangle (vom Benutzer gesetzt)
|
||||
// ViewPlane DeviceRectangle (user-defined)
|
||||
double mfLeftBound;
|
||||
double mfRightBound;
|
||||
double mfBottomBound;
|
||||
@@ -105,22 +91,22 @@ private:
|
||||
double mfNearBound;
|
||||
double mfFarBound;
|
||||
|
||||
// Seitenverhaeltnis der 3D Abbildung (Y / X)
|
||||
// default ist 1:1 -> 1.0
|
||||
// Deaktivieren mit 0.0 als Wert
|
||||
// Aspect ratio of 3D transformation (Y / X)
|
||||
// default: 1:1 -> 1.0
|
||||
// Disable with value 0.0
|
||||
double mfRatio;
|
||||
|
||||
// Der gesetzte Ausgabebereich (in logischen Koordinaten)
|
||||
// und der dazugehoerige sichtbare Bereich
|
||||
// Viewport area in logical coordinates
|
||||
Rectangle maViewportRectangle;
|
||||
// Visible area within viewport
|
||||
Rectangle maVisibleRectangle;
|
||||
|
||||
// Die tatsaechlich von CalcViewport gesetzten Abmessungen
|
||||
// des sichtbaren Bereichs (in logischen Koordinaten)
|
||||
// Actual coordinates as set by CalcViewport
|
||||
// of visible viewport area (logical coordinates)
|
||||
Rectangle maSetBound;
|
||||
|
||||
// Methode zur Aufrechterhaltung des Seitenverhaeltnisses
|
||||
// default ist Base3DRatioGrow
|
||||
// Method of keeping defined aspect ratio
|
||||
// default: Base3DRatioGrow
|
||||
Base3DRatio meRatio;
|
||||
|
||||
// Flags
|
||||
@@ -134,7 +120,6 @@ public:
|
||||
B3dTransformationSet();
|
||||
virtual ~B3dTransformationSet();
|
||||
|
||||
// Zurueck auf Standard
|
||||
void Reset();
|
||||
|
||||
// ObjectTrans
|
||||
@@ -156,12 +141,12 @@ public:
|
||||
// Texture
|
||||
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; }
|
||||
void SetRatio(double fNew=1.0);
|
||||
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);
|
||||
double GetDeviceRectangleWidth() const { return mfRightBound - mfLeftBound; }
|
||||
double GetDeviceRectangleHeight() const { return mfTopBound - mfBottomBound; }
|
||||
@@ -174,7 +159,7 @@ public:
|
||||
const Rectangle& GetViewportRectangle() { return maViewportRectangle; }
|
||||
void CalcViewport();
|
||||
|
||||
// Direkter Zugriff auf verschiedene Transformationen
|
||||
// Direct accessors for miscellaneous transformations
|
||||
const basegfx::B3DPoint WorldToEyeCoor(const basegfx::B3DPoint& rVec);
|
||||
const basegfx::B3DPoint EyeToWorldCoor(const basegfx::B3DPoint& rVec);
|
||||
|
||||
@@ -204,12 +189,10 @@ protected:
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|* Viewport for B3D
|
||||
|*
|
||||
|* Viewport fuer B3D
|
||||
|*
|
||||
|* Verwendet wird hier ein vereinfachtes System, bei dem der abzubildende
|
||||
|* Punkt durch VRP repraesentiert wird
|
||||
|*
|
||||
|* Uses a simplified model, in which a point
|
||||
|* is described using a View Reference Point (VRP)
|
||||
\************************************************************************/
|
||||
|
||||
class TOOLS_DLLPUBLIC B3dViewport : public B3dTransformationSet
|
||||
@@ -237,11 +220,7 @@ protected:
|
||||
void CalcOrientation();
|
||||
};
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* Kamera fuer B3D
|
||||
|*
|
||||
\************************************************************************/
|
||||
// B3D camera
|
||||
|
||||
class TOOLS_DLLPUBLIC B3dCamera : public B3dViewport
|
||||
{
|
||||
@@ -262,17 +241,14 @@ public:
|
||||
sal_Bool bUseFocLen = sal_False);
|
||||
virtual ~B3dCamera();
|
||||
|
||||
// Positionen
|
||||
const basegfx::B3DPoint& GetPosition() const { return aPosition; }
|
||||
const basegfx::B3DVector& GetLookAt() const { return aLookAt; }
|
||||
|
||||
// Brennweite in mm
|
||||
// Focal length in mm
|
||||
double GetFocalLength() const { return fFocalLength; }
|
||||
|
||||
// Neigung links/rechts
|
||||
double GetBankAngle() const { return fBankAngle; }
|
||||
|
||||
// FocalLength Flag
|
||||
sal_Bool GetUseFocalLength() const { return (sal_Bool)bUseFocalLength; }
|
||||
|
||||
protected:
|
||||
|
@@ -48,7 +48,7 @@ class TOOLS_DLLPUBLIC BigInt
|
||||
private:
|
||||
long nVal;
|
||||
unsigned short nNum[MAX_DIGITS];
|
||||
sal_uInt8 nLen : 5; // Aktuelle Laenge
|
||||
sal_uInt8 nLen : 5; // current length
|
||||
sal_Bool bIsNeg : 1, // Is Sign negative
|
||||
bIsBig : 1, // sal_True == BigInt
|
||||
bIsSet : 1; // Not "Null" (not not 0)
|
||||
|
@@ -51,7 +51,7 @@ public:
|
||||
~SvCacheStream();
|
||||
|
||||
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; }
|
||||
|
||||
void SwapOut();
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
sal_Bool IsPersistent() { return bPersistent != 0; }
|
||||
void SetPersistence( sal_Bool b = sal_True ) { bPersistent = b; }
|
||||
void SetSwapStream( SvStream *p )
|
||||
{ pSwapStream = p; } // darf nur vom FilenameHdl gerufen werden!
|
||||
{ pSwapStream = p; } // call only from FilenameHdl
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -30,7 +30,6 @@ class CBlock;
|
||||
// - Container -
|
||||
// -------------
|
||||
|
||||
// Maximale Blockgroesse
|
||||
#define CONTAINER_MAXBLOCKSIZE ((sal_uInt16)0x3FF0)
|
||||
|
||||
#define CONTAINER_APPEND ULONG_MAX
|
||||
|
@@ -46,8 +46,6 @@
|
||||
|
||||
#ifdef DBG_UTIL
|
||||
|
||||
// --- Dbg-Daten ---
|
||||
|
||||
typedef void (*DbgPrintLine)( const sal_Char* pLine );
|
||||
typedef const sal_Char* (*DbgUsr)(const void* pThis );
|
||||
typedef void (*DbgTestSolarMutexProc)();
|
||||
@@ -102,8 +100,7 @@ struct DbgDataType
|
||||
sal_Char const * pName;
|
||||
};
|
||||
|
||||
// --- Dbg-Prototypen ---
|
||||
|
||||
// Dbg prototypes
|
||||
#define DBG_FUNC_DEBUGSTART 1
|
||||
#define DBG_FUNC_DEBUGEND 2
|
||||
#define DBG_FUNC_GLOBALDEBUGEND 3
|
||||
@@ -307,8 +304,7 @@ inline void DbgPrintFile( const sal_Char* pLine )
|
||||
DbgFunc( DBG_FUNC_PRINTFILE, (void*)(sal_Char*)pLine );
|
||||
}
|
||||
|
||||
// --- Dbg-Output ---
|
||||
|
||||
// Dbg output
|
||||
#define DBG_OUT_TRACE 1
|
||||
#define DBG_OUT_WARNING 2
|
||||
#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 ImpDbgOutfBuf( sal_Char* pBuf, const sal_Char* pFStr, ... );
|
||||
|
||||
// --- Dbg-Test-Functions ---
|
||||
// Dbg test functions
|
||||
|
||||
#define DBG_PROF_START 1
|
||||
#define DBG_PROF_STOP 2
|
||||
@@ -364,7 +360,7 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
// --- Dbg-Defines (intern) ---
|
||||
// (internally used) defines
|
||||
|
||||
#define DBG_FUNC( aName ) DbgName_##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( aName ) DBG_NAMEEX_VISIBILITY( aName, )
|
||||
|
||||
// --- Dbg-Defines (extern) ---
|
||||
// (externally used) defines
|
||||
|
||||
#define DBG_DEBUGSTART() DbgDebugStart()
|
||||
#define DBG_DEBUGEND() DbgDebugEnd()
|
||||
@@ -443,7 +439,7 @@ do \
|
||||
DbgTestSolarMutex(); \
|
||||
} while(0)
|
||||
|
||||
// --- Dbg-Defines (An/Ausschlaten) ---
|
||||
// en-/disable debug defines
|
||||
|
||||
#define DBG_INSTOUTTRACE( nOut ) \
|
||||
do \
|
||||
|
@@ -32,7 +32,7 @@ Warning || || |
|
||||
| || || || |
|
||||
Dynamic || || |
|
||||
| || || |
|
||||
Subsystembereiche | |
|
||||
Subsystemarea| || |
|
||||
| || |
|
||||
| || |
|
||||
| || |
|
||||
@@ -294,7 +294,7 @@ inline sal_uIntPtr ERRCODE_TOERROR( sal_uIntPtr x )
|
||||
|
||||
#define SVSTREAM_DISK_FULL ERRCODE_IO_OUTOFSPACE
|
||||
|
||||
// Fuer die EditEngine:
|
||||
// For the EditEngine:
|
||||
#define SVSTREAM_ERRBASE_USER ERRCODE_AREA_LIB1
|
||||
|
||||
#define PRINTER_OK ERRCODE_NONE
|
||||
|
@@ -129,7 +129,7 @@ typedef sal_uInt16 FontEmphasisMark;
|
||||
#define EMPHASISMARK_POS_ABOVE ((FontEmphasisMark)0x1000)
|
||||
#define EMPHASISMARK_POS_BELOW ((FontEmphasisMark)0x2000)
|
||||
|
||||
// Only for kompability
|
||||
// Only for compability
|
||||
#define EMPHASISMARK_DOTS_ABOVE (EMPHASISMARK_DOT | EMPHASISMARK_POS_ABOVE)
|
||||
#define EMPHASISMARK_DOTS_BELOW (EMPHASISMARK_DOT | EMPHASISMARK_POS_BELOW)
|
||||
#define EMPHASISMARK_SIDE_DOTS (EMPHASISMARK_ACCENT | EMPHASISMARK_POS_ABOVE)
|
||||
|
@@ -63,7 +63,7 @@ typedef int DirEntryKind;
|
||||
#define FSYS_KIND_BLOCK ((DirEntryKind) 8)
|
||||
#define FSYS_KIND_CHAR ((DirEntryKind) 16)
|
||||
#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_FIXED ((DirEntryKind) 256)
|
||||
#define FSYS_KIND_REMOTE ((DirEntryKind) 512)
|
||||
@@ -92,11 +92,11 @@ typedef ::std::vector< FSysSort > FSysSortList;
|
||||
enum DirEntryFlag
|
||||
{
|
||||
FSYS_FLAG_NORMAL,
|
||||
FSYS_FLAG_VOLUME, // Dir( FSYS_FLAG_VOLUME ) und GetDevice()
|
||||
FSYS_FLAG_ABSROOT, // z.B. "a:\" oder "\"
|
||||
FSYS_FLAG_RELROOT, // z.B. "a:", "a:." oder "."
|
||||
FSYS_FLAG_CURRENT = FSYS_FLAG_RELROOT, // Synonym fuer FSYS_FLAG_RELROOT
|
||||
FSYS_FLAG_PARENT, // z.B. ".."
|
||||
FSYS_FLAG_VOLUME, // Dir( FSYS_FLAG_VOLUME ) and GetDevice()
|
||||
FSYS_FLAG_ABSROOT, // e.g. "a:\" or "\"
|
||||
FSYS_FLAG_RELROOT, // e.g. "a:", "a:." or "."
|
||||
FSYS_FLAG_CURRENT = FSYS_FLAG_RELROOT, // Synonym for FSYS_FLAG_RELROOT
|
||||
FSYS_FLAG_PARENT, // e.g. ".."
|
||||
FSYS_FLAG_INVALID
|
||||
};
|
||||
|
||||
@@ -122,7 +122,7 @@ typedef int FSysAction;
|
||||
// clashes
|
||||
#define FSYS_ACTION_STANDARD 0
|
||||
|
||||
// Fuer RFS
|
||||
// RFS
|
||||
#define RFS_IDENTIFIER "-rfs-"
|
||||
|
||||
typedef sal_uIntPtr FSysError;
|
||||
@@ -373,10 +373,10 @@ class TOOLS_DLLPUBLIC Dir : public DirEntry
|
||||
{
|
||||
friend struct DirReader_Impl;
|
||||
|
||||
DirReader_Impl* pReader; // systemabhaengig
|
||||
DirReader_Impl* pReader; // is system-dependent
|
||||
DirEntryList* pLst;
|
||||
FSysSortList* pSortLst; // NULL, wenn kein Sort gefordert
|
||||
FileStatList* pStatLst; // NULL, wenn keine Stat's benoetigt
|
||||
FSysSortList* pSortLst; // NULL if no sorting requested
|
||||
FileStatList* pStatLst; // NULL if no stats requested
|
||||
WildCard aNameMask;
|
||||
DirEntryKind eAttrMask;
|
||||
|
||||
|
@@ -17,7 +17,7 @@
|
||||
* 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
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
#undef Rectangle
|
||||
#undef DELETE
|
||||
|
||||
/* Hilfe-Ids umbenennen */
|
||||
/* rename help IDs */
|
||||
#define WIN_HELP_INDEX 0x0003
|
||||
#define WIN_HELP_HELPONHELP 0x0004
|
||||
#undef HELP_INDEX
|
||||
@@ -206,7 +206,6 @@
|
||||
#define WIN_FindWindow FindWindow
|
||||
#endif
|
||||
|
||||
// keine Yield-Definition
|
||||
#undef Yield
|
||||
|
||||
/* new StretchBlt() Modes (simpler names) */
|
||||
@@ -229,7 +228,7 @@ extern "C"
|
||||
|
||||
#endif
|
||||
|
||||
// Konfl<EFBFBD>kt mit den Tools-Pair vermeiden
|
||||
// avoid conflict with Pair in tools
|
||||
#undef Pair
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
@@ -17,9 +17,9 @@
|
||||
* 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
|
||||
|
||||
#if defined WNT
|
||||
|
@@ -155,46 +155,45 @@ typedef std::map<SvPersistBase*, sal_uIntPtr> PersistBaseMap;
|
||||
|
||||
//=========================================================================
|
||||
class SvStream;
|
||||
class TOOLS_DLLPUBLIC SvPersistStream : public SvStream
|
||||
/* [Beschreibung]
|
||||
|
||||
Mit dieser Klasse k"onnen Laufzeit Objektstrukturen gespeichert
|
||||
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.
|
||||
/** Persistent Stream
|
||||
|
||||
[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.
|
||||
Objekt A verweist auf B, dieses auf C und das wieder auf A.
|
||||
C verweist auf D.
|
||||
[Example]
|
||||
|
||||
Die Reihenfolge beim Speichern und Laden ist egal, sie muss nur
|
||||
gleich sein:
|
||||
Speichern: Laden:
|
||||
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
|
||||
One example is described in the constructor.
|
||||
Assume a ring-like dependency, where A referenes B,
|
||||
B itself references C, and C references to both D and A.
|
||||
|
||||
[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,
|
||||
kann aber von beiden Versionen gelesen werden.
|
||||
Saving: Loading:
|
||||
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;
|
||||
SvStream * pStm;
|
||||
PersistBaseMap aPTable; // Pointer und Key gedreht
|
||||
PersistBaseMap aPTable; // reversed pointer and key
|
||||
SvPersistUIdx aPUIdx;
|
||||
sal_uIntPtr nStartIdx;
|
||||
const SvPersistStream * pRefStm;
|
||||
@@ -239,8 +238,7 @@ public:
|
||||
TOOLS_DLLPUBLIC friend SvPersistStream& operator << (SvPersistStream &, SvPersistBase *);
|
||||
TOOLS_DLLPUBLIC friend SvPersistStream& operator >> (SvPersistStream &, SvPersistBase * &);
|
||||
|
||||
// Objekte halten ihre Id's w"ahrend geladen und
|
||||
// gespeichert werden.
|
||||
// Objects maintain their IDs while storing and loading to/from stream
|
||||
friend SvStream& operator >> ( SvStream &, SvPersistStream & );
|
||||
friend SvStream& operator << ( SvStream &, SvPersistStream & );
|
||||
};
|
||||
|
@@ -22,9 +22,9 @@
|
||||
|
||||
#include <tools/rcid.h>
|
||||
|
||||
// Definition der Struktur die alle "Window"-Resourcen haben
|
||||
// Hier sind die Fensterstyles definiert die nicht in WinBits sind
|
||||
#define RSC_EXTRAMAPUNIT 0xFFFF //Wert nicht veraendern!!!
|
||||
// Defines for all "Window" resources.
|
||||
// (Here are all window styles that are not in WinBits)
|
||||
#define RSC_EXTRAMAPUNIT 0xFFFF // do not change that value!
|
||||
|
||||
typedef short RSWND_STYLE;
|
||||
#define RSWND_DISABLED 0x01
|
||||
@@ -44,26 +44,26 @@ typedef short RSWND_STYLE;
|
||||
#define WINDOW_BORDER_STYLE 0x2000
|
||||
#define WINDOW_HELPID 0x4000
|
||||
|
||||
// Definition der Struktur die alle "WorkWindow"-Resourcen haben
|
||||
// For "WorkWindow" resources:
|
||||
#define WORKWIN_SHOWNORMAL 0
|
||||
#define WORKWIN_SHOWMINIMIZED 1
|
||||
#define WORKWIN_SHOWMAXIMIZED 2
|
||||
|
||||
// Definition der Struktur der FixedBitmap-Resource.
|
||||
// For "FixedBitmap" resource:
|
||||
#define RSC_FIXEDBITMAP_BITMAP 0x0001
|
||||
|
||||
// Definition der Struktur der FixedImage-Resource.
|
||||
// For "FixedImage" resource:
|
||||
#define RSC_FIXEDIMAGE_IMAGE 0x0001
|
||||
|
||||
// Definition der Struktur des MenuButtons
|
||||
// For "MenuButton" resources:
|
||||
#define RSCMENUBUTTON_MENU 0x01
|
||||
|
||||
// Definition der Struktur die alle Menu-Resourcen haben
|
||||
// For all menu resources:
|
||||
#define RSC_MENU_ITEMS 0x01
|
||||
#define RSC_MENU_TEXT 0x02
|
||||
#define RSC_MENU_DEFAULTITEMID 0x04
|
||||
|
||||
// Hier sind die MenuItem-Resourceoptionen definiert
|
||||
// "MenuItem" resource options:
|
||||
#define RSC_MENUITEM_SEPARATOR 0x001
|
||||
#define RSC_MENUITEM_ID 0x002
|
||||
#define RSC_MENUITEM_STATUS 0x004
|
||||
@@ -77,11 +77,11 @@ typedef short RSWND_STYLE;
|
||||
#define RSC_MENUITEM_DISABLE 0x400
|
||||
#define RSC_MENUITEM_COMMAND 0x800
|
||||
|
||||
// Hier sind die AccelKey-Resourceoptionen definiert
|
||||
// "AccelKey" resource options:
|
||||
#define ACCELITEM_ACCEL 0x01
|
||||
#define ACCELITEM_KEY 0x02
|
||||
|
||||
// Definition der Struktur die alle "Field"-Resourcen haben
|
||||
// For "Field" resources:
|
||||
#define PATTERNFORMATTER_STRICTFORMAT 0x01
|
||||
#define PATTERNFORMATTER_EDITMASK 0x02
|
||||
#define PATTERNFORMATTER_LITTERALMASK 0x04
|
||||
@@ -130,7 +130,7 @@ typedef short RSWND_STYLE;
|
||||
#define TIMEFIELD_FIRST 0x01
|
||||
#define TIMEFIELD_LAST 0x02
|
||||
|
||||
// Definition der Struktur die alle "ToolBoxItem"-Resourcen haben
|
||||
// For "ToolBoxItem" resources:
|
||||
#define RSC_TOOLBOXITEM_ID 0x0001
|
||||
#define RSC_TOOLBOXITEM_TYPE 0x0002
|
||||
#define RSC_TOOLBOXITEM_STATUS 0x0004
|
||||
@@ -145,7 +145,7 @@ typedef short RSWND_STYLE;
|
||||
#define RSC_TOOLBOXITEM_COMMAND 0x0800
|
||||
#define RSC_TOOLBOXITEM_MENUSTRINGS 0x1000
|
||||
|
||||
// Definition der Struktur die alle ToolBox-Resourcen haben
|
||||
// For "ToolBox" resources:
|
||||
#define RSC_TOOLBOX_BUTTONTYPE 0x01
|
||||
#define RSC_TOOLBOX_ALIGN 0x02
|
||||
#define RSC_TOOLBOX_LINECOUNT 0x04
|
||||
@@ -155,45 +155,45 @@ typedef short RSWND_STYLE;
|
||||
#define RSC_TOOLBOX_ITEMIMAGELIST 0x40
|
||||
#define RSC_TOOLBOX_ITEMLIST 0x80
|
||||
|
||||
// Definition der Struktur die alle MoreButton-Resourcen haben
|
||||
// For "MoreButton" resources:
|
||||
#define RSC_MOREBUTTON_STATE 0x01
|
||||
#define RSC_MOREBUTTON_MAPUNIT 0x02
|
||||
#define RSC_MOREBUTTON_DELTA 0x04
|
||||
|
||||
// Definition der Struktur die alle FloatingWindow-Resourcen haben
|
||||
// For "FloatingWindow" resources:
|
||||
#define RSC_FLOATINGWINDOW_WHMAPMODE 0x01
|
||||
#define RSC_FLOATINGWINDOW_WIDTH 0x02
|
||||
#define RSC_FLOATINGWINDOW_HEIGHT 0x04
|
||||
#define RSC_FLOATINGWINDOW_ZOOMIN 0x08
|
||||
|
||||
// Definition der Struktur die alle DockingWindow-Resourcen haben
|
||||
// For "DockingWindow" resources:
|
||||
#define RSC_DOCKINGWINDOW_XYMAPMODE 0x01
|
||||
#define RSC_DOCKINGWINDOW_X 0x02
|
||||
#define RSC_DOCKINGWINDOW_Y 0x04
|
||||
#define RSC_DOCKINGWINDOW_FLOATING 0x08
|
||||
|
||||
// Definition der Struktur die alle "TabControlItem"-Resourcen haben
|
||||
// For "TabControlItem" resources:
|
||||
#define RSC_TABCONTROLITEM_ID 0x0001
|
||||
#define RSC_TABCONTROLITEM_TEXT 0x0002
|
||||
#define RSC_TABCONTROLITEM_PAGERESID 0x0008
|
||||
|
||||
// Definition der Struktur die alle TabControl-Resourcen haben
|
||||
// For "TabControl" resources:
|
||||
#define RSC_TABCONTROL_ITEMLIST 0x01
|
||||
|
||||
// Definition der Struktur des ImageButtons
|
||||
// For "ImageButtons":
|
||||
#define RSC_IMAGEBUTTON_IMAGE 0x01
|
||||
#define RSC_IMAGEBUTTON_SYMBOL 0x02
|
||||
#define RSC_IMAGEBUTTON_STATE 0x04
|
||||
|
||||
// Definition der Struktur des ImageRadioButtons
|
||||
// For "ImageRadioButtons":
|
||||
#define RSC_IMAGERADIOBUTTON_IMAGE 0x01
|
||||
|
||||
// Definition der Struktur des Image
|
||||
// For "Image":
|
||||
#define RSC_IMAGE_IMAGEBITMAP 0x01
|
||||
#define RSC_IMAGE_MASKBITMAP 0x02
|
||||
#define RSC_IMAGE_MASKCOLOR 0x04
|
||||
|
||||
// Definition der Struktur des Image
|
||||
// For "ImageList":
|
||||
#define RSC_IMAGELIST_IMAGEBITMAP 0x01
|
||||
#define RSC_IMAGELIST_MASKBITMAP 0x02
|
||||
#define RSC_IMAGELIST_MASKCOLOR 0x04
|
||||
|
@@ -79,7 +79,6 @@ class TOOLS_DLLPUBLIC Resource
|
||||
rtl::OString ReadByteStringRes()
|
||||
{ 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)
|
||||
void FreeResource()
|
||||
{ m_pResMgr->PopContext( this ); }
|
||||
|
@@ -22,25 +22,24 @@
|
||||
|
||||
#include <tools/resid.hxx>
|
||||
|
||||
// Definition der Versionsnummer
|
||||
// Definition of the version number
|
||||
#define RSCVERSION_ID 200U
|
||||
// Definition eines ungueltige Identifiers.
|
||||
// Definition of an invalid identifier
|
||||
#define RC_NO_ID (sal_uInt32(0xFFFFFFFF))
|
||||
|
||||
// Dies sind die Resourcetypen
|
||||
// Mindestens 0x100 wegen MS-Windows Resourcetypen
|
||||
//#define RSC_NOTYPE 0x100
|
||||
//RSC_NOTYPE wird in resid.hxx definiert
|
||||
// Resource types
|
||||
// Minimum is 0x100 due to MS-Windows resource types
|
||||
// (RSC_NOTYPE=0x100) is defined in resid.hxx
|
||||
#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_STRING (RSC_NOTYPE + 0x11)
|
||||
#define RSC_BITMAP (RSC_NOTYPE + 0x13)
|
||||
#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_MENUITEM (RSC_NOTYPE + 0x1d)// nur intern
|
||||
#define RSC_MENUITEM (RSC_NOTYPE + 0x1d) // only used internally
|
||||
#define RSC_KEYCODE (RSC_NOTYPE + 0x1f)
|
||||
#define RSC_TIME (RSC_NOTYPE + 0x20)
|
||||
#define RSC_DATE (RSC_NOTYPE + 0x21)
|
||||
@@ -115,13 +114,12 @@
|
||||
#define RSC_TREELISTBOX (RSC_NOTYPE + 0x78)
|
||||
#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_STRING (RSC_NOTYPE + 0xf3) // Sonderbehandlung
|
||||
#define RT_SYS_FILE (RSC_NOTYPE + 0xf4) // nicht implementiert
|
||||
#define RT_SYS_STRING (RSC_NOTYPE + 0xf3) // special case
|
||||
#define RT_SYS_FILE (RSC_NOTYPE + 0xf4) // not implemented
|
||||
|
||||
// (RSC_NOTYPE + 0x200) - (RSC_NOTYPE + 0x300) fuer Sfx reserviert
|
||||
|
||||
#endif // _RCID_H
|
||||
|
||||
|
@@ -220,7 +220,7 @@ class SvCompatWeakBase
|
||||
public:
|
||||
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() { _xHdl->ResetWeakBase(); }
|
||||
};
|
||||
|
@@ -34,20 +34,20 @@ class InternalResMgr;
|
||||
// - RSHEADER_TYPE -
|
||||
// -----------------
|
||||
|
||||
// Definition der Struktur, aus denen die Resource aufgebaut ist
|
||||
// Defines structure used to build resource
|
||||
struct RSHEADER_TYPE
|
||||
{
|
||||
private:
|
||||
sal_uInt32 nId; // Identifier der Resource
|
||||
RESOURCE_TYPE nRT; // Resource Typ
|
||||
sal_uInt32 nGlobOff; // Globaler Offset
|
||||
sal_uInt32 nLocalOff; // Lokaler Offset
|
||||
sal_uInt32 nId; // Identifier of resource
|
||||
RESOURCE_TYPE nRT; // Resource type
|
||||
sal_uInt32 nGlobOff; // Global offset
|
||||
sal_uInt32 nLocalOff; // Local offset
|
||||
|
||||
public:
|
||||
inline sal_uInt32 GetId(); // Identifier der Resource
|
||||
inline RESOURCE_TYPE GetRT(); // Resource Typ
|
||||
inline sal_uInt32 GetGlobOff(); // Globaler Offset
|
||||
inline sal_uInt32 GetLocalOff(); // Lokaler Offset
|
||||
inline sal_uInt32 GetId(); // Identifier of resource
|
||||
inline RESOURCE_TYPE GetRT(); // Resource type
|
||||
inline sal_uInt32 GetGlobOff(); // Global offset
|
||||
inline sal_uInt32 GetLocalOff(); // Local offset
|
||||
};
|
||||
|
||||
// ----------
|
||||
@@ -60,9 +60,9 @@ typedef rtl::OUString (*ResHookProc)( const rtl::OUString& rStr );
|
||||
// - ResMgr -
|
||||
// ----------
|
||||
|
||||
// Initialisierung
|
||||
// Initialization
|
||||
#define RC_NOTYPE 0x00
|
||||
// Globale Resource
|
||||
// Global resource
|
||||
#define RC_GLOBAL 0x01
|
||||
#define RC_AUTORELEASE 0x02
|
||||
#define RC_NOTFOUND 0x04
|
||||
@@ -134,11 +134,11 @@ private:
|
||||
ResMgr(const ResMgr&);
|
||||
ResMgr& operator=(const ResMgr&);
|
||||
public:
|
||||
static void DestroyAllResMgr(); // Wird gerufen, wenn App beendet wird
|
||||
static void DestroyAllResMgr(); // Called upon app shutdown
|
||||
|
||||
~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 ResMgr* SearchCreateResMgr( const sal_Char* pPrefixName,
|
||||
com::sun::star::lang::Locale& rLocale );
|
||||
@@ -147,23 +147,23 @@ public:
|
||||
rtl::OUString(),
|
||||
rtl::OUString()));
|
||||
|
||||
// Testet ob Resource noch da ist
|
||||
// Test whether resource still exists
|
||||
void TestStack( const Resource * );
|
||||
|
||||
// ist Resource verfuegbar
|
||||
// Returns whether resource is available
|
||||
sal_Bool IsAvailable( const ResId& rId,
|
||||
const Resource* = NULL) const;
|
||||
|
||||
// Resource suchen und laden
|
||||
// Search and load resource, given its ID
|
||||
sal_Bool GetResource( const ResId& rId, const Resource * = NULL );
|
||||
static void * GetResourceSkipHeader( const ResId& rResId, ResMgr ** ppResMgr );
|
||||
// Kontext freigeben
|
||||
// Free resource context
|
||||
void PopContext( const Resource* = NULL );
|
||||
|
||||
// Resourcezeiger erhoehen
|
||||
// Increment resource pointer
|
||||
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 )
|
||||
{ return( pHT->GetGlobOff() ); }
|
||||
|
||||
@@ -172,24 +172,23 @@ public:
|
||||
// returns a byte string and its length out of the resource
|
||||
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 )
|
||||
{ nLen++; return (nLen + nLen%2); }
|
||||
static sal_uInt32 GetStringSize( const sal_uInt8* pStr, sal_uInt32& nLen );
|
||||
|
||||
// return a int64
|
||||
static sal_uInt64 GetUInt64( void* pDatum );
|
||||
// Gibt einen long zurueck
|
||||
// return a long
|
||||
static sal_Int32 GetLong( void * pLong );
|
||||
// return a short
|
||||
static sal_Int16 GetShort( void * pShort );
|
||||
|
||||
// Gibt einen Zeiger auf die Resource zurueck
|
||||
// return a pointer to the resource
|
||||
void * GetClass();
|
||||
|
||||
RSHEADER_TYPE * CreateBlock( const ResId & rId );
|
||||
|
||||
// Gibt die verbleibende Groesse zurueck
|
||||
sal_uInt32 GetRemainSize();
|
||||
|
||||
const rtl::OUString&GetFileName() const;
|
||||
|
@@ -105,25 +105,24 @@ typedef void* (*TypeId)();
|
||||
|
||||
//-------------------------------------------------------------------------
|
||||
|
||||
// Die (exemplarischen) Makros fuer die Anwendung ( hier fuer
|
||||
// Pointer, kann aber nach dem gleichen Strickmuster fuer
|
||||
// Referenzen erweitert werden.
|
||||
// PTR_CAST: sicheres Casten eines Pointers auf einen Pointer
|
||||
// einer abgeleiteten Klasse. Liefert im Fehlerfall einen
|
||||
// Nullpointer (wahrscheinlich die haeufigste Anwendung)
|
||||
// Exemplary application macros for pointers
|
||||
// (can be extended for use with references)
|
||||
//
|
||||
// T: Typ, auf den gecastet werden soll
|
||||
// p: Pointer, der gecastet werden soll
|
||||
// PTR_CAST: Safe pointer casting to a derived class.
|
||||
// Returns NULL pointer on cast error.
|
||||
//
|
||||
// T: Target type to cast into
|
||||
// p: Pointer to be cast into T
|
||||
#define PTR_CAST( T, pObj ) \
|
||||
( pObj && (pObj)->IsA( TYPE(T) ) ? (T*)(pObj) : 0 )
|
||||
|
||||
// Abfrage, ob ein Objekt eine bestimmte Klasse als
|
||||
// Basisklasse hat (oder genau von dieser Klasse ist)
|
||||
// Check whether object pObj has a Base Class T
|
||||
// (or if pObj is an instance of T)
|
||||
#define HAS_BASE( T, pObj ) \
|
||||
( pObj && (pObj)->IsA( TYPE(T) ) )
|
||||
|
||||
// Abfrage, ob ein Pointer auf ein Objekt eines bestimmten
|
||||
// Typs zeigt
|
||||
// Check whether a pointer is targetting
|
||||
// an object of type T.
|
||||
#define IS_TYPE(T,pObj) \
|
||||
( pObj && (pObj)->Type() == TYPE(T) )
|
||||
|
||||
|
@@ -57,7 +57,7 @@ public:
|
||||
static SimpleResMgr* Create( const sal_Char* pPrefixName,
|
||||
::com::sun::star::lang::Locale aLocale = ::com::sun::star::lang::Locale( rtl::OUString(),
|
||||
rtl::OUString(),
|
||||
rtl::OUString()));// nur in VCL
|
||||
rtl::OUString()));// only in VCL
|
||||
|
||||
bool IsValid() const { return m_pResImpl != NULL; }
|
||||
|
||||
|
@@ -230,25 +230,24 @@ class TOOLS_DLLPUBLIC SvStream
|
||||
private:
|
||||
// LockBytes Interface
|
||||
void* pImp; // unused
|
||||
SvLockBytesRef xLockBytes; // Default Implmentierung
|
||||
SvLockBytesRef xLockBytes; // Default implementation
|
||||
sal_Size nActPos; //
|
||||
|
||||
// Puffer-Verwaltung
|
||||
sal_uInt8* pRWBuf; // Zeigt auf Read/Write-Puffer
|
||||
sal_uInt8* pRWBuf; // Points to read/write buffer
|
||||
sal_uInt8* pBufPos; // pRWBuf + nBufActualPos
|
||||
sal_uInt16 nBufSize; // Allozierte Groesse des Puffers
|
||||
sal_uInt16 nBufActualLen; // Laenge des beschriebenen Teils des Puffers
|
||||
// Entspricht nBufSize, wenn EOF nicht
|
||||
// ueberschritten wurde
|
||||
sal_uInt16 nBufActualPos; // aktuelle Position im Puffer (0..nBufSize-1)
|
||||
sal_uInt16 nBufFree; // freier Platz im Puffer fuer IO vom Typ eIOMode
|
||||
sal_uInt16 nBufSize; // Allocated size of buffer
|
||||
sal_uInt16 nBufActualLen; // Length of used segment of puffer
|
||||
// = nBufSize, if EOF did not occur
|
||||
sal_uInt16 nBufActualPos; // current position in buffer (0..nBufSize-1)
|
||||
sal_uInt16 nBufFree; // number of free slots in buffer to IO of type eIOMode
|
||||
unsigned int eIOMode:2; // STREAM_IO_*
|
||||
|
||||
// Error-Codes, Konvertierung, Komprimierung, ...
|
||||
int bIsDirty:1; // sal_True: Stream != Pufferinhalt
|
||||
int bIsConsistent:1;// sal_False: Buffer enthaelt Daten, die NICHT
|
||||
// per PutData in den abgeleiteten Stream
|
||||
// geschrieben werden duerfen (siehe PutBack)
|
||||
// Error codes, conversion, compression, ...
|
||||
int bIsDirty:1; // sal_True: Stream != buffer content
|
||||
int bIsConsistent:1;// sal_False: Buffer contains data, which were
|
||||
// NOT allowed to be written by PutData
|
||||
// into the derived stream (cf. PutBack)
|
||||
int bSwap:1;
|
||||
int bIsEof:1;
|
||||
sal_uInt32 nError;
|
||||
@@ -257,21 +256,21 @@ private:
|
||||
LineEnd eLineDelimiter;
|
||||
CharSet eStreamCharSet;
|
||||
|
||||
// Verschluesselung
|
||||
rtl::OString m_aCryptMaskKey; // aCryptMaskKey.getLength != 0 -> Verschluesselung
|
||||
// Encryption
|
||||
rtl::OString m_aCryptMaskKey; // aCryptMaskKey.getLength != 0 -> Encryption used
|
||||
unsigned char nCryptMask;
|
||||
|
||||
// Userdata
|
||||
long nVersion; // for external use
|
||||
|
||||
// Hilfsmethoden
|
||||
// helper methods
|
||||
TOOLS_DLLPRIVATE void ImpInit();
|
||||
|
||||
SvStream ( const SvStream& rStream ); // not implemented
|
||||
SvStream& operator=( const SvStream& rStream ); // not implemented
|
||||
|
||||
protected:
|
||||
sal_Size nBufFilePos; // Fileposition von pBuf[0]
|
||||
sal_Size nBufFilePos; // File position of pBuf[0]
|
||||
sal_uInt16 eStreamMode;
|
||||
sal_Bool bIsWritable;
|
||||
|
||||
@@ -284,7 +283,7 @@ protected:
|
||||
void ClearError();
|
||||
void ClearBuffer();
|
||||
|
||||
// verschluesselt & schreibt blockweise
|
||||
// encrypt and write in blocks
|
||||
sal_Size CryptAndWriteBuffer( const void* pStart, sal_Size nLen );
|
||||
sal_Bool EncryptBuffer( void* pStart, sal_Size nLen );
|
||||
|
||||
@@ -487,7 +486,7 @@ public:
|
||||
long GetVersion() { return nVersion; }
|
||||
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
|
||||
bool eof() const { return bIsEof; }
|
||||
@@ -694,7 +693,7 @@ protected:
|
||||
virtual void FlushData();
|
||||
|
||||
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();
|
||||
~SvFileStream();
|
||||
@@ -737,25 +736,24 @@ protected:
|
||||
virtual void SetSize( sal_Size nSize );
|
||||
virtual void FlushData();
|
||||
|
||||
// AllocateMemory muss folgende Variable mitpflegen:
|
||||
// - pBuf: Adresse des neuen Blocks
|
||||
// AllocateMemory must update pBuf accordingly
|
||||
// - pBuf: Address of new block
|
||||
virtual sal_Bool AllocateMemory( sal_Size nSize );
|
||||
|
||||
// ReAllocateMemory muss folgende Variablen mitpflegen:
|
||||
// - pBuf: Adresse des neuen Blocks
|
||||
// - nEndOfData: Muss auf nNewSize-1L gesetzt werden, wenn ausserhalb des Blocks
|
||||
// Muss auf 0 gesetzt werden, wenn neuer Block 0 Byte gross
|
||||
// - nSize: Neue Groesse des Blocks
|
||||
// - nPos: Muss auf 0 gesetzt werden, wenn ausserhalb des Blocks
|
||||
// ReAllocateMemory must update the following variables:
|
||||
// - pBuf: Address of new block
|
||||
// - nEndOfData: Set to nNewSize-1L if outside of block
|
||||
// Set to 0 if new block size is 0 bytes
|
||||
// - nSize: New block size
|
||||
// - nPos: Set to 0 if position outside of block
|
||||
virtual sal_Bool ReAllocateMemory( long nDiff );
|
||||
|
||||
// wird aufgerufen, wenn dem Stream der Speicher gehoert oder wenn
|
||||
// der Speicher in der Groesse veraendert wird.
|
||||
// FreeMemory muss folgende Variablen mitpflegen:
|
||||
// - in abgeleiteten Klassen muessen ggf. Handles genullt werden
|
||||
// is called when this stream allocated the buffer
|
||||
// or the buffer is resized.
|
||||
// FreeMemory may need to NULL handles in derived classes
|
||||
virtual void FreeMemory();
|
||||
|
||||
SvMemoryStream(void*) { } // Fuer unsere Subklassen
|
||||
SvMemoryStream(void*) { } // for sub-classes
|
||||
|
||||
public:
|
||||
SvMemoryStream( void* pBuf, sal_Size nSize, StreamMode eMode);
|
||||
@@ -784,14 +782,13 @@ public:
|
||||
// - SvDataCopyStream -
|
||||
// --------------------
|
||||
|
||||
// AB 10.5.1996: Diese Klasse bildet die Basis fuer Klassen, die mittels
|
||||
// SvData (SO2\DTRANS.HXX/CXX) transportiert werden sollen, z.B. Graphik
|
||||
// Die abgeleiteten Klassen muessen die virtuellen Funktionen ueberladen.
|
||||
// This class is the foundation for all classes that use SvData for
|
||||
// transportation (e.g., graphics).
|
||||
|
||||
class TOOLS_DLLPUBLIC SvDataCopyStream
|
||||
{
|
||||
public:
|
||||
// mehrfaches Aufrufen von Load und Assign erlaubt
|
||||
// repeated execution of Load or Assign is allowed
|
||||
TYPEINFO();
|
||||
virtual ~SvDataCopyStream(){}
|
||||
virtual void Load( SvStream & ) = 0;
|
||||
|
@@ -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
|
||||
// Nur fuer Debug-Zwecke (darf nie direkt einem String zugewiesen werden)
|
||||
// Data used for the management of this String
|
||||
// use only for debugging purposes (never assign to String directly!)
|
||||
|
||||
#ifdef SAL_W32
|
||||
#pragma pack(push, 4)
|
||||
@@ -102,7 +102,7 @@ enum StringCompare { COMPARE_LESS = -1, COMPARE_EQUAL = 0, COMPARE_GREATER = 1 }
|
||||
|
||||
typedef struct _UniStringData
|
||||
{
|
||||
sal_Int32 mnRefCount; // Referenz counter
|
||||
sal_Int32 mnRefCount; // reference counter
|
||||
sal_Int32 mnLen; // Length of the String
|
||||
sal_Unicode maStr[1]; // CharArray (String)
|
||||
} UniStringData;
|
||||
|
@@ -119,7 +119,7 @@ typedef sal_uInt16 WindowType;
|
||||
|
||||
typedef sal_Int64 WinBits;
|
||||
|
||||
// Window-Bits fuer Window
|
||||
// Window-Bits for Window
|
||||
#define WB_CLIPCHILDREN ((WinBits)0x00000001)
|
||||
#define WB_DIALOGCONTROL ((WinBits)0x00000002)
|
||||
#define WB_NODIALOGCONTROL ((WinBits)0x00000004)
|
||||
@@ -129,7 +129,7 @@ typedef sal_Int64 WinBits;
|
||||
#define WB_3DLOOK ((WinBits)0x00000040)
|
||||
#define WB_AUTOSIZE ((WinBits)0x00000080)
|
||||
|
||||
// Window-Bits fuer SystemWindows
|
||||
// Window-Bits for SystemWindows
|
||||
#define WB_MOVEABLE ((WinBits)0x00000100)
|
||||
#define WB_ROLLABLE ((WinBits)0x00000200)
|
||||
#define WB_CLOSEABLE ((WinBits)0x00000400)
|
||||
@@ -149,7 +149,7 @@ typedef sal_Int64 WinBits;
|
||||
#define WB_SYSTEMCHILDWINDOW ((WinBits)SAL_CONST_INT64(0x8000000000))
|
||||
#define WB_SIZEMOVE (WB_SIZEABLE | WB_MOVEABLE)
|
||||
|
||||
// Standard-Window-Bits fuer ChildWindows
|
||||
// Standard-Window-Bits for ChildWindows
|
||||
#define WB_TABSTOP ((WinBits)0x00000100)
|
||||
#define WB_NOTABSTOP ((WinBits)0x00000200)
|
||||
#define WB_GROUP ((WinBits)0x00000400)
|
||||
|
@@ -134,7 +134,7 @@ Date::Date( DateInitSystem )
|
||||
SYSTEMTIME aDateTime;
|
||||
GetLocalTime( &aDateTime );
|
||||
|
||||
// Datum zusammenbauen
|
||||
// Combine to date
|
||||
nDate = ((sal_uIntPtr)aDateTime.wDay) +
|
||||
(((sal_uIntPtr)aDateTime.wMonth)*100) +
|
||||
(((sal_uIntPtr)aDateTime.wYear)*10000);
|
||||
@@ -142,10 +142,10 @@ Date::Date( DateInitSystem )
|
||||
time_t nTmpTime;
|
||||
struct tm aTime;
|
||||
|
||||
// Zeit ermitteln
|
||||
// get current time
|
||||
nTmpTime = time( 0 );
|
||||
|
||||
// Datum zusammenbauen
|
||||
// compute date
|
||||
if ( localtime_r( &nTmpTime, &aTime ) )
|
||||
{
|
||||
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 nDayOfYear = (short)GetDayOfYear();
|
||||
|
||||
// Wochentage beginnen bei 0, deshalb einen abziehen
|
||||
// weekdays start at 0, thus decrement one
|
||||
nDayOfYear--;
|
||||
// StartDay beruecksichtigen
|
||||
// account for StartDay
|
||||
n1WDay = (n1WDay+(7-(short)eStartDay)) % 7;
|
||||
|
||||
if (nMinimumNumberOfDaysInWeek < 1 || 7 < nMinimumNumberOfDaysInWeek)
|
||||
@@ -231,8 +231,8 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
|
||||
if ( nMinimumNumberOfDaysInWeek == 1 )
|
||||
{
|
||||
nWeek = ((n1WDay+nDayOfYear)/7) + 1;
|
||||
// 53te-Woche nur dann, wenn wir nicht schon in der ersten
|
||||
// Woche des neuen Jahres liegen
|
||||
// Set to 53rd week only if we're not in the
|
||||
// first week of the new year
|
||||
if ( nWeek == 54 )
|
||||
nWeek = 1;
|
||||
else if ( nWeek == 53 )
|
||||
@@ -247,8 +247,7 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
|
||||
else if ( nMinimumNumberOfDaysInWeek == 7 )
|
||||
{
|
||||
nWeek = ((n1WDay+nDayOfYear)/7);
|
||||
// Erste Woche eines Jahres entspricht der letzen Woche des
|
||||
// vorherigen Jahres
|
||||
// First week of a year is equal to the last week of the previous year
|
||||
if ( nWeek == 0 )
|
||||
{
|
||||
Date aLastDatePrevYear( 31, 12, GetYear()-1 );
|
||||
@@ -284,8 +283,8 @@ sal_uInt16 Date::GetWeekOfYear( DayOfWeek eStartDay,
|
||||
nWeek = (nDayOfYear + n1WDay) / 7;
|
||||
if ( nWeek == 53 )
|
||||
{
|
||||
// naechster x_Sonntag == erster x_Sonntag im neuen Jahr
|
||||
// == noch gleiche Woche
|
||||
// next x_Sonntag == first x_Sonntag in the new year
|
||||
// == still the same week!
|
||||
long nTempDays = DateToDays( GetDay(), GetMonth(), GetYear() );
|
||||
nTempDays += 6 - (GetDayOfWeek()+(7-(short)eStartDay)) % 7;
|
||||
sal_uInt16 nDay;
|
||||
|
@@ -78,7 +78,7 @@ public:
|
||||
sal_uIntPtr Count() const { return nCount; }
|
||||
};
|
||||
|
||||
// --- Datentypen ---
|
||||
// data types
|
||||
|
||||
#define DBG_MAXNAME 28
|
||||
|
||||
@@ -157,7 +157,7 @@ struct DebugData
|
||||
DBG_TEST_XTOR_EXIT | DBG_TEST_XTOR_REPORT )
|
||||
|
||||
// ------------------------------
|
||||
// - statische Verwaltungsdaten -
|
||||
// - static maintenance variables -
|
||||
// ------------------------------
|
||||
|
||||
static DebugData aDebugData;
|
||||
@@ -637,7 +637,7 @@ static DebugData* GetDebugData()
|
||||
{
|
||||
aDebugData.bInit = sal_True;
|
||||
|
||||
// Default Debug-Namen setzen
|
||||
// set default debug names
|
||||
DbgGetLogFileName( aDebugData.aDbgData.aDebugName );
|
||||
|
||||
// DEBUG.INI-File
|
||||
@@ -718,7 +718,7 @@ static DebugData* GetDebugData()
|
||||
OSL_TRACE( "getcwd failed with error %s", strerror(errno) );
|
||||
}
|
||||
|
||||
// Daten initialisieren
|
||||
// initialize debug data
|
||||
if ( aDebugData.aDbgData.nTestFlags & DBG_TEST_XTOR )
|
||||
aDebugData.pXtorList = new PointerList;
|
||||
if ( aDebugData.aDbgData.nTestFlags & DBG_TEST_PROFILING )
|
||||
@@ -780,7 +780,7 @@ static FILETYPE ImplDbgInitFile()
|
||||
pTime = localtime( &nTime );
|
||||
#endif
|
||||
|
||||
// Header ausgeben
|
||||
// print header
|
||||
FilePrintF( pDebugFile, "******************************************************************************%s", FILE_LINEEND );
|
||||
FilePrintF( pDebugFile, "%s%s", pData->aDbgData.aDebugName, FILE_LINEEND );
|
||||
if ( pTime )
|
||||
@@ -898,11 +898,11 @@ static void DebugDeInit()
|
||||
pData->bOslIsHooked = sal_False;
|
||||
}
|
||||
|
||||
// Statistik-Ausgaben immer in File
|
||||
// Output statistics trace data to file
|
||||
nOldOut = pData->aDbgData.nTraceOut;
|
||||
pData->aDbgData.nTraceOut = DBG_OUT_FILE;
|
||||
|
||||
// Xtor-Liste ausgeben
|
||||
// output Xtor list
|
||||
if ( pData->pXtorList && pData->pXtorList->Count() &&
|
||||
(pData->aDbgData.nTestFlags & DBG_TEST_XTOR_REPORT) )
|
||||
{
|
||||
@@ -917,7 +917,7 @@ static void DebugDeInit()
|
||||
XtorType* pXtorData = (XtorType*)pData->pXtorList->Get( i );
|
||||
if ( pXtorData->bTest )
|
||||
{
|
||||
// Static-Objekte dazurechnen
|
||||
// Add static objects
|
||||
pXtorData->nDtorCalls += pXtorData->nStatics;
|
||||
if ( pXtorData->nStatics && (pXtorData->nDtorCalls > pXtorData->nCtorCalls) )
|
||||
pXtorData->nDtorCalls = pXtorData->nCtorCalls;
|
||||
@@ -931,7 +931,7 @@ static void DebugDeInit()
|
||||
DbgOutf( "==============================================================================" );
|
||||
}
|
||||
|
||||
// Aufraeumen
|
||||
// free XtorList
|
||||
if ( pData->pXtorList )
|
||||
{
|
||||
for( i = 0, nCount = pData->pXtorList->Count(); i < nCount; i++ )
|
||||
@@ -943,11 +943,11 @@ static void DebugDeInit()
|
||||
pData->pXtorList = NULL;
|
||||
}
|
||||
|
||||
// Alles auf sal_False setzen, damit globale Variablen nicht das
|
||||
// System zum Abstuerzen bringt. Dabei muessen aber die
|
||||
// Memory-Flags erhalten bleiben, da sonst new/delete in globalen
|
||||
// Variablen abstuerzen, da die Pointeranpassung dann nicht mehr richtig
|
||||
// funktioniert
|
||||
// Set everything to sal_False, as global variables
|
||||
// may cause a system crash otherwise.
|
||||
// Maintain memory flags, as otherwise new/delete calls
|
||||
// for global variables will crash,
|
||||
// as pointer alignment won't work then.
|
||||
pData->aDbgData.nTraceOut = nOldOut;
|
||||
pData->aDbgData.nTestFlags &= DBG_TEST_PROFILING;
|
||||
pData->aDbgPrintUserChannels.clear();
|
||||
@@ -966,11 +966,11 @@ static void DebugGlobalDeInit()
|
||||
sal_uIntPtr nCount;
|
||||
sal_uIntPtr nOldOut;
|
||||
|
||||
// Statistik-Ausgaben immer in File
|
||||
// Output statistics trace data to file
|
||||
nOldOut = pData->aDbgData.nTraceOut;
|
||||
pData->aDbgData.nTraceOut = DBG_OUT_FILE;
|
||||
|
||||
// Profileliste ausgeben
|
||||
// output profile liste
|
||||
if ( pData->pProfList && pData->pProfList->Count() )
|
||||
{
|
||||
DbgOutf( "------------------------------------------------------------------------------" );
|
||||
@@ -991,7 +991,7 @@ static void DebugGlobalDeInit()
|
||||
DbgOutf( "==============================================================================" );
|
||||
}
|
||||
|
||||
// Aufraeumen
|
||||
// free profile list
|
||||
if ( pData->pProfList )
|
||||
{
|
||||
for( i = 0, nCount = pData->pProfList->Count(); i < nCount; i++ )
|
||||
@@ -1003,7 +1003,7 @@ static void DebugGlobalDeInit()
|
||||
pData->pProfList = NULL;
|
||||
}
|
||||
|
||||
// Profiling-Flags ausschalten
|
||||
// disable profiling flags
|
||||
pData->aDbgData.nTraceOut = nOldOut;
|
||||
pData->aDbgData.nTestFlags &= ~DBG_TEST_PROFILING;
|
||||
}
|
||||
@@ -1031,7 +1031,7 @@ static void DebugXTorInfo( sal_Char* pBuf )
|
||||
sal_uIntPtr i;
|
||||
sal_uIntPtr nCount;
|
||||
|
||||
// Xtor-Liste ausgeben
|
||||
// output Xtor list
|
||||
if ( pData->pXtorList && pData->pXtorList->Count() &&
|
||||
(pData->aDbgData.nTestFlags & DBG_TEST_XTOR_REPORT) )
|
||||
{
|
||||
@@ -1219,7 +1219,6 @@ DbgChannelId DbgRegisterUserChannel( DbgPrintLine pProc )
|
||||
|
||||
void DbgProf( sal_uInt16 nAction, DbgDataType* pDbgData )
|
||||
{
|
||||
// Ueberhaupt Profiling-Test an
|
||||
DebugData* pData = ImplGetDebugData();
|
||||
|
||||
if ( !(pData->aDbgData.nTestFlags & DBG_TEST_PROFILING) )
|
||||
@@ -1315,7 +1314,7 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
|
||||
{
|
||||
DebugData* pData = ImplGetDebugData();
|
||||
|
||||
// Schnell-Test
|
||||
// quick test
|
||||
if ( !(pData->aDbgData.nTestFlags & DBG_TEST_XTOR) )
|
||||
return;
|
||||
|
||||
@@ -1351,10 +1350,10 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
|
||||
: nAct == DBG_XTOR_DTOR ? "Enter Dtor from class "
|
||||
: "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 )
|
||||
{
|
||||
// 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 )
|
||||
{
|
||||
SAL_WARN(
|
||||
@@ -1364,7 +1363,7 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
|
||||
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_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;
|
||||
switch ( nAction & ~DBG_XTOR_DTOROBJ )
|
||||
{
|
||||
@@ -1446,7 +1445,6 @@ void DbgXtor( DbgDataType* pDbgData, sal_uInt16 nAction, const void* pThis,
|
||||
break;
|
||||
}
|
||||
|
||||
// Gegebenenfalls Fehlermeldung ausgeben
|
||||
SAL_WARN_IF(
|
||||
pMsg, "tools.debug",
|
||||
"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, " at Line " );
|
||||
|
||||
// Line in String umwandeln und dranhaengen
|
||||
// Convert line to String and append
|
||||
sal_Char aLine[9];
|
||||
sal_Char* pLine = &aLine[7];
|
||||
sal_uInt16 i;
|
||||
|
@@ -68,7 +68,7 @@ struct DirReader_Impl
|
||||
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
|
||||
pDosDir = NULL;
|
||||
@@ -77,7 +77,7 @@ struct DirReader_Impl
|
||||
pDosDir = opendir( aBypass.getStr() );
|
||||
#endif
|
||||
|
||||
// Parent f"ur die neuen DirEntries ermitteln
|
||||
// Determine parents for new DirEntries
|
||||
pParent = pDir->GetFlag() == FSYS_FLAG_NORMAL ||
|
||||
pDir->GetFlag() == FSYS_FLAG_ABSROOT
|
||||
? pDir
|
||||
@@ -88,20 +88,20 @@ struct DirReader_Impl
|
||||
~DirReader_Impl()
|
||||
{ if( pDosDir ) closedir( pDosDir ); }
|
||||
|
||||
// die folgenden sind systemabh"angig implementiert
|
||||
sal_uInt16 Init(); // initialisiert, liest ggf. devices
|
||||
sal_uInt16 Read(); // liest 1 Eintrag, F2ugt ein falls ok
|
||||
// Init and Read are system-independent
|
||||
sal_uInt16 Init(); // initializes (and if necessary reads devices)
|
||||
sal_uInt16 Read(); // Reads one entry and appends it if ok
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
||||
struct FileCopier_Impl
|
||||
{
|
||||
FSysAction nActions; // was zu tun ist (Copy/Move/recur)
|
||||
Link aErrorLink; // bei Fehlern zu rufen
|
||||
ErrCode eErr; // aktueller Fehlercode im Error-Handler
|
||||
const DirEntry* pErrSource; // fuer Error-Handler falls Source-Fehler
|
||||
const DirEntry* pErrTarget; // fuer Error-Handler falls Target-Fehler
|
||||
FSysAction nActions; // action command (Copy/Move/recur)
|
||||
Link aErrorLink; // link to call upon errors
|
||||
ErrCode eErr; // current errorcode in the handler
|
||||
const DirEntry* pErrSource; // for error handlers in case of Source error
|
||||
const DirEntry* pErrTarget; // for error handlers in case of Target error
|
||||
|
||||
FileCopier_Impl()
|
||||
: nActions( 0 ), eErr( 0 ),
|
||||
|
@@ -190,9 +190,9 @@ DirEntryStack::~DirEntryStack()
|
||||
|*
|
||||
|* ImpCheckDirEntry()
|
||||
|*
|
||||
|* Beschreibung Pruefung eines DirEntry fuer DBG_UTIL
|
||||
|* Parameter void* p Zeiger auf den DirEntry
|
||||
|* Return-Wert char* Fehlermeldungs-TExtension oder NULL
|
||||
|* Description Check DirEntry for DBG_UTIL
|
||||
|* Parameter void* p Pointer to DirEntry
|
||||
|* Return-Valu char* Error-TExtension or NULL
|
||||
|*
|
||||
*************************************************************************/
|
||||
|
||||
@@ -212,7 +212,7 @@ const char* ImpCheckDirEntry( const void* p )
|
||||
|*
|
||||
|* 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 )
|
||||
nBegin = 0;
|
||||
else
|
||||
nMaxPathLen += 2; // fuer Prefix <Laufwerk>:
|
||||
nMaxPathLen += 2; // Prefix <Disk>:
|
||||
|
||||
while( aCutPath.getLength() > nMaxPathLen )
|
||||
{
|
||||
@@ -271,7 +271,7 @@ FSysError DirEntry::ImpParseName( const rtl::OString& rPfad )
|
||||
#if defined(WNT)
|
||||
DBG_CHKTHIS( DirEntry, ImpCheckDirEntry );
|
||||
|
||||
// die einzelnen Namen auf einen Stack packen
|
||||
// put single names onto stack
|
||||
String aPfad(rtl::OStringToOUString(rPfad, osl_getThreadTextEncoding()));
|
||||
DirEntryStack aStack;
|
||||
|
||||
|
Reference in New Issue
Block a user