diff options
author | Philipp Riemer <ruderphilipp@gmail.com> | 2012-08-13 22:51:30 +0200 |
---|---|---|
committer | Philipp Riemer <ruderphilipp@gmail.com> | 2012-08-13 23:52:37 +0200 |
commit | 731f3ce64a84b14b43a2a8ca3d455dd8711781b9 (patch) | |
tree | a91cb5cd15df91af172beb59e1a4b68959a01a92 | |
parent | 7dfba55bfd15b3c3b080a13b63073e6d2ab808b7 (diff) |
clean-up of existing comments in tools/inc
This is a follow-up patch of c8b7aa55138848fe07108779099267424bc03e3d.
Change-Id: Ie220db245c08a6144f74a3727db3d6bdc2786495
46 files changed, 260 insertions, 604 deletions
diff --git a/tools/inc/impcont.hxx b/tools/inc/impcont.hxx index 87b963880fe5..559a861834d2 100644 --- a/tools/inc/impcont.hxx +++ b/tools/inc/impcont.hxx @@ -25,10 +25,6 @@ typedef void* PVOID; -// ---------- -// - CBlock - -// ---------- - class CBlock { private: diff --git a/tools/inc/poly.h b/tools/inc/poly.h index 9105ed9c85c2..cefad73b8775 100644 --- a/tools/inc/poly.h +++ b/tools/inc/poly.h @@ -22,10 +22,6 @@ #include <tools/gen.hxx> -// ------------------- -// - ImplPolygonData - -// ------------------- - class ImplPolygonData { public: @@ -35,10 +31,6 @@ public: sal_uIntPtr mnRefCount; }; -// --------------- -// - ImplPolygon - -// --------------- - class ImplPolygon : public ImplPolygonData { public: @@ -52,10 +44,6 @@ public: void ImplSplit( sal_uInt16 nPos, sal_uInt16 nSpace, ImplPolygon* pInitPoly = NULL ); }; -// ------------------- -// - ImplPolyPolygon - -// ------------------- - #define MAX_POLYGONS ((sal_uInt16)0x3FF0) class Polygon; diff --git a/tools/inc/tools/bigint.hxx b/tools/inc/tools/bigint.hxx index bc8859642789..276efacb3f99 100644 --- a/tools/inc/tools/bigint.hxx +++ b/tools/inc/tools/bigint.hxx @@ -31,10 +31,6 @@ struct SbxUINT64; namespace binfilter { class SbxINT64Converter; } #endif -// ---------- -// - BigInt - -// ---------- - #define MAX_DIGITS 8 class Fraction; @@ -49,9 +45,9 @@ private: long nVal; unsigned short nNum[MAX_DIGITS]; 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 - bIsSet : 1; // Not "Null" (not not 0) + bIsSet : 1; // Not "Null" (not "not 0") TOOLS_DLLPRIVATE void MakeBigInt(BigInt const &); TOOLS_DLLPRIVATE void Normalize(); diff --git a/tools/inc/tools/cachestr.hxx b/tools/inc/tools/cachestr.hxx index babe4d07b98f..60c31e298cf8 100644 --- a/tools/inc/tools/cachestr.hxx +++ b/tools/inc/tools/cachestr.hxx @@ -16,7 +16,6 @@ * except in compliance with the License. You may obtain a copy of * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #ifndef _CACHESTR_HXX #define _CACHESTR_HXX @@ -24,27 +23,26 @@ #include <tools/string.hxx> #include "tools/toolsdllapi.h" -// ----------------- -// - SvCacheStream - -// ----------------- - class TempFile; + class TOOLS_DLLPUBLIC SvCacheStream : public SvStream { private: String aFileName; - sal_uIntPtr nMaxSize; + sal_uIntPtr nMaxSize; int bPersistent; SvStream* pSwapStream; SvStream* pCurrentStream; TempFile* pTempFile; - TOOLS_DLLPRIVATE virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ); - TOOLS_DLLPRIVATE virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize ); - TOOLS_DLLPRIVATE virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos ); - TOOLS_DLLPRIVATE virtual void FlushData(); - TOOLS_DLLPRIVATE virtual void SetSize( sal_uIntPtr nSize ); + TOOLS_DLLPRIVATE virtual sal_uIntPtr GetData( void* pData, + sal_uIntPtr nSize ); + TOOLS_DLLPRIVATE virtual sal_uIntPtr PutData( const void* pData, + sal_uIntPtr nSize ); + TOOLS_DLLPRIVATE virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos ); + TOOLS_DLLPRIVATE virtual void FlushData(); + TOOLS_DLLPRIVATE virtual void SetSize( sal_uIntPtr nSize ); public: SvCacheStream( sal_uIntPtr nMaxMemSize = 0 ); @@ -56,9 +54,9 @@ public: void SwapOut(); const void* GetBuffer(); - sal_uIntPtr GetSize(); + sal_uIntPtr GetSize(); - sal_Bool IsPersistent() { return bPersistent != 0; } + sal_Bool IsPersistent() { return bPersistent != 0; } void SetPersistence( sal_Bool b = sal_True ) { bPersistent = b; } void SetSwapStream( SvStream *p ) { pSwapStream = p; } // call only from FilenameHdl diff --git a/tools/inc/tools/color.hxx b/tools/inc/tools/color.hxx index da77c61d0287..75bddc8a3bde 100644 --- a/tools/inc/tools/color.hxx +++ b/tools/inc/tools/color.hxx @@ -27,10 +27,7 @@ class ResId; #include <basegfx/color/bcolor.hxx> -// --------------- -// - Color-Types - -// --------------- - +// Color types typedef sal_uInt32 ColorData; #define RGB_COLORDATA( r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16)) #define TRGB_COLORDATA( t,r,g,b ) ((ColorData)(((sal_uInt32)((sal_uInt8)(b))))|(((sal_uInt32)((sal_uInt8)(g)))<<8)|(((sal_uInt32)((sal_uInt8)(r)))<<16)|(((sal_uInt32)((sal_uInt8)(t)))<<24)) @@ -90,9 +87,7 @@ typedef sal_uInt32 ColorData; #define COLOR_CHANNEL_MERGE( _def_cDst, _def_cSrc, _def_cSrcTrans ) \ ((sal_uInt8)((((long)(_def_cDst)-(_def_cSrc))*(_def_cSrcTrans)+(((_def_cSrc)<<8L)|(_def_cDst)))>>8L)) -// --------- -// - Color - -// --------- +// Color class TOOLS_DLLPUBLIC Color { diff --git a/tools/inc/tools/config.hxx b/tools/inc/tools/config.hxx index 26a532fefa09..f4ae84154b85 100644 --- a/tools/inc/tools/config.hxx +++ b/tools/inc/tools/config.hxx @@ -25,10 +25,6 @@ struct ImplConfigData; struct ImplGroupData; -// ---------- -// - Config - -// ---------- - class TOOLS_DLLPUBLIC Config { private: diff --git a/tools/inc/tools/contnr.hxx b/tools/inc/tools/contnr.hxx index cfd140d9eb73..2bba0431cd85 100644 --- a/tools/inc/tools/contnr.hxx +++ b/tools/inc/tools/contnr.hxx @@ -26,12 +26,7 @@ class CBlock; -// ------------- -// - Container - -// ------------- - #define CONTAINER_MAXBLOCKSIZE ((sal_uInt16)0x3FF0) - #define CONTAINER_APPEND ULONG_MAX #define CONTAINER_ENTRY_NOTFOUND ULONG_MAX diff --git a/tools/inc/tools/date.hxx b/tools/inc/tools/date.hxx index c400e3096171..a9fe36fb3448 100644 --- a/tools/inc/tools/date.hxx +++ b/tools/inc/tools/date.hxx @@ -24,17 +24,9 @@ class ResId; -// -------------- -// - Date-Types - -// -------------- - enum DayOfWeek { MONDAY, TUESDAY, WEDNESDAY, THURSDAY, FRIDAY, SATURDAY, SUNDAY }; -// -------- -// - Date - -// -------- - class TOOLS_DLLPUBLIC Date { private: @@ -46,7 +38,8 @@ public: { SYSTEM }; - // temporary until all uses are inspected and resolved + + // TODO temporary until all uses are inspected and resolved enum DateInitEmpty { EMPTY diff --git a/tools/inc/tools/datetime.hxx b/tools/inc/tools/datetime.hxx index 61ea84260e32..0c1261a750f2 100644 --- a/tools/inc/tools/datetime.hxx +++ b/tools/inc/tools/datetime.hxx @@ -24,10 +24,6 @@ #include <tools/date.hxx> #include <tools/time.hxx> -// ------------ -// - DateTime - -// ------------ - class TOOLS_DLLPUBLIC DateTime : public Date, public Time { public: @@ -36,7 +32,8 @@ public: { SYSTEM }; - // temporary until all uses are inspected and resolved + + // TODO temporary until all uses are inspected and resolved enum DateTimeInitEmpty { EMPTY diff --git a/tools/inc/tools/debug.hxx b/tools/inc/tools/debug.hxx index 6d3173725840..e1e52c1fd62b 100644 --- a/tools/inc/tools/debug.hxx +++ b/tools/inc/tools/debug.hxx @@ -40,10 +40,6 @@ SAL_INFO. */ -// ------------ -// - DBG_UITL - -// ------------ - #ifdef DBG_UTIL typedef void (*DbgPrintLine)( const sal_Char* pLine ); @@ -460,10 +456,7 @@ do \ } while(0) #else - -// --------------- -// - NO DBG_UITL - -// --------------- +// NO DBG_UITL struct DbgData; struct DbgDataType; diff --git a/tools/inc/tools/errcode.hxx b/tools/inc/tools/errcode.hxx index 3ba47276754b..fdd6ffca98f2 100644 --- a/tools/inc/tools/errcode.hxx +++ b/tools/inc/tools/errcode.hxx @@ -36,7 +36,7 @@ Warning || || | | || | | || | | || | - Class | + Class| | | | | | | | diff --git a/tools/inc/tools/errinf.hxx b/tools/inc/tools/errinf.hxx index 06e20b236631..61b69de8a2d3 100644 --- a/tools/inc/tools/errinf.hxx +++ b/tools/inc/tools/errinf.hxx @@ -32,14 +32,10 @@ class EDcr_Impl; class ErrHdl_Impl; class Window; -// ------------- -// - ErrorInfo - -// ------------- - class ErrorInfo { private: - sal_uIntPtr lUserId; + sal_uIntPtr lUserId; public: TYPEINFO(); @@ -48,16 +44,11 @@ public: lUserId( lArgUserId ){} virtual ~ErrorInfo(){} - sal_uIntPtr GetErrorCode() const { return lUserId; } + sal_uIntPtr GetErrorCode() const { return lUserId; } static ErrorInfo* GetErrorInfo(sal_uIntPtr); }; - -// -------------------- -// - DynamicErrorInfo - -// -------------------- - class TOOLS_DLLPUBLIC DynamicErrorInfo : public ErrorInfo { friend class EDcr_Impl; @@ -72,14 +63,9 @@ public: virtual ~DynamicErrorInfo(); operator sal_uIntPtr() const; - sal_uInt16 GetDialogMask() const; + sal_uInt16 GetDialogMask() const; }; - -// ------------------- -// - StringErrorInfo - -// ------------------- - class TOOLS_DLLPUBLIC StringErrorInfo : public DynamicErrorInfo { private: @@ -94,7 +80,6 @@ public: const String& GetErrorString() const { return aString; } }; -//============================================================================= class TOOLS_DLLPUBLIC TwoStringErrorInfo: public DynamicErrorInfo { private: @@ -113,14 +98,9 @@ public: String GetArg2() const { return aArg2; } }; -// ------------------- -// - MessageInfo - -// ------------------- - class TOOLS_DLLPUBLIC MessageInfo : public DynamicErrorInfo { - public: - +public: TYPEINFO(); MessageInfo(sal_uIntPtr UserId, sal_uInt16 nFlags = 0) : DynamicErrorInfo(UserId, nFlags){} @@ -129,16 +109,10 @@ class TOOLS_DLLPUBLIC MessageInfo : public DynamicErrorInfo DynamicErrorInfo(UserId, nFlags), aArg(rArg) {} const String& GetMessageArg() const { return aArg; } - private: - +private: String aArg; }; - -// ---------------- -// - ErrorContext - -// ---------------- - class TOOLS_DLLPUBLIC ErrorContext { friend class ErrorHandler; @@ -151,17 +125,12 @@ public: ErrorContext(Window *pWin=0); virtual ~ErrorContext(); - virtual sal_Bool GetString( sal_uIntPtr nErrId, String& rCtxStr ) = 0; + virtual sal_Bool GetString( sal_uIntPtr nErrId, String& rCtxStr ) = 0; Window* GetParent() { return pWin; } static ErrorContext* GetContext(); }; - -// ---------------- -// - ErrorHandler - -// ---------------- - typedef sal_uInt16 WindowDisplayErrorFunc( Window *, sal_uInt16 nMask, const String &rErr, const String &rAction); @@ -187,27 +156,21 @@ public: ErrorHandler(); virtual ~ErrorHandler(); - static sal_uInt16 HandleError ( sal_uIntPtr lId, sal_uInt16 nMask = USHRT_MAX ); - static sal_Bool GetErrorString( sal_uIntPtr lId, String& rStr ); + static sal_uInt16 HandleError ( sal_uIntPtr lId, sal_uInt16 nMask = USHRT_MAX ); + static sal_Bool GetErrorString( sal_uIntPtr lId, String& rStr ); static void RegisterDisplay( BasicDisplayErrorFunc* ); static void RegisterDisplay( WindowDisplayErrorFunc* ); }; - -// ---------------------- -// - SimpleErrorHandler - -// ---------------------- - class TOOLS_DLLPUBLIC SimpleErrorHandler : private ErrorHandler { protected: - virtual sal_Bool CreateString( const ErrorInfo*, String &, + virtual sal_Bool CreateString( const ErrorInfo*, String &, sal_uInt16 &nMask ) const; public: SimpleErrorHandler(); - }; #endif diff --git a/tools/inc/tools/fldunit.hxx b/tools/inc/tools/fldunit.hxx index 475ca8a552fd..d3834de1790d 100644 --- a/tools/inc/tools/fldunit.hxx +++ b/tools/inc/tools/fldunit.hxx @@ -20,10 +20,6 @@ #ifndef _TOOLS_FLDUNIT_HXX #define _TOOLS_FLDUNIT_HXX -// -------------- -// - FieldTypes - -// -------------- - enum FieldUnit { FUNIT_NONE, FUNIT_MM, FUNIT_CM, FUNIT_M, FUNIT_KM, FUNIT_TWIP, FUNIT_POINT, FUNIT_PICA, FUNIT_INCH, FUNIT_FOOT, FUNIT_MILE, FUNIT_CHAR, FUNIT_LINE, FUNIT_CUSTOM, diff --git a/tools/inc/tools/fract.hxx b/tools/inc/tools/fract.hxx index c765b0ef9bb8..2e710693b56e 100644 --- a/tools/inc/tools/fract.hxx +++ b/tools/inc/tools/fract.hxx @@ -23,9 +23,6 @@ #include <tools/solar.h> class SvStream; -// ------------ -// - Fraction - -// ------------ class TOOLS_DLLPUBLIC Fraction { diff --git a/tools/inc/tools/fsys.hxx b/tools/inc/tools/fsys.hxx index 43d928e2c718..b671ee388f6e 100644 --- a/tools/inc/tools/fsys.hxx +++ b/tools/inc/tools/fsys.hxx @@ -32,10 +32,7 @@ #define FEAT_FSYS_DOUBLESPEED -// -------------- -// - FSys-Types - -// -------------- - +// FSys-Types class DirEntry; class FileStat; struct FileCopier_Impl; @@ -134,10 +131,7 @@ enum FSysExact FSYS_EXACT }; -// ------------ -// - FileStat - -// ------------ - +// FileStat struct dirent; class TOOLS_DLLPUBLIC FileStat { @@ -191,9 +185,7 @@ public: static sal_Bool GetReadOnlyFlag( const DirEntry &rEntry ); }; -// ------------ -// - DirEntry - -// ------------ +// DirEntry class DirEntryStack; @@ -314,9 +306,7 @@ public: static String GetSearchDelimiter( FSysPathStyle eFormatter = FSYS_STYLE_HOST ); }; -// ----------------------------------------------------- -// - FileCopier - a private impl. detail of tools/ ... - -// ----------------------------------------------------- +// FileCopier (a private impl. detail of tools/) class FileCopier { @@ -364,9 +354,7 @@ public: const Link& GetProgressHdl() const { return aProgressLink; } }; -// ------- -// - Dir - -// ------- +// Dir struct DirReader_Impl; class TOOLS_DLLPUBLIC Dir : public DirEntry diff --git a/tools/inc/tools/gen.hxx b/tools/inc/tools/gen.hxx index da62346e417a..771b346cceeb 100644 --- a/tools/inc/tools/gen.hxx +++ b/tools/inc/tools/gen.hxx @@ -26,10 +26,7 @@ class SvStream; - -// -------- -// - Pair - -// -------- +// Pair class Pair { @@ -74,9 +71,7 @@ inline sal_Bool Pair::operator != ( const Pair& rPair ) const return ((nA != rPair.nA) || (nB != rPair.nB)); } -// --------- -// - Point - -// --------- +// Point class Point : public Pair { @@ -194,9 +189,7 @@ inline Point operator/( const Point &rVal1, const long nVal2 ) return Point( rVal1.nA/nVal2, rVal1.nB/nVal2 ); } -// -------- -// - Size - -// -------- +// Size class Size : public Pair { @@ -225,9 +218,7 @@ inline Size::Size( long nWidth, long nHeight ) : { } -// --------- -// - Range - -// --------- +// Range #define RANGE_MAX LONG_MAX @@ -272,9 +263,7 @@ inline void Range::Justify() } } -// ------------- -// - Selection - -// ------------- +// Selection #define SELECTION_MIN LONG_MIN #define SELECTION_MAX LONG_MAX @@ -333,9 +322,7 @@ inline void Selection::Justify() } } -// ------------- -// - Rectangle - -// ------------- +// Rectangle #define RECT_EMPTY ((short)-32767) diff --git a/tools/inc/tools/inetmsg.hxx b/tools/inc/tools/inetmsg.hxx index 78d33b4e9e1b..67945dede1b3 100644 --- a/tools/inc/tools/inetmsg.hxx +++ b/tools/inc/tools/inetmsg.hxx @@ -31,11 +31,6 @@ class DateTime; -/*======================================================================= - * - * INetMessageHeader Interface. - * - *=====================================================================*/ class INetMessageHeader { rtl::OString m_aName; @@ -85,11 +80,6 @@ public: } }; -/*======================================================================= - * - * INetMessage Interface. - * - *=====================================================================*/ typedef ::std::vector< INetMessageHeader* > HeaderList_impl; class INetMessage { @@ -217,11 +207,6 @@ public: } }; -/*======================================================================= - * - * INetRFC822Message Interface. - * - *=====================================================================*/ #define INETMSG_RFC822_BCC 0 #define INETMSG_RFC822_CC 1 #define INETMSG_RFC822_COMMENTS 2 @@ -266,8 +251,8 @@ public: sal_uIntPtr nIndex = ((sal_uIntPtr)-1) ); - /** Header fields. - */ + // Header fields. + rtl::OUString GetBCC() const { return GetHeaderValue_Impl ( @@ -373,8 +358,8 @@ public: INetMIME::HEADER_FIELD_TEXT); } - /** Stream operators. - */ + // Stream operators. + friend SvStream& operator<< ( SvStream& rStrm, const INetRFC822Message& rMsg) { @@ -388,11 +373,6 @@ public: } }; -/*======================================================================= - * - * INetMIMEMessage Interface. - * - *=====================================================================*/ #define INETMSG_MIME_VERSION 0 #define INETMSG_MIME_CONTENT_DESCRIPTION 1 #define INETMSG_MIME_CONTENT_DISPOSITION 2 @@ -455,8 +435,8 @@ public: sal_uIntPtr nIndex = ((sal_uIntPtr)-1) ); - /** Header fields. - */ + // Header fields. + void SetMIMEVersion (const UniString& rVersion); UniString GetMIMEVersion() const { @@ -493,8 +473,8 @@ public: rtl::OUString GetDefaultContentType (); - /** Message container methods. - */ + // Message container methods. + sal_Bool IsContainer() const { return (IsMessage() || IsMultipart()); @@ -521,8 +501,8 @@ public: sal_Bool AttachChild ( INetMIMEMessage& rChildMsg, sal_Bool bOwner = sal_True); - /** Stream operators. - */ + // Stream operators. + friend SvStream& operator<< ( SvStream& rStrm, const INetMIMEMessage& rMsg) { diff --git a/tools/inc/tools/inetstrm.hxx b/tools/inc/tools/inetstrm.hxx index dd3e430597a8..e7da8e57ea2c 100644 --- a/tools/inc/tools/inetstrm.hxx +++ b/tools/inc/tools/inetstrm.hxx @@ -28,11 +28,6 @@ class INetMIMEMessage; class SvMemoryStream; class SvStream; -/*========================================================================= - * - * INetStream Interface. - * - *=======================================================================*/ enum INetStreamStatus { INETSTREAM_STATUS_LOADED = -4, @@ -41,9 +36,6 @@ enum INetStreamStatus INETSTREAM_STATUS_ERROR = -1 }; -/* - * INetIStream. - */ class TOOLS_DLLPUBLIC INetIStream { // Not implemented. @@ -60,9 +52,6 @@ public: int Read (sal_Char *pData, sal_uIntPtr nSize); }; -/* - * INetOStream. - */ class INetOStream { // Not implemented. @@ -80,11 +69,6 @@ public: int Write (const sal_Char *pData, sal_uIntPtr nSize); }; -/*========================================================================= - * - * INetMessageStream Interface. - * - *=======================================================================*/ enum INetMessageStreamState { INETMSG_EOL_BEGIN, @@ -162,9 +146,6 @@ public: sal_Bool IsHeaderParsed (void) const { return bHeaderParsed; } }; -/* - * INetMessageIOStream Interface. - */ class INetMessageIOStream : public INetMessageIStream, public INetMessageOStream @@ -178,11 +159,6 @@ public: virtual ~INetMessageIOStream (void); }; -/*========================================================================= - * - * INetMIMEMessageStream Interface. - * - *=======================================================================*/ enum INetMessageEncoding { INETMSG_ENCODING_7BIT, diff --git a/tools/inc/tools/line.hxx b/tools/inc/tools/line.hxx index 19aa4fe3ee59..6088e5adfb6d 100644 --- a/tools/inc/tools/line.hxx +++ b/tools/inc/tools/line.hxx @@ -24,10 +24,6 @@ class Link; -// -------- -// - Line - -// -------- - class TOOLS_DLLPUBLIC Line { private: diff --git a/tools/inc/tools/link.hxx b/tools/inc/tools/link.hxx index 0a7475b0d2ab..a364e06f0f71 100644 --- a/tools/inc/tools/link.hxx +++ b/tools/inc/tools/link.hxx @@ -24,10 +24,6 @@ #include "sal/types.h" #include <tools/solar.h> -// --------------- -// - Link-Makros - -// --------------- - typedef long (*PSTUB)( void*, void* ); #define DECL_LINK( Method, ArgType ) \ @@ -89,10 +85,6 @@ typedef long (*PSTUB)( void*, void* ); #define EMPTYARG -// -------- -// - Link - -// -------- - class TOOLS_DLLPUBLIC Link { void* pInst; diff --git a/tools/inc/tools/list.hxx b/tools/inc/tools/list.hxx index b462d5526c07..e267f974d360 100644 --- a/tools/inc/tools/list.hxx +++ b/tools/inc/tools/list.hxx @@ -23,10 +23,7 @@ #include <tools/solar.h> #include <tools/contnr.hxx> -// -------- -// - List - -// -------- - +#define LIST_APPEND CONTAINER_APPEND #define LIST_ENTRY_NOTFOUND CONTAINER_ENTRY_NOTFOUND class List : private Container diff --git a/tools/inc/tools/mapunit.hxx b/tools/inc/tools/mapunit.hxx index cc02d915e8ce..eceb630fb135 100644 --- a/tools/inc/tools/mapunit.hxx +++ b/tools/inc/tools/mapunit.hxx @@ -20,10 +20,6 @@ #ifndef _TOOLS_MAPUNIT_HXX #define _TOOLS_MAPUNIT_HXX -// ----------------- -// - MapMode-Types - -// ----------------- - enum MapUnit { MAP_100TH_MM, MAP_10TH_MM, MAP_MM, MAP_CM, MAP_1000TH_INCH, MAP_100TH_INCH, MAP_10TH_INCH, MAP_INCH, MAP_POINT, MAP_TWIP, MAP_PIXEL, MAP_SYSFONT, MAP_APPFONT, diff --git a/tools/inc/tools/mempool.hxx b/tools/inc/tools/mempool.hxx index a20e9df3be5a..fc58a60e47fd 100644 --- a/tools/inc/tools/mempool.hxx +++ b/tools/inc/tools/mempool.hxx @@ -25,10 +25,6 @@ #include "tools/toolsdllapi.h" #include "tools/solar.h" -// ---------------- -// - FixedMemPool - -// ---------------- - struct FixedMemPool_Impl; class TOOLS_DLLPUBLIC FixedMemPool @@ -45,10 +41,6 @@ public: void Free( void* p ); }; -// ---------------------------- -// - DECL_FIXEDMEMPOOL_NEWDEL - -// ---------------------------- - #define DECL_FIXEDMEMPOOL_NEW_DECL() \ static void * operator new( size_t n ) diff --git a/tools/inc/tools/multisel.hxx b/tools/inc/tools/multisel.hxx index f196f36dc16d..9bcda05a3145 100644 --- a/tools/inc/tools/multisel.hxx +++ b/tools/inc/tools/multisel.hxx @@ -34,10 +34,6 @@ typedef ::std::vector< Range* > ImpSelList; //------------------------------------------------------------------ -// ------------------ -// - MultiSelection - -// ------------------ - class TOOLS_DLLPUBLIC MultiSelection { private: diff --git a/tools/inc/tools/poly.hxx b/tools/inc/tools/poly.hxx index 372a81daac10..c28106def61a 100644 --- a/tools/inc/tools/poly.hxx +++ b/tools/inc/tools/poly.hxx @@ -25,10 +25,6 @@ #include <vector> -// ----------- -// - Defines - -// ----------- - #define POLY_APPEND (0xFFFF) #define POLYPOLY_APPEND (0xFFFF) @@ -41,10 +37,6 @@ #define POLY_OPTIMIZE_REDUCE 0x00000008UL #define POLY_OPTIMIZE_EDGES 0x00000010UL -// ------------- -// - PolyStyle - -// ------------- - enum PolyStyle { POLY_ARC = 1, @@ -52,10 +44,6 @@ enum PolyStyle POLY_CHORD = 3 }; -// ------------- -// - PolyFlags - -// ------------- - #ifndef ENUM_POLYFLAGS_DECLARED #define ENUM_POLYFLAGS_DECLARED enum PolyFlags @@ -67,10 +55,6 @@ enum PolyFlags }; #endif -// ---------------- -// - PolyOptimize - -// ---------------- - class PolyOptimizeData { private: @@ -89,10 +73,6 @@ public: sal_uInt16 GetPercentValue() const { DBG_ASSERT( eType == DATA_PERCENT, "Wrong data type" ); return mnPercent; } }; -// ----------- -// - Polygon - -// ----------- - class SvStream; class ImplPolygon; class ImplPolyPolygon; @@ -219,10 +199,6 @@ public: explicit Polygon(const ::basegfx::B2DPolygon& rPolygon); }; -// --------------- -// - PolyPolygon - -// --------------- - class TOOLS_DLLPUBLIC PolyPolygon { private: diff --git a/tools/inc/tools/pstm.hxx b/tools/inc/tools/pstm.hxx index 3a209687d137..6f971ca7014a 100644 --- a/tools/inc/tools/pstm.hxx +++ b/tools/inc/tools/pstm.hxx @@ -21,7 +21,6 @@ #include <boost/unordered_map.hpp> #include "tools/toolsdllapi.h" - #include <tools/unqidx.hxx> #include <tools/ref.hxx> #include <tools/rtti.hxx> @@ -30,10 +29,10 @@ #define ERRCODE_IO_NOFACTORY ERRCODE_IO_WRONGFORMAT -/************************************************************************* -*************************************************************************/ class SvPersistBase; + typedef void * (*SvCreateInstancePersist)( SvPersistBase ** ); + #define SV_CLASS_REGISTER( Class ) \ Register( Class::StaticClassId(), Class::CreateInstance ) @@ -41,13 +40,12 @@ class TOOLS_DLLPUBLIC SvClassManager { typedef boost::unordered_map<sal_Int32, SvCreateInstancePersist> Map; Map aAssocTable; + public: void Register( sal_Int32 nClassId, SvCreateInstancePersist pFunc ); SvCreateInstancePersist Get( sal_Int32 nClassId ); }; -/************************** S v R t t i B a s e **************************/ - class TOOLS_DLLPUBLIC SvRttiBase : public SvRefBase { public: @@ -55,7 +53,6 @@ public: }; SV_DECL_IMPL_REF(SvRttiBase) -/*************************************************************************/ #define SV_DECL_PERSIST( Class, CLASS_ID ) \ TYPEINFO(); \ static sal_Int32 StaticClassId() { return CLASS_ID; } \ @@ -90,8 +87,8 @@ SV_DECL_IMPL_REF(SvRttiBase) TYPEINIT1( Class, Super1 ) \ PRV_SV_IMPL_PERSIST( Class ) -/*************************************************************************/ class SvPersistStream; + class SvPersistBase : public SvRttiBase { public: @@ -103,8 +100,6 @@ public: }; SV_DECL_IMPL_REF(SvPersistBase) -/*************************************************************************/ - class SvPersistListWriteable { public: @@ -112,6 +107,7 @@ public: virtual size_t size() const = 0; virtual SvPersistBase* GetPersistBase(size_t idx) const = 0; }; + class SvPersistListReadable { public: @@ -123,9 +119,11 @@ void TOOLS_DLLPUBLIC WritePersistListObjects(const SvPersistListWriteable& rList void TOOLS_DLLPUBLIC ReadObjects( SvPersistListReadable& rLst, SvPersistStream & rStm); -// T has to be a subtype of "SvPersistBase*" +// <T> has to be a subtype of "SvPersistBase*" template<typename T> -class SvDeclPersistList : public SvRefMemberList<T>, public SvPersistListWriteable, public SvPersistListReadable +class SvDeclPersistList : public SvRefMemberList<T>, + public SvPersistListWriteable, + public SvPersistListReadable { public: // implement the reader/writer adapter methods @@ -150,10 +148,8 @@ SvPersistStream& operator >> (SvPersistStream &rStm, SvDeclPersistList<T> &rLst) }; typedef UniqueIndex<SvPersistBase> SvPersistUIdx; - typedef std::map<SvPersistBase*, sal_uIntPtr> PersistBaseMap; -//========================================================================= class SvStream; /** Persistent Stream @@ -191,24 +187,25 @@ class SvStream; */ class TOOLS_DLLPUBLIC SvPersistStream : public SvStream { - SvClassManager & rClassMgr; - SvStream * pStm; - PersistBaseMap aPTable; // reversed pointer and key - SvPersistUIdx aPUIdx; - sal_uIntPtr nStartIdx; + SvClassManager & rClassMgr; + SvStream * pStm; + PersistBaseMap aPTable; // reversed pointer and key + SvPersistUIdx aPUIdx; + sal_uIntPtr nStartIdx; const SvPersistStream * pRefStm; - sal_uInt32 nFlags; + sal_uInt32 nFlags; - virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ); - virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize ); - virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos ); + virtual sal_uIntPtr GetData( void* pData, sal_uIntPtr nSize ); + virtual sal_uIntPtr PutData( const void* pData, sal_uIntPtr nSize ); + virtual sal_uIntPtr SeekPos( sal_uIntPtr nPos ); virtual void FlushData(); + protected: void WriteObj( sal_uInt8 nHdr, SvPersistBase * pObj ); - sal_uInt32 ReadObj( SvPersistBase * & rpObj, - sal_Bool bRegister ); + sal_uInt32 ReadObj( SvPersistBase * & rpObj, sal_Bool bRegister ); + public: - sal_Bool IsStreamed( SvPersistBase * pObj ) const + sal_Bool IsStreamed( SvPersistBase * pObj ) const { return 0 != GetIndex( pObj ); } virtual void ResetError(); @@ -218,20 +215,20 @@ public: void SetStream( SvStream * pStream ); SvStream * GetStream() const { return pStm; } - virtual sal_uInt16 IsA() const; + virtual sal_uInt16 IsA() const; SvPersistBase * GetObject( sal_uIntPtr nIdx ) const; - sal_uIntPtr GetIndex( SvPersistBase * ) const; + sal_uIntPtr GetIndex( SvPersistBase * ) const; void SetContextFlags( sal_uInt32 n ) { nFlags = n; } - sal_uInt32 GetContextFlags() const { return nFlags; } + sal_uInt32 GetContextFlags() const { return nFlags; } static void WriteCompressed( SvStream & rStm, sal_uInt32 nVal ); - static sal_uInt32 ReadCompressed( SvStream & rStm ); + static sal_uInt32 ReadCompressed( SvStream & rStm ); - sal_uInt32 WriteDummyLen(); + sal_uInt32 WriteDummyLen(); void WriteLen( sal_uInt32 nLenPos ); - sal_uInt32 ReadLen( sal_uInt32 * pTestPos ); + sal_uInt32 ReadLen( sal_uInt32 * pTestPos ); SvPersistStream& WritePointer( SvPersistBase * pObj ); SvPersistStream& ReadPointer( SvPersistBase * & rpObj ); @@ -243,6 +240,6 @@ public: friend SvStream& operator << ( SvStream &, SvPersistStream & ); }; -#endif // _PSTM_HXX +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/inc/tools/rc.h b/tools/inc/tools/rc.h index 6b8cfde1c9e5..740cab24f185 100644 --- a/tools/inc/tools/rc.h +++ b/tools/inc/tools/rc.h @@ -89,7 +89,7 @@ typedef short RSWND_STYLE; #define NUMERICFORMATTER_MIN 0x01 #define NUMERICFORMATTER_MAX 0x02 #define NUMERICFORMATTER_STRICTFORMAT 0x04 -//#define NUMERICFORMATTER_I12 0x08 // erAck: got rid of class International (2005-06-17) +//#define NUMERICFORMATTER_I12 0x08 // removed (2005-06-17) #define NUMERICFORMATTER_DECIMALDIGITS 0x10 #define NUMERICFORMATTER_VALUE 0x20 #define NUMERICFORMATTER_NOTHOUSANDSEP 0x40 @@ -101,7 +101,7 @@ typedef short RSWND_STYLE; #define DATEFORMATTER_MAX 0x02 #define DATEFORMATTER_LONGFORMAT 0x04 #define DATEFORMATTER_STRICTFORMAT 0x08 -//#define DATEFORMATTER_I12 0x10 // erAck: got rid of class International (2005-06-17) +//#define DATEFORMATTER_I12 0x10 // removed (2005-06-17) #define DATEFORMATTER_VALUE 0x20 #define TIMEFORMATTER_MIN 0x01 @@ -109,7 +109,7 @@ typedef short RSWND_STYLE; #define TIMEFORMATTER_TIMEFIELDFORMAT 0x04 #define TIMEFORMATTER_DURATION 0x08 #define TIMEFORMATTER_STRICTFORMAT 0x10 -//#define TIMEFORMATTER_I12 0x20 // erAck: got rid of class International (2005-06-17) +//#define TIMEFORMATTER_I12 0x20 // removed (2005-06-17) #define TIMEFORMATTER_VALUE 0x40 #define NUMERICFIELD_FIRST 0x01 @@ -200,7 +200,7 @@ typedef short RSWND_STYLE; #define RSC_IMAGELIST_IDLIST 0x08 #define RSC_IMAGELIST_IDCOUNT 0x10 -// obsolete, should be removed by MM +// FIXME obsolete, should be removed by MM #define RSC_COLOR (RSC_NOTYPE + 0x16) #define TIME_HOUR 0x01 #define TIME_MINUTE 0x02 diff --git a/tools/inc/tools/rc.hxx b/tools/inc/tools/rc.hxx index 899d7e2aaf54..cf723e3235df 100644 --- a/tools/inc/tools/rc.hxx +++ b/tools/inc/tools/rc.hxx @@ -24,10 +24,6 @@ #include <tools/string.hxx> #include <tools/resmgr.hxx> -// ------------ -// - Resource - -// ------------ - class TOOLS_DLLPUBLIC Resource { protected: diff --git a/tools/inc/tools/rcid.h b/tools/inc/tools/rcid.h index c864c04bc8e3..59b103a2d9ff 100644 --- a/tools/inc/tools/rcid.h +++ b/tools/inc/tools/rcid.h @@ -43,7 +43,7 @@ #define RSC_KEYCODE (RSC_NOTYPE + 0x1f) #define RSC_TIME (RSC_NOTYPE + 0x20) #define RSC_DATE (RSC_NOTYPE + 0x21) -//#define RSC_INTERNATIONAL (RSC_NOTYPE + 0x22) // erAck: got rid of class International (2005-06-17) +//#define RSC_INTERNATIONAL (RSC_NOTYPE + 0x22) // removed (2005-06-17) #define RSC_IMAGE (RSC_NOTYPE + 0x23) #define RSC_IMAGELIST (RSC_NOTYPE + 0x24) diff --git a/tools/inc/tools/ref.hxx b/tools/inc/tools/ref.hxx index bc945f1f3e5a..ac7a42bc2e3e 100644 --- a/tools/inc/tools/ref.hxx +++ b/tools/inc/tools/ref.hxx @@ -22,8 +22,6 @@ #include "tools/toolsdllapi.h" #include <vector> -//========================================================================= - #define PRV_SV_IMPL_REF_COUNTERS( ClassName, Ref, AddRef, AddNextRef, ReleaseRef, Init, pRefbase ) \ inline ClassName##Ref::ClassName##Ref( const ClassName##Ref & rObj ) \ { pObj = rObj.pObj; if( pObj ) { Init pRefbase->AddNextRef; } } \ @@ -63,7 +61,7 @@ public: \ inline ~ClassName##Ref(); \ inline ClassName##Ref & operator = ( const ClassName##Ref & rObj ); \ inline ClassName##Ref & operator = ( ClassName * pObj ); \ - inline sal_Bool Is() const { return pObj != NULL; } \ + inline sal_Bool Is() const { return pObj != NULL; } \ inline ClassName * operator & () const { return pObj; } \ inline ClassName * operator -> () const { return pObj; } \ inline ClassName & operator * () const { return *pObj; } \ @@ -99,13 +97,12 @@ PRV_SV_IMPL_REF_COUNTERS( ClassName, Lock, OwnerLock( sal_True ), \ SV_DECL_REF(ClassName) \ SV_IMPL_REF(ClassName) - -/************************** S v R e f L i s t ****************************/ template<typename T> class SvRefMemberList : private std::vector<T> { private: typedef typename std::vector<T> base_t; + public: using base_t::size; using base_t::front; @@ -122,46 +119,50 @@ public: inline ~SvRefMemberList() { clear(); } inline void clear() + { + for( typename base_t::const_iterator it = base_t::begin(); it != base_t::end(); ++it ) { - for( typename base_t::const_iterator it = base_t::begin(); it != base_t::end(); ++it ) - { - T p = *it; - if( p ) - p->ReleaseReference(); - } - base_t::clear(); + T p = *it; + if( p ) + p->ReleaseReference(); } + base_t::clear(); + } + inline void push_back( T p ) - { - base_t::push_back( p ); - p->AddRef(); - } + { + base_t::push_back( p ); + p->AddRef(); + } + inline void insert(const SvRefMemberList& rOther) + { + for( typename base_t::const_iterator it = rOther.begin(); it != rOther.end(); ++it ) { - for( typename base_t::const_iterator it = rOther.begin(); it != rOther.end(); ++it ) - { - push_back(*it); - } + push_back(*it); } + } + inline T pop_back() - { - T p = base_t::back(); - base_t::pop_back(); - if( p ) - p->ReleaseReference(); - return p; - } + { + T p = base_t::back(); + base_t::pop_back(); + if( p ) + p->ReleaseReference(); + return p; + } }; - -/************************** S v R e f B a s e ****************************/ #define SV_NO_DELETE_REFCOUNT 0x80000000 + class TOOLS_DLLPUBLIC SvRefBase { sal_uIntPtr nRefCount; + protected: virtual ~SvRefBase(); virtual void QueryDelete(); + public: SvRefBase() { nRefCount = SV_NO_DELETE_REFCOUNT; } SvRefBase( const SvRefBase & /* rObj */ ) @@ -173,9 +174,9 @@ public: if( nRefCount < SV_NO_DELETE_REFCOUNT ) nRefCount += SV_NO_DELETE_REFCOUNT; } - sal_uIntPtr AddMulRef( sal_uIntPtr n ) { return nRefCount += n; } - sal_uIntPtr AddNextRef() { return ++nRefCount; } - sal_uIntPtr AddRef() + sal_uIntPtr AddMulRef( sal_uIntPtr n ) { return nRefCount += n; } + sal_uIntPtr AddNextRef() { return ++nRefCount; } + sal_uIntPtr AddRef() { if( nRefCount >= SV_NO_DELETE_REFCOUNT ) nRefCount -= SV_NO_DELETE_REFCOUNT; @@ -186,14 +187,14 @@ public: if( !--nRefCount ) QueryDelete(); } - sal_uIntPtr ReleaseRef() + sal_uIntPtr ReleaseRef() { sal_uIntPtr n = --nRefCount; if( !n ) QueryDelete(); return n; } - sal_uIntPtr GetRefCount() const { return nRefCount; } + sal_uIntPtr GetRefCount() const { return nRefCount; } }; #ifndef EMPTYARG @@ -207,6 +208,7 @@ class SvCompatWeakHdl : public SvRefBase friend class SvCompatWeakBase; void* _pObj; SvCompatWeakHdl( void* pObj ) : _pObj( pObj ) {} + public: void ResetWeakBase( ) { _pObj = 0; } void* GetObj() { return _pObj; } @@ -217,6 +219,7 @@ SV_DECL_IMPL_REF( SvCompatWeakHdl ) class SvCompatWeakBase { SvCompatWeakHdlRef _xHdl; + public: SvCompatWeakHdl* GetHdl() { return _xHdl; } @@ -248,6 +251,6 @@ public: \ return (ClassName*) (_xHdl.Is() ? _xHdl->GetObj() : 0 ); } \ }; -#endif // _Weak_HXX +#endif /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/tools/inc/tools/resary.hxx b/tools/inc/tools/resary.hxx index a10a9eccea44..3f9cf8e0e7c1 100644 --- a/tools/inc/tools/resary.hxx +++ b/tools/inc/tools/resary.hxx @@ -25,18 +25,11 @@ #include <tools/string.hxx> #include <tools/resid.hxx> -// ------------------ -// - ResStringArray - -// ------------------ - #define RESARRAY_INDEX_NOTFOUND (0xffffffff) class TOOLS_DLLPUBLIC ResStringArray : private boost::noncopyable { private: - // --------------------- - // - ImplResStringItem - - // --------------------- struct ImplResStringItem { rtl::OUString m_aStr; diff --git a/tools/inc/tools/resid.hxx b/tools/inc/tools/resid.hxx index cbe4ed25c622..be9158495b3f 100644 --- a/tools/inc/tools/resid.hxx +++ b/tools/inc/tools/resid.hxx @@ -32,10 +32,6 @@ typedef sal_uInt32 RESOURCE_TYPE; class ResMgr; -//--------- -//- ResId - -//--------- - class ResId { /* diff --git a/tools/inc/tools/resmgr.hxx b/tools/inc/tools/resmgr.hxx index bdfd4661bd52..6a13f98000c8 100644 --- a/tools/inc/tools/resmgr.hxx +++ b/tools/inc/tools/resmgr.hxx @@ -30,10 +30,6 @@ class SvStream; class InternalResMgr; -// ----------------- -// - RSHEADER_TYPE - -// ----------------- - /// Defines structure used to build resource struct RSHEADER_TYPE { @@ -50,16 +46,8 @@ public: inline sal_uInt32 GetLocalOff(); ///< Local offset }; -// ---------- -// - ResMgr - -// ---------- - typedef rtl::OUString (*ResHookProc)( const rtl::OUString& rStr ); -// ---------- -// - ResMgr - -// ---------- - // Initialization #define RC_NOTYPE 0x00 // Global resource @@ -130,7 +118,7 @@ private: static ResMgr* ImplCreateResMgr( InternalResMgr* pImpl ) { return new ResMgr( pImpl ); } - //No copying + // no copying ResMgr(const ResMgr&); ResMgr& operator=(const ResMgr&); public: diff --git a/tools/inc/tools/shl.hxx b/tools/inc/tools/shl.hxx index ca2b41e9f575..786cab4b9e13 100644 --- a/tools/inc/tools/shl.hxx +++ b/tools/inc/tools/shl.hxx @@ -23,9 +23,7 @@ #include <tools/solar.h> #include "tools/toolsdllapi.h" -// ---------------- -// - GetAppData() - -// ---------------- +// GetAppData() #define SHL_SHL1 0 #define SHL_SHL2 1 @@ -84,7 +82,7 @@ // #110743# // #define SHL_COUNT 53 // the following added for binary filter project -// Sice an array is created for that values, it is necessary to +// Since an array is created for that values, it is necessary to // put them directly behind the defined ones. Else, some space is // wasted. #define BF_SHL_SVX 53 diff --git a/tools/inc/tools/simplerm.hxx b/tools/inc/tools/simplerm.hxx index 2ef211105e79..116314c92224 100644 --- a/tools/inc/tools/simplerm.hxx +++ b/tools/inc/tools/simplerm.hxx @@ -17,10 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -// ---------------- -// - SimpleResMgr - -// ---------------- - // a simple resource manager : no stacks, no sharing of the impl class, only loading of strings and blobs // but thread-safety !! :) @@ -44,10 +40,11 @@ protected: public: /** creates a new SimpleResManager @param pPrefixName - denotes the prefix of the resource file name, in ThreadTextEncoding + denotes the prefix of the resource file name, + in ThreadTextEncoding @param rLocale - denotes the locale of the resource file to load. If empty, a default locale - will be used. + denotes the locale of the resource file to + load. If empty, a default locale will be used. */ SimpleResMgr( const sal_Char* pPrefixName, const ::com::sun::star::lang::Locale& _rLocale); diff --git a/tools/inc/tools/solar.h b/tools/inc/tools/solar.h index 5820e1b9b679..061cce486e03 100644 --- a/tools/inc/tools/solar.h +++ b/tools/inc/tools/solar.h @@ -24,8 +24,6 @@ #include <osl/endian.h> #include <comphelper/fileformat.h> -/*** common solar defines ***********************************/ - #ifdef _SOLAR__PRIVATE #undef _SOLAR__PRIVATE #endif @@ -38,7 +36,7 @@ used for data exchange or for similiar method args. */ typedef sal_uIntPtr sal_uLong; /* Replaces type ULONG */ -/*** misc. macros to leverage platform and compiler differences ********/ +// misc. macros to leverage platform and compiler differences #define DELETEZ( p ) ( delete p,p = 0 ) @@ -58,7 +56,7 @@ typedef sal_uIntPtr sal_uLong; /* Replaces type ULONG */ #define ILLEGAL_POINTER NULL #endif -/*** solar binary types **********************************************/ +// solar binary types /* Solar (portable) Binary (exchange) Type; OSI 6 subset always little endian; @@ -130,8 +128,6 @@ inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[7 #endif #endif -/*** standard macros *****************************************/ - #ifndef __cplusplus #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) @@ -141,28 +137,18 @@ inline void DoubleToSVBT64( double n, SVBT64 p ) { p[0] = ((sal_uInt8*)&n)[7 #endif #endif - - -/*** standard inline functions *****************************************/ - #ifdef __cplusplus template<typename T> inline T Min(T a, T b) { return (a<b?a:b); } template<typename T> inline T Max(T a, T b) { return (a>b?a:b); } template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } #endif - -/*** C / C++ - macros **************************************************/ - #ifdef __cplusplus #define EXTERN_C extern "C" #else #define EXTERN_C #endif - -/*** macros ************************************************************/ - #ifdef NOHACKS #define HACK( comment ) #error hack: comment #else @@ -172,8 +158,7 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } #define _LF ((char)0x0A) #define _CR ((char)0x0D) - -/*** pragmas ************************************************************/ +// pragmas #if defined _MSC_VER /* deletion of pointer to incomplete type '...'; no destructor called @@ -184,8 +169,7 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } #pragma warning(error : 4002 4003) #endif - -/* dll file extensions *******************************************************/ +// dll file extensions #if defined WNT #define __DLLEXTENSION "lo" @@ -197,15 +181,11 @@ template<typename T> inline T Abs(T a) { return (a>=0?a:-a); } #error unknown platform #endif -// ----------------------------------------------------------------------- - #define UniString String #define XubString String #define xub_Unicode sal_Unicode #define xub_StrLen sal_uInt16 -// -- moved here from libcall.hxx ---------------------------------------- - #define LIBRARY_CONCAT3( s1, s2, s3 ) \ s1 s2 s3 #define LIBRARY_CONCAT4( s1, s2, s3, s4 ) \ diff --git a/tools/inc/tools/stream.hxx b/tools/inc/tools/stream.hxx index d237d091ed14..09d432dcfd02 100644 --- a/tools/inc/tools/stream.hxx +++ b/tools/inc/tools/stream.hxx @@ -31,10 +31,6 @@ class FileCopier; class StreamData; -// ------------------------ -// - FileFormat-Functions - -// ------------------------ - inline rtl_TextEncoding GetStoreCharSet( rtl_TextEncoding eEncoding ) { if ( eEncoding == RTL_TEXTENCODING_ISO_8859_1 ) @@ -43,9 +39,7 @@ inline rtl_TextEncoding GetStoreCharSet( rtl_TextEncoding eEncoding ) return eEncoding; } -// --------------- -// - StreamTypes - -// --------------- +// StreamTypes typedef sal_uInt16 StreamMode; @@ -100,12 +94,9 @@ typedef sal_uInt16 StreamMode; class SvStream; typedef SvStream& (*SvStrPtr)( SvStream& ); -// forward declaration with internal linkage inline SvStream& operator<<( SvStream& rStr, SvStrPtr f ); -// --------------- -// - SvLockBytes - -// --------------- +// SvLockBytes enum LockType {}; @@ -162,9 +153,7 @@ public: SV_DECL_IMPL_REF(SvLockBytes); -// ------------------- -// - SvOpenLockBytes - -// ------------------- +// SvOpenLockBytes class TOOLS_DLLPUBLIC SvOpenLockBytes: public SvLockBytes { @@ -188,9 +177,7 @@ public: SV_DECL_IMPL_REF(SvOpenLockBytes); -// -------------------- -// - SvAsyncLockBytes - -// -------------------- +// SvAsyncLockBytes class SvAsyncLockBytes: public SvOpenLockBytes { @@ -221,9 +208,7 @@ public: SV_DECL_IMPL_REF(SvAsyncLockBytes); -// ---------- -// - Stream - -// ---------- +// SvStream class TOOLS_DLLPUBLIC SvStream { @@ -241,7 +226,7 @@ private: // = 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_* + unsigned int eIOMode : 2;// STREAM_IO_* // Error codes, conversion, compression, ... int bIsDirty:1; // sal_True: Stream != buffer content @@ -257,11 +242,11 @@ private: CharSet eStreamCharSet; // Encryption - rtl::OString m_aCryptMaskKey; // aCryptMaskKey.getLength != 0 -> Encryption used + rtl::OString m_aCryptMaskKey;// aCryptMaskKey.getLength != 0 -> Encryption used unsigned char nCryptMask; // Userdata - long nVersion; // for external use + long nVersion; // for external use // helper methods TOOLS_DLLPRIVATE void ImpInit(); @@ -363,112 +348,116 @@ public: sal_Size Seek( sal_Size nPos ); sal_Size SeekRel( sal_sSize nPos ); sal_Size Tell() const { return nBufFilePos+nBufActualPos; } - //length between current (Tell()) pos and end of stream + // length between current (Tell()) pos and end of stream virtual sal_Size remainingSize(); void Flush(); sal_Bool IsEof() const { return bIsEof; } // next Tell() <= nSize sal_Bool SetStreamSize( sal_Size nSize ); - /** Read a line of bytes. + /** Read a line of bytes. - @param nMaxBytesToRead - Maximum of bytes to read, if line is longer it will be - truncated. + @param nMaxBytesToRead + Maximum of bytes to read, if line is longer it will be + truncated. - NOTE that the default is one character less than - STRING_MAXLEN to prevent problems after conversion to - String that may be lurking in various places doing - something like - for (sal_uInt16 i=0; i < aString.Len(); ++i) - causing endless loops ... - */ + @note NOTE that the default is one character less than STRING_MAXLEN to + prevent problems after conversion to String that may be lurking + in various places doing something like + @code + for (sal_uInt16 i=0; i < aString.Len(); ++i) + @endcode + causing endless loops ... + */ sal_Bool ReadLine( rtl::OString& rStr, sal_Int32 nMaxBytesToRead = 0xFFFE ); sal_Bool WriteLine( const rtl::OString& rStr ); - /** Read a line of bytes. + /** Read a line of bytes. - @param nMaxBytesToRead - Maximum of bytes to read, if line is longer it will be - truncated. + @param nMaxBytesToRead + Maximum of bytes to read, if line is longer it will be + truncated. - NOTE that the default is one character less than - STRING_MAXLEN to prevent problems after conversion to - String that may be lurking in various places doing - something like - for (sal_uInt16 i=0; i < aString.Len(); ++i) - causing endless loops ... - */ + @note NOTE that the default is one character less than STRING_MAXLEN to + prevent problems after conversion to String that may be lurking + in various places doing something like + @code + for (sal_uInt16 i=0; i < aString.Len(); ++i) + @endcode + causing endless loops ... + */ sal_Bool ReadByteStringLine( rtl::OUString& rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxBytesToRead = 0xFFFE ); sal_Bool ReadByteStringLine( String& rStr, rtl_TextEncoding eSrcCharSet ); sal_Bool WriteByteStringLine( const String& rStr, rtl_TextEncoding eDestCharSet ); - /// Switch to no endian swapping and write 0xfeff + /// Switch to no endian swapping and write 0xfeff sal_Bool StartWritingUnicodeText(); - /** If eReadBomCharSet==RTL_TEXTENCODING_DONTKNOW: read 16bit, - if 0xfeff do nothing (UTF-16), if 0xfffe switch endian - swapping (UTF-16), if 0xefbb or 0xbbef read another byte - and check for UTF-8. If no UTF-* BOM was detected put all - read bytes back. This means that if 2 bytes were read it - was an UTF-16 BOM, if 3 bytes were read it was an UTF-8 - BOM. There is no UTF-7, UTF-32 or UTF-EBCDIC BOM detection! - - If eReadBomCharSet!=RTL_TEXTENCODING_DONTKNOW: only read a - BOM of that encoding and switch endian swapping if UTF-16 - and 0xfffe. - */ + /** If eReadBomCharSet==RTL_TEXTENCODING_DONTKNOW: read 16bit, if 0xfeff do + nothing (UTF-16), if 0xfffe switch endian swapping (UTF-16), if 0xefbb + or 0xbbef read another byte and check for UTF-8. If no UTF-* BOM was + detected put all read bytes back. This means that if 2 bytes were read + it was an UTF-16 BOM, if 3 bytes were read it was an UTF-8 BOM. There + is no UTF-7, UTF-32 or UTF-EBCDIC BOM detection! + + If eReadBomCharSet!=RTL_TEXTENCODING_DONTKNOW: only read a BOM of that + encoding and switch endian swapping if UTF-16 and 0xfffe. */ sal_Bool StartReadingUnicodeText( rtl_TextEncoding eReadBomCharSet ); - /** Read a line of Unicode. + /** Read a line of Unicode. - @param nMaxCodepointsToRead - Maximum of codepoints (UCS-2 or UTF-16 pairs, not - bytes) to read, if line is longer it will be truncated. + @param nMaxCodepointsToRead + Maximum of codepoints (UCS-2 or UTF-16 pairs, not bytes) to + read, if line is longer it will be truncated. - NOTE that the default is one character less than - STRING_MAXLEN to prevent problems after conversion to - String that may be lurking in various places doing - something like - for (sal_uInt16 i=0; i < aString.Len(); ++i) - causing endless loops ... - */ + @note NOTE that the default is one character less than STRING_MAXLEN to + prevent problems after conversion to String that may be lurking in + various places doing something like + @code + for (sal_uInt16 i=0; i < aString.Len(); ++i) + @endcode + causing endless loops ... + */ sal_Bool ReadUniStringLine( rtl::OUString& rStr, sal_Int32 nMaxCodepointsToRead = 0xFFFE ); - /// Read a 32bit length prefixed sequence of utf-16 if eSrcCharSet==RTL_TEXTENCODING_UNICODE, - /// otherwise read a 16bit length prefixed sequence of bytes and convert from eSrcCharSet + /** Read a 32bit length prefixed sequence of utf-16 if + eSrcCharSet==RTL_TEXTENCODING_UNICODE, otherwise read a 16bit length + prefixed sequence of bytes and convert from eSrcCharSet */ rtl::OUString ReadUniOrByteString(rtl_TextEncoding eSrcCharSet); - /// Write a 32bit length prefixed sequence of utf-16 if eSrcCharSet==RTL_TEXTENCODING_UNICODE, - /// otherwise convert to eSrcCharSet and write a 16bit length prefixed sequence of bytes + /** Write a 32bit length prefixed sequence of utf-16 if + eSrcCharSet==RTL_TEXTENCODING_UNICODE, otherwise convert to eSrcCharSet + and write a 16bit length prefixed sequence of bytes */ SvStream& WriteUniOrByteString( const rtl::OUString& rStr, rtl_TextEncoding eDestCharSet ); - /** Read a line of Unicode if eSrcCharSet==RTL_TEXTENCODING_UNICODE, - otherwise read a line of Bytecode and convert from eSrcCharSet - - @param nMaxCodepointsToRead - Maximum of codepoints (2 bytes if Unicode, bytes if not - Unicode) to read, if line is longer it will be - truncated. - - NOTE that the default is one character less than - STRING_MAXLEN to prevent problems after conversion to - String that may be lurking in various places doing - something like - for (sal_uInt16 i=0; i < aString.Len(); ++i) - causing endless loops ... - */ + /** Read a line of Unicode if eSrcCharSet==RTL_TEXTENCODING_UNICODE, + otherwise read a line of Bytecode and convert from eSrcCharSet + + @param nMaxCodepointsToRead + Maximum of codepoints (2 bytes if Unicode, bytes if not + Unicode) to read, if line is longer it will be truncated. + + @note NOTE that the default is one character less than STRING_MAXLEN to + prevent problems after conversion to String that may be lurking in + various places doing something like + @code + for (sal_uInt16 i=0; i < aString.Len(); ++i) + @endcode + causing endless loops ... + */ sal_Bool ReadUniOrByteStringLine( rtl::OUString& rStr, rtl_TextEncoding eSrcCharSet, sal_Int32 nMaxCodepointsToRead = 0xFFFE ); - /// Write a sequence of Unicode characters if eDestCharSet==RTL_TEXTENCODING_UNICODE, - /// otherwise write a sequence of Bytecodes converted to eDestCharSet + /** Write a sequence of Unicode characters if + eDestCharSet==RTL_TEXTENCODING_UNICODE, otherwise write a sequence of + Bytecodes converted to eDestCharSet */ sal_Bool WriteUnicodeOrByteText( const String& rStr, rtl_TextEncoding eDestCharSet ); sal_Bool WriteUnicodeOrByteText( const String& rStr ) { return WriteUnicodeOrByteText( rStr, GetStreamCharSet() ); } - /// Write a Unicode character if eDestCharSet==RTL_TEXTENCODING_UNICODE, - /// otherwise write as Bytecode converted to eDestCharSet. - /// This may result in more than one byte being written - /// if a multi byte encoding (e.g. UTF7, UTF8) is chosen. + /** Write a Unicode character if eDestCharSet==RTL_TEXTENCODING_UNICODE, + otherwise write as Bytecode converted to eDestCharSet. + + This may result in more than one byte being written if a multi byte + encoding (e.g. UTF7, UTF8) is chosen. */ sal_Bool WriteUniOrByteChar( sal_Unicode ch, rtl_TextEncoding eDestCharSet ); sal_Bool WriteUniOrByteChar( sal_Unicode ch ) { return WriteUniOrByteChar( ch, GetStreamCharSet() ); } @@ -488,22 +477,25 @@ public: 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; } - // stream is broken + /// stream is broken bool bad() const { return GetError() != 0; } - //If the state is good() the previous i/o operation succeeded. - // - //If the state is good(), the next input operation might succeed; - //otherwise, it will fail. - // - //Applying an input operation to a stream that is not in the good() state - //is a null operation as far as the variable being read into is concerned. - // - //If we try to read into a variable v and the operation fails, the value of - //v should be unchanged, + /** Get state + + If the state is good() the previous i/o operation succeeded. + + If the state is good(), the next input operation might succeed; + otherwise, it will fail. + + Applying an input operation to a stream that is not in the good() state + is a null operation as far as the variable being read into is concerned. + + If we try to read into a variable v and the operation fails, the value + of v should be unchanged, + */ bool good() const { return !(eof() || bad()); } }; @@ -643,27 +635,25 @@ TOOLS_DLLPUBLIC inline sal_Size write_uInt8s_FromOString(SvStream& rStrm, const return write_uInt8s_FromOString(rStrm, rStr, rStr.getLength()); } -//Attempt to write a pascal-style length (of type prefix) prefixed sequence of -//8bit units from an OString, returned value is number of bytes written (including -//byte-count of prefix) +/// Attempt to write a pascal-style length (of type prefix) prefixed sequence +/// of 8bit units from an OString, returned value is number of bytes written +/// (including byte-count of prefix) template<typename prefix> sal_Size write_lenPrefixed_uInt8s_FromOString(SvStream& rStrm, const rtl::OString &rStr) { return streamdetail::write_lenPrefixed_seq_From_str<prefix, rtl::OString, write_uInt8s_FromOString>(rStrm, rStr); } -//Attempt to write a pascal-style length (of type prefix) prefixed sequence of -//8bit units from an OUString, returned value is number of bytes written (including -//byte-count of prefix) +/// Attempt to write a pascal-style length (of type prefix) prefixed sequence +/// of 8bit units from an OUString, returned value is number of bytes written +/// (including byte-count of prefix) template<typename prefix> sal_Size write_lenPrefixed_uInt8s_FromOUString(SvStream& rStrm, const rtl::OUString &rStr, rtl_TextEncoding eEnc) { return write_lenPrefixed_uInt8s_FromOString<prefix>(rStrm, rtl::OUStringToOString(rStr, eEnc)); } -// -------------- -// - FileStream - -// -------------- +// FileStream class TOOLS_DLLPUBLIC SvFileStream : public SvStream { @@ -709,9 +699,7 @@ public: const String& GetFileName() const { return aFilename; } }; -// ---------------- -// - MemoryStream - -// ---------------- +// MemoryStream class TOOLS_DLLPUBLIC SvMemoryStream : public SvStream { diff --git a/tools/inc/tools/string.hxx b/tools/inc/tools/string.hxx index 3b3006679b48..3b045c8d7e61 100644 --- a/tools/inc/tools/string.hxx +++ b/tools/inc/tools/string.hxx @@ -56,9 +56,7 @@ class UniString; // ----------------------------------------------------------------------- -// ----------- -// - CharSet - -// ----------- +// CharSet #ifndef ENUM_CHARSET_DECLARED #define ENUM_CHARSET_DECLARED @@ -69,9 +67,7 @@ typedef rtl_TextEncoding CharSet; // ----------------------------------------------------------------------- -// ---------------- -// - String-Types - -// ---------------- +// String-Types #ifdef STRING32 #define STRING_NOTFOUND ((xub_StrLen)0x7FFFFFFF) @@ -89,9 +85,7 @@ enum StringCompare { COMPARE_LESS = -1, COMPARE_EQUAL = 0, COMPARE_GREATER = 1 } // ----------------------------------------------------------------------- -// ------------------------ -// Internal String data -// ------------------------ +//Internal String data // Data used for the management of this String // use only for debugging purposes (never assign to String directly!) @@ -111,9 +105,7 @@ typedef struct _UniStringData #pragma pack(pop) #endif -// ------------- -// - UniString - -// ------------- +// UniString class TOOLS_DLLPUBLIC UniString { diff --git a/tools/inc/tools/tenccvt.hxx b/tools/inc/tools/tenccvt.hxx index ca72f7e1948e..fcb9ff74bdfd 100644 --- a/tools/inc/tools/tenccvt.hxx +++ b/tools/inc/tools/tenccvt.hxx @@ -22,9 +22,7 @@ #include <rtl/textenc.h> #include "tools/toolsdllapi.h" -// ---------------------------------------- -// - Functions for handling Import/Export - -// ---------------------------------------- +// Functions for handling Import/Export /// return an encoding which has more defined Characters as the given /// encoding, but have the same definition for the defined characters diff --git a/tools/inc/tools/time.hxx b/tools/inc/tools/time.hxx index 64c8f5f6549f..a0957affb69b 100644 --- a/tools/inc/tools/time.hxx +++ b/tools/inc/tools/time.hxx @@ -24,14 +24,10 @@ class ResId; -// -------- -// - Time - -// -------- - /** - WARNING: This class can serve both as call clock time and time duration, and the mixing - of these concepts leads to problems such as there being 25 hours - or 10 minus 20 seconds being (non-negative) 10 seconds. + @WARNING: This class can serve both as call clock time and time duration, and + the mixing of these concepts leads to problems such as there being + 25 hours or 10 minus 20 seconds being (non-negative) 10 seconds. */ class TOOLS_DLLPUBLIC Time diff --git a/tools/inc/tools/unqidx.hxx b/tools/inc/tools/unqidx.hxx index 9938961e1a02..a23c34fc83fe 100644 --- a/tools/inc/tools/unqidx.hxx +++ b/tools/inc/tools/unqidx.hxx @@ -24,10 +24,6 @@ #include <tools/contnr.hxx> #include <map> -// --------------- -// - UniqueIndex - -// --------------- - #define UNIQUEINDEX_ENTRY_NOTFOUND CONTAINER_ENTRY_NOTFOUND class TOOLS_DLLPUBLIC UniqueIndexImpl : public std::map<sal_uInt32, void*> diff --git a/tools/inc/tools/vcompat.hxx b/tools/inc/tools/vcompat.hxx index 8f281a4641b3..4946aa9c1f9e 100644 --- a/tools/inc/tools/vcompat.hxx +++ b/tools/inc/tools/vcompat.hxx @@ -22,20 +22,12 @@ #include "tools/toolsdllapi.h" #include <tools/solar.h> -// ----------- -// - Defines - -// ----------- - #define COMPAT_FORMAT( char1, char2, char3, char4 ) \ ((sal_uInt32)((((sal_uInt32)(char)(char1)))| \ (((sal_uInt32)(char)(char2))<<8UL)| \ (((sal_uInt32)(char)(char3))<<16UL)| \ ((sal_uInt32)(char)(char4))<<24UL)) -// -------------- -// - ImplCompat - -// -------------- - class SvStream; class TOOLS_DLLPUBLIC VersionCompat diff --git a/tools/inc/tools/vector2d.hxx b/tools/inc/tools/vector2d.hxx index 096782f9a4b8..a137a8410a17 100644 --- a/tools/inc/tools/vector2d.hxx +++ b/tools/inc/tools/vector2d.hxx @@ -23,10 +23,6 @@ #include <math.h> #include <tools/gen.hxx> -// ------------ -// - Vector2D - -// ------------ - class Vector2D { private: diff --git a/tools/inc/tools/wintypes.hxx b/tools/inc/tools/wintypes.hxx index f5942c50b8e3..5abe73a690fe 100644 --- a/tools/inc/tools/wintypes.hxx +++ b/tools/inc/tools/wintypes.hxx @@ -22,9 +22,7 @@ #include <tools/solar.h> #include <sal/types.h> -// ---------------- -// - Window-Types - -// ---------------- +// Window-Types typedef sal_uInt16 WindowType; #define WINDOW_BASE 0x0100 @@ -112,10 +110,7 @@ typedef sal_uInt16 WindowType; #define WINDOW_CALCINPUTLINE (WINDOW_FIRST + 0x52) #define WINDOW_LAST (WINDOW_CALCINPUTLINE) - -// --------------- -// - Window-Bits - -// --------------- +// Window-Bits typedef sal_Int64 WinBits; @@ -138,11 +133,11 @@ typedef sal_Int64 WinBits; #define WB_PINABLE ((WinBits)0x00002000) #define WB_SYSTEMWINDOW ((WinBits)SAL_CONST_INT64(0x40000000)) // warning: do not confuse WB_SYSTEMCHILDWINDOW with the SystemChildWindow class - +// // the SystemChildWindow class was there first and is a very specialized // sytem child window type for plugged applications. The SystemChildWindow class // explicitly should never use the WB_SYSTEMCHILDWINDOW WinBit - +// // WB_SYSTEMCHILDWINDOW on the other hand is to be used on system windows // which should be created as system child windows with (more or less) // normal event handling @@ -285,16 +280,11 @@ typedef sal_Int64 WinBits; // Window-Bits for TabControl #define WB_SLIDERSET ((WinBits)0x02000000) - -// -------------------- -// - extended WinBits - -// -------------------- +// extended WinBits #define WB_EXT_DOCUMENT ((WinBits)0x00000001) #define WB_EXT_DOCMODIFIED ((WinBits)0x00000002) -// --------------- -// - WindowAlign - -// --------------- +// WindowAlign enum WindowAlign { WINDOWALIGN_LEFT, WINDOWALIGN_TOP, WINDOWALIGN_RIGHT, WINDOWALIGN_BOTTOM }; enum ImageAlign { IMAGEALIGN_LEFT, IMAGEALIGN_TOP, IMAGEALIGN_RIGHT, IMAGEALIGN_BOTTOM, @@ -303,16 +293,12 @@ enum ImageAlign { IMAGEALIGN_LEFT, IMAGEALIGN_TOP, IMAGEALIGN_RIGHT, IMAGEALIGN_ IMAGEALIGN_BOTTOM_LEFT, IMAGEALIGN_BOTTOM_RIGHT, IMAGEALIGN_CENTER }; enum SymbolAlign { SYMBOLALIGN_LEFT, SYMBOLALIGN_RIGHT }; -// ------------ -// - TriState - -// ------------ +// TriState enum TriState { STATE_NOCHECK, STATE_CHECK, STATE_DONTKNOW }; -// ---------------------- -// - ButtonDialog-Types - -// ---------------------- +// ButtonDialog-Types typedef sal_uInt16 StandardButtonType; #define BUTTON_OK ((StandardButtonType)0) @@ -328,9 +314,7 @@ typedef sal_uInt16 StandardButtonType; #define BUTTON_LESS ((StandardButtonType)10) #define BUTTON_COUNT 11 -// -------------------------------------------- -// - prominent place for ListBox window types - -// -------------------------------------------- +// prominent place for ListBox window types enum ProminentEntry { PROMINENT_TOP, PROMINENT_MIDDLE }; diff --git a/tools/inc/tools/wldcrd.hxx b/tools/inc/tools/wldcrd.hxx index 8a04c8945d82..2a53c162a000 100644 --- a/tools/inc/tools/wldcrd.hxx +++ b/tools/inc/tools/wldcrd.hxx @@ -23,10 +23,6 @@ #include <tools/string.hxx> #include <osl/thread.h> -// ------------ -// - WildCard - -// ------------ - class TOOLS_DLLPUBLIC WildCard { private: diff --git a/tools/inc/tools/zcodec.hxx b/tools/inc/tools/zcodec.hxx index 829324b4bd5f..4dd00867c49a 100644 --- a/tools/inc/tools/zcodec.hxx +++ b/tools/inc/tools/zcodec.hxx @@ -23,22 +23,17 @@ #include "tools/toolsdllapi.h" #include <tools/solar.h> -// ----------- -// - Defines - -// ----------- +// Defines #define DEFAULT_IN_BUFSIZE (0x00008000UL) #define DEFAULT_OUT_BUFSIZE (0x00008000UL) #define MAX_MEM_USAGE 8 -// // memory requirement using compress: // [ INBUFFER ] + [ OUTBUFFER ] + 128KB + 1 << (MEM_USAGE+9) -// // memory requirement using decompress: // [ INBUFFER ] + [ OUTBUFFER ] + 32KB -// #define ZCODEC_NO_COMPRESSION (0x00000000UL) #define ZCODEC_BEST_SPEED (0x00000001UL) @@ -55,10 +50,6 @@ #define ZCODEC_PNG_DEFAULT ( ZCODEC_NO_COMPRESSION | ZCODEC_DEFAULT_STRATEGY | ZCODEC_UPDATE_CRC ) #define ZCODEC_DEFAULT ( ZCODEC_DEFAULT_COMPRESSION | ZCODEC_DEFAULT_STRATEGY ) -// ---------- -// - ZCodec - -// ---------- - class SvStream; class TOOLS_DLLPUBLIC ZCodec |