summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorMathias Bauer <mba@openoffice.org>2011-02-08 11:49:29 +0100
committerMathias Bauer <mba@openoffice.org>2011-02-08 11:49:29 +0100
commitd55fc1c693ed693def35feb0c34f82478ae42ae6 (patch)
tree49b109557349baed3ed05f51703fd13ca1ad4f99 /sot
parent7c3026b4aa032e6c1c477c2f2ebe47f45275c03d (diff)
parent88f014217e8e8c8c2ffc6b497357917800f33520 (diff)
CWS gnumake3: pull in cws removetooltypes01
Diffstat (limited to 'sot')
-rw-r--r--sot/inc/sot/absdev.hxx2
-rw-r--r--sot/inc/sot/agg.hxx16
-rw-r--r--sot/inc/sot/exchange.hxx184
-rw-r--r--sot/inc/sot/factory.hxx10
-rw-r--r--sot/inc/sot/filelist.hxx6
-rw-r--r--sot/inc/sot/formats.hxx276
-rw-r--r--sot/inc/sot/object.hxx52
-rw-r--r--sot/inc/sot/sotdata.hxx2
-rw-r--r--sot/inc/sot/stg.hxx280
-rw-r--r--sot/inc/sot/storage.hxx90
-rw-r--r--sot/inc/sot/storinfo.hxx16
-rw-r--r--sot/source/base/exchange.cxx34
-rw-r--r--sot/source/base/factory.cxx24
-rw-r--r--sot/source/base/filelist.cxx14
-rw-r--r--sot/source/base/formats.cxx56
-rw-r--r--sot/source/base/object.cxx28
-rw-r--r--sot/source/sdstor/stg.cxx296
-rw-r--r--sot/source/sdstor/stgavl.cxx36
-rw-r--r--sot/source/sdstor/stgavl.hxx8
-rw-r--r--sot/source/sdstor/stgcache.cxx108
-rw-r--r--sot/source/sdstor/stgcache.hxx66
-rw-r--r--sot/source/sdstor/stgdir.cxx272
-rw-r--r--sot/source/sdstor/stgdir.hxx78
-rw-r--r--sot/source/sdstor/stgelem.cxx106
-rw-r--r--sot/source/sdstor/stgelem.hxx122
-rw-r--r--sot/source/sdstor/stgio.cxx110
-rw-r--r--sot/source/sdstor/stgio.hxx12
-rw-r--r--sot/source/sdstor/stgole.cxx88
-rw-r--r--sot/source/sdstor/stgole.hxx24
-rw-r--r--sot/source/sdstor/stgstrms.cxx334
-rw-r--r--sot/source/sdstor/stgstrms.hxx106
-rw-r--r--sot/source/sdstor/storage.cxx214
-rw-r--r--sot/source/sdstor/storinfo.cxx20
-rw-r--r--sot/source/sdstor/ucbstorage.cxx598
-rw-r--r--sot/source/sdstor/unostorageholder.cxx2
35 files changed, 1845 insertions, 1845 deletions
diff --git a/sot/inc/sot/absdev.hxx b/sot/inc/sot/absdev.hxx
index 3d251d98e0b6..d882e6fc6b14 100644
--- a/sot/inc/sot/absdev.hxx
+++ b/sot/inc/sot/absdev.hxx
@@ -40,7 +40,7 @@ protected:
public:
virtual ~AbstractDeviceData() {}
virtual AbstractDeviceData * Copy() const = 0;
- virtual BOOL Equals( const AbstractDeviceData & ) const = 0;
+ virtual sal_Bool Equals( const AbstractDeviceData & ) const = 0;
JobSetup * GetJobSetup() const { return pJobSetup; }
};
diff --git a/sot/inc/sot/agg.hxx b/sot/inc/sot/agg.hxx
index 2f8cc7587458..cf07f6a8faff 100644
--- a/sot/inc/sot/agg.hxx
+++ b/sot/inc/sot/agg.hxx
@@ -41,21 +41,21 @@ struct SvAggregate
SotFactory * pFact;
SotObject * pObj;
};
- BOOL bFactory;
- BOOL bMainObj; // TRUE, das Objekt, welches das casting steuert
+ sal_Bool bFactory;
+ sal_Bool bMainObj; // sal_True, das Objekt, welches das casting steuert
SvAggregate()
: pFact( NULL )
- , bFactory( FALSE )
- , bMainObj( FALSE ) {}
- SvAggregate( SotObject * pObjP, BOOL bMainP )
+ , bFactory( sal_False )
+ , bMainObj( sal_False ) {}
+ SvAggregate( SotObject * pObjP, sal_Bool bMainP )
: pObj( pObjP )
- , bFactory( FALSE )
+ , bFactory( sal_False )
, bMainObj( bMainP ) {}
SvAggregate( SotFactory * pFactP )
: pFact( pFactP )
- , bFactory( TRUE )
- , bMainObj( FALSE ) {}
+ , bFactory( sal_True )
+ , bMainObj( sal_False ) {}
};
/************** class SvAggregateMemberList *****************************/
diff --git a/sot/inc/sot/exchange.hxx b/sot/inc/sot/exchange.hxx
index dc67e72a4f82..da5d5854f056 100644
--- a/sot/inc/sot/exchange.hxx
+++ b/sot/inc/sot/exchange.hxx
@@ -52,7 +52,7 @@ namespace com { namespace sun { namespace star { namespace datatransfer {
// - SotFormatStringId -
// ---------------------
-typedef ULONG SotFormatStringId;
+typedef sal_uLong SotFormatStringId;
// ----------------
// - DataFlavorEx -
@@ -77,14 +77,14 @@ typedef ::std::list< ::com::sun::star::datatransfer::DataFlavor > DataFlavorLi
typedef ::std::list< DataFlavorEx > DataFlavorExList;
SOT_DLLPUBLIC sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector,
- ULONG nId );
+ sal_uLong nId );
// -------------------------
// - Vordefinierte Formate -
// -------------------------
-// Die Reihenfolge und die Werte dürfen nicht geändert werden,
-// da die Implementation sich darauf verläßt.
+// Die Reihenfolge und die Werte d�rfen nicht ge�ndert werden,
+// da die Implementation sich darauf verl��t.
// Standard-Formate fuer die es auch Copy/Paste-Methoden gibt
#define FORMAT_STRING 1
#define FORMAT_BITMAP 2
@@ -97,70 +97,70 @@ SOT_DLLPUBLIC sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorE
#define FORMAT_RTF 10
// Source-Options
-#define EXCHG_SOURCE_MOVEABLE ((USHORT)0x0001)
-#define EXCHG_SOURCE_COPYABLE ((USHORT)0x0002)
-#define EXCHG_SOURCE_LINKABLE ((USHORT)0x0004)
-#define EXCHG_SOURCE_PRINTABLE ((USHORT)0x0008)
-#define EXCHG_SOURCE_DISCARDABLE ((USHORT)0x0010)
-#define EXCHG_SOURCE_ALL ((USHORT)0x001F)
-#define EXCHG_SOURCE_DEF_COPYABLE ((USHORT)0x0020)
+#define EXCHG_SOURCE_MOVEABLE ((sal_uInt16)0x0001)
+#define EXCHG_SOURCE_COPYABLE ((sal_uInt16)0x0002)
+#define EXCHG_SOURCE_LINKABLE ((sal_uInt16)0x0004)
+#define EXCHG_SOURCE_PRINTABLE ((sal_uInt16)0x0008)
+#define EXCHG_SOURCE_DISCARDABLE ((sal_uInt16)0x0010)
+#define EXCHG_SOURCE_ALL ((sal_uInt16)0x001F)
+#define EXCHG_SOURCE_DEF_COPYABLE ((sal_uInt16)0x0020)
// Aktionen
-#define EXCHG_ACTION_MASK ((USHORT)0x00FF)
-#define EXCHG_INOUT_ACTION_NONE ((USHORT)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_NONE)
+#define EXCHG_ACTION_MASK ((sal_uInt16)0x00FF)
+#define EXCHG_INOUT_ACTION_NONE ((sal_uInt16)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_NONE)
#define EXCHG_IN_ACTION_DEFAULT EXCHG_INOUT_ACTION_NONE
-#define EXCHG_IN_ACTION_MOVE ((USHORT)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_MOVE)
-#define EXCHG_IN_ACTION_COPY ((USHORT)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_COPY)
-#define EXCHG_IN_ACTION_LINK ((USHORT)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_LINK)
-#define EXCHG_INOUT_ACTION_PRINT ((USHORT)8)
-#define EXCHG_INOUT_ACTION_DISCARD ((USHORT)16)
-#define EXCHG_OUT_ACTION_INSERT_OBJ ((USHORT)17)
-#define EXCHG_OUT_ACTION_INSERT_BOOKMARK ((USHORT)18)
-#define EXCHG_OUT_ACTION_INSERT_FILELINK ((USHORT)19)
-#define EXCHG_OUT_ACTION_INSERT_FILE ((USHORT)20)
-#define EXCHG_OUT_ACTION_INSERT_FILELIST ((USHORT)21)
-#define EXCHG_OUT_ACTION_INSERT_IMAGEMAP ((USHORT)22)
-#define EXCHG_OUT_ACTION_INSERT_OLE ((USHORT)23)
-#define EXCHG_OUT_ACTION_INSERT_INTERACTIVE ((USHORT)24)
-#define EXCHG_OUT_ACTION_INSERT_URLBUTTON ((USHORT)25)
-#define EXCHG_OUT_ACTION_INSERT_CHAOSOBJ ((USHORT)26) // OBSOLET ab 500.b ?
-#define EXCHG_OUT_ACTION_REPLACE_OBJ ((USHORT)27)
-#define EXCHG_OUT_ACTION_REPLACE_LINK ((USHORT)28)
-#define EXCHG_OUT_ACTION_REPLACE_IMAGEMAP ((USHORT)29)
-#define EXCHG_OUT_ACTION_GET_ATTRIBUTES ((USHORT)30)
-#define EXCHG_OUT_ACTION_UPLOAD ((USHORT)31) // OBSOLET ab 500.b ?
-#define EXCHG_OUT_ACTION_MOVE_FILE ((USHORT)32)
-#define EXCHG_OUT_ACTION_MOVE_FILELIST ((USHORT)33)
-#define EXCHG_OUT_ACTION_UPDATE_RANGE ((USHORT)34)
-#define EXCHG_OUT_ACTION_INSERT_PRIVATE ((USHORT)35)
-#define EXCHG_OUT_ACTION_INSERT_HTML ((USHORT)36)
-#define EXCHG_OUT_ACTION_MOVE_PRIVATE ((USHORT)37)
-#define EXCHG_OUT_ACTION_INSERT_STRING ((USHORT)38)
-#define EXCHG_OUT_ACTION_INSERT_DRAWOBJ ((USHORT)39)
-#define EXCHG_OUT_ACTION_INSERT_SVXB ((USHORT)40)
-#define EXCHG_OUT_ACTION_INSERT_GDIMETAFILE ((USHORT)41)
-#define EXCHG_OUT_ACTION_INSERT_BITMAP ((USHORT)42)
-#define EXCHG_OUT_ACTION_INSERT_DDE ((USHORT)43)
-#define EXCHG_OUT_ACTION_INSERT_HYPERLINK ((USHORT)44)
-#define EXCHG_OUT_ACTION_REPLACE_DRAWOBJ ((USHORT)45)
-#define EXCHG_OUT_ACTION_REPLACE_SVXB ((USHORT)46)
-#define EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE ((USHORT)47)
-#define EXCHG_OUT_ACTION_REPLACE_BITMAP ((USHORT)48)
-#define EXCHG_OUT_ACTION_REPLACE_GRAPH ((USHORT)49)
-#define EXCHG_OUT_ACTION_INSERT_GRAPH ((USHORT)50)
-#define EXCHG_OUT_ACTION_INSERT_MSGATTACH ((USHORT)51) // obsolet ab 500.b ?
-#define EXCHG_OUT_ACTION_COPY_CHAOSOBJ ((USHORT)52)
-#define EXCHG_OUT_ACTION_MOVE_CHAOSOBJ ((USHORT)53)
-#define EXCHG_OUT_ACTION_COPY_MSGATTACH ((USHORT)54)
-#define EXCHG_OUT_ACTION_COPY_BOOKMARK ((USHORT)55)
-#define EXCHG_OUT_ACTION_COPY_FILE ((USHORT)56)
-
-#define EXCHG_OUT_ACTION_FLAG_CREATE_THEME ((USHORT)0x0100)
-#define EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE ((USHORT)0x0200)
-#define EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP ((USHORT)0x0400)
-#define EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP ((USHORT)0x0800)
-#define EXCHG_OUT_ACTION_FLAG_FILL ((USHORT)0x1000)
-#define EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL ((USHORT)0x2000)
+#define EXCHG_IN_ACTION_MOVE ((sal_uInt16)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_MOVE)
+#define EXCHG_IN_ACTION_COPY ((sal_uInt16)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_COPY)
+#define EXCHG_IN_ACTION_LINK ((sal_uInt16)com::sun::star::datatransfer::dnd::DNDConstants::ACTION_LINK)
+#define EXCHG_INOUT_ACTION_PRINT ((sal_uInt16)8)
+#define EXCHG_INOUT_ACTION_DISCARD ((sal_uInt16)16)
+#define EXCHG_OUT_ACTION_INSERT_OBJ ((sal_uInt16)17)
+#define EXCHG_OUT_ACTION_INSERT_BOOKMARK ((sal_uInt16)18)
+#define EXCHG_OUT_ACTION_INSERT_FILELINK ((sal_uInt16)19)
+#define EXCHG_OUT_ACTION_INSERT_FILE ((sal_uInt16)20)
+#define EXCHG_OUT_ACTION_INSERT_FILELIST ((sal_uInt16)21)
+#define EXCHG_OUT_ACTION_INSERT_IMAGEMAP ((sal_uInt16)22)
+#define EXCHG_OUT_ACTION_INSERT_OLE ((sal_uInt16)23)
+#define EXCHG_OUT_ACTION_INSERT_INTERACTIVE ((sal_uInt16)24)
+#define EXCHG_OUT_ACTION_INSERT_URLBUTTON ((sal_uInt16)25)
+#define EXCHG_OUT_ACTION_INSERT_CHAOSOBJ ((sal_uInt16)26) // OBSOLET ab 500.b ?
+#define EXCHG_OUT_ACTION_REPLACE_OBJ ((sal_uInt16)27)
+#define EXCHG_OUT_ACTION_REPLACE_LINK ((sal_uInt16)28)
+#define EXCHG_OUT_ACTION_REPLACE_IMAGEMAP ((sal_uInt16)29)
+#define EXCHG_OUT_ACTION_GET_ATTRIBUTES ((sal_uInt16)30)
+#define EXCHG_OUT_ACTION_UPLOAD ((sal_uInt16)31) // OBSOLET ab 500.b ?
+#define EXCHG_OUT_ACTION_MOVE_FILE ((sal_uInt16)32)
+#define EXCHG_OUT_ACTION_MOVE_FILELIST ((sal_uInt16)33)
+#define EXCHG_OUT_ACTION_UPDATE_RANGE ((sal_uInt16)34)
+#define EXCHG_OUT_ACTION_INSERT_PRIVATE ((sal_uInt16)35)
+#define EXCHG_OUT_ACTION_INSERT_HTML ((sal_uInt16)36)
+#define EXCHG_OUT_ACTION_MOVE_PRIVATE ((sal_uInt16)37)
+#define EXCHG_OUT_ACTION_INSERT_STRING ((sal_uInt16)38)
+#define EXCHG_OUT_ACTION_INSERT_DRAWOBJ ((sal_uInt16)39)
+#define EXCHG_OUT_ACTION_INSERT_SVXB ((sal_uInt16)40)
+#define EXCHG_OUT_ACTION_INSERT_GDIMETAFILE ((sal_uInt16)41)
+#define EXCHG_OUT_ACTION_INSERT_BITMAP ((sal_uInt16)42)
+#define EXCHG_OUT_ACTION_INSERT_DDE ((sal_uInt16)43)
+#define EXCHG_OUT_ACTION_INSERT_HYPERLINK ((sal_uInt16)44)
+#define EXCHG_OUT_ACTION_REPLACE_DRAWOBJ ((sal_uInt16)45)
+#define EXCHG_OUT_ACTION_REPLACE_SVXB ((sal_uInt16)46)
+#define EXCHG_OUT_ACTION_REPLACE_GDIMETAFILE ((sal_uInt16)47)
+#define EXCHG_OUT_ACTION_REPLACE_BITMAP ((sal_uInt16)48)
+#define EXCHG_OUT_ACTION_REPLACE_GRAPH ((sal_uInt16)49)
+#define EXCHG_OUT_ACTION_INSERT_GRAPH ((sal_uInt16)50)
+#define EXCHG_OUT_ACTION_INSERT_MSGATTACH ((sal_uInt16)51) // obsolet ab 500.b ?
+#define EXCHG_OUT_ACTION_COPY_CHAOSOBJ ((sal_uInt16)52)
+#define EXCHG_OUT_ACTION_MOVE_CHAOSOBJ ((sal_uInt16)53)
+#define EXCHG_OUT_ACTION_COPY_MSGATTACH ((sal_uInt16)54)
+#define EXCHG_OUT_ACTION_COPY_BOOKMARK ((sal_uInt16)55)
+#define EXCHG_OUT_ACTION_COPY_FILE ((sal_uInt16)56)
+
+#define EXCHG_OUT_ACTION_FLAG_CREATE_THEME ((sal_uInt16)0x0100)
+#define EXCHG_OUT_ACTION_FLAG_KEEP_POSSIZE ((sal_uInt16)0x0200)
+#define EXCHG_OUT_ACTION_FLAG_INSERT_IMAGEMAP ((sal_uInt16)0x0400)
+#define EXCHG_OUT_ACTION_FLAG_REPLACE_IMAGEMAP ((sal_uInt16)0x0800)
+#define EXCHG_OUT_ACTION_FLAG_FILL ((sal_uInt16)0x1000)
+#define EXCHG_OUT_ACTION_FLAG_INSERT_TARGETURL ((sal_uInt16)0x2000)
// Ziele
#define EXCHG_DEST_DOC_OLEOBJ 1
@@ -188,66 +188,66 @@ class SvGlobalName;
class SOT_DLLPUBLIC SotExchange
{
public:
- static ULONG RegisterFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
- static ULONG RegisterFormatName( const String& rName );
- static ULONG RegisterFormatMimeType( const String& rMimeType );
+ static sal_uLong RegisterFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ static sal_uLong RegisterFormatName( const String& rName );
+ static sal_uLong RegisterFormatMimeType( const String& rMimeType );
- static ULONG GetFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
- static String GetFormatName( ULONG nFormat );
- static sal_Bool GetFormatDataFlavor( ULONG nFormat, ::com::sun::star::datatransfer::DataFlavor& rFlavor );
- static String GetFormatMimeType( ULONG nFormat );
- static BOOL IsInternal( const SvGlobalName& );
- static ULONG GetFormatIdFromMimeType( const String& rMimeType );
+ static sal_uLong GetFormat( const ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ static String GetFormatName( sal_uLong nFormat );
+ static sal_Bool GetFormatDataFlavor( sal_uLong nFormat, ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ static String GetFormatMimeType( sal_uLong nFormat );
+ static sal_Bool IsInternal( const SvGlobalName& );
+ static sal_uLong GetFormatIdFromMimeType( const String& rMimeType );
// bestimme die SotFormatStringId von dem registrierten Format
//JP 12.11.98: diese 3 Methoden sind ab sofort ueberfluessig, da
// die ClipboardIds statisch sind und aequivalent zur
// SotFormatStringId ist!
- static SotFormatStringId GetFormatStringId( ULONG nFormat )
+ static SotFormatStringId GetFormatStringId( sal_uLong nFormat )
{ return nFormat; }
static SotFormatStringId GetFormatStringId( const String& rName )
{ return SotExchange::RegisterFormatMimeType( rName ); }
- static ULONG RegisterSotFormatName( SotFormatStringId nId )
+ static sal_uLong RegisterSotFormatName( SotFormatStringId nId )
{ return nId; }
// same for XTransferable interface
- static USHORT GetExchangeAction(
+ static sal_uInt16 GetExchangeAction(
// XTransferable
const DataFlavorExVector& rDataFlavorExVector,
// Ziel der Aktion (EXCHG_DEST_*)
- USHORT nDestination,
+ sal_uInt16 nDestination,
// Aktionen, die Quelle unterstuetzt (EXCHG_SOURCE_...)
- USHORT nSourceOptions,
+ sal_uInt16 nSourceOptions,
// vom Anwender gewaehlte Aktion (EXCHG_IN_*, EXCHG_INOUT_*)
- USHORT nUserAction,
+ sal_uInt16 nUserAction,
// In:- Out: Zu benutzendes Format
- ULONG& rFormat,
+ sal_uLong& rFormat,
// In:- Out: Default-Action (EXCHG_IN_*, EXCHG_INOUT_*)
- USHORT& rDefaultAction,
+ sal_uInt16& rDefaultAction,
// In:- optional - check only for this specific format
- ULONG nOnlyTestFormat = 0,
+ sal_uLong nOnlyTestFormat = 0,
// In:- optional - check the contents of Xtransferable
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >* pxTransferable = NULL );
// same for XTransferable interface
- static USHORT GetExchangeAction(
+ static sal_uInt16 GetExchangeAction(
// XTransferable
const ::com::sun::star::uno::Reference< ::com::sun::star::datatransfer::XTransferable >& rxTransferable,
// Ziel der Aktion (EXCHG_DEST_*)
- USHORT nDestination,
+ sal_uInt16 nDestination,
// Aktionen, die Quelle unterstuetzt (EXCHG_SOURCE_...)
- USHORT nSourceOptions,
+ sal_uInt16 nSourceOptions,
// vom Anwender gewaehlte Aktion (EXCHG_IN_*, EXCHG_INOUT_*)
- USHORT nUserAction,
+ sal_uInt16 nUserAction,
// In:- Out: Zu benutzendes Format
- ULONG& rFormat,
+ sal_uLong& rFormat,
// In:- Out: Default-Action (EXCHG_IN_*, EXCHG_INOUT_*)
- USHORT& rDefaultAction,
+ sal_uInt16& rDefaultAction,
// In:- optional - check only for this specific format
- ULONG nOnlyTestFormat = 0 );
+ sal_uLong nOnlyTestFormat = 0 );
- static USHORT IsChart( const SvGlobalName& rName );
- static USHORT IsMath( const SvGlobalName& rName );
+ static sal_uInt16 IsChart( const SvGlobalName& rName );
+ static sal_uInt16 IsMath( const SvGlobalName& rName );
};
#endif // _EXCHANGE_HXX
diff --git a/sot/inc/sot/factory.hxx b/sot/inc/sot/factory.hxx
index 7b7feb0e9ebe..064c4b6388a1 100644
--- a/sot/inc/sot/factory.hxx
+++ b/sot/inc/sot/factory.hxx
@@ -47,13 +47,13 @@ typedef void * (*CreateInstanceType)( SotObject ** );
//==================class SotFactory=======================================
class SOT_DLLPUBLIC SotFactory : public SvGlobalName
{
- USHORT nSuperCount; // Anzahl der Superklassen
+ sal_uInt16 nSuperCount; // Anzahl der Superklassen
const SotFactory ** pSuperClasses; // Superklassen
CreateInstanceType pCreateFunc;
String aClassName;
- static BOOL ExistTest( const SvGlobalName & );
+ static sal_Bool ExistTest( const SvGlobalName & );
protected:
virtual ~SotFactory();
public:
@@ -61,7 +61,7 @@ public:
static void DeInit();
static void IncSvObjectCount( SotObject * = NULL );
static void DecSvObjectCount( SotObject * = NULL );
- static UINT32 GetSvObjectCount();
+ static sal_uInt32 GetSvObjectCount();
static void TestInvariant();
static const SotFactory * Find( const SvGlobalName & );
@@ -74,8 +74,8 @@ public:
virtual void * CreateInstance( SotObject ** ppObj = NULL ) const;
void * CastAndAddRef( SotObject * ) const;
- BOOL Is( const SotFactory * pSuperClass ) const;
- const SotFactory * GetSuper( USHORT nPos ) const
+ sal_Bool Is( const SotFactory * pSuperClass ) const;
+ const SotFactory * GetSuper( sal_uInt16 nPos ) const
{
return nPos < nSuperCount ?
pSuperClasses[ nPos ]
diff --git a/sot/inc/sot/filelist.hxx b/sot/inc/sot/filelist.hxx
index 4c6c55534319..4db3e4866817 100644
--- a/sot/inc/sot/filelist.hxx
+++ b/sot/inc/sot/filelist.hxx
@@ -62,13 +62,13 @@ public:
SOT_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStm, FileList& rFileList );
// Clipboard, D&D usw.
- static ULONG GetFormat();
+ static sal_uLong GetFormat();
// Liste fuellen/abfragen
void AppendFile( const String& rStr );
- String GetFile( ULONG i ) const;
- ULONG Count( void ) const;
+ String GetFile( sal_uLong i ) const;
+ sal_uLong Count( void ) const;
};
diff --git a/sot/inc/sot/formats.hxx b/sot/inc/sot/formats.hxx
index c9d7a3e69d78..303afecb5a17 100644
--- a/sot/inc/sot/formats.hxx
+++ b/sot/inc/sot/formats.hxx
@@ -46,145 +46,145 @@
#endif
#include <sot/exchange.hxx>
-#define SOT_FORMAT_SYSTEM_START ((ULONG)0)
-#define SOT_FORMAT_STRING ((ULONG)FORMAT_STRING)
-#define SOT_FORMAT_BITMAP ((ULONG)FORMAT_BITMAP)
-#define SOT_FORMAT_GDIMETAFILE ((ULONG)FORMAT_GDIMETAFILE)
-#define SOT_FORMAT_PRIVATE ((ULONG)FORMAT_PRIVATE)
-#define SOT_FORMAT_FILE ((ULONG)FORMAT_FILE)
-#define SOT_FORMAT_FILE_LIST ((ULONG)FORMAT_FILE_LIST)
-#define SOT_FORMAT_RTF ((ULONG)FORMAT_RTF)
+#define SOT_FORMAT_SYSTEM_START ((sal_uLong)0)
+#define SOT_FORMAT_STRING ((sal_uLong)FORMAT_STRING)
+#define SOT_FORMAT_BITMAP ((sal_uLong)FORMAT_BITMAP)
+#define SOT_FORMAT_GDIMETAFILE ((sal_uLong)FORMAT_GDIMETAFILE)
+#define SOT_FORMAT_PRIVATE ((sal_uLong)FORMAT_PRIVATE)
+#define SOT_FORMAT_FILE ((sal_uLong)FORMAT_FILE)
+#define SOT_FORMAT_FILE_LIST ((sal_uLong)FORMAT_FILE_LIST)
+#define SOT_FORMAT_RTF ((sal_uLong)FORMAT_RTF)
-#define SOT_FORMATSTR_ID_DRAWING ((ULONG)11)
-#define SOT_FORMATSTR_ID_SVXB ((ULONG)12)
-#define SOT_FORMATSTR_ID_SVIM ((ULONG)13)
-#define SOT_FORMATSTR_ID_XFA ((ULONG)14)
-#define SOT_FORMATSTR_ID_EDITENGINE ((ULONG)15)
-#define SOT_FORMATSTR_ID_INTERNALLINK_STATE ((ULONG)16)
-#define SOT_FORMATSTR_ID_SOLK ((ULONG)17)
-#define SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ((ULONG)18)
-#define SOT_FORMATSTR_ID_TREELISTBOX ((ULONG)19)
-#define SOT_FORMATSTR_ID_NATIVE ((ULONG)20)
-#define SOT_FORMATSTR_ID_OWNERLINK ((ULONG)21)
-#define SOT_FORMATSTR_ID_STARSERVER ((ULONG)22)
-#define SOT_FORMATSTR_ID_STAROBJECT ((ULONG)23)
-#define SOT_FORMATSTR_ID_APPLETOBJECT ((ULONG)24)
-#define SOT_FORMATSTR_ID_PLUGIN_OBJECT ((ULONG)25)
-#define SOT_FORMATSTR_ID_STARWRITER_30 ((ULONG)26)
-#define SOT_FORMATSTR_ID_STARWRITER_40 ((ULONG)27)
-#define SOT_FORMATSTR_ID_STARWRITER_50 ((ULONG)28)
-#define SOT_FORMATSTR_ID_STARWRITERWEB_40 ((ULONG)29)
-#define SOT_FORMATSTR_ID_STARWRITERWEB_50 ((ULONG)30)
-#define SOT_FORMATSTR_ID_STARWRITERGLOB_40 ((ULONG)31)
-#define SOT_FORMATSTR_ID_STARWRITERGLOB_50 ((ULONG)32)
-#define SOT_FORMATSTR_ID_STARDRAW ((ULONG)33)
-#define SOT_FORMATSTR_ID_STARDRAW_40 ((ULONG)34)
-#define SOT_FORMATSTR_ID_STARIMPRESS_50 ((ULONG)35)
-#define SOT_FORMATSTR_ID_STARDRAW_50 ((ULONG)36)
-#define SOT_FORMATSTR_ID_STARCALC ((ULONG)37)
-#define SOT_FORMATSTR_ID_STARCALC_40 ((ULONG)38)
-#define SOT_FORMATSTR_ID_STARCALC_50 ((ULONG)39)
-#define SOT_FORMATSTR_ID_STARCHART ((ULONG)40)
-#define SOT_FORMATSTR_ID_STARCHART_40 ((ULONG)41)
-#define SOT_FORMATSTR_ID_STARCHART_50 ((ULONG)42)
-#define SOT_FORMATSTR_ID_STARIMAGE ((ULONG)43)
-#define SOT_FORMATSTR_ID_STARIMAGE_40 ((ULONG)44)
-#define SOT_FORMATSTR_ID_STARIMAGE_50 ((ULONG)45)
-#define SOT_FORMATSTR_ID_STARMATH ((ULONG)46)
-#define SOT_FORMATSTR_ID_STARMATH_40 ((ULONG)47)
-#define SOT_FORMATSTR_ID_STARMATH_50 ((ULONG)48)
-#define SOT_FORMATSTR_ID_STAROBJECT_PAINTDOC ((ULONG)49)
-#define SOT_FORMATSTR_ID_FILLED_AREA ((ULONG)50)
-#define SOT_FORMATSTR_ID_HTML ((ULONG)51)
-#define SOT_FORMATSTR_ID_HTML_SIMPLE ((ULONG)52)
-#define SOT_FORMATSTR_ID_CHAOS ((ULONG)53)
-#define SOT_FORMATSTR_ID_CNT_MSGATTACHFILE ((ULONG)54)
-#define SOT_FORMATSTR_ID_BIFF_5 ((ULONG)55)
-#define SOT_FORMATSTR_ID_BIFF__5 ((ULONG)56)
-#define SOT_FORMATSTR_ID_SYLK ((ULONG)57)
-#define SOT_FORMATSTR_ID_SYLK_BIGCAPS ((ULONG)58)
-#define SOT_FORMATSTR_ID_LINK ((ULONG)59)
-#define SOT_FORMATSTR_ID_DIF ((ULONG)60)
-#define SOT_FORMATSTR_ID_STARDRAW_TABBAR ((ULONG)61)
-#define SOT_FORMATSTR_ID_SONLK ((ULONG)62)
-#define SOT_FORMATSTR_ID_MSWORD_DOC ((ULONG)63)
-#define SOT_FORMATSTR_ID_STAR_FRAMESET_DOC ((ULONG)64)
-#define SOT_FORMATSTR_ID_OFFICE_DOC ((ULONG)65)
-#define SOT_FORMATSTR_ID_NOTES_DOCINFO ((ULONG)66)
-#define SOT_FORMATSTR_ID_NOTES_HNOTE ((ULONG)67)
-#define SOT_FORMATSTR_ID_NOTES_NATIVE ((ULONG)68)
-#define SOT_FORMATSTR_ID_SFX_DOC ((ULONG)69)
-#define SOT_FORMATSTR_ID_EVDF ((ULONG)70)
-#define SOT_FORMATSTR_ID_ESDF ((ULONG)71)
-#define SOT_FORMATSTR_ID_IDF ((ULONG)72)
-#define SOT_FORMATSTR_ID_EFTP ((ULONG)73)
-#define SOT_FORMATSTR_ID_EFD ((ULONG)74)
-#define SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH ((ULONG)75)
-#define SOT_FORMATSTR_ID_EXTENDED_TABBAR ((ULONG)76)
-#define SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ((ULONG)77)
-#define SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE ((ULONG)78)
-#define SOT_FORMATSTR_ID_SBA_PRIVATE_URL ((ULONG)79)
-#define SOT_FORMATSTR_ID_SBA_TABED ((ULONG)80)
-#define SOT_FORMATSTR_ID_SBA_TABID ((ULONG)81)
-#define SOT_FORMATSTR_ID_SBA_JOIN ((ULONG)82)
-#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ((ULONG)83)
-#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR ((ULONG)84)
-#define SOT_FORMATSTR_ID_EMBED_SOURCE ((ULONG)85)
-#define SOT_FORMATSTR_ID_LINK_SOURCE ((ULONG)86)
-#define SOT_FORMATSTR_ID_EMBEDDED_OBJ ((ULONG)87)
-#define SOT_FORMATSTR_ID_FILECONTENT ((ULONG)88)
-#define SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ((ULONG)89)
-#define SOT_FORMATSTR_ID_FILENAME ((ULONG)90)
-#define SOT_FORMATSTR_ID_SD_OLE ((ULONG)91)
-#define SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ((ULONG)92)
-#define SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ((ULONG)93)
-#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE ((ULONG)94)
-#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR_OLE ((ULONG)95)
-#define SOT_FORMATSTR_ID_LINK_SOURCE_OLE ((ULONG)96)
-#define SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE ((ULONG)97)
-#define SOT_FORMATSTR_ID_OUTPLACE_OBJ ((ULONG)98)
-#define SOT_FORMATSTR_ID_CNT_OWN_CLIP ((ULONG)99)
-#define SOT_FORMATSTR_ID_INET_IMAGE ((ULONG)100)
-#define SOT_FORMATSTR_ID_NETSCAPE_IMAGE ((ULONG)101)
-#define SOT_FORMATSTR_ID_SBA_FORMEXCHANGE ((ULONG)102)
-#define SOT_FORMATSTR_ID_SBA_REPORTEXCHANGE ((ULONG)103)
-#define SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ((ULONG)104)
-#define SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50 ((ULONG)105)
-#define SOT_FORMATSTR_ID_GRAPHOBJ ((ULONG)106)
-#define SOT_FORMATSTR_ID_STARWRITER_60 ((ULONG)107)
-#define SOT_FORMATSTR_ID_STARWRITERWEB_60 ((ULONG)108)
-#define SOT_FORMATSTR_ID_STARWRITERGLOB_60 ((ULONG)109)
-#define SOT_FORMATSTR_ID_STARDRAW_60 ((ULONG)110)
-#define SOT_FORMATSTR_ID_STARIMPRESS_60 ((ULONG)111)
-#define SOT_FORMATSTR_ID_STARCALC_60 ((ULONG)112)
-#define SOT_FORMATSTR_ID_STARCHART_60 ((ULONG)113)
-#define SOT_FORMATSTR_ID_STARMATH_60 ((ULONG)114)
-#define SOT_FORMATSTR_ID_WMF ((ULONG)115)
-#define SOT_FORMATSTR_ID_DBACCESS_QUERY ((ULONG)116)
-#define SOT_FORMATSTR_ID_DBACCESS_TABLE ((ULONG)117)
-#define SOT_FORMATSTR_ID_DBACCESS_COMMAND ((ULONG)118)
-#define SOT_FORMATSTR_ID_DIALOG_60 ((ULONG)119)
-#define SOT_FORMATSTR_ID_EMF ((ULONG)120)
-#define SOT_FORMATSTR_ID_BIFF_8 ((ULONG)121)
-#define SOT_FORMATSTR_ID_BMP ((ULONG)122)
-#define SOT_FORMATSTR_ID_HTML_NO_COMMENT ((ULONG)123)
-#define SOT_FORMATSTR_ID_STARWRITER_8 ((ULONG)124)
-#define SOT_FORMATSTR_ID_STARWRITERWEB_8 ((ULONG)125)
-#define SOT_FORMATSTR_ID_STARWRITERGLOB_8 ((ULONG)126)
-#define SOT_FORMATSTR_ID_STARDRAW_8 ((ULONG)127)
-#define SOT_FORMATSTR_ID_STARIMPRESS_8 ((ULONG)128)
-#define SOT_FORMATSTR_ID_STARCALC_8 ((ULONG)129)
-#define SOT_FORMATSTR_ID_STARCHART_8 ((ULONG)130)
-#define SOT_FORMATSTR_ID_STARMATH_8 ((ULONG)131)
-#define SOT_FORMATSTR_ID_XFORMS ((ULONG)132)
-#define SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE ((ULONG)133)
-#define SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE ((ULONG)134)
-#define SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE ((ULONG)135)
-#define SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE ((ULONG)136)
-#define SOT_FORMATSTR_ID_STARCHART_8_TEMPLATE ((ULONG)137)
-#define SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE ((ULONG)138)
-#define SOT_FORMATSTR_ID_STARBASE_8 ((ULONG)139)
-#define SOT_FORMATSTR_ID_HC_GDIMETAFILE ((ULONG)140)
+#define SOT_FORMATSTR_ID_DRAWING ((sal_uLong)11)
+#define SOT_FORMATSTR_ID_SVXB ((sal_uLong)12)
+#define SOT_FORMATSTR_ID_SVIM ((sal_uLong)13)
+#define SOT_FORMATSTR_ID_XFA ((sal_uLong)14)
+#define SOT_FORMATSTR_ID_EDITENGINE ((sal_uLong)15)
+#define SOT_FORMATSTR_ID_INTERNALLINK_STATE ((sal_uLong)16)
+#define SOT_FORMATSTR_ID_SOLK ((sal_uLong)17)
+#define SOT_FORMATSTR_ID_NETSCAPE_BOOKMARK ((sal_uLong)18)
+#define SOT_FORMATSTR_ID_TREELISTBOX ((sal_uLong)19)
+#define SOT_FORMATSTR_ID_NATIVE ((sal_uLong)20)
+#define SOT_FORMATSTR_ID_OWNERLINK ((sal_uLong)21)
+#define SOT_FORMATSTR_ID_STARSERVER ((sal_uLong)22)
+#define SOT_FORMATSTR_ID_STAROBJECT ((sal_uLong)23)
+#define SOT_FORMATSTR_ID_APPLETOBJECT ((sal_uLong)24)
+#define SOT_FORMATSTR_ID_PLUGIN_OBJECT ((sal_uLong)25)
+#define SOT_FORMATSTR_ID_STARWRITER_30 ((sal_uLong)26)
+#define SOT_FORMATSTR_ID_STARWRITER_40 ((sal_uLong)27)
+#define SOT_FORMATSTR_ID_STARWRITER_50 ((sal_uLong)28)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_40 ((sal_uLong)29)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_50 ((sal_uLong)30)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_40 ((sal_uLong)31)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_50 ((sal_uLong)32)
+#define SOT_FORMATSTR_ID_STARDRAW ((sal_uLong)33)
+#define SOT_FORMATSTR_ID_STARDRAW_40 ((sal_uLong)34)
+#define SOT_FORMATSTR_ID_STARIMPRESS_50 ((sal_uLong)35)
+#define SOT_FORMATSTR_ID_STARDRAW_50 ((sal_uLong)36)
+#define SOT_FORMATSTR_ID_STARCALC ((sal_uLong)37)
+#define SOT_FORMATSTR_ID_STARCALC_40 ((sal_uLong)38)
+#define SOT_FORMATSTR_ID_STARCALC_50 ((sal_uLong)39)
+#define SOT_FORMATSTR_ID_STARCHART ((sal_uLong)40)
+#define SOT_FORMATSTR_ID_STARCHART_40 ((sal_uLong)41)
+#define SOT_FORMATSTR_ID_STARCHART_50 ((sal_uLong)42)
+#define SOT_FORMATSTR_ID_STARIMAGE ((sal_uLong)43)
+#define SOT_FORMATSTR_ID_STARIMAGE_40 ((sal_uLong)44)
+#define SOT_FORMATSTR_ID_STARIMAGE_50 ((sal_uLong)45)
+#define SOT_FORMATSTR_ID_STARMATH ((sal_uLong)46)
+#define SOT_FORMATSTR_ID_STARMATH_40 ((sal_uLong)47)
+#define SOT_FORMATSTR_ID_STARMATH_50 ((sal_uLong)48)
+#define SOT_FORMATSTR_ID_STAROBJECT_PAINTDOC ((sal_uLong)49)
+#define SOT_FORMATSTR_ID_FILLED_AREA ((sal_uLong)50)
+#define SOT_FORMATSTR_ID_HTML ((sal_uLong)51)
+#define SOT_FORMATSTR_ID_HTML_SIMPLE ((sal_uLong)52)
+#define SOT_FORMATSTR_ID_CHAOS ((sal_uLong)53)
+#define SOT_FORMATSTR_ID_CNT_MSGATTACHFILE ((sal_uLong)54)
+#define SOT_FORMATSTR_ID_BIFF_5 ((sal_uLong)55)
+#define SOT_FORMATSTR_ID_BIFF__5 ((sal_uLong)56)
+#define SOT_FORMATSTR_ID_SYLK ((sal_uLong)57)
+#define SOT_FORMATSTR_ID_SYLK_BIGCAPS ((sal_uLong)58)
+#define SOT_FORMATSTR_ID_LINK ((sal_uLong)59)
+#define SOT_FORMATSTR_ID_DIF ((sal_uLong)60)
+#define SOT_FORMATSTR_ID_STARDRAW_TABBAR ((sal_uLong)61)
+#define SOT_FORMATSTR_ID_SONLK ((sal_uLong)62)
+#define SOT_FORMATSTR_ID_MSWORD_DOC ((sal_uLong)63)
+#define SOT_FORMATSTR_ID_STAR_FRAMESET_DOC ((sal_uLong)64)
+#define SOT_FORMATSTR_ID_OFFICE_DOC ((sal_uLong)65)
+#define SOT_FORMATSTR_ID_NOTES_DOCINFO ((sal_uLong)66)
+#define SOT_FORMATSTR_ID_NOTES_HNOTE ((sal_uLong)67)
+#define SOT_FORMATSTR_ID_NOTES_NATIVE ((sal_uLong)68)
+#define SOT_FORMATSTR_ID_SFX_DOC ((sal_uLong)69)
+#define SOT_FORMATSTR_ID_EVDF ((sal_uLong)70)
+#define SOT_FORMATSTR_ID_ESDF ((sal_uLong)71)
+#define SOT_FORMATSTR_ID_IDF ((sal_uLong)72)
+#define SOT_FORMATSTR_ID_EFTP ((sal_uLong)73)
+#define SOT_FORMATSTR_ID_EFD ((sal_uLong)74)
+#define SOT_FORMATSTR_ID_SVX_FORMFIELDEXCH ((sal_uLong)75)
+#define SOT_FORMATSTR_ID_EXTENDED_TABBAR ((sal_uLong)76)
+#define SOT_FORMATSTR_ID_SBA_DATAEXCHANGE ((sal_uLong)77)
+#define SOT_FORMATSTR_ID_SBA_FIELDDATAEXCHANGE ((sal_uLong)78)
+#define SOT_FORMATSTR_ID_SBA_PRIVATE_URL ((sal_uLong)79)
+#define SOT_FORMATSTR_ID_SBA_TABED ((sal_uLong)80)
+#define SOT_FORMATSTR_ID_SBA_TABID ((sal_uLong)81)
+#define SOT_FORMATSTR_ID_SBA_JOIN ((sal_uLong)82)
+#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR ((sal_uLong)83)
+#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR ((sal_uLong)84)
+#define SOT_FORMATSTR_ID_EMBED_SOURCE ((sal_uLong)85)
+#define SOT_FORMATSTR_ID_LINK_SOURCE ((sal_uLong)86)
+#define SOT_FORMATSTR_ID_EMBEDDED_OBJ ((sal_uLong)87)
+#define SOT_FORMATSTR_ID_FILECONTENT ((sal_uLong)88)
+#define SOT_FORMATSTR_ID_FILEGRPDESCRIPTOR ((sal_uLong)89)
+#define SOT_FORMATSTR_ID_FILENAME ((sal_uLong)90)
+#define SOT_FORMATSTR_ID_SD_OLE ((sal_uLong)91)
+#define SOT_FORMATSTR_ID_EMBEDDED_OBJ_OLE ((sal_uLong)92)
+#define SOT_FORMATSTR_ID_EMBED_SOURCE_OLE ((sal_uLong)93)
+#define SOT_FORMATSTR_ID_OBJECTDESCRIPTOR_OLE ((sal_uLong)94)
+#define SOT_FORMATSTR_ID_LINKSRCDESCRIPTOR_OLE ((sal_uLong)95)
+#define SOT_FORMATSTR_ID_LINK_SOURCE_OLE ((sal_uLong)96)
+#define SOT_FORMATSTR_ID_SBA_CTRLDATAEXCHANGE ((sal_uLong)97)
+#define SOT_FORMATSTR_ID_OUTPLACE_OBJ ((sal_uLong)98)
+#define SOT_FORMATSTR_ID_CNT_OWN_CLIP ((sal_uLong)99)
+#define SOT_FORMATSTR_ID_INET_IMAGE ((sal_uLong)100)
+#define SOT_FORMATSTR_ID_NETSCAPE_IMAGE ((sal_uLong)101)
+#define SOT_FORMATSTR_ID_SBA_FORMEXCHANGE ((sal_uLong)102)
+#define SOT_FORMATSTR_ID_SBA_REPORTEXCHANGE ((sal_uLong)103)
+#define SOT_FORMATSTR_ID_UNIFORMRESOURCELOCATOR ((sal_uLong)104)
+#define SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50 ((sal_uLong)105)
+#define SOT_FORMATSTR_ID_GRAPHOBJ ((sal_uLong)106)
+#define SOT_FORMATSTR_ID_STARWRITER_60 ((sal_uLong)107)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_60 ((sal_uLong)108)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_60 ((sal_uLong)109)
+#define SOT_FORMATSTR_ID_STARDRAW_60 ((sal_uLong)110)
+#define SOT_FORMATSTR_ID_STARIMPRESS_60 ((sal_uLong)111)
+#define SOT_FORMATSTR_ID_STARCALC_60 ((sal_uLong)112)
+#define SOT_FORMATSTR_ID_STARCHART_60 ((sal_uLong)113)
+#define SOT_FORMATSTR_ID_STARMATH_60 ((sal_uLong)114)
+#define SOT_FORMATSTR_ID_WMF ((sal_uLong)115)
+#define SOT_FORMATSTR_ID_DBACCESS_QUERY ((sal_uLong)116)
+#define SOT_FORMATSTR_ID_DBACCESS_TABLE ((sal_uLong)117)
+#define SOT_FORMATSTR_ID_DBACCESS_COMMAND ((sal_uLong)118)
+#define SOT_FORMATSTR_ID_DIALOG_60 ((sal_uLong)119)
+#define SOT_FORMATSTR_ID_EMF ((sal_uLong)120)
+#define SOT_FORMATSTR_ID_BIFF_8 ((sal_uLong)121)
+#define SOT_FORMATSTR_ID_BMP ((sal_uLong)122)
+#define SOT_FORMATSTR_ID_HTML_NO_COMMENT ((sal_uLong)123)
+#define SOT_FORMATSTR_ID_STARWRITER_8 ((sal_uLong)124)
+#define SOT_FORMATSTR_ID_STARWRITERWEB_8 ((sal_uLong)125)
+#define SOT_FORMATSTR_ID_STARWRITERGLOB_8 ((sal_uLong)126)
+#define SOT_FORMATSTR_ID_STARDRAW_8 ((sal_uLong)127)
+#define SOT_FORMATSTR_ID_STARIMPRESS_8 ((sal_uLong)128)
+#define SOT_FORMATSTR_ID_STARCALC_8 ((sal_uLong)129)
+#define SOT_FORMATSTR_ID_STARCHART_8 ((sal_uLong)130)
+#define SOT_FORMATSTR_ID_STARMATH_8 ((sal_uLong)131)
+#define SOT_FORMATSTR_ID_XFORMS ((sal_uLong)132)
+#define SOT_FORMATSTR_ID_STARWRITER_8_TEMPLATE ((sal_uLong)133)
+#define SOT_FORMATSTR_ID_STARDRAW_8_TEMPLATE ((sal_uLong)134)
+#define SOT_FORMATSTR_ID_STARIMPRESS_8_TEMPLATE ((sal_uLong)135)
+#define SOT_FORMATSTR_ID_STARCALC_8_TEMPLATE ((sal_uLong)136)
+#define SOT_FORMATSTR_ID_STARCHART_8_TEMPLATE ((sal_uLong)137)
+#define SOT_FORMATSTR_ID_STARMATH_8_TEMPLATE ((sal_uLong)138)
+#define SOT_FORMATSTR_ID_STARBASE_8 ((sal_uLong)139)
+#define SOT_FORMATSTR_ID_HC_GDIMETAFILE ((sal_uLong)140)
#define SOT_FORMATSTR_ID_USER_END SOT_FORMATSTR_ID_HC_GDIMETAFILE
#endif // _SOT_FORMATS_HXX
diff --git a/sot/inc/sot/object.hxx b/sot/inc/sot/object.hxx
index 563c90d89a54..0f72e61510a9 100644
--- a/sot/inc/sot/object.hxx
+++ b/sot/inc/sot/object.hxx
@@ -43,41 +43,41 @@
#define TEST_INVARIANT
#ifdef TEST_INVARIANT
#define SO2_DECL_INVARIANT() \
- virtual void TestObjRef( BOOL bFree ); \
- void TestMemberObjRef( BOOL bFree ); \
- virtual void TestInvariant( BOOL bPrint ); \
- void TestMemberInvariant( BOOL bPrint );
+ virtual void TestObjRef( sal_Bool bFree ); \
+ void TestMemberObjRef( sal_Bool bFree ); \
+ virtual void TestInvariant( sal_Bool bPrint ); \
+ void TestMemberInvariant( sal_Bool bPrint );
#define SO2_IMPL_INVARIANT(ClassName) \
-void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
+void __EXPORT ClassName::TestObjRef( sal_Bool bFree ) \
{ \
TestMemberObjRef( bFree ); \
} \
-void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
+void __EXPORT ClassName::TestInvariant( sal_Bool bPrint ) \
{ \
TestMemberInvariant( bPrint ); \
}
#define SO2_IMPL_INVARIANT1(ClassName,Super1) \
-void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
+void __EXPORT ClassName::TestObjRef( sal_Bool bFree ) \
{ \
TestMemberObjRef( bFree ); \
Super1::TestObjRef( bFree ); \
} \
-void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
+void __EXPORT ClassName::TestInvariant( sal_Bool bPrint ) \
{ \
TestMemberInvariant( bPrint ); \
Super1::TestInvariant( bPrint ); \
}
#define SO2_IMPL_INVARIANT2(ClassName,Super1,Super2) \
-void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
+void __EXPORT ClassName::TestObjRef( sal_Bool bFree ) \
{ \
TestMemberObjRef( bFree ); \
Super1::TestObjRef( bFree ); \
Super2::TestObjRef( bFree ); \
} \
-void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
+void __EXPORT ClassName::TestInvariant( sal_Bool bPrint ) \
{ \
TestMemberInvariant( bPrint ); \
Super1::TestInvariant( bPrint ); \
@@ -85,14 +85,14 @@ void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
}
#define SO2_IMPL_INVARIANT3(ClassName,Super1,Super2,Super3) \
-void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
+void __EXPORT ClassName::TestObjRef( sal_Bool bFree ) \
{ \
TestMemberObjRef( bFree ); \
Super1::TestObjRef( bFree ); \
Super2::TestObjRef( bFree ); \
Super3::TestObjRef( bFree ); \
} \
-void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
+void __EXPORT ClassName::TestInvariant( sal_Bool bPrint ) \
{ \
TestMemberInvariant( bPrint ); \
Super1::TestInvariant( bPrint ); \
@@ -101,7 +101,7 @@ void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
}
#define SO2_IMPL_INVARIANT4(ClassName,Super1,Super2,Super3,Super4) \
-void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
+void __EXPORT ClassName::TestObjRef( sal_Bool bFree ) \
{ \
TestMemberObjRef( bFree ); \
Super1::TestObjRef( bFree ); \
@@ -109,7 +109,7 @@ void __EXPORT ClassName::TestObjRef( BOOL bFree ) \
Super3::TestObjRef( bFree ); \
Super4::TestObjRef( bFree ); \
} \
-void __EXPORT ClassName::TestInvariant( BOOL bPrint ) \
+void __EXPORT ClassName::TestInvariant( sal_Bool bPrint ) \
{ \
TestMemberInvariant( bPrint ); \
Super1::TestInvariant( bPrint ); \
@@ -386,9 +386,9 @@ class SOT_DLLPUBLIC SotObject : virtual public SvRefBase
{
friend class SotFactory;
friend class SvObject;
- USHORT nStrongLockCount;
- USHORT nOwnerLockCount;
- BOOL bOwner:1,
+ sal_uInt16 nStrongLockCount;
+ sal_uInt16 nOwnerLockCount;
+ sal_Bool bOwner:1,
bSVObject:1, // Ist Proxy, dann TRUE wenn andere Seite SV ist
bInClose:1; // TRUE, im DoClose
@@ -398,8 +398,8 @@ public:
protected:
#endif
virtual ~SotObject();
- void SetExtern() { bOwner = FALSE; }
- virtual BOOL Close();
+ void SetExtern() { bOwner = sal_False; }
+ virtual sal_Bool Close();
public:
SotObject();
SO2_DECL_BASIC_CLASS_DLL(SotObject,SOTDATA())
@@ -408,18 +408,18 @@ public:
// Nur damit die Makros in So3 nicht ganz ausufern
virtual IUnknown * GetInterface( const SvGlobalName & );
- BOOL Owner() const { return bOwner; }
+ sal_Bool Owner() const { return bOwner; }
void* CastAndAddRef( const SotFactory * pFact );
- USHORT Lock( BOOL bLock ); // affects nStrongLockCount
- USHORT GetOwnerLockCount() const { return nOwnerLockCount; }
- USHORT GetStrongLockCount() const { return nStrongLockCount; }
+ sal_uInt16 Lock( sal_Bool bLock ); // affects nStrongLockCount
+ sal_uInt16 GetOwnerLockCount() const { return nOwnerLockCount; }
+ sal_uInt16 GetStrongLockCount() const { return nStrongLockCount; }
- void OwnerLock( BOOL bLock );
+ void OwnerLock( sal_Bool bLock );
void RemoveOwnerLock();
- BOOL DoClose();
- BOOL IsInClose() const { return bInClose; }
+ sal_Bool DoClose();
+ sal_Bool IsInClose() const { return bInClose; }
private:
// Kopieren und Zuweisen dieses Objekttyps ist nicht erlaubt
diff --git a/sot/inc/sot/sotdata.hxx b/sot/inc/sot/sotdata.hxx
index 8d8775b5e181..213eea7f4ed3 100644
--- a/sot/inc/sot/sotdata.hxx
+++ b/sot/inc/sot/sotdata.hxx
@@ -45,7 +45,7 @@ class SotObjectList;
struct SotData_Impl
{
- UINT32 nSvObjCount;
+ sal_uInt32 nSvObjCount;
SotObjectList * pObjectList;
SotFactoryList * pFactoryList;
SotFactory * pSotObjectFactory;
diff --git a/sot/inc/sot/stg.hxx b/sot/inc/sot/stg.hxx
index 84373e26d596..630c7d6a4a0f 100644
--- a/sot/inc/sot/stg.hxx
+++ b/sot/inc/sot/stg.hxx
@@ -65,30 +65,30 @@ class StgStrm;
class SvGlobalName;
struct ClsId
{
- INT32 n1;
- INT16 n2, n3;
- UINT8 n4, n5, n6, n7, n8, n9, n10, n11;
+ sal_Int32 n1;
+ sal_Int16 n2, n3;
+ sal_uInt8 n4, n5, n6, n7, n8, n9, n10, n11;
};
class SOT_DLLPUBLIC StorageBase : public SvRefBase
{
protected:
- ULONG m_nError; // error code
+ sal_uLong m_nError; // error code
StreamMode m_nMode; // open mode
- BOOL m_bAutoCommit;
+ sal_Bool m_bAutoCommit;
StorageBase();
virtual ~StorageBase();
public:
TYPEINFO();
virtual const SvStream* GetSvStream() const = 0;
- virtual BOOL Validate( BOOL=FALSE ) const = 0;
- virtual BOOL ValidateMode( StreamMode ) const = 0;
+ virtual sal_Bool Validate( sal_Bool=sal_False ) const = 0;
+ virtual sal_Bool ValidateMode( StreamMode ) const = 0;
void ResetError() const;
- void SetError( ULONG ) const;
- ULONG GetError() const;
- BOOL Good() const { return BOOL( m_nError == SVSTREAM_OK ); }
+ void SetError( sal_uLong ) const;
+ sal_uLong GetError() const;
+ sal_Bool Good() const { return sal_Bool( m_nError == SVSTREAM_OK ); }
StreamMode GetMode() const { return m_nMode; }
- void SetAutoCommit( BOOL bSet )
+ void SetAutoCommit( sal_Bool bSet )
{ m_bAutoCommit = bSet; }
};
@@ -96,16 +96,16 @@ class BaseStorageStream : public StorageBase
{
public:
TYPEINFO();
- virtual ULONG Read( void * pData, ULONG nSize ) = 0;
- virtual ULONG Write( const void* pData, ULONG nSize ) = 0;
- virtual ULONG Seek( ULONG nPos ) = 0;
- virtual ULONG Tell() = 0;
+ virtual sal_uLong Read( void * pData, sal_uLong nSize ) = 0;
+ virtual sal_uLong Write( const void* pData, sal_uLong nSize ) = 0;
+ virtual sal_uLong Seek( sal_uLong nPos ) = 0;
+ virtual sal_uLong Tell() = 0;
virtual void Flush() = 0;
- virtual BOOL SetSize( ULONG nNewSize ) = 0;
- virtual BOOL CopyTo( BaseStorageStream * pDestStm ) = 0;
- virtual BOOL Commit() = 0;
- virtual BOOL Revert() = 0;
- virtual BOOL Equals( const BaseStorageStream& rStream ) const = 0;
+ virtual sal_Bool SetSize( sal_uLong nNewSize ) = 0;
+ virtual sal_Bool CopyTo( BaseStorageStream * pDestStm ) = 0;
+ virtual sal_Bool Commit() = 0;
+ virtual sal_Bool Revert() = 0;
+ virtual sal_Bool Equals( const BaseStorageStream& rStream ) const = 0;
};
class SvStorageInfoList;
@@ -114,45 +114,45 @@ class BaseStorage : public StorageBase
public:
TYPEINFO();
virtual const String& GetName() const = 0;
- virtual BOOL IsRoot() const = 0;
+ virtual sal_Bool IsRoot() const = 0;
virtual void SetClassId( const ClsId& ) = 0;
virtual const ClsId& GetClassId() const = 0;
virtual void SetDirty() = 0;
virtual void SetClass( const SvGlobalName & rClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName ) = 0;
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName ) = 0;
virtual SvGlobalName GetClassName() = 0;
- virtual ULONG GetFormat() = 0;
+ virtual sal_uLong GetFormat() = 0;
virtual String GetUserName() = 0;
- virtual BOOL ShouldConvert() = 0;
+ virtual sal_Bool ShouldConvert() = 0;
virtual void FillInfoList( SvStorageInfoList* ) const = 0;
- virtual BOOL CopyTo( BaseStorage* pDestStg ) const = 0;
- virtual BOOL Commit() = 0;
- virtual BOOL Revert() = 0;
+ virtual sal_Bool CopyTo( BaseStorage* pDestStg ) const = 0;
+ virtual sal_Bool Commit() = 0;
+ virtual sal_Bool Revert() = 0;
virtual BaseStorageStream* OpenStream( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = TRUE, const ByteString* pKey=0 ) = 0;
+ sal_Bool bDirect = sal_True, const ByteString* pKey=0 ) = 0;
virtual BaseStorage* OpenStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE ) = 0;
+ sal_Bool bDirect = sal_False ) = 0;
virtual BaseStorage* OpenUCBStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE ) = 0;
+ sal_Bool bDirect = sal_False ) = 0;
virtual BaseStorage* OpenOLEStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE ) = 0;
- virtual BOOL IsStream( const String& rEleName ) const = 0;
- virtual BOOL IsStorage( const String& rEleName ) const = 0;
- virtual BOOL IsContained( const String& rEleName ) const = 0;
- virtual BOOL Remove( const String & rEleName ) = 0;
- virtual BOOL Rename( const String & rEleName, const String & rNewName ) = 0;
- virtual BOOL CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName ) = 0;
- virtual BOOL MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName ) = 0;
- virtual BOOL ValidateFAT() = 0;
- virtual BOOL Equals( const BaseStorage& rStream ) const = 0;
+ sal_Bool bDirect = sal_False ) = 0;
+ virtual sal_Bool IsStream( const String& rEleName ) const = 0;
+ virtual sal_Bool IsStorage( const String& rEleName ) const = 0;
+ virtual sal_Bool IsContained( const String& rEleName ) const = 0;
+ virtual sal_Bool Remove( const String & rEleName ) = 0;
+ virtual sal_Bool Rename( const String & rEleName, const String & rNewName ) = 0;
+ virtual sal_Bool CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName ) = 0;
+ virtual sal_Bool MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName ) = 0;
+ virtual sal_Bool ValidateFAT() = 0;
+ virtual sal_Bool Equals( const BaseStorage& rStream ) const = 0;
};
class OLEStorageBase
@@ -163,8 +163,8 @@ protected:
StgDirEntry* pEntry; // the dir entry
OLEStorageBase( StgIo*, StgDirEntry*, StreamMode& );
~OLEStorageBase();
- BOOL Validate_Impl( BOOL=FALSE ) const;
- BOOL ValidateMode_Impl( StreamMode, StgDirEntry* p = NULL ) const ;
+ sal_Bool Validate_Impl( sal_Bool=sal_False ) const;
+ sal_Bool ValidateMode_Impl( StreamMode, StgDirEntry* p = NULL ) const ;
const SvStream* GetSvStream_Impl() const;
public:
};
@@ -172,26 +172,26 @@ public:
class StorageStream : public BaseStorageStream, public OLEStorageBase
{
//friend class Storage;
- ULONG nPos; // current position
+ sal_uLong nPos; // current position
protected:
~StorageStream();
public:
TYPEINFO();
StorageStream( StgIo*, StgDirEntry*, StreamMode );
- virtual ULONG Read( void * pData, ULONG nSize );
- virtual ULONG Write( const void* pData, ULONG nSize );
- virtual ULONG Seek( ULONG nPos );
- virtual ULONG Tell() { return nPos; }
+ virtual sal_uLong Read( void * pData, sal_uLong nSize );
+ virtual sal_uLong Write( const void* pData, sal_uLong nSize );
+ virtual sal_uLong Seek( sal_uLong nPos );
+ virtual sal_uLong Tell() { return nPos; }
virtual void Flush();
- virtual BOOL SetSize( ULONG nNewSize );
- virtual BOOL CopyTo( BaseStorageStream * pDestStm );
- virtual BOOL Commit();
- virtual BOOL Revert();
- virtual BOOL Validate( BOOL=FALSE ) const;
- virtual BOOL ValidateMode( StreamMode ) const;
- BOOL ValidateMode( StreamMode, StgDirEntry* p ) const;
+ virtual sal_Bool SetSize( sal_uLong nNewSize );
+ virtual sal_Bool CopyTo( BaseStorageStream * pDestStm );
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
+ virtual sal_Bool Validate( sal_Bool=sal_False ) const;
+ virtual sal_Bool ValidateMode( StreamMode ) const;
+ sal_Bool ValidateMode( StreamMode, StgDirEntry* p ) const;
const SvStream* GetSvStream() const;
- virtual BOOL Equals( const BaseStorageStream& rStream ) const;
+ virtual sal_Bool Equals( const BaseStorageStream& rStream ) const;
};
class UCBStorageStream;
@@ -199,64 +199,64 @@ class UCBStorageStream;
class SOT_DLLPUBLIC Storage : public BaseStorage, public OLEStorageBase
{
String aName;
- BOOL bIsRoot;
- void Init( BOOL bCreate );
+ sal_Bool bIsRoot;
+ void Init( sal_Bool bCreate );
Storage( StgIo*, StgDirEntry*, StreamMode );
protected:
~Storage();
public:
TYPEINFO();
- Storage( const String &, StreamMode = STREAM_STD_READWRITE, BOOL bDirect = TRUE );
- Storage( SvStream& rStrm, BOOL bDirect = TRUE );
- Storage( UCBStorageStream& rStrm, BOOL bDirect = TRUE );
+ Storage( const String &, StreamMode = STREAM_STD_READWRITE, sal_Bool bDirect = sal_True );
+ Storage( SvStream& rStrm, sal_Bool bDirect = sal_True );
+ Storage( UCBStorageStream& rStrm, sal_Bool bDirect = sal_True );
- static BOOL IsStorageFile( const String & rFileName );
- static BOOL IsStorageFile( SvStream* );
+ static sal_Bool IsStorageFile( const String & rFileName );
+ static sal_Bool IsStorageFile( SvStream* );
virtual const String& GetName() const;
- virtual BOOL IsRoot() const { return bIsRoot; }
+ virtual sal_Bool IsRoot() const { return bIsRoot; }
virtual void SetClassId( const ClsId& );
virtual const ClsId& GetClassId() const;
virtual void SetDirty();
virtual void SetClass( const SvGlobalName & rClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName );
virtual SvGlobalName GetClassName();
- virtual ULONG GetFormat();
+ virtual sal_uLong GetFormat();
virtual String GetUserName();
- virtual BOOL ShouldConvert();
+ virtual sal_Bool ShouldConvert();
virtual void FillInfoList( SvStorageInfoList* ) const;
- virtual BOOL CopyTo( BaseStorage* pDestStg ) const;
- virtual BOOL Commit();
- virtual BOOL Revert();
+ virtual sal_Bool CopyTo( BaseStorage* pDestStg ) const;
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
virtual BaseStorageStream* OpenStream( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = TRUE, const ByteString* pKey=0 );
+ sal_Bool bDirect = sal_True, const ByteString* pKey=0 );
virtual BaseStorage* OpenStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
+ sal_Bool bDirect = sal_False );
virtual BaseStorage* OpenUCBStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
+ sal_Bool bDirect = sal_False );
virtual BaseStorage* OpenOLEStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
- virtual BOOL IsStream( const String& rEleName ) const;
- virtual BOOL IsStorage( const String& rEleName ) const;
- virtual BOOL IsContained( const String& rEleName ) const;
- virtual BOOL Remove( const String & rEleName );
- virtual BOOL Rename( const String & rEleName, const String & rNewName );
- virtual BOOL CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
- virtual BOOL MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
- virtual BOOL ValidateFAT();
- virtual BOOL Validate( BOOL=FALSE ) const;
- virtual BOOL ValidateMode( StreamMode ) const;
- BOOL ValidateMode( StreamMode, StgDirEntry* p ) const;
+ sal_Bool bDirect = sal_False );
+ virtual sal_Bool IsStream( const String& rEleName ) const;
+ virtual sal_Bool IsStorage( const String& rEleName ) const;
+ virtual sal_Bool IsContained( const String& rEleName ) const;
+ virtual sal_Bool Remove( const String & rEleName );
+ virtual sal_Bool Rename( const String & rEleName, const String & rNewName );
+ virtual sal_Bool CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
+ virtual sal_Bool MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
+ virtual sal_Bool ValidateFAT();
+ virtual sal_Bool Validate( sal_Bool=sal_False ) const;
+ virtual sal_Bool ValidateMode( StreamMode ) const;
+ sal_Bool ValidateMode( StreamMode, StgDirEntry* p ) const;
virtual const SvStream* GetSvStream() const;
- virtual BOOL Equals( const BaseStorage& rStream ) const;
+ virtual sal_Bool Equals( const BaseStorage& rStream ) const;
};
class UCBStorageStream_Impl;
@@ -270,25 +270,25 @@ protected:
~UCBStorageStream();
public:
TYPEINFO();
- UCBStorageStream( const String& rName, StreamMode nMode, BOOL bDirect, const ByteString* pKey=0 );
- UCBStorageStream( const String& rName, StreamMode nMode, BOOL bDirect, const ByteString* pKey, BOOL bRepair, ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler > xProgress );
+ UCBStorageStream( const String& rName, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey=0 );
+ UCBStorageStream( const String& rName, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey, sal_Bool bRepair, ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler > xProgress );
UCBStorageStream( UCBStorageStream_Impl* );
- virtual ULONG Read( void * pData, ULONG nSize );
- virtual ULONG Write( const void* pData, ULONG nSize );
- virtual ULONG Seek( ULONG nPos );
- virtual ULONG Tell();
+ virtual sal_uLong Read( void * pData, sal_uLong nSize );
+ virtual sal_uLong Write( const void* pData, sal_uLong nSize );
+ virtual sal_uLong Seek( sal_uLong nPos );
+ virtual sal_uLong Tell();
virtual void Flush();
- virtual BOOL SetSize( ULONG nNewSize );
- virtual BOOL CopyTo( BaseStorageStream * pDestStm );
- virtual BOOL Commit();
- virtual BOOL Revert();
- virtual BOOL Validate( BOOL=FALSE ) const;
- virtual BOOL ValidateMode( StreamMode ) const;
+ virtual sal_Bool SetSize( sal_uLong nNewSize );
+ virtual sal_Bool CopyTo( BaseStorageStream * pDestStm );
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
+ virtual sal_Bool Validate( sal_Bool=sal_False ) const;
+ virtual sal_Bool ValidateMode( StreamMode ) const;
const SvStream* GetSvStream() const;
- virtual BOOL Equals( const BaseStorageStream& rStream ) const;
- BOOL SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
+ virtual sal_Bool Equals( const BaseStorageStream& rStream ) const;
+ sal_Bool SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
SvStream* GetModifySvStream();
@@ -309,76 +309,76 @@ class SOT_DLLPUBLIC UCBStorage : public BaseStorage
protected:
~UCBStorage();
public:
- static BOOL IsStorageFile( SvStream* );
- static BOOL IsStorageFile( const String& rName );
- static BOOL IsDiskSpannedFile( SvStream* );
+ static sal_Bool IsStorageFile( SvStream* );
+ static sal_Bool IsStorageFile( const String& rName );
+ static sal_Bool IsDiskSpannedFile( SvStream* );
static String GetLinkedFile( SvStream& );
static String CreateLinkFile( const String& rName );
- UCBStorage( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, BOOL bDirect = TRUE, BOOL bIsRoot = TRUE );
+ UCBStorage( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, sal_Bool bDirect = sal_True, sal_Bool bIsRoot = sal_True );
UCBStorage( const String& rName,
StreamMode nMode,
- BOOL bDirect = TRUE,
- BOOL bIsRoot = TRUE );
+ sal_Bool bDirect = sal_True,
+ sal_Bool bIsRoot = sal_True );
UCBStorage( const String& rName,
StreamMode nMode,
- BOOL bDirect,
- BOOL bIsRoot,
- BOOL bIsRepair,
+ sal_Bool bDirect,
+ sal_Bool bIsRoot,
+ sal_Bool bIsRepair,
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler >
xProgressHandler );
UCBStorage( UCBStorage_Impl* );
- UCBStorage( SvStream& rStrm, BOOL bDirect = TRUE );
+ UCBStorage( SvStream& rStrm, sal_Bool bDirect = sal_True );
TYPEINFO();
virtual const String& GetName() const;
- virtual BOOL IsRoot() const;
+ virtual sal_Bool IsRoot() const;
virtual void SetClassId( const ClsId& );
virtual const ClsId& GetClassId() const;
virtual void SetDirty();
virtual void SetClass( const SvGlobalName & rClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName );
virtual SvGlobalName GetClassName();
- virtual ULONG GetFormat();
+ virtual sal_uLong GetFormat();
virtual String GetUserName();
- virtual BOOL ShouldConvert();
+ virtual sal_Bool ShouldConvert();
virtual void FillInfoList( SvStorageInfoList* ) const;
- virtual BOOL CopyTo( BaseStorage* pDestStg ) const;
- virtual BOOL Commit();
- virtual BOOL Revert();
+ virtual sal_Bool CopyTo( BaseStorage* pDestStg ) const;
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
virtual BaseStorageStream* OpenStream( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = TRUE, const ByteString* pKey=0 );
+ sal_Bool bDirect = sal_True, const ByteString* pKey=0 );
virtual BaseStorage* OpenStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
+ sal_Bool bDirect = sal_False );
virtual BaseStorage* OpenUCBStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
+ sal_Bool bDirect = sal_False );
virtual BaseStorage* OpenOLEStorage( const String & rEleName,
StreamMode = STREAM_STD_READWRITE,
- BOOL bDirect = FALSE );
- virtual BOOL IsStream( const String& rEleName ) const;
- virtual BOOL IsStorage( const String& rEleName ) const;
- virtual BOOL IsContained( const String& rEleName ) const;
- virtual BOOL Remove( const String & rEleName );
- virtual BOOL Rename( const String & rEleName, const String & rNewName );
- virtual BOOL CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
- virtual BOOL MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
- virtual BOOL ValidateFAT();
- virtual BOOL Validate( BOOL=FALSE ) const;
- virtual BOOL ValidateMode( StreamMode ) const;
+ sal_Bool bDirect = sal_False );
+ virtual sal_Bool IsStream( const String& rEleName ) const;
+ virtual sal_Bool IsStorage( const String& rEleName ) const;
+ virtual sal_Bool IsContained( const String& rEleName ) const;
+ virtual sal_Bool Remove( const String & rEleName );
+ virtual sal_Bool Rename( const String & rEleName, const String & rNewName );
+ virtual sal_Bool CopyTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
+ virtual sal_Bool MoveTo( const String & rEleName, BaseStorage * pDest, const String & rNewName );
+ virtual sal_Bool ValidateFAT();
+ virtual sal_Bool Validate( sal_Bool=sal_False ) const;
+ virtual sal_Bool ValidateMode( StreamMode ) const;
virtual const SvStream* GetSvStream() const;
- virtual BOOL Equals( const BaseStorage& rStream ) const;
- BOOL SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue );
+ virtual sal_Bool Equals( const BaseStorage& rStream ) const;
+ sal_Bool SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue );
// HACK to avoid incompatible build, can be done since this feature is only for development
// should be removed before release
@@ -386,10 +386,10 @@ public:
//#if _SOLAR__PRIVATE
UCBStorageElement_Impl* FindElement_Impl( const String& rName ) const;
- BOOL CopyStorageElement_Impl( UCBStorageElement_Impl& rElement,
+ sal_Bool CopyStorageElement_Impl( UCBStorageElement_Impl& rElement,
BaseStorage* pDest, const String& rNew ) const;
BaseStorage* OpenStorage_Impl( const String & rEleName,
- StreamMode, BOOL bDirect, BOOL bForceUCBStorage );
+ StreamMode, sal_Bool bDirect, sal_Bool bForceUCBStorage );
//#endif
};
diff --git a/sot/inc/sot/storage.hxx b/sot/inc/sot/storage.hxx
index 572e100c7299..3c253fd80d1e 100644
--- a/sot/inc/sot/storage.hxx
+++ b/sot/inc/sot/storage.hxx
@@ -71,9 +71,9 @@ friend class SotStorage;
friend class ImpStream;
BaseStorageStream * pOwnStm;// Zeiger auf den eigenen Stream
protected:
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
+ virtual sal_uLong GetData( void* pData, sal_uLong nSize );
+ virtual sal_uLong PutData( const void* pData, sal_uLong nSize );
+ virtual sal_uLong SeekPos( sal_uLong nPos );
virtual void FlushData();
~SotStorageStream();
public:
@@ -91,13 +91,13 @@ public:
virtual void ResetError();
- virtual void SetSize( ULONG nNewSize );
- UINT32 GetSize() const;
- BOOL CopyTo( SotStorageStream * pDestStm );
- virtual BOOL Commit();
- virtual BOOL Revert();
- BOOL SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
+ virtual void SetSize( sal_uLong nNewSize );
+ sal_uInt32 GetSize() const;
+ sal_Bool CopyTo( SotStorageStream * pDestStm );
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
+ sal_Bool SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >
GetXInputStream() const;
};
@@ -125,21 +125,21 @@ friend class ::binfilter::SvStorage;
BaseStorage * m_pTmpStg; // Temp-Storage fuer Transacted, nur auf diesem schreiben! ??? Useless ???
BaseStorage * m_pOwnStg; // Zielstorage
SvStream * m_pStorStm; // nur fuer SDSTORAGES
- ULONG m_nError;
+ sal_uLong m_nError;
String m_aName; // Name des Storage
- BOOL m_bIsRoot:1, // z.B.: File-Storage
+ sal_Bool m_bIsRoot:1, // z.B.: File-Storage
m_bDelStm:1;
ByteString m_aKey; // aKey.Len != 0 -> Verschluesselung
long m_nVersion;
protected:
~SotStorage();
- void CreateStorage( BOOL bUCBStorage, StreamMode, StorageMode );
+ void CreateStorage( sal_Bool bUCBStorage, StreamMode, StorageMode );
public:
SotStorage( const String &,
StreamMode = STREAM_STD_READWRITE,
StorageMode = 0 );
- SotStorage( BOOL bUCBStorage, const String &,
+ SotStorage( sal_Bool bUCBStorage, const String &,
StreamMode = STREAM_STD_READWRITE,
StorageMode = 0 );
SotStorage( const ::ucbhelper::Content& rContent, const String &,
@@ -147,8 +147,8 @@ public:
StorageMode = 0 );
SotStorage( BaseStorage * );
SotStorage( SvStream & rStm );
- SotStorage( BOOL bUCBStorage, SvStream & rStm );
- SotStorage( SvStream * pStm, BOOL bDelete );
+ SotStorage( sal_Bool bUCBStorage, SvStream & rStm );
+ SotStorage( SvStream * pStm, sal_Bool bDelete );
SotStorage();
SO2_DECL_BASIC_CLASS_DLL(SotStorage,SOTDATA())
SO2_DECL_INVARIANT()
@@ -156,12 +156,12 @@ public:
SvMemoryStream * CreateMemoryStream();
const SvStream * GetSvStream();
- static BOOL IsStorageFile( const String & rFileName );
- static BOOL IsStorageFile( SvStream* pStream );
+ static sal_Bool IsStorageFile( const String & rFileName );
+ static sal_Bool IsStorageFile( SvStream* pStream );
virtual const String & GetName() const;
- virtual BOOL Validate();
+ virtual sal_Bool Validate();
void SetKey( const ByteString& rKey );
const ByteString & GetKey() const { return m_aKey; }
@@ -175,37 +175,37 @@ public:
return m_nVersion;
}
- ULONG GetErrorCode() const { return m_nError; }
- ULONG GetError() const { return ERRCODE_TOERROR(m_nError); }
- void SetError( ULONG nErrorCode )
+ sal_uLong GetErrorCode() const { return m_nError; }
+ sal_uLong GetError() const { return ERRCODE_TOERROR(m_nError); }
+ void SetError( sal_uLong nErrorCode )
{
if( m_nError == SVSTREAM_OK )
m_nError = nErrorCode;
}
virtual void ResetError();
- BOOL IsRoot() const { return m_bIsRoot; }
- void SignAsRoot( BOOL b = TRUE ) { m_bIsRoot = b; }
- void SetDeleteStream( BOOL bDelete ) { m_bDelStm = bDelete; }
+ sal_Bool IsRoot() const { return m_bIsRoot; }
+ void SignAsRoot( sal_Bool b = sal_True ) { m_bIsRoot = b; }
+ void SetDeleteStream( sal_Bool bDelete ) { m_bDelStm = bDelete; }
// eigener Datenbereich
virtual void SetClass( const SvGlobalName & rClass,
- ULONG bOriginalClipFormat,
+ sal_uLong bOriginalClipFormat,
const String & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG bOriginalClipFormat,
+ sal_uLong bOriginalClipFormat,
const String & rUserTypeName );
virtual SvGlobalName GetClassName();// Typ der Daten im Storage
- virtual ULONG GetFormat();
+ virtual sal_uLong GetFormat();
virtual String GetUserName();
- virtual BOOL ShouldConvert();
+ virtual sal_Bool ShouldConvert();
void SetName( const String& rName );
// Liste aller Elemente
virtual void FillInfoList( SvStorageInfoList * ) const;
- virtual BOOL CopyTo( SotStorage * pDestStg );
- virtual BOOL Commit();
- virtual BOOL Revert();
+ virtual sal_Bool CopyTo( SotStorage * pDestStg );
+ virtual sal_Bool Commit();
+ virtual sal_Bool Revert();
/* Element Methoden */
// Stream mit Verbindung zu Storage erzeugen,
@@ -226,26 +226,26 @@ public:
StreamMode = STREAM_STD_READWRITE,
StorageMode = STORAGE_TRANSACTED );
// Abfrage auf Storage oder Stream
- virtual BOOL IsStream( const String & rEleName ) const;
- virtual BOOL IsStorage( const String & rEleName ) const;
- virtual BOOL IsContained( const String & rEleName ) const;
+ virtual sal_Bool IsStream( const String & rEleName ) const;
+ virtual sal_Bool IsStorage( const String & rEleName ) const;
+ virtual sal_Bool IsContained( const String & rEleName ) const;
// Element loeschen
- virtual BOOL Remove( const String & rEleName );
+ virtual sal_Bool Remove( const String & rEleName );
// Elementnamen aendern
- virtual BOOL Rename( const String & rEleName,
+ virtual sal_Bool Rename( const String & rEleName,
const String & rNewName );
- virtual BOOL CopyTo( const String & rEleName, SotStorage * pDest,
+ virtual sal_Bool CopyTo( const String & rEleName, SotStorage * pDest,
const String & rNewName );
- virtual BOOL MoveTo( const String & rEleName, SotStorage * pDest,
+ virtual sal_Bool MoveTo( const String & rEleName, SotStorage * pDest,
const String & rNewName );
SvStream* GetTargetSvStream() const;
- BOOL SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
- BOOL GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue );
- BOOL IsOLEStorage() const;
- static BOOL IsOLEStorage( const String & rFileName );
- static BOOL IsOLEStorage( SvStream* pStream );
+ sal_Bool SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue );
+ sal_Bool GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue );
+ sal_Bool IsOLEStorage() const;
+ static sal_Bool IsOLEStorage( const String & rFileName );
+ static sal_Bool IsOLEStorage( SvStream* pStream );
// this is temporary HACK, _MUST_ be removed before release
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >
diff --git a/sot/inc/sot/storinfo.hxx b/sot/inc/sot/storinfo.hxx
index dab1f6d4540e..02db24529129 100644
--- a/sot/inc/sot/storinfo.hxx
+++ b/sot/inc/sot/storinfo.hxx
@@ -39,14 +39,14 @@ class SvStorageInfo
friend class SvStorage;
String aName;
SvGlobalName aClassName;
- ULONG nSize;
- BOOL bStream:1,
+ sal_uLong nSize;
+ sal_Bool bStream:1,
bStorage:1;
SvStorageInfo(){}; // Fuer SvStorage
public:
SvStorageInfo( const StgDirEntry& );
- SvStorageInfo( const String& rName, ULONG nSz, BOOL bIsStorage )
+ SvStorageInfo( const String& rName, sal_uLong nSz, sal_Bool bIsStorage )
: aName( rName )
, nSize( nSz )
, bStream( !bIsStorage )
@@ -55,9 +55,9 @@ public:
const SvGlobalName & GetClassName() const { return aClassName; }
const String & GetName() const { return aName; }
- BOOL IsStream() const { return bStream; }
- BOOL IsStorage() const { return bStorage; }
- ULONG GetSize() const { return nSize; }
+ sal_Bool IsStream() const { return bStream; }
+ sal_Bool IsStorage() const { return bStorage; }
+ sal_uLong GetSize() const { return nSize; }
};
class SOT_DLLPUBLIC SvStorageInfoList
@@ -66,7 +66,7 @@ class SOT_DLLPUBLIC SvStorageInfoList
const SvStorageInfo * Get( const String & rName );
};
-SOT_DLLPUBLIC ULONG ReadClipboardFormat( SvStream & rStm );
-SOT_DLLPUBLIC void WriteClipboardFormat( SvStream & rStm, ULONG nFormat );
+SOT_DLLPUBLIC sal_uLong ReadClipboardFormat( SvStream & rStm );
+SOT_DLLPUBLIC void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat );
#endif // _STORINFO_HXX
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index d860c8b0f572..57e65862aea2 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -237,11 +237,11 @@ static List& InitFormats_Impl()
|*
|* Beschreibung CLIP.SDW
*************************************************************************/
-ULONG SotExchange::RegisterFormatName( const String& rName )
+sal_uLong SotExchange::RegisterFormatName( const String& rName )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
// teste zuerst die Standard - Name
- ULONG i, nMax = SOT_FORMAT_FILE_LIST;
+ sal_uLong i, nMax = SOT_FORMAT_FILE_LIST;
for( i = SOT_FORMAT_STRING; i <= nMax; ++i )
if( COMPARE_EQUAL == rName.CompareToAscii( pFormatArray_Impl[ i ].pName ) )
return i;
@@ -277,11 +277,11 @@ ULONG SotExchange::RegisterFormatName( const String& rName )
return nMax + SOT_FORMATSTR_ID_USER_END + 1;
}
-ULONG SotExchange::RegisterFormatMimeType( const String& rMimeType )
+sal_uLong SotExchange::RegisterFormatMimeType( const String& rMimeType )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
// teste zuerst die Standard - Name
- ULONG i, nMax = SOT_FORMAT_FILE_LIST;
+ sal_uLong i, nMax = SOT_FORMAT_FILE_LIST;
for( i = SOT_FORMAT_STRING; i <= nMax; ++i )
if( rMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
return i;
@@ -318,9 +318,9 @@ ULONG SotExchange::RegisterFormatMimeType( const String& rMimeType )
|*
|* Beschreibung CLIP.SDW
*************************************************************************/
-ULONG SotExchange::RegisterFormat( const DataFlavor& rFlavor )
+sal_uLong SotExchange::RegisterFormat( const DataFlavor& rFlavor )
{
- ULONG nRet = GetFormat( rFlavor );
+ sal_uLong nRet = GetFormat( rFlavor );
if( !nRet )
{
@@ -338,7 +338,7 @@ ULONG SotExchange::RegisterFormat( const DataFlavor& rFlavor )
|*
*************************************************************************/
-sal_Bool SotExchange::GetFormatDataFlavor( ULONG nFormat, DataFlavor& rFlavor )
+sal_Bool SotExchange::GetFormatDataFlavor( sal_uLong nFormat, DataFlavor& rFlavor )
{
sal_Bool bRet;
@@ -376,11 +376,11 @@ sal_Bool SotExchange::GetFormatDataFlavor( ULONG nFormat, DataFlavor& rFlavor )
/*************************************************************************
|*
-|* SotExchange::GetFormatMimeType( ULONG nFormat )
+|* SotExchange::GetFormatMimeType( sal_uLong nFormat )
|*
*************************************************************************/
-String SotExchange::GetFormatMimeType( ULONG nFormat )
+String SotExchange::GetFormatMimeType( sal_uLong nFormat )
{
String sMimeType;
if( SOT_FORMATSTR_ID_USER_END >= nFormat )
@@ -406,10 +406,10 @@ String SotExchange::GetFormatMimeType( ULONG nFormat )
|*
*************************************************************************/
-ULONG SotExchange::GetFormatIdFromMimeType( const String& rMimeType )
+sal_uLong SotExchange::GetFormatIdFromMimeType( const String& rMimeType )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
- ULONG i, nMax = SOT_FORMAT_FILE_LIST;
+ sal_uLong i, nMax = SOT_FORMAT_FILE_LIST;
for( i = SOT_FORMAT_STRING; i <= nMax; ++i )
if( rMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
return i;
@@ -443,12 +443,12 @@ ULONG SotExchange::GetFormatIdFromMimeType( const String& rMimeType )
|*
|* Beschreibung CLIP.SDW
*************************************************************************/
-ULONG SotExchange::GetFormat( const DataFlavor& rFlavor )
+sal_uLong SotExchange::GetFormat( const DataFlavor& rFlavor )
{
// teste zuerst die Standard - Name
const ::rtl::OUString& rMimeType = rFlavor.MimeType;
const String aMimeType( rMimeType );
- ULONG i, nMax = SOT_FORMAT_FILE_LIST;
+ sal_uLong i, nMax = SOT_FORMAT_FILE_LIST;
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
for( i = SOT_FORMAT_STRING; i <= nMax; ++i )
if( aMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
@@ -482,7 +482,7 @@ ULONG SotExchange::GetFormat( const DataFlavor& rFlavor )
|*
|* Beschreibung CLIP.SDW
*************************************************************************/
-String SotExchange::GetFormatName( ULONG nFormat )
+String SotExchange::GetFormatName( sal_uLong nFormat )
{
DataFlavor aFlavor;
String aRet;
@@ -493,7 +493,7 @@ String SotExchange::GetFormatName( ULONG nFormat )
return aRet;
}
-BOOL SotExchange::IsInternal( const SvGlobalName& rName )
+sal_Bool SotExchange::IsInternal( const SvGlobalName& rName )
{
if ( rName == SvGlobalName(SO3_SW_CLASSID_60) ||
rName == SvGlobalName(SO3_SC_CLASSID_60) ||
@@ -503,6 +503,6 @@ BOOL SotExchange::IsInternal( const SvGlobalName& rName )
rName == SvGlobalName(SO3_SM_CLASSID_60) ||
rName == SvGlobalName(SO3_SWWEB_CLASSID_60) ||
rName == SvGlobalName(SO3_SWGLOB_CLASSID_60) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
diff --git a/sot/source/base/factory.cxx b/sot/source/base/factory.cxx
index 3c034a980578..d04a7917b0b4 100644
--- a/sot/source/base/factory.cxx
+++ b/sot/source/base/factory.cxx
@@ -96,10 +96,10 @@ void SotFactory::DeInit()
aStr += " Count: ";
aStr += p->GetRefCount();
DBG_TRACE( "\tReferences:" );
- p->TestObjRef( FALSE );
+ p->TestObjRef( sal_False );
#ifdef TEST_INVARIANT
DBG_TRACE( "\tInvariant:" );
- p->TestInvariant( TRUE );
+ p->TestInvariant( sal_True );
#endif
p = pObjList->Next();
}
@@ -129,7 +129,7 @@ void SotFactory::DeInit()
if( pSotData->pDataFlavorList )
{
- for( ULONG i = 0, nMax = pSotData->pDataFlavorList->Count(); i < nMax; i++ )
+ for( sal_uLong i = 0, nMax = pSotData->pDataFlavorList->Count(); i < nMax; i++ )
delete (::com::sun::star::datatransfer::DataFlavor*) pSotData->pDataFlavorList->GetObject( i );
delete pSotData->pDataFlavorList;
pSotData->pDataFlavorList = NULL;
@@ -194,7 +194,7 @@ SotFactory::~SotFactory()
|*
|* Beschreibung Zugriffsmethoden auf SotData_Impl-Daten
*************************************************************************/
-UINT32 SotFactory::GetSvObjectCount()
+sal_uInt32 SotFactory::GetSvObjectCount()
{
return SOTDATA()->nSvObjCount;
}
@@ -295,10 +295,10 @@ void SotFactory::TestInvariant()
SotData_Impl * pSotData = SOTDATA();
if( pSotData->pObjectList )
{
- ULONG nCount = pSotData->pObjectList->Count();
- for( ULONG i = 0; i < nCount ; i++ )
+ sal_uLong nCount = pSotData->pObjectList->Count();
+ for( sal_uLong i = 0; i < nCount ; i++ )
{
- pSotData->pObjectList->GetObject( i )->TestInvariant( FALSE );
+ pSotData->pObjectList->GetObject( i )->TestInvariant( sal_False );
}
}
#endif
@@ -349,17 +349,17 @@ void * SotFactory::CastAndAddRef
|*
|* Beschreibung
*************************************************************************/
-BOOL SotFactory::Is( const SotFactory * pSuperCl ) const
+sal_Bool SotFactory::Is( const SotFactory * pSuperCl ) const
{
if( this == pSuperCl )
- return TRUE;
+ return sal_True;
- for( USHORT i = 0; i < nSuperCount; i++ )
+ for( sal_uInt16 i = 0; i < nSuperCount; i++ )
{
if( pSuperClasses[ i ]->Is( pSuperCl ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index 048f19e65bd7..345e6ddec84b 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -61,8 +61,8 @@ FileList::~FileList()
void FileList::ClearAll( void )
{
// Strings in der Liste loeschen
- ULONG nCount = pStrList->Count();
- for( ULONG i = 0 ; i < nCount ; i++ )
+ sal_uLong nCount = pStrList->Count();
+ for( sal_uLong i = 0 ; i < nCount ; i++ )
delete pStrList->GetObject( i );
// Liste loeschen
@@ -81,8 +81,8 @@ FileList& FileList::operator=( const FileList& rFileList )
*pStrList = *rFileList.pStrList;
// Strings in der Liste kopieren
- ULONG nCount = pStrList->Count();
- for( ULONG i = 0 ; i < nCount ; i++ )
+ sal_uLong nCount = pStrList->Count();
+ for( sal_uLong i = 0 ; i < nCount ; i++ )
pStrList->Replace( new String( *rFileList.pStrList->GetObject( i ) ), i );
return *this;
@@ -94,7 +94,7 @@ FileList& FileList::operator=( const FileList& rFileList )
|*
\*************************************************************************/
-ULONG FileList::GetFormat()
+sal_uLong FileList::GetFormat()
{
return FORMAT_FILE_LIST;
}
@@ -184,7 +184,7 @@ void FileList::AppendFile( const String& rStr )
pStrList->Insert( new String( rStr ) , pStrList->Count() );
}
-String FileList::GetFile( ULONG i ) const
+String FileList::GetFile( sal_uLong i ) const
{
String aStr;
if( i < pStrList->Count() )
@@ -192,7 +192,7 @@ String FileList::GetFile( ULONG i ) const
return aStr;
}
-ULONG FileList::Count( void ) const
+sal_uLong FileList::Count( void ) const
{
return pStrList->Count();
}
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index 58b08fb53f18..f04d5d439bdc 100644
--- a/sot/source/base/formats.cxx
+++ b/sot/source/base/formats.cxx
@@ -46,9 +46,9 @@ using namespace::com::sun::star::datatransfer;
struct SotAction_Impl
{
- ULONG nFormatId; // Clipboard Id
- USHORT nAction; // Action Id
- BYTE nContextCheckId; // additional check of content in clipboard
+ sal_uLong nFormatId; // Clipboard Id
+ sal_uInt16 nAction; // Action Id
+ sal_uInt8 nContextCheckId; // additional check of content in clipboard
};
@@ -68,7 +68,7 @@ struct SotAction_Impl
struct SotDestinationEntry_Impl
{
- USHORT nDestination;
+ sal_uInt16 nDestination;
const SotAction_Impl* aDefaultActions;
const SotAction_Impl* aMoveActions;
const SotAction_Impl* aCopyActions;
@@ -1283,7 +1283,7 @@ static SotDestinationEntry_Impl __READONLY_DATA aDestinationArray[] = \
// - new style GetExchange methods -
// ---------------------------------
-sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, ULONG nId )
+sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, sal_uLong nId )
{
DataFlavorExVector::iterator aIter( ( (DataFlavorExVector&) rDataFlavorExVector ).begin() );
DataFlavorExVector::iterator aEnd( ( (DataFlavorExVector&) rDataFlavorExVector ).end() );
@@ -1303,14 +1303,14 @@ sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, ULONG
// -----------------------------------------------------------------------------
-static BOOL CheckTransferableContext_Impl( const Reference< XTransferable >* pxTransferable, const SotAction_Impl&
+static sal_Bool CheckTransferableContext_Impl( const Reference< XTransferable >* pxTransferable, const SotAction_Impl&
#ifdef WNT
rEntry
#endif
)
{
DataFlavor aFlavor;
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
try
{
@@ -1323,7 +1323,7 @@ rEntry
{
case FILEGRPDSC_ONLY_URL:
{
- bRet = FALSE;
+ bRet = sal_False;
if( SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_FILECONTENT, aFlavor ) &&
(*pxTransferable)->isDataFlavorSupported( aFlavor ) &&
@@ -1367,11 +1367,11 @@ rEntry
// -----------------------------------------------------------------------------
-static USHORT GetTransferableAction_Impl(
+static sal_uInt16 GetTransferableAction_Impl(
const DataFlavorExVector& rDataFlavorExVector,
const SotAction_Impl* pArray,
- ULONG& rFormat,
- ULONG nOnlyTestFormat,
+ sal_uLong& rFormat,
+ sal_uLong nOnlyTestFormat,
const Reference< XTransferable >* pxTransferable )
{
try
@@ -1380,11 +1380,11 @@ static USHORT GetTransferableAction_Impl(
{
DataFlavor aFlavor;
const SotAction_Impl* pArrayStart = pArray;
- ULONG nId = pArray->nFormatId;
+ sal_uLong nId = pArray->nFormatId;
#if OSL_DEBUG_LEVEL > 1
// used for testing a specific format - change in the debugger the value
- static ULONG nChkFormat = 0;
+ static sal_uLong nChkFormat = 0;
if( nChkFormat )
{
for( ; 0xffff != pArray->nFormatId &&
@@ -1454,13 +1454,13 @@ static USHORT GetTransferableAction_Impl(
// -----------------------------------------------------------------------------
-USHORT SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavorExVector,
- USHORT nDestination,
- USHORT nSourceOptions,
- USHORT nUserAction,
- ULONG& rFormat,
- USHORT& rDefaultAction,
- ULONG nOnlyTestFormat,
+sal_uInt16 SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavorExVector,
+ sal_uInt16 nDestination,
+ sal_uInt16 nSourceOptions,
+ sal_uInt16 nUserAction,
+ sal_uLong& rFormat,
+ sal_uInt16& rDefaultAction,
+ sal_uLong nOnlyTestFormat,
const Reference< XTransferable >* pxTransferable )
{
// hier wird jetzt die oben definierte Tabelle "implementiert"
@@ -1568,11 +1568,11 @@ USHORT SotExchange::GetExchangeAction( const DataFlavorExVector& rDataFlavorExVe
// -----------------------------------------------------------------------------
-USHORT SotExchange::GetExchangeAction(
+sal_uInt16 SotExchange::GetExchangeAction(
const Reference< XTransferable >& rxTransferable,
- USHORT nDestination, USHORT nSourceOptions,
- USHORT nUserAction, ULONG& rFormat,
- USHORT& rDefaultAction, ULONG nOnlyTestFormat )
+ sal_uInt16 nDestination, sal_uInt16 nSourceOptions,
+ sal_uInt16 nUserAction, sal_uLong& rFormat,
+ sal_uInt16& rDefaultAction, sal_uLong nOnlyTestFormat )
{
DataFlavorExVector aVector;
@@ -1625,9 +1625,9 @@ USHORT SotExchange::GetExchangeAction(
nOnlyTestFormat, &rxTransferable ) );
}
-USHORT SotExchange::IsChart( const SvGlobalName& rName )
+sal_uInt16 SotExchange::IsChart( const SvGlobalName& rName )
{
- USHORT nRet=0;
+ sal_uInt16 nRet=0;
// if ( rName == SvGlobalName( SO3_SCH_CLASSID_8 ) )
// nRet = SOFFICE_FILEFORMAT_8;
// else
@@ -1643,9 +1643,9 @@ USHORT SotExchange::IsChart( const SvGlobalName& rName )
return nRet;
}
-USHORT SotExchange::IsMath( const SvGlobalName& rName )
+sal_uInt16 SotExchange::IsMath( const SvGlobalName& rName )
{
- USHORT nRet=0;
+ sal_uInt16 nRet=0;
// if ( rName == SvGlobalName( SO3_SM_CLASSID_8 ) )
// nRet = SOFFICE_FILEFORMAT_8;
// else
diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx
index 70792a325d31..8c0bb0346605 100644
--- a/sot/source/base/object.cxx
+++ b/sot/source/base/object.cxx
@@ -59,7 +59,7 @@ SO2_IMPL_INVARIANT(SotObject)
|*
|* Beschreibung:
*************************************************************************/
-void SotObject::TestMemberObjRef( BOOL /*bFree*/ )
+void SotObject::TestMemberObjRef( sal_Bool /*bFree*/ )
{
}
@@ -69,7 +69,7 @@ void SotObject::TestMemberObjRef( BOOL /*bFree*/ )
|* Beschreibung:
*************************************************************************/
#ifdef TEST_INVARIANT
-void SotObject::TestMemberInvariant( BOOL /*bPrint*/ )
+void SotObject::TestMemberInvariant( sal_Bool /*bPrint*/ )
{
}
#endif
@@ -82,9 +82,9 @@ void SotObject::TestMemberInvariant( BOOL /*bPrint*/ )
SotObject::SotObject()
: nStrongLockCount( 0 )
, nOwnerLockCount( 0 )
- , bOwner ( TRUE )
- , bSVObject ( FALSE )
- , bInClose ( FALSE )
+ , bOwner ( sal_True )
+ , bSVObject ( sal_False )
+ , bInClose ( sal_False )
{
SotFactory::IncSvObjectCount( this );
}
@@ -127,10 +127,10 @@ void* SotObject::CastAndAddRef( const SotFactory * pFact )
}
//=========================================================================
-USHORT SotObject::Lock( BOOL bLock )
+sal_uInt16 SotObject::Lock( sal_Bool bLock )
{
SotObjectRef xHoldAlive( this );
- USHORT nRet;
+ sal_uInt16 nRet;
if( bLock )
{
AddRef();
@@ -151,7 +151,7 @@ USHORT SotObject::Lock( BOOL bLock )
//=========================================================================
void SotObject::OwnerLock
(
- BOOL bLock /* TRUE, lock. FALSE, unlock. */
+ sal_Bool bLock /* sal_True, lock. sal_False, unlock. */
)
/* [Beschreibung]
@@ -187,23 +187,23 @@ void SotObject::RemoveOwnerLock()
}
//=========================================================================
-BOOL SotObject::DoClose()
+sal_Bool SotObject::DoClose()
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !bInClose )
{
SotObjectRef xHoldAlive( this );
- bInClose = TRUE;
+ bInClose = sal_True;
bRet = Close();
- bInClose = FALSE;
+ bInClose = sal_False;
}
return bRet;
}
//=========================================================================
-BOOL SotObject::Close()
+sal_Bool SotObject::Close()
{
- return TRUE;
+ return sal_True;
}
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index c057b2d0aac0..bf1490447b08 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -66,7 +66,7 @@ TYPEINIT1( BaseStorageStream, StorageBase );
TYPEINIT1( BaseStorage, StorageBase );
StorageBase::StorageBase()
- : m_bAutoCommit( FALSE )
+ : m_bAutoCommit( sal_False )
{
m_nMode = STREAM_READ;
m_nError = SVSTREAM_OK;
@@ -79,14 +79,14 @@ StorageBase::~StorageBase()
// The following three methods are declared as const, since they
// may be called from within a const method.
-ULONG StorageBase::GetError() const
+sal_uLong StorageBase::GetError() const
{
- ULONG n = m_nError;
+ sal_uLong n = m_nError;
((StorageBase*) this)->m_nError = SVSTREAM_OK;
return n;
}
-void StorageBase::SetError( ULONG n ) const
+void StorageBase::SetError( sal_uLong n ) const
{
if( !m_nError )
((StorageBase*) this)->m_nError = n;
@@ -133,20 +133,20 @@ OLEStorageBase::~OLEStorageBase()
// Validate the instance for I/O
-BOOL OLEStorageBase::Validate_Impl( BOOL bWrite ) const
+sal_Bool OLEStorageBase::Validate_Impl( sal_Bool bWrite ) const
{
if( pEntry
&& !pEntry->bInvalid
&& ( !bWrite || !pEntry->bDirect || ( nStreamMode & STREAM_WRITE ) ) )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
-BOOL OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
+sal_Bool OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
{
if( m == INTERNAL_MODE )
- return TRUE;
- USHORT nCurMode = ( p && p->nRefCnt ) ? p->nMode : 0xFFFF;
+ return sal_True;
+ sal_uInt16 nCurMode = ( p && p->nRefCnt ) ? p->nMode : 0xFFFF;
if( ( m & 3 ) == STREAM_READ )
{
// only SHARE_DENYWRITE or SHARE_DENYALL allowed
@@ -154,7 +154,7 @@ BOOL OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
&& ( nCurMode & STREAM_SHARE_DENYWRITE ) )
|| ( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) ) )
- return TRUE;
+ return sal_True;
}
else
{
@@ -163,9 +163,9 @@ BOOL OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
// the commit may fail
if( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -199,18 +199,18 @@ StorageStream::~StorageStream()
pEntry->Commit();
}
-BOOL StorageStream::Equals( const BaseStorageStream& rStream ) const
+sal_Bool StorageStream::Equals( const BaseStorageStream& rStream ) const
{
const StorageStream* pOther = PTR_CAST( StorageStream, &rStream );
return pOther && ( pOther->pEntry == pEntry );
}
-ULONG StorageStream::Read( void* pData, ULONG nSize )
+sal_uLong StorageStream::Read( void* pData, sal_uLong nSize )
{
if( Validate() )
{
pEntry->Seek( nPos );
- nSize = pEntry->Read( pData, (INT32) nSize );
+ nSize = pEntry->Read( pData, (sal_Int32) nSize );
pIo->MoveError( *this );
nPos += nSize;
}
@@ -219,12 +219,12 @@ ULONG StorageStream::Read( void* pData, ULONG nSize )
return nSize;
}
-ULONG StorageStream::Write( const void* pData, ULONG nSize )
+sal_uLong StorageStream::Write( const void* pData, sal_uLong nSize )
{
- if( Validate( TRUE ) )
+ if( Validate( sal_True ) )
{
pEntry->Seek( nPos );
- nSize = pEntry->Write( pData, (INT32) nSize );
+ nSize = pEntry->Write( pData, (sal_Int32) nSize );
pIo->MoveError( *this );
nPos += nSize;
}
@@ -233,7 +233,7 @@ ULONG StorageStream::Write( const void* pData, ULONG nSize )
return nSize;
}
-ULONG StorageStream::Seek( ULONG n )
+sal_uLong StorageStream::Seek( sal_uLong n )
{
if( Validate() )
return nPos = pEntry->Seek( n );
@@ -247,26 +247,26 @@ void StorageStream::Flush()
Commit();
}
-BOOL StorageStream::SetSize( ULONG nNewSize )
+sal_Bool StorageStream::SetSize( sal_uLong nNewSize )
{
- if( Validate( TRUE ) )
+ if( Validate( sal_True ) )
{
- BOOL b = pEntry->SetSize( (INT32) nNewSize );
+ sal_Bool b = pEntry->SetSize( (sal_Int32) nNewSize );
pIo->MoveError( *this );
return b;
}
else
- return FALSE;
+ return sal_False;
}
-BOOL StorageStream::Commit()
+sal_Bool StorageStream::Commit()
{
if( !Validate() )
- return FALSE;
+ return sal_False;
if( !( m_nMode & STREAM_WRITE ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
else
{
@@ -276,22 +276,22 @@ BOOL StorageStream::Commit()
}
}
-BOOL StorageStream::Revert()
+sal_Bool StorageStream::Revert()
{
pEntry->Revert();
pIo->MoveError( *this );
return Good();
}
-BOOL StorageStream::CopyTo( BaseStorageStream* pDest )
+sal_Bool StorageStream::CopyTo( BaseStorageStream* pDest )
{
- if( !Validate() || !pDest->Validate( TRUE ) || Equals( *pDest ) )
- return FALSE;
+ if( !Validate() || !pDest->Validate( sal_True ) || Equals( *pDest ) )
+ return sal_False;
pEntry->Copy( *pDest );
pDest->Commit();
pIo->MoveError( *this );
SetError( pDest->GetError() );
- return BOOL( Good() && pDest->Good() );
+ return sal_Bool( Good() && pDest->Good() );
}
const SvStream* StorageStream::GetSvStream() const
@@ -299,25 +299,25 @@ const SvStream* StorageStream::GetSvStream() const
return GetSvStream_Impl();
}
-BOOL StorageStream::Validate( BOOL bValidate ) const
+sal_Bool StorageStream::Validate( sal_Bool bValidate ) const
{
- BOOL bRet = Validate_Impl( bValidate );
+ sal_Bool bRet = Validate_Impl( bValidate );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-BOOL StorageStream::ValidateMode( StreamMode nMode ) const
+sal_Bool StorageStream::ValidateMode( StreamMode nMode ) const
{
- BOOL bRet = ValidateMode_Impl( nMode, NULL );
+ sal_Bool bRet = ValidateMode_Impl( nMode, NULL );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-BOOL StorageStream::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
+sal_Bool StorageStream::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
{
- BOOL bRet = ValidateMode_Impl( nMode, p );
+ sal_Bool bRet = ValidateMode_Impl( nMode, p );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
@@ -328,26 +328,26 @@ BOOL StorageStream::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
SvStorageInfo::SvStorageInfo( const StgDirEntry& rE )
{
rE.aEntry.GetName( aName );
- bStorage = BOOL( rE.aEntry.GetType() == STG_STORAGE );
- bStream = BOOL( rE.aEntry.GetType() == STG_STREAM );
+ bStorage = sal_Bool( rE.aEntry.GetType() == STG_STORAGE );
+ bStream = sal_Bool( rE.aEntry.GetType() == STG_STREAM );
nSize = bStorage ? 0 : rE.aEntry.GetSize();
}
/////////////////////////// class Storage ////////////////////////////////
-BOOL Storage::IsStorageFile( const String & rFileName )
+sal_Bool Storage::IsStorageFile( const String & rFileName )
{
StgIo aIo;
if( aIo.Open( rFileName, STREAM_STD_READ ) )
return aIo.Load();
- return FALSE;
+ return sal_False;
}
-BOOL Storage::IsStorageFile( SvStream* pStream )
+sal_Bool Storage::IsStorageFile( SvStream* pStream )
{
StgHeader aHdr;
- ULONG nPos = pStream->Tell();
- BOOL bRet = ( aHdr.Load( *pStream ) && aHdr.Check() );
+ sal_uLong nPos = pStream->Tell();
+ sal_Bool bRet = ( aHdr.Load( *pStream ) && aHdr.Check() );
// It's not a stream error if it is too small for a OLE storage header
if ( pStream->GetErrorCode() == ERRCODE_IO_CANTSEEK )
@@ -361,21 +361,21 @@ BOOL Storage::IsStorageFile( SvStream* pStream )
TYPEINIT1( Storage, BaseStorage );
-Storage::Storage( const String& rFile, StreamMode m, BOOL bDirect )
- : OLEStorageBase( new StgIo, NULL, m_nMode ), aName( rFile ), bIsRoot( FALSE )
+Storage::Storage( const String& rFile, StreamMode m, sal_Bool bDirect )
+ : OLEStorageBase( new StgIo, NULL, m_nMode ), aName( rFile ), bIsRoot( sal_False )
{
- BOOL bTemp = FALSE;
+ sal_Bool bTemp = sal_False;
if( !aName.Len() )
{
// no name = temporary name!
aName = TempFile::CreateTempName();
- bTemp = TRUE;
+ bTemp = sal_True;
}
// the root storage creates the I/O system
m_nMode = m;
if( pIo->Open( aName, m ) )
{
- Init( BOOL( ( m & ( STREAM_TRUNC | STREAM_NOCREATE ) ) == STREAM_TRUNC ) );
+ Init( sal_Bool( ( m & ( STREAM_TRUNC | STREAM_NOCREATE ) ) == STREAM_TRUNC ) );
if( pEntry )
{
pEntry->bDirect = bDirect;
@@ -392,19 +392,19 @@ Storage::Storage( const String& rFile, StreamMode m, BOOL bDirect )
// Create a storage on a given stream.
-Storage::Storage( SvStream& r, BOOL bDirect )
- : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( FALSE )
+Storage::Storage( SvStream& r, sal_Bool bDirect )
+ : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( sal_False )
{
m_nMode = STREAM_READ;
if( r.IsWritable() )
m_nMode = STREAM_READ | STREAM_WRITE;
if( r.GetError() == SVSTREAM_OK )
{
- pIo->SetStrm( &r, FALSE );
- ULONG nSize = r.Seek( STREAM_SEEK_TO_END );
+ pIo->SetStrm( &r, sal_False );
+ sal_uLong nSize = r.Seek( STREAM_SEEK_TO_END );
r.Seek( 0L );
// Initializing is OK if the stream is empty
- Init( BOOL( nSize == 0 ) );
+ Init( sal_Bool( nSize == 0 ) );
if( pEntry )
{
pEntry->bDirect = bDirect;
@@ -420,8 +420,8 @@ Storage::Storage( SvStream& r, BOOL bDirect )
}
-Storage::Storage( UCBStorageStream& rStrm, BOOL bDirect )
- : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( FALSE )
+Storage::Storage( UCBStorageStream& rStrm, sal_Bool bDirect )
+ : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( sal_False )
{
m_nMode = STREAM_READ;
@@ -435,7 +435,7 @@ Storage::Storage( UCBStorageStream& rStrm, BOOL bDirect )
SvStream* pStream = rStrm.GetModifySvStream();
if ( !pStream )
{
- OSL_ENSURE( FALSE, "UCBStorageStream can not provide SvStream implementation!\n" );
+ OSL_ENSURE( sal_False, "UCBStorageStream can not provide SvStream implementation!\n" );
SetError( SVSTREAM_GENERALERROR );
pEntry = NULL;
return;
@@ -446,10 +446,10 @@ Storage::Storage( UCBStorageStream& rStrm, BOOL bDirect )
pIo->SetStrm( &rStrm );
- ULONG nSize = pStream->Seek( STREAM_SEEK_TO_END );
+ sal_uLong nSize = pStream->Seek( STREAM_SEEK_TO_END );
pStream->Seek( 0L );
// Initializing is OK if the stream is empty
- Init( BOOL( nSize == 0 ) );
+ Init( sal_Bool( nSize == 0 ) );
if( pEntry )
{
pEntry->bDirect = bDirect;
@@ -462,14 +462,14 @@ Storage::Storage( UCBStorageStream& rStrm, BOOL bDirect )
// Perform common code for both ctors above.
-void Storage::Init( BOOL bCreate )
+void Storage::Init( sal_Bool bCreate )
{
pEntry = NULL;
- BOOL bHdrLoaded = FALSE;
- bIsRoot = TRUE;
+ sal_Bool bHdrLoaded = sal_False;
+ bIsRoot = sal_True;
if( pIo->Good() )
{
- ULONG nSize = pIo->GetStrm()->Seek( STREAM_SEEK_TO_END );
+ sal_uLong nSize = pIo->GetStrm()->Seek( STREAM_SEEK_TO_END );
pIo->GetStrm()->Seek( 0L );
if( nSize )
{
@@ -498,7 +498,7 @@ void Storage::Init( BOOL bCreate )
// Internal ctor
Storage::Storage( StgIo* p, StgDirEntry* q, StreamMode m )
- : OLEStorageBase( p, q, m_nMode ), bIsRoot( FALSE )
+ : OLEStorageBase( p, q, m_nMode ), bIsRoot( sal_False )
{
if( q )
q->aEntry.GetName( aName );
@@ -561,7 +561,7 @@ void Storage::FillInfoList( SvStorageInfoList* pList ) const
// Open or create a substorage
-BaseStorage* Storage::OpenUCBStorage( const String& rName, StreamMode m, BOOL bDirect )
+BaseStorage* Storage::OpenUCBStorage( const String& rName, StreamMode m, sal_Bool bDirect )
{
DBG_ERROR("Not supported!");
/*
@@ -572,20 +572,20 @@ BaseStorage* Storage::OpenUCBStorage( const String& rName, StreamMode m, BOOL bD
return OpenStorage( rName, m, bDirect );
}
-BaseStorage* Storage::OpenOLEStorage( const String& rName, StreamMode m, BOOL bDirect )
+BaseStorage* Storage::OpenOLEStorage( const String& rName, StreamMode m, sal_Bool bDirect )
{
return OpenStorage( rName, m, bDirect );
}
-BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, BOOL bDirect )
+BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, sal_Bool bDirect )
{
if( !Validate() || !ValidateMode( m ) )
return new Storage( pIo, NULL, m );
- BOOL bSetAutoCommit = FALSE;
+ sal_Bool bSetAutoCommit = sal_False;
if( bDirect && !pEntry->bDirect )
{
- bSetAutoCommit = TRUE;
- bDirect = FALSE;
+ bSetAutoCommit = sal_True;
+ bDirect = sal_False;
}
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
@@ -593,14 +593,14 @@ BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, BOOL bDire
{
if( !( m & STREAM_NOCREATE ) )
{
- BOOL bTemp = FALSE;
+ sal_Bool bTemp = sal_False;
// create a new storage
String aNewName = rName;
if( !aNewName.Len() )
{
aNewName.AssignAscii( "Temp Stg " );
aNewName.Append( String::CreateFromInt32( ++nTmpCount ) );
- bTemp = TRUE;
+ bTemp = sal_True;
}
p = pIo->pTOC->Create( *pEntry, aNewName, STG_STORAGE );
if( p )
@@ -630,13 +630,13 @@ BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, BOOL bDire
}
Storage* pStg = new Storage( pIo, p, m );
pIo->MoveError( *pStg );
- if( m & STREAM_WRITE ) pStg->m_bAutoCommit = TRUE;
+ if( m & STREAM_WRITE ) pStg->m_bAutoCommit = sal_True;
return pStg;
}
// Open a stream
-BaseStorageStream* Storage::OpenStream( const String& rName, StreamMode m, BOOL,
+BaseStorageStream* Storage::OpenStream( const String& rName, StreamMode m, sal_Bool,
const ByteString*
#ifdef DBG_UTIL
pB
@@ -648,7 +648,7 @@ pB
if( !Validate() || !ValidateMode( m ) )
return new StorageStream( pIo, NULL, m );
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
- BOOL bTemp = FALSE;
+ sal_Bool bTemp = sal_False;
if( !p )
{
if( !( m & STREAM_NOCREATE ) )
@@ -660,7 +660,7 @@ pB
{
aNewName.AssignAscii( "Temp Strm " );
aNewName.Append( String::CreateFromInt32( ++nTmpCount ) );
- bTemp = TRUE;
+ bTemp = sal_True;
}
p = pIo->pTOC->Create( *pEntry, aNewName, STG_STREAM );
}
@@ -682,50 +682,50 @@ pB
}
StorageStream* pStm = new StorageStream( pIo, p, m );
if( p && !p->bDirect )
- pStm->SetAutoCommit( TRUE );
+ pStm->SetAutoCommit( sal_True );
pIo->MoveError( *pStm );
return pStm;
}
// Delete a stream or substorage by setting the temp bit.
-BOOL Storage::Remove( const String& rName )
+sal_Bool Storage::Remove( const String& rName )
{
- if( !Validate( TRUE ) )
- return FALSE;
+ if( !Validate( sal_True ) )
+ return sal_False;
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
if( p )
{
- p->Invalidate( TRUE );
- return TRUE;
+ p->Invalidate( sal_True );
+ return sal_True;
}
else
{
SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
}
// Rename a storage element
-BOOL Storage::Rename( const String& rOld, const String& rNew )
+sal_Bool Storage::Rename( const String& rOld, const String& rNew )
{
- if( Validate( TRUE ) )
+ if( Validate( sal_True ) )
{
- BOOL b = pIo->pTOC->Rename( *pEntry, rOld, rNew );
+ sal_Bool b = pIo->pTOC->Rename( *pEntry, rOld, rNew );
pIo->MoveError( *this );
return b;
}
else
- return FALSE;
+ return sal_False;
}
// Copy one element
-BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNew )
+sal_Bool Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNew )
{
- if( !Validate() || !pDest || !pDest->Validate( TRUE ) )
- return FALSE;
+ if( !Validate() || !pDest || !pDest->Validate( sal_True ) )
+ return sal_False;
StgDirEntry* pElem = pIo->pTOC->Find( *pEntry, rElem );
if( pElem )
{
@@ -734,7 +734,7 @@ BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNe
if( !pElem->IsContained( pDest->pEntry ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
*/
if( pElem->aEntry.GetType() == STG_STORAGE )
@@ -743,7 +743,7 @@ BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNe
BaseStorage* p1 = OpenStorage( rElem, INTERNAL_MODE );
BaseStorage* p2 = pDest->OpenOLEStorage( rNew, STREAM_WRITE | STREAM_SHARE_DENYALL, pEntry->bDirect );
- ULONG nTmpErr = p2->GetError();
+ sal_uLong nTmpErr = p2->GetError();
if( !nTmpErr )
{
p2->SetClassId( p1->GetClassId() );
@@ -761,7 +761,7 @@ BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNe
delete p1;
delete p2;
- return BOOL( Good() && pDest->Good() );
+ return sal_Bool( Good() && pDest->Good() );
}
else
{
@@ -769,7 +769,7 @@ BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNe
BaseStorageStream* p1 = OpenStream( rElem, INTERNAL_MODE );
BaseStorageStream* p2 = pDest->OpenStream( rNew, STREAM_WRITE | STREAM_SHARE_DENYALL, pEntry->bDirect );
- ULONG nTmpErr = p2->GetError();
+ sal_uLong nTmpErr = p2->GetError();
if( !nTmpErr )
{
p1->CopyTo( p2 );
@@ -786,58 +786,58 @@ BOOL Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNe
delete p1;
delete p2;
- return BOOL( Good() && pDest->Good() );
+ return sal_Bool( Good() && pDest->Good() );
}
}
SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
-BOOL Storage::CopyTo( BaseStorage* pDest ) const
+sal_Bool Storage::CopyTo( BaseStorage* pDest ) const
{
- if( !Validate() || !pDest || !pDest->Validate( TRUE ) || Equals( *pDest ) )
+ if( !Validate() || !pDest || !pDest->Validate( sal_True ) || Equals( *pDest ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
Storage* pThis = (Storage*) this;
/*
if( !pThis->pEntry->IsContained( pDest->pEntry ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
*/
pDest->SetClassId( GetClassId() );
pDest->SetDirty();
SvStorageInfoList aList;
FillInfoList( &aList );
- BOOL bRes = TRUE;
- for( USHORT i = 0; i < aList.Count() && bRes; i++ )
+ sal_Bool bRes = sal_True;
+ for( sal_uInt16 i = 0; i < aList.Count() && bRes; i++ )
{
SvStorageInfo& rInfo = aList.GetObject( i );
bRes = pThis->CopyTo( rInfo.GetName(), pDest, rInfo.GetName() );
}
if( !bRes )
SetError( pDest->GetError() );
- return BOOL( Good() && pDest->Good() );
+ return sal_Bool( Good() && pDest->Good() );
}
// Move one element
-BOOL Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String& rNew )
+sal_Bool Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String& rNew )
{
- if( !Validate() || !pODest || !pODest->Validate( TRUE ) || Equals( *pODest ) )
+ if( !Validate() || !pODest || !pODest->Validate( sal_True ) || Equals( *pODest ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
StgDirEntry* pElem = pIo->pTOC->Find( *pEntry, rElem );
if( pElem )
{
// Simplest case: both storages share the same file
- BOOL bRes;
+ sal_Bool bRes;
Storage *pOther = PTR_CAST( Storage, pODest );
if( pOther && pIo == pOther->pIo && rElem == rNew )
{
@@ -848,14 +848,14 @@ BOOL Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String& rN
{
// cyclic move
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
bRes = pIo->pTOC->Move( *pEntry, *pDest->pEntry, rNew );
if( !bRes )
{
pIo->MoveError( *this );
pDest->pIo->MoveError( *pDest );
- ULONG nErr = GetError();
+ sal_uLong nErr = GetError();
if( !nErr )
nErr = pDest->GetError();
SetError( nErr );
@@ -873,51 +873,51 @@ BOOL Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String& rN
return bRes;
}
SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
-BOOL Storage::IsStorage( const String& rName ) const
+sal_Bool Storage::IsStorage( const String& rName ) const
{
if( Validate() )
{
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
if( p )
- return BOOL( p->aEntry.GetType() == STG_STORAGE );
+ return sal_Bool( p->aEntry.GetType() == STG_STORAGE );
}
- return FALSE;
+ return sal_False;
}
-BOOL Storage::IsStream( const String& rName ) const
+sal_Bool Storage::IsStream( const String& rName ) const
{
if( Validate() )
{
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
if( p )
- return BOOL( p->aEntry.GetType() == STG_STREAM );
+ return sal_Bool( p->aEntry.GetType() == STG_STREAM );
}
- return FALSE;
+ return sal_False;
}
-BOOL Storage::IsContained( const String& rName ) const
+sal_Bool Storage::IsContained( const String& rName ) const
{
if( Validate() )
- return BOOL( pIo->pTOC->Find( *pEntry, rName ) != NULL );
+ return sal_Bool( pIo->pTOC->Find( *pEntry, rName ) != NULL );
else
- return FALSE;
+ return sal_False;
}
// Commit all sub-elements within this storage. If this is
// the root, commit the FAT, the TOC and the header as well.
-BOOL Storage::Commit()
+sal_Bool Storage::Commit()
{
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if( !Validate() )
- return FALSE;
+ return sal_False;
if( !( m_nMode & STREAM_WRITE ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE;
+ return sal_False;
}
else
{
@@ -936,9 +936,9 @@ BOOL Storage::Commit()
return bRes;
}
-BOOL Storage::Revert()
+sal_Bool Storage::Revert()
{
- return TRUE;
+ return sal_True;
}
///////////////////////////// OLE Support ////////////////////////////////
@@ -946,16 +946,16 @@ BOOL Storage::Revert()
// Set the storage type
void Storage::SetClass( const SvGlobalName & rClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName )
{
- if( Validate( TRUE ) )
+ if( Validate( sal_True ) )
{
// set the class name in the root entry
pEntry->aEntry.SetClassId( (const ClsId&) rClass.GetCLSID() );
pEntry->SetDirty();
// then create the streams
- StgCompObjStream aCompObj( *this, TRUE );
+ StgCompObjStream aCompObj( *this, sal_True );
aCompObj.GetClsId() = (const ClsId&) rClass.GetCLSID();
aCompObj.GetCbFormat() = nOriginalClipFormat;
aCompObj.GetUserName() = rUserTypeName;
@@ -973,14 +973,14 @@ void Storage::SetClass( const SvGlobalName & rClass,
}
void Storage::SetConvertClass( const SvGlobalName & rConvertClass,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName )
{
- if( Validate( TRUE ) )
+ if( Validate( sal_True ) )
{
SetClass( rConvertClass, nOriginalClipFormat, rUserTypeName );
// plus the convert flag:
- StgOleStream aOle( *this, TRUE );
+ StgOleStream aOle( *this, sal_True );
aOle.GetFlags() |= 4;
if( !aOle.Store() )
SetError( aOle.GetError() );
@@ -989,7 +989,7 @@ void Storage::SetConvertClass( const SvGlobalName & rConvertClass,
SvGlobalName Storage::GetClassName()
{
- StgCompObjStream aCompObj( *this, FALSE );
+ StgCompObjStream aCompObj( *this, sal_False );
if( aCompObj.Load() )
return SvGlobalName( (const CLSID&) aCompObj.GetClsId() );
pIo->ResetError();
@@ -1000,9 +1000,9 @@ SvGlobalName Storage::GetClassName()
return SvGlobalName();
}
-ULONG Storage::GetFormat()
+sal_uLong Storage::GetFormat()
{
- StgCompObjStream aCompObj( *this, FALSE );
+ StgCompObjStream aCompObj( *this, sal_False );
if( aCompObj.Load() )
return aCompObj.GetCbFormat();
pIo->ResetError();
@@ -1011,26 +1011,26 @@ ULONG Storage::GetFormat()
String Storage::GetUserName()
{
- StgCompObjStream aCompObj( *this, FALSE );
+ StgCompObjStream aCompObj( *this, sal_False );
if( aCompObj.Load() )
return aCompObj.GetUserName();
pIo->ResetError();
return String();
}
-BOOL Storage::ShouldConvert()
+sal_Bool Storage::ShouldConvert()
{
- StgOleStream aOle( *this, FALSE );
+ StgOleStream aOle( *this, sal_False );
if( aOle.Load() )
- return BOOL( ( aOle.GetFlags() & 4 ) != 0 );
+ return sal_Bool( ( aOle.GetFlags() & 4 ) != 0 );
else
{
pIo->ResetError();
- return FALSE;
+ return sal_False;
}
}
-BOOL Storage::ValidateFAT()
+sal_Bool Storage::ValidateFAT()
{
Link aLink = StgIo::GetErrorLink();
ErrCode nErr = pIo->ValidateFATs();
@@ -1058,31 +1058,31 @@ const SvStream* Storage::GetSvStream() const
return GetSvStream_Impl();
}
-BOOL Storage::Validate( BOOL bValidate ) const
+sal_Bool Storage::Validate( sal_Bool bValidate ) const
{
- BOOL bRet = Validate_Impl( bValidate );
+ sal_Bool bRet = Validate_Impl( bValidate );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-BOOL Storage::ValidateMode( StreamMode nMode ) const
+sal_Bool Storage::ValidateMode( StreamMode nMode ) const
{
- BOOL bRet = ValidateMode_Impl( nMode );
+ sal_Bool bRet = ValidateMode_Impl( nMode );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-BOOL Storage::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
+sal_Bool Storage::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
{
- BOOL bRet = ValidateMode_Impl( nMode, p );
+ sal_Bool bRet = ValidateMode_Impl( nMode, p );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-BOOL Storage::Equals( const BaseStorage& rStorage ) const
+sal_Bool Storage::Equals( const BaseStorage& rStorage ) const
{
const Storage* pOther = PTR_CAST( Storage, &rStorage );
return pOther && ( pOther->pEntry == pEntry );
diff --git a/sot/source/sdstor/stgavl.cxx b/sot/source/sdstor/stgavl.cxx
index 3542a965da33..ad400f85dee5 100644
--- a/sot/source/sdstor/stgavl.cxx
+++ b/sot/source/sdstor/stgavl.cxx
@@ -212,7 +212,7 @@ StgAvlNode* StgAvlNode::RotRL()
// Remove a tree element. Return the removed element or NULL.
-StgAvlNode* StgAvlNode::Rem( StgAvlNode** p, StgAvlNode* pDel, BOOL bPtrs )
+StgAvlNode* StgAvlNode::Rem( StgAvlNode** p, StgAvlNode* pDel, sal_Bool bPtrs )
{
if( *p )
{
@@ -279,21 +279,21 @@ void StgAvlNode::StgEnum( short& n )
}
// Add node to AVL tree.
-// Return FALSE if the element already exists.
+// Return sal_False if the element already exists.
-BOOL StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
+sal_Bool StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
{
StgAvlNode* pPivot, *pHeavy, *pNewRoot, *pParent, *pPrev;
// special case - empty tree
if( *pRoot == NULL )
{
*pRoot = pIns;
- return TRUE;
+ return sal_True;
}
// find insertion point and return if already present
short nRes = (*pRoot)->Locate( pIns, &pPivot, &pParent, &pPrev );
if( !nRes )
- return FALSE;
+ return sal_False;
// add new node
if( nRes < 0 )
pPrev->pLeft = pIns;
@@ -323,19 +323,19 @@ BOOL StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
else if( pPivot == pParent->pRight )
pParent->pRight = pNewRoot;
}
- return TRUE;
+ return sal_True;
}
-// Remove node from tree. Returns TRUE is found and removed.
+// Remove node from tree. Returns sal_True is found and removed.
// Actually delete if bDel
-BOOL StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, BOOL bDel )
+sal_Bool StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, sal_Bool bDel )
{
// special case - empty tree
if( *pRoot == NULL )
- return FALSE;
+ return sal_False;
// delete the element
- pDel = Rem( pRoot, pDel, FALSE );
+ pDel = Rem( pRoot, pDel, sal_False );
if( pDel )
{
if( bDel )
@@ -345,30 +345,30 @@ BOOL StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, BOOL bDel )
/* StgAvlNode* pNew = NULL;
while( *pRoot )
{
- StgAvlNode* p = Rem( pRoot, *pRoot, FALSE );
+ StgAvlNode* p = Rem( pRoot, *pRoot, sal_False );
Insert( &pNew, p );
}
*pRoot = pNew;*/
- return TRUE;
+ return sal_True;
}
else
- return FALSE;
+ return sal_False;
}
-// Move node to a different tree. Returns TRUE is found and moved. This routine
+// Move node to a different tree. Returns sal_True is found and moved. This routine
// may be called when the key has changed.
-BOOL StgAvlNode::Move
+sal_Bool StgAvlNode::Move
( StgAvlNode** pRoot1, StgAvlNode** pRoot2, StgAvlNode* pMove )
{
// special case - empty tree
if( *pRoot1 == NULL )
- return FALSE;
- pMove = Rem( pRoot1, pMove, FALSE );
+ return sal_False;
+ pMove = Rem( pRoot1, pMove, sal_False );
if( pMove )
return Insert( pRoot2, pMove );
else
- return FALSE;
+ return sal_False;
}
////////////////////////// class AvlIterator /////////////////////////
diff --git a/sot/source/sdstor/stgavl.hxx b/sot/source/sdstor/stgavl.hxx
index 66f424888e6d..29b33ae81109 100644
--- a/sot/source/sdstor/stgavl.hxx
+++ b/sot/source/sdstor/stgavl.hxx
@@ -46,7 +46,7 @@ private:
StgAvlNode* RotRR();
StgAvlNode* RotRL();
void StgEnum( short& );
- static StgAvlNode* Rem( StgAvlNode**, StgAvlNode*, BOOL );
+ static StgAvlNode* Rem( StgAvlNode**, StgAvlNode*, sal_Bool );
protected:
short nId; // iterator ID
short nBalance; // indicates tree balance
@@ -55,9 +55,9 @@ protected:
public:
virtual ~StgAvlNode();
StgAvlNode* Find( StgAvlNode* );
- static BOOL Insert( StgAvlNode**, StgAvlNode* );
- static BOOL Remove( StgAvlNode**, StgAvlNode*, BOOL bDel = TRUE );
- static BOOL Move( StgAvlNode**, StgAvlNode**, StgAvlNode* );
+ static sal_Bool Insert( StgAvlNode**, StgAvlNode* );
+ static sal_Bool Remove( StgAvlNode**, StgAvlNode*, sal_Bool bDel = sal_True );
+ static sal_Bool Move( StgAvlNode**, StgAvlNode**, StgAvlNode* );
virtual short Compare( const StgAvlNode* ) const = 0;
};
diff --git a/sot/source/sdstor/stgcache.cxx b/sot/source/sdstor/stgcache.cxx
index f4461383c0ba..5a0fde8b9cf1 100644
--- a/sot/source/sdstor/stgcache.cxx
+++ b/sot/source/sdstor/stgcache.cxx
@@ -52,10 +52,10 @@
//-----------------------------------------------------------------------------
typedef std::hash_map
<
- INT32,
+ sal_Int32,
StgPage *,
- std::hash< INT32 >,
- NAMESPACE_STD(equal_to)< INT32 >
+ std::hash< sal_Int32 >,
+ NAMESPACE_STD(equal_to)< sal_Int32 >
> UsrStgPagePtr_Impl;
#ifdef _MSC_VER
#pragma warning( disable: 4786 )
@@ -73,9 +73,9 @@ StgPage::StgPage( StgCache* p, short n )
{
pCache = p;
nData = n;
- bDirty = FALSE;
+ bDirty = sal_False;
nPage = 0;
- pData = new BYTE[ nData ];
+ pData = new sal_uInt8[ nData ];
pNext1 =
pNext2 =
pLast1 =
@@ -88,15 +88,15 @@ StgPage::~StgPage()
delete [] pData;
}
-void StgPage::SetPage( short nOff, INT32 nVal )
+void StgPage::SetPage( short nOff, sal_Int32 nVal )
{
- if( ( nOff < (short) ( nData / sizeof( INT32 ) ) ) && nOff >= 0 )
+ if( ( nOff < (short) ( nData / sizeof( sal_Int32 ) ) ) && nOff >= 0 )
{
#ifdef OSL_BIGENDIAN
nVal = SWAPLONG(nVal);
#endif
- ((INT32*) pData )[ nOff ] = nVal;
- bDirty = TRUE;
+ ((sal_Int32*) pData )[ nOff ] = nVal;
+ bDirty = sal_True;
}
}
@@ -105,7 +105,7 @@ void StgPage::SetPage( short nOff, INT32 nVal )
// The disk cache holds the cached sectors. The sector type differ according
// to their purpose.
-INT32 lcl_GetPageCount( ULONG nFileSize, short nPageSize )
+sal_Int32 lcl_GetPageCount( sal_uLong nFileSize, short nPageSize )
{
// return (nFileSize >= 512) ? (nFileSize - 512) / nPageSize : 0;
// #i61980# reallife: last page may be incomplete, return number of *started* pages
@@ -119,8 +119,8 @@ StgCache::StgCache()
pCur = pElem1 = NULL;
nPageSize = 512;
nError = SVSTREAM_OK;
- bMyStream = FALSE;
- bFile = FALSE;
+ bMyStream = sal_False;
+ bFile = sal_False;
pLRUCache = NULL;
pStorageStream = NULL;
}
@@ -128,15 +128,15 @@ StgCache::StgCache()
StgCache::~StgCache()
{
Clear();
- SetStrm( NULL, FALSE );
+ SetStrm( NULL, sal_False );
delete (UsrStgPagePtr_Impl*)pLRUCache;
}
void StgCache::SetPhysPageSize( short n )
{
nPageSize = n;
- ULONG nPos = pStrm->Tell();
- ULONG nFileSize = pStrm->Seek( STREAM_SEEK_TO_END );
+ sal_uLong nPos = pStrm->Tell();
+ sal_uLong nFileSize = pStrm->Seek( STREAM_SEEK_TO_END );
nPages = lcl_GetPageCount( nFileSize, nPageSize );
pStrm->Seek( nPos );
}
@@ -144,7 +144,7 @@ void StgCache::SetPhysPageSize( short n )
// Create a new cache element
// pCur points to this element
-StgPage* StgCache::Create( INT32 nPg )
+StgPage* StgCache::Create( sal_Int32 nPg )
{
StgPage* pElem = new StgPage( this, nPageSize );
pElem->nPage = nPg;
@@ -227,7 +227,7 @@ void StgCache::Clear()
// Look for a cached page
-StgPage* StgCache::Find( INT32 nPage )
+StgPage* StgCache::Find( sal_Int32 nPage )
{
if( !pLRUCache )
return NULL;
@@ -255,7 +255,7 @@ StgPage* StgCache::Find( INT32 nPage )
// Load a page into the cache
-StgPage* StgCache::Get( INT32 nPage, BOOL bForce )
+StgPage* StgCache::Get( sal_Int32 nPage, sal_Bool bForce )
{
StgPage* p = Find( nPage );
if( !p )
@@ -275,7 +275,7 @@ StgPage* StgCache::Get( INT32 nPage, BOOL bForce )
// to duplicate an existing stream or to create new entries.
// The new page is initially marked dirty. No owner is copied.
-StgPage* StgCache::Copy( INT32 nNew, INT32 nOld )
+StgPage* StgCache::Copy( sal_Int32 nNew, sal_Int32 nOld )
{
StgPage* p = Find( nNew );
if( !p )
@@ -283,7 +283,7 @@ StgPage* StgCache::Copy( INT32 nNew, INT32 nOld )
if( nOld >= 0 )
{
// old page: we must have this data!
- StgPage* q = Get( nOld, TRUE );
+ StgPage* q = Get( nOld, sal_True );
if( q )
memcpy( p->pData, q->pData, p->nData );
}
@@ -293,17 +293,17 @@ StgPage* StgCache::Copy( INT32 nNew, INT32 nOld )
// Flush the cache whose owner is given. NULL flushes all.
-BOOL StgCache::Commit( StgDirEntry* )
+sal_Bool StgCache::Commit( StgDirEntry* )
{
StgPage* p = pElem1;
if( p ) do
{
if( p->bDirty )
{
- BOOL b = Write( p->nPage, p->pData, 1 );
+ sal_Bool b = Write( p->nPage, p->pData, 1 );
if( !b )
- return FALSE;
- p->bDirty = FALSE;
+ return sal_False;
+ p->bDirty = sal_False;
}
p = p->pNext2;
} while( p != pElem1 );
@@ -316,10 +316,10 @@ BOOL StgCache::Commit( StgDirEntry* )
if( p->bDirty )
{
ErrorBox( NULL, WB_OK, String("SO2: Dirty Block in Ordered List") ).Execute();
- BOOL b = Write( p->nPage, p->pData, 1 );
+ sal_Bool b = Write( p->nPage, p->pData, 1 );
if( !b )
- return FALSE;
- p->bDirty = FALSE;
+ return sal_False;
+ p->bDirty = sal_False;
}
p = p->pNext2;
} while( p != pElem1 );
@@ -329,15 +329,15 @@ BOOL StgCache::Commit( StgDirEntry* )
if( p->bDirty )
{
ErrorBox( NULL, WB_OK, String("SO2: Dirty Block in LRU List") ).Execute();
- BOOL b = Write( p->nPage, p->pData, 1 );
+ sal_Bool b = Write( p->nPage, p->pData, 1 );
if( !b )
- return FALSE;
- p->bDirty = FALSE;
+ return sal_False;
+ p->bDirty = sal_False;
}
p = p->pNext1;
} while( p != pElem1 );
#endif
- return TRUE;
+ return sal_True;
}
void StgCache::Revert( StgDirEntry* )
@@ -345,7 +345,7 @@ void StgCache::Revert( StgDirEntry* )
// Set a stream
-void StgCache::SetStrm( SvStream* p, BOOL bMy )
+void StgCache::SetStrm( SvStream* p, sal_Bool bMy )
{
if( pStorageStream )
{
@@ -376,34 +376,34 @@ void StgCache::SetStrm( UCBStorageStream* pStgStream )
pStrm = pStorageStream->GetModifySvStream();
}
- bMyStream = FALSE;
+ bMyStream = sal_False;
}
// Open/close the disk file
-BOOL StgCache::Open( const String& rName, StreamMode nMode )
+sal_Bool StgCache::Open( const String& rName, StreamMode nMode )
{
// do not open in exclusive mode!
if( nMode & STREAM_SHARE_DENYALL )
nMode = ( ( nMode & ~STREAM_SHARE_DENYALL ) | STREAM_SHARE_DENYWRITE );
SvFileStream* pFileStrm = new SvFileStream( rName, nMode );
// SvStream "Feature" Write Open auch erfolgreich, wenns nicht klappt
- BOOL bAccessDenied = FALSE;
+ sal_Bool bAccessDenied = sal_False;
if( ( nMode & STREAM_WRITE ) && !pFileStrm->IsWritable() )
{
pFileStrm->Close();
- bAccessDenied = TRUE;
+ bAccessDenied = sal_True;
}
- SetStrm( pFileStrm, TRUE );
+ SetStrm( pFileStrm, sal_True );
if( pFileStrm->IsOpen() )
{
- ULONG nFileSize = pStrm->Seek( STREAM_SEEK_TO_END );
+ sal_uLong nFileSize = pStrm->Seek( STREAM_SEEK_TO_END );
nPages = lcl_GetPageCount( nFileSize, nPageSize );
pStrm->Seek( 0L );
}
else
nPages = 0;
- bFile = TRUE;
+ bFile = sal_True;
SetError( bAccessDenied ? ERRCODE_IO_ACCESSDENIED : pStrm->GetError() );
return Good();
}
@@ -419,7 +419,7 @@ void StgCache::Close()
// low level I/O
-BOOL StgCache::Read( INT32 nPage, void* pBuf, INT32 nPg )
+sal_Bool StgCache::Read( sal_Int32 nPage, void* pBuf, sal_Int32 nPg )
{
if( Good() )
{
@@ -431,9 +431,9 @@ BOOL StgCache::Read( INT32 nPage, void* pBuf, INT32 nPg )
SetError( SVSTREAM_READ_ERROR );
else if ( nPage < nPages )
{
- ULONG nPos = Page2Pos( nPage );
- INT32 nPg2 = ( ( nPage + nPg ) > nPages ) ? nPages - nPage : nPg;
- ULONG nBytes = nPg2 * nPageSize;
+ sal_uLong nPos = Page2Pos( nPage );
+ sal_Int32 nPg2 = ( ( nPage + nPg ) > nPages ) ? nPages - nPage : nPg;
+ sal_uLong nBytes = nPg2 * nPageSize;
// fixed address and size for the header
if( nPage == -1 )
{
@@ -458,12 +458,12 @@ BOOL StgCache::Read( INT32 nPage, void* pBuf, INT32 nPg )
return Good();
}
-BOOL StgCache::Write( INT32 nPage, void* pBuf, INT32 nPg )
+sal_Bool StgCache::Write( sal_Int32 nPage, void* pBuf, sal_Int32 nPg )
{
if( Good() )
{
- ULONG nPos = Page2Pos( nPage );
- ULONG nBytes = nPg * nPageSize;
+ sal_uLong nPos = Page2Pos( nPage );
+ sal_uLong nBytes = nPg * nPageSize;
// fixed address and size for the header
if( nPage == -1 )
nPos = 0L, nBytes = 512;
@@ -475,16 +475,16 @@ BOOL StgCache::Write( INT32 nPage, void* pBuf, INT32 nPg )
#endif
}
}
- ULONG nRes = pStrm->Write( pBuf, nBytes );
+ sal_uLong nRes = pStrm->Write( pBuf, nBytes );
if( nRes != nBytes )
SetError( SVSTREAM_WRITE_ERROR );
else
SetError( pStrm->GetError() );
#ifdef READ_AFTER_WRITE
- BYTE cBuf[ 512 ];
+ sal_uInt8 cBuf[ 512 ];
pStrm->Flush();
pStrm->Seek( nPos );
- BOOL bRes = ( pStrm->Read( cBuf, 512 ) == 512 );
+ sal_Bool bRes = ( pStrm->Read( cBuf, 512 ) == 512 );
if( bRes )
bRes = !memcmp( cBuf, pBuf, 512 );
if( !bRes )
@@ -499,10 +499,10 @@ BOOL StgCache::Write( INT32 nPage, void* pBuf, INT32 nPg )
// set the file size in pages
-BOOL StgCache::SetSize( INT32 n )
+sal_Bool StgCache::SetSize( sal_Int32 n )
{
// Add the file header
- INT32 nSize = n * nPageSize + 512;
+ sal_Int32 nSize = n * nPageSize + 512;
pStrm->SetStreamSize( nSize );
SetError( pStrm->GetError() );
if( !nError )
@@ -510,7 +510,7 @@ BOOL StgCache::SetSize( INT32 n )
return Good();
}
-void StgCache::SetError( ULONG n )
+void StgCache::SetError( sal_uLong n )
{
if( n && !nError )
nError = n;
@@ -533,13 +533,13 @@ void StgCache::MoveError( StorageBase& r )
// Utility functions
-INT32 StgCache::Page2Pos( INT32 nPage )
+sal_Int32 StgCache::Page2Pos( sal_Int32 nPage )
{
if( nPage < 0 ) nPage = 0;
return( nPage * nPageSize ) + nPageSize;
}
-INT32 StgCache::Pos2Page( INT32 nPos )
+sal_Int32 StgCache::Pos2Page( sal_Int32 nPos )
{
return ( ( nPos + nPageSize - 1 ) / nPageSize ) * nPageSize - 1;
}
diff --git a/sot/source/sdstor/stgcache.hxx b/sot/source/sdstor/stgcache.hxx
index 5379f837b8b1..d6849bdd4b3d 100644
--- a/sot/source/sdstor/stgcache.hxx
+++ b/sot/source/sdstor/stgcache.hxx
@@ -47,9 +47,9 @@ class StorageBase;
class StgCache {
StgPage* pCur; // top of LRU list
StgPage* pElem1; // top of ordered list
- ULONG nError; // error code
- INT32 nPages; // size of data area in pages
- USHORT nRef; // reference count
+ sal_uLong nError; // error code
+ sal_Int32 nPages; // size of data area in pages
+ sal_uInt16 nRef; // reference count
void * pLRUCache; // hash table of cached objects
short nPageSize; // page size of the file
UCBStorageStream* pStorageStream; // holds reference to UCB storage stream
@@ -57,40 +57,40 @@ class StgCache {
void Erase( StgPage* ); // delete a cache element
void InsertToLRU( StgPage* ); // insert into LRU list
void InsertToOrdered( StgPage* ); // insert into ordered list
- StgPage* Create( INT32 ); // create a cached page
+ StgPage* Create( sal_Int32 ); // create a cached page
protected:
SvStream* pStrm; // physical stream
- BOOL bMyStream; // TRUE: delete stream in dtor
- BOOL bFile; // TRUE: file stream
- INT32 Page2Pos( INT32 ); // page address --> file position
- INT32 Pos2Page( INT32 ); // file position --> page address
+ sal_Bool bMyStream; // sal_True: delete stream in dtor
+ sal_Bool bFile; // sal_True: file stream
+ sal_Int32 Page2Pos( sal_Int32 ); // page address --> file position
+ sal_Int32 Pos2Page( sal_Int32 ); // file position --> page address
public:
StgCache();
~StgCache();
void IncRef() { nRef++; }
- USHORT DecRef() { return --nRef; }
+ sal_uInt16 DecRef() { return --nRef; }
void SetPhysPageSize( short );
- INT32 GetPhysPages() { return nPages; }
+ sal_Int32 GetPhysPages() { return nPages; }
short GetPhysPageSize() { return nPageSize; }
SvStream* GetStrm() { return pStrm; }
- void SetStrm( SvStream*, BOOL );
+ void SetStrm( SvStream*, sal_Bool );
void SetStrm( UCBStorageStream* );
- BOOL IsWritable() { return pStrm->IsWritable(); }
- BOOL Good() { return BOOL( nError == SVSTREAM_OK ); }
- BOOL Bad() { return BOOL( nError != SVSTREAM_OK ); }
- ULONG GetError() { return nError; }
+ sal_Bool IsWritable() { return pStrm->IsWritable(); }
+ sal_Bool Good() { return sal_Bool( nError == SVSTREAM_OK ); }
+ sal_Bool Bad() { return sal_Bool( nError != SVSTREAM_OK ); }
+ sal_uLong GetError() { return nError; }
void MoveError( StorageBase& );
- void SetError( ULONG );
+ void SetError( sal_uLong );
void ResetError();
- BOOL Open( const String& rName, StreamMode );
+ sal_Bool Open( const String& rName, StreamMode );
void Close();
- BOOL Read( INT32 nPage, void* pBuf, INT32 nPages );
- BOOL Write( INT32 nPage, void* pBuf, INT32 nPages );
- BOOL SetSize( INT32 nPages );
- StgPage* Find( INT32 ); // find a cached page
- StgPage* Get( INT32, BOOL ); // get a cached page
- StgPage* Copy( INT32, INT32=STG_FREE ); // copy a page
- BOOL Commit( StgDirEntry* = NULL ); // flush all pages
+ sal_Bool Read( sal_Int32 nPage, void* pBuf, sal_Int32 nPages );
+ sal_Bool Write( sal_Int32 nPage, void* pBuf, sal_Int32 nPages );
+ sal_Bool SetSize( sal_Int32 nPages );
+ StgPage* Find( sal_Int32 ); // find a cached page
+ StgPage* Get( sal_Int32, sal_Bool ); // get a cached page
+ StgPage* Copy( sal_Int32, sal_Int32=STG_FREE ); // copy a page
+ sal_Bool Commit( StgDirEntry* = NULL ); // flush all pages
void Revert( StgDirEntry* = NULL ); // revert dirty pages
void Clear(); // clear the cache
};
@@ -101,32 +101,32 @@ class StgPage {
StgPage *pNext1, *pLast1; // LRU chain
StgPage *pNext2, *pLast2; // ordered chain
StgDirEntry* pOwner; // owner
- INT32 nPage; // page #
- BYTE* pData; // nPageSize characters
+ sal_Int32 nPage; // page #
+ sal_uInt8* pData; // nPageSize characters
short nData; // size of this page
- BOOL bDirty; // dirty flag
+ sal_Bool bDirty; // dirty flag
StgPage( StgCache*, short );
~StgPage();
public:
- void SetDirty() { bDirty = TRUE; }
- INT32 GetPage() { return nPage; }
+ void SetDirty() { bDirty = sal_True; }
+ sal_Int32 GetPage() { return nPage; }
void* GetData() { return pData; }
short GetSize() { return nData; }
void SetOwner( StgDirEntry* p ) { pOwner = p; }
// routines for accessing FAT pages
// Assume that the data is a FAT page and get/put FAT data.
- INT32 GetPage( short nOff )
+ sal_Int32 GetPage( short nOff )
{
- if( ( nOff >= (short) ( nData / sizeof( INT32 ) ) ) || nOff < 0 )
+ if( ( nOff >= (short) ( nData / sizeof( sal_Int32 ) ) ) || nOff < 0 )
return -1;
- INT32 n = ((INT32*) pData )[ nOff ];
+ sal_Int32 n = ((sal_Int32*) pData )[ nOff ];
#ifdef OSL_BIGENDIAN
return SWAPLONG(n);
#else
return n;
#endif
}
- void SetPage( short, INT32 ); // put an element
+ void SetPage( short, sal_Int32 ); // put an element
};
#endif
diff --git a/sot/source/sdstor/stgdir.cxx b/sot/source/sdstor/stgdir.cxx
index 8c553d0f8a32..42676a9dd222 100644
--- a/sot/source/sdstor/stgdir.cxx
+++ b/sot/source/sdstor/stgdir.cxx
@@ -54,7 +54,7 @@
// Problem der Implementation: Keine Hierarchischen commits. Daher nur
// insgesamt transaktionsorientert oder direkt.
-StgDirEntry::StgDirEntry( const void* pFrom, BOOL * pbOk ) : StgAvlNode()
+StgDirEntry::StgDirEntry( const void* pFrom, sal_Bool * pbOk ) : StgAvlNode()
{
*pbOk = aEntry.Load( pFrom );
@@ -81,14 +81,14 @@ void StgDirEntry::InitMembers()
nEntry =
nRefCnt = 0;
nMode = STREAM_READ;
- bDirect = TRUE;
+ bDirect = sal_True;
bInvalid =
bCreated =
bRenamed =
bRemoved =
bTemp =
bDirty =
- bZombie = FALSE;
+ bZombie = sal_False;
}
StgDirEntry::~StgDirEntry()
@@ -113,9 +113,9 @@ short StgDirEntry::Compare( const StgAvlNode* p ) const
// the TOC tree into the TOC stream. Remember that aSave is
// stored, not aEntry.
-void StgDirEntry::Enum( INT32& n )
+void StgDirEntry::Enum( sal_Int32& n )
{
- INT32 nLeft = STG_FREE, nRight = STG_FREE, nDown = STG_FREE;
+ sal_Int32 nLeft = STG_FREE, nRight = STG_FREE, nDown = STG_FREE;
nEntry = n++;
if( pLeft )
{
@@ -137,17 +137,17 @@ void StgDirEntry::Enum( INT32& n )
// Delete all temporary entries before writing the TOC stream.
// Until now Deltem is never called with bForce True
-void StgDirEntry::DelTemp( BOOL bForce )
+void StgDirEntry::DelTemp( sal_Bool bForce )
{
if( pLeft )
- ((StgDirEntry*) pLeft)->DelTemp( FALSE );
+ ((StgDirEntry*) pLeft)->DelTemp( sal_False );
if( pRight )
- ((StgDirEntry*) pRight)->DelTemp( FALSE );
+ ((StgDirEntry*) pRight)->DelTemp( sal_False );
if( pDown )
{
// If the storage is dead, of course all elements are dead, too
if( bInvalid && aEntry.GetType() == STG_STORAGE )
- bForce = TRUE;
+ bForce = sal_True;
pDown->DelTemp( bForce );
}
if( ( bForce || bInvalid )
@@ -157,12 +157,12 @@ void StgDirEntry::DelTemp( BOOL bForce )
if( pUp )
{
// this deletes the element if refcnt == 0!
- BOOL bDel = nRefCnt == 0;
+ sal_Bool bDel = nRefCnt == 0;
StgAvlNode::Remove( (StgAvlNode**) &pUp->pDown, this, bDel );
if( !bDel )
{
pLeft = pRight = pDown = 0;
- bInvalid = bZombie = TRUE;
+ bInvalid = bZombie = sal_True;
}
}
}
@@ -170,26 +170,26 @@ void StgDirEntry::DelTemp( BOOL bForce )
// Save the tree into the given dir stream
-BOOL StgDirEntry::Store( StgDirStrm& rStrm )
+sal_Bool StgDirEntry::Store( StgDirStrm& rStrm )
{
- void* pEntry = rStrm.GetEntry( nEntry, TRUE );
+ void* pEntry = rStrm.GetEntry( nEntry, sal_True );
if( !pEntry )
- return FALSE;
+ return sal_False;
// Do not store the current (maybe not commited) entry
aSave.Store( pEntry );
if( pLeft )
if( !((StgDirEntry*) pLeft)->Store( rStrm ) )
- return FALSE;
+ return sal_False;
if( pRight )
if( !((StgDirEntry*) pRight)->Store( rStrm ) )
- return FALSE;
+ return sal_False;
if( pDown )
if( !pDown->Store( rStrm ) )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
-BOOL StgDirEntry::StoreStream( StgIo& rIo )
+sal_Bool StgDirEntry::StoreStream( StgIo& rIo )
{
if( aEntry.GetType() == STG_STREAM || aEntry.GetType() == STG_ROOT )
{
@@ -206,27 +206,27 @@ BOOL StgDirEntry::StoreStream( StgIo& rIo )
}
// or write the data stream
else if( !Tmp2Strm() )
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// Save all dirty streams
-BOOL StgDirEntry::StoreStreams( StgIo& rIo )
+sal_Bool StgDirEntry::StoreStreams( StgIo& rIo )
{
if( !StoreStream( rIo ) )
- return FALSE;
+ return sal_False;
if( pLeft )
if( !((StgDirEntry*) pLeft)->StoreStreams( rIo ) )
- return FALSE;
+ return sal_False;
if( pRight )
if( !((StgDirEntry*) pRight)->StoreStreams( rIo ) )
- return FALSE;
+ return sal_False;
if( pDown )
if( !pDown->StoreStreams( rIo ) )
- return FALSE;
- return TRUE;
+ return sal_False;
+ return sal_True;
}
// Revert all directory entries after failure to write the TOC stream
@@ -244,24 +244,24 @@ void StgDirEntry::RevertAll()
// Look if any element of the tree is dirty
-BOOL StgDirEntry::IsDirty()
+sal_Bool StgDirEntry::IsDirty()
{
if( bDirty || bInvalid )
- return TRUE;
+ return sal_True;
if( pLeft && ((StgDirEntry*) pLeft)->IsDirty() )
- return TRUE;
+ return sal_True;
if( pRight && ((StgDirEntry*) pRight)->IsDirty() )
- return TRUE;
+ return sal_True;
if( pDown && pDown->IsDirty() )
- return TRUE;
- return FALSE;
+ return sal_True;
+ return sal_False;
}
// Set up a stream.
-void StgDirEntry::OpenStream( StgIo& rIo, BOOL bForceBig )
+void StgDirEntry::OpenStream( StgIo& rIo, sal_Bool bForceBig )
{
- INT32 nThreshold = (USHORT) rIo.aHdr.GetThreshold();
+ sal_Int32 nThreshold = (sal_uInt16) rIo.aHdr.GetThreshold();
delete pStgStrm;
if( !bForceBig && aEntry.GetSize() < nThreshold )
pStgStrm = new StgSmallStrm( rIo, this );
@@ -271,7 +271,7 @@ void StgDirEntry::OpenStream( StgIo& rIo, BOOL bForceBig )
{
// This entry has invalid data, so delete that data
SetSize( 0L );
-// bRemoved = bInvalid = FALSE;
+// bRemoved = bInvalid = sal_False;
}
nPos = 0;
}
@@ -291,9 +291,9 @@ void StgDirEntry::Close()
// Get the current stream size
-INT32 StgDirEntry::GetSize()
+sal_Int32 StgDirEntry::GetSize()
{
- INT32 n;
+ sal_Int32 n;
if( pTmpStrm )
n = pTmpStrm->GetSize();
else if( pCurStrm )
@@ -304,14 +304,14 @@ INT32 StgDirEntry::GetSize()
// Set the stream size. This means also creating a temp stream.
-BOOL StgDirEntry::SetSize( INT32 nNewSize )
+sal_Bool StgDirEntry::SetSize( sal_Int32 nNewSize )
{
if (
!( nMode & STREAM_WRITE ) ||
(!bDirect && !pTmpStrm && !Strm2Tmp())
)
{
- return FALSE;
+ return sal_False;
}
if( nNewSize < nPos )
@@ -320,26 +320,26 @@ BOOL StgDirEntry::SetSize( INT32 nNewSize )
{
pTmpStrm->SetSize( nNewSize );
pStgStrm->GetIo().SetError( pTmpStrm->GetError() );
- return BOOL( pTmpStrm->GetError() == SVSTREAM_OK );
+ return sal_Bool( pTmpStrm->GetError() == SVSTREAM_OK );
}
else
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
StgIo& rIo = pStgStrm->GetIo();
- INT32 nThreshold = rIo.aHdr.GetThreshold();
+ sal_Int32 nThreshold = rIo.aHdr.GetThreshold();
// ensure the correct storage stream!
StgStrm* pOld = NULL;
- USHORT nOldSize = 0;
+ sal_uInt16 nOldSize = 0;
if( nNewSize >= nThreshold && pStgStrm->IsSmallStrm() )
{
pOld = pStgStrm;
- nOldSize = (USHORT) pOld->GetSize();
+ nOldSize = (sal_uInt16) pOld->GetSize();
pStgStrm = new StgDataStrm( rIo, STG_EOF, 0 );
}
else if( nNewSize < nThreshold && !pStgStrm->IsSmallStrm() )
{
pOld = pStgStrm;
- nOldSize = (USHORT) nNewSize;
+ nOldSize = (sal_uInt16) nNewSize;
pStgStrm = new StgSmallStrm( rIo, STG_EOF, 0 );
}
// now set the new size
@@ -351,16 +351,16 @@ BOOL StgDirEntry::SetSize( INT32 nNewSize )
// if so, we probably need to copy the old data
if( nOldSize )
{
- void* pBuf = new BYTE[ nOldSize ];
+ void* pBuf = new sal_uInt8[ nOldSize ];
pOld->Pos2Page( 0L );
pStgStrm->Pos2Page( 0L );
if( pOld->Read( pBuf, nOldSize )
&& pStgStrm->Write( pBuf, nOldSize ) )
- bRes = TRUE;
- delete[] static_cast<BYTE*>(pBuf);
+ bRes = sal_True;
+ delete[] static_cast<sal_uInt8*>(pBuf);
}
else
- bRes = TRUE;
+ bRes = sal_True;
if( bRes )
{
pOld->SetSize( 0 );
@@ -378,7 +378,7 @@ BOOL StgDirEntry::SetSize( INT32 nNewSize )
else
{
pStgStrm->Pos2Page( nPos );
- bRes = TRUE;
+ bRes = sal_True;
}
}
return bRes;
@@ -387,7 +387,7 @@ BOOL StgDirEntry::SetSize( INT32 nNewSize )
// Seek. On negative values, seek to EOF.
-INT32 StgDirEntry::Seek( INT32 nNew )
+sal_Int32 StgDirEntry::Seek( sal_Int32 nNew )
{
if( pTmpStrm )
{
@@ -403,7 +403,7 @@ INT32 StgDirEntry::Seek( INT32 nNew )
}
else
{
- INT32 nSize = aEntry.GetSize();
+ sal_Int32 nSize = aEntry.GetSize();
if( nNew < 0 )
nNew = nSize;
@@ -427,7 +427,7 @@ INT32 StgDirEntry::Seek( INT32 nNew )
// Read
-INT32 StgDirEntry::Read( void* p, INT32 nLen )
+sal_Int32 StgDirEntry::Read( void* p, sal_Int32 nLen )
{
if( nLen <= 0 )
return 0;
@@ -443,7 +443,7 @@ INT32 StgDirEntry::Read( void* p, INT32 nLen )
// Write
-INT32 StgDirEntry::Write( const void* p, INT32 nLen )
+sal_Int32 StgDirEntry::Write( const void* p, sal_Int32 nLen )
{
if( nLen <= 0 || !( nMode & STREAM_WRITE ) )
return 0;
@@ -461,7 +461,7 @@ INT32 StgDirEntry::Write( const void* p, INT32 nLen )
}
else
{
- INT32 nNew = nPos + nLen;
+ sal_Int32 nNew = nPos + nLen;
if( nNew > pStgStrm->GetSize() )
{
if( !SetSize( nNew ) )
@@ -478,16 +478,16 @@ INT32 StgDirEntry::Write( const void* p, INT32 nLen )
void StgDirEntry::Copy( StgDirEntry& rDest )
{
- INT32 n = GetSize();
+ sal_Int32 n = GetSize();
if( rDest.SetSize( n ) && n )
{
- BYTE aTempBytes[ 4096 ];
+ sal_uInt8 aTempBytes[ 4096 ];
void* p = static_cast<void*>( aTempBytes );
Seek( 0L );
rDest.Seek( 0L );
while( n )
{
- INT32 nn = n;
+ sal_Int32 nn = n;
if( nn > 4096 )
nn = 4096;
if( Read( p, nn ) != nn )
@@ -501,22 +501,22 @@ void StgDirEntry::Copy( StgDirEntry& rDest )
void StgDirEntry::Copy( BaseStorageStream& rDest )
{
- INT32 n = GetSize();
+ sal_Int32 n = GetSize();
if( rDest.SetSize( n ) && n )
{
- ULONG Pos = rDest.Tell();
- BYTE aTempBytes[ 4096 ];
+ sal_uLong Pos = rDest.Tell();
+ sal_uInt8 aTempBytes[ 4096 ];
void* p = static_cast<void*>( aTempBytes );
Seek( 0L );
rDest.Seek( 0L );
while( n )
{
- INT32 nn = n;
+ sal_Int32 nn = n;
if( nn > 4096 )
nn = 4096;
if( Read( p, nn ) != nn )
break;
- if( sal::static_int_cast<INT32>(rDest.Write( p, nn )) != nn )
+ if( sal::static_int_cast<sal_Int32>(rDest.Write( p, nn )) != nn )
break;
n -= nn;
}
@@ -526,12 +526,12 @@ void StgDirEntry::Copy( BaseStorageStream& rDest )
// Commit this entry
-BOOL StgDirEntry::Commit()
+sal_Bool StgDirEntry::Commit()
{
// OSL_ENSURE( nMode & STREAM_WRITE, "Trying to commit readonly stream!" );
aSave = aEntry;
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if( aEntry.GetType() == STG_STREAM )
{
if( pTmpStrm )
@@ -552,7 +552,7 @@ BOOL StgDirEntry::Commit()
// Revert the entry
-BOOL StgDirEntry::Revert()
+sal_Bool StgDirEntry::Revert()
{
aEntry = aSave;
switch( aEntry.GetType() )
@@ -563,24 +563,24 @@ BOOL StgDirEntry::Revert()
break;
case STG_STORAGE:
{
- BOOL bSomeRenamed = FALSE;
+ sal_Bool bSomeRenamed = sal_False;
StgIterator aOIter( *this );
StgDirEntry* op = aOIter.First();
while( op )
{
op->aEntry = op->aSave;
- op->bDirty = FALSE;
- bSomeRenamed = BOOL( bSomeRenamed | op->bRenamed );
+ op->bDirty = sal_False;
+ bSomeRenamed = sal_Bool( bSomeRenamed | op->bRenamed );
// Remove any new entries
if( op->bCreated )
{
- op->bCreated = FALSE;
+ op->bCreated = sal_False;
op->Close();
- op->bInvalid = TRUE;
+ op->bInvalid = sal_True;
}
// Reactivate any removed entries
else if( op->bRemoved )
- op->bRemoved = op->bInvalid = op->bTemp = FALSE;
+ op->bRemoved = op->bInvalid = op->bTemp = sal_False;
op = aOIter.Next();
}
// Resort all renamed entries
@@ -595,12 +595,12 @@ BOOL StgDirEntry::Revert()
StgAvlNode::Move
( (StgAvlNode**) &p->pUp->pDown,
(StgAvlNode**) &p->pUp->pDown, p );
- p->bRenamed = FALSE;
+ p->bRenamed = sal_False;
}
p = aIter.Next();
}
}
- DelTemp( FALSE );
+ DelTemp( sal_False );
break;
}
case STG_EMPTY:
@@ -609,22 +609,22 @@ BOOL StgDirEntry::Revert()
case STG_ROOT:
break;
}
- return TRUE;
+ return sal_True;
}
// Copy the stg stream to the temp stream
-BOOL StgDirEntry::Strm2Tmp()
+sal_Bool StgDirEntry::Strm2Tmp()
{
if( !pTmpStrm )
{
- ULONG n = 0;
+ sal_uLong n = 0;
if( pCurStrm )
{
// It was already commited once
pTmpStrm = new StgTmpStrm;
if( pTmpStrm->GetError() == SVSTREAM_OK && pTmpStrm->Copy( *pCurStrm ) )
- return TRUE;
+ return sal_True;
n = 1; // indicates error
}
else
@@ -635,15 +635,15 @@ BOOL StgDirEntry::Strm2Tmp()
{
if( n )
{
- BYTE aTempBytes[ 4096 ];
+ sal_uInt8 aTempBytes[ 4096 ];
void* p = static_cast<void*>( aTempBytes );
pStgStrm->Pos2Page( 0L );
while( n )
{
- ULONG nn = n;
+ sal_uLong nn = n;
if( nn > 4096 )
nn = 4096;
- if( (ULONG) pStgStrm->Read( p, nn ) != nn )
+ if( (sal_uLong) pStgStrm->Read( p, nn ) != nn )
break;
if( pTmpStrm->Write( p, nn ) != nn )
break;
@@ -661,41 +661,41 @@ BOOL StgDirEntry::Strm2Tmp()
pStgStrm->GetIo().SetError( pTmpStrm->GetError() );
delete pTmpStrm;
pTmpStrm = NULL;
- return FALSE;
+ return sal_False;
}
}
- return TRUE;
+ return sal_True;
}
// Copy the temp stream to the stg stream during the final commit
-BOOL StgDirEntry::Tmp2Strm()
+sal_Bool StgDirEntry::Tmp2Strm()
{
// We did commit once, but have not written since then
if( !pTmpStrm )
pTmpStrm = pCurStrm, pCurStrm = NULL;
if( pTmpStrm )
{
- ULONG n = pTmpStrm->GetSize();
+ sal_uLong n = pTmpStrm->GetSize();
StgStrm* pNewStrm;
StgIo& rIo = pStgStrm->GetIo();
- ULONG nThreshold = (ULONG) rIo.aHdr.GetThreshold();
+ sal_uLong nThreshold = (sal_uLong) rIo.aHdr.GetThreshold();
if( n < nThreshold )
pNewStrm = new StgSmallStrm( rIo, STG_EOF, 0 );
else
pNewStrm = new StgDataStrm( rIo, STG_EOF, 0 );
if( pNewStrm->SetSize( n ) )
{
- BYTE p[ 4096 ];
+ sal_uInt8 p[ 4096 ];
pTmpStrm->Seek( 0L );
while( n )
{
- ULONG nn = n;
+ sal_uLong nn = n;
if( nn > 4096 )
nn = 4096;
if( pTmpStrm->Read( p, nn ) != nn )
break;
- if( (ULONG) pNewStrm->Write( p, nn ) != nn )
+ if( (sal_uLong) pNewStrm->Write( p, nn ) != nn )
break;
n -= nn;
}
@@ -704,7 +704,7 @@ BOOL StgDirEntry::Tmp2Strm()
pTmpStrm->Seek( nPos );
pStgStrm->GetIo().SetError( pTmpStrm->GetError() );
delete pNewStrm;
- return FALSE;
+ return sal_False;
}
else
{
@@ -720,12 +720,12 @@ BOOL StgDirEntry::Tmp2Strm()
}
}
}
- return TRUE;
+ return sal_True;
}
// Check if the given entry is contained in this entry
-BOOL StgDirEntry::IsContained( StgDirEntry* pStg )
+sal_Bool StgDirEntry::IsContained( StgDirEntry* pStg )
{
if( aEntry.GetType() == STG_STORAGE )
{
@@ -734,25 +734,25 @@ BOOL StgDirEntry::IsContained( StgDirEntry* pStg )
while( p )
{
if( !p->aEntry.Compare( pStg->aEntry ) )
- return FALSE;
+ return sal_False;
if( p->aEntry.GetType() == STG_STORAGE )
if( !p->IsContained( pStg ) )
- return FALSE;
+ return sal_False;
p = aIter.Next();
}
}
- return TRUE;
+ return sal_True;
}
// Invalidate all open entries by setting the RefCount to 0. If the bDel
// flag is set, also set the invalid flag to indicate deletion during the
// next dir stream flush.
-void StgDirEntry::Invalidate( BOOL bDel )
+void StgDirEntry::Invalidate( sal_Bool bDel )
{
// nRefCnt = 0;
if( bDel )
- bRemoved = bInvalid = TRUE;
+ bRemoved = bInvalid = sal_True;
switch( aEntry.GetType() )
{
case STG_STORAGE:
@@ -807,12 +807,12 @@ StgDirStrm::~StgDirStrm()
// Recursively parse the directory tree during reading the TOC stream
-void StgDirStrm::SetupEntry( INT32 n, StgDirEntry* pUpper )
+void StgDirStrm::SetupEntry( sal_Int32 n, StgDirEntry* pUpper )
{
void* p = ( n == STG_FREE ) ? NULL : GetEntry( n );
if( p )
{
- BOOL bOk(FALSE);
+ sal_Bool bOk(sal_False);
StgDirEntry* pCur = new StgDirEntry( p, &bOk );
if( !bOk )
@@ -827,10 +827,10 @@ void StgDirStrm::SetupEntry( INT32 n, StgDirEntry* pUpper )
if( !pUpper )
pCur->aEntry.SetType( STG_ROOT );
- INT32 nLeft = pCur->aEntry.GetLeaf( STG_LEFT );
- INT32 nRight = pCur->aEntry.GetLeaf( STG_RIGHT );
+ sal_Int32 nLeft = pCur->aEntry.GetLeaf( STG_LEFT );
+ sal_Int32 nRight = pCur->aEntry.GetLeaf( STG_RIGHT );
// substorage?
- INT32 nLeaf = STG_FREE;
+ sal_Int32 nLeaf = STG_FREE;
if( pCur->aEntry.GetType() == STG_STORAGE || pCur->aEntry.GetType() == STG_ROOT )
{
nLeaf = pCur->aEntry.GetLeaf( STG_CHILD );
@@ -865,7 +865,7 @@ void StgDirStrm::SetupEntry( INT32 n, StgDirEntry* pUpper )
// Extend or shrink the directory stream.
-BOOL StgDirStrm::SetSize( INT32 nBytes )
+sal_Bool StgDirStrm::SetSize( sal_Int32 nBytes )
{
// Always allocate full pages
nBytes = ( ( nBytes + nPageSize - 1 ) / nPageSize ) * nPageSize;
@@ -874,67 +874,67 @@ BOOL StgDirStrm::SetSize( INT32 nBytes )
// Save the TOC stream into a new substream after saving all data streams
-BOOL StgDirStrm::Store()
+sal_Bool StgDirStrm::Store()
{
if( !pRoot->IsDirty() )
- return TRUE;
+ return sal_True;
if( !pRoot->StoreStreams( rIo ) )
- return FALSE;
+ return sal_False;
// After writing all streams, the data FAT stream has changed,
// so we have to commit the root again
pRoot->Commit();
// We want a completely new stream, so fake an empty stream
- INT32 nOldStart = nStart; // save for later deletion
- INT32 nOldSize = nSize;
+ sal_Int32 nOldStart = nStart; // save for later deletion
+ sal_Int32 nOldSize = nSize;
nStart = nPage = STG_EOF;
nSize = nPos = 0;
nOffset = 0;
// Delete all temporary entries
- pRoot->DelTemp( FALSE );
+ pRoot->DelTemp( sal_False );
// set the entry numbers
- INT32 n = 0;
+ sal_Int32 n = 0;
pRoot->Enum( n );
if( !SetSize( n * STGENTRY_SIZE ) )
{
nStart = nOldStart; nSize = nOldSize;
pRoot->RevertAll();
- return FALSE;
+ return sal_False;
}
// set up the cache elements for the new stream
if( !Copy( STG_FREE, nSize ) )
{
pRoot->RevertAll();
- return FALSE;
+ return sal_False;
}
// Write the data to the new stream
if( !pRoot->Store( *this ) )
{
pRoot->RevertAll();
- return FALSE;
+ return sal_False;
}
// fill any remaining entries with empty data
- INT32 ne = nSize / STGENTRY_SIZE;
+ sal_Int32 ne = nSize / STGENTRY_SIZE;
StgEntry aEmpty;
aEmpty.Init();
while( n < ne )
{
- void* p = GetEntry( n++, TRUE );
+ void* p = GetEntry( n++, sal_True );
if( !p )
{
pRoot->RevertAll();
- return FALSE;
+ return sal_False;
}
aEmpty.Store( p );
}
// Now we can release the old stream
- pFat->FreePages( nOldStart, TRUE );
+ pFat->FreePages( nOldStart, sal_True );
rIo.aHdr.SetTOCStart( nStart );
- return TRUE;
+ return sal_True;
}
// Get a dir entry.
-void* StgDirStrm::GetEntry( INT32 n, BOOL bDirty )
+void* StgDirStrm::GetEntry( sal_Int32 n, sal_Bool bDirty )
{
if( n < 0 )
return NULL;
@@ -942,7 +942,7 @@ void* StgDirStrm::GetEntry( INT32 n, BOOL bDirty )
n *= STGENTRY_SIZE;
if( n < 0 && n >= nSize )
return NULL;
- return GetPtr( n, TRUE, bDirty );
+ return GetPtr( n, sal_True, bDirty );
}
// Find a dir entry.
@@ -989,9 +989,9 @@ StgDirEntry* StgDirStrm::Create
}
pRes->bInvalid =
pRes->bRemoved =
- pRes->bTemp = FALSE;
+ pRes->bTemp = sal_False;
pRes->bCreated =
- pRes->bDirty = TRUE;
+ pRes->bDirty = sal_True;
}
else
{
@@ -1001,7 +1001,7 @@ StgDirEntry* StgDirStrm::Create
pRes->pUp = &rStg;
pRes->ppRoot = &pRoot;
pRes->bCreated =
- pRes->bDirty = TRUE;
+ pRes->bDirty = sal_True;
}
else
{
@@ -1014,44 +1014,44 @@ StgDirEntry* StgDirStrm::Create
// Rename the given entry.
-BOOL StgDirStrm::Rename( StgDirEntry& rStg, const String& rOld, const String& rNew )
+sal_Bool StgDirStrm::Rename( StgDirEntry& rStg, const String& rOld, const String& rNew )
{
StgDirEntry* p = Find( rStg, rOld );
if( p )
{
- if( !StgAvlNode::Remove( (StgAvlNode**) &rStg.pDown, p, FALSE ) )
- return FALSE;
+ if( !StgAvlNode::Remove( (StgAvlNode**) &rStg.pDown, p, sal_False ) )
+ return sal_False;
p->aEntry.SetName( rNew );
if( !StgAvlNode::Insert( (StgAvlNode**) &rStg.pDown, p ) )
- return FALSE;
- p->bRenamed = p->bDirty = TRUE;
- return TRUE;
+ return sal_False;
+ p->bRenamed = p->bDirty = sal_True;
+ return sal_True;
}
else
{
rIo.SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
}
// Move the given entry to a different storage.
-BOOL StgDirStrm::Move( StgDirEntry& rStg1, StgDirEntry& rStg2, const String& rName )
+sal_Bool StgDirStrm::Move( StgDirEntry& rStg1, StgDirEntry& rStg2, const String& rName )
{
StgDirEntry* p = Find( rStg1, rName );
if( p )
{
if( !StgAvlNode::Move
( (StgAvlNode**) &rStg1.pDown, (StgAvlNode**) &rStg2.pDown, p ) )
- return FALSE;
- p->bDirty = TRUE;
- return TRUE;
+ return sal_False;
+ p->bDirty = sal_True;
+ return sal_True;
}
else
{
rIo.SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
}
diff --git a/sot/source/sdstor/stgdir.hxx b/sot/source/sdstor/stgdir.hxx
index 3ef510a12e50..e3cf2cb78072 100644
--- a/sot/source/sdstor/stgdir.hxx
+++ b/sot/source/sdstor/stgdir.hxx
@@ -49,52 +49,52 @@ class StgDirEntry : public StgAvlNode
StgStrm* pStgStrm; // storage stream
StgTmpStrm* pTmpStrm; // temporary stream
StgTmpStrm* pCurStrm; // temp stream after commit
- INT32 nEntry; // entry # in TOC stream (temp)
- INT32 nPos; // current position
- BOOL bDirty; // dirty directory entry
- BOOL bCreated; // newly created entry
- BOOL bRemoved; // removed per Invalidate()
- BOOL bRenamed; // renamed
+ sal_Int32 nEntry; // entry # in TOC stream (temp)
+ sal_Int32 nPos; // current position
+ sal_Bool bDirty; // dirty directory entry
+ sal_Bool bCreated; // newly created entry
+ sal_Bool bRemoved; // removed per Invalidate()
+ sal_Bool bRenamed; // renamed
void InitMembers(); // ctor helper
virtual short Compare( const StgAvlNode* ) const;
- BOOL StoreStream( StgIo& ); // store the stream
- BOOL StoreStreams( StgIo& ); // store all streams
+ sal_Bool StoreStream( StgIo& ); // store the stream
+ sal_Bool StoreStreams( StgIo& ); // store all streams
void RevertAll(); // revert the whole tree
- BOOL Strm2Tmp(); // copy stgstream to temp file
- BOOL Tmp2Strm(); // copy temp file to stgstream
+ sal_Bool Strm2Tmp(); // copy stgstream to temp file
+ sal_Bool Tmp2Strm(); // copy temp file to stgstream
public:
StgEntry aEntry; // entry data
- INT32 nRefCnt; // reference count
+ sal_Int32 nRefCnt; // reference count
StreamMode nMode; // open mode
- BOOL bTemp; // TRUE: delete on dir flush
- BOOL bDirect; // TRUE: direct mode
- BOOL bZombie; // TRUE: Removed From StgIo
- BOOL bInvalid; // TRUE: invalid entry
- StgDirEntry( const void*, BOOL * pbOk );
+ sal_Bool bTemp; // sal_True: delete on dir flush
+ sal_Bool bDirect; // sal_True: direct mode
+ sal_Bool bZombie; // sal_True: Removed From StgIo
+ sal_Bool bInvalid; // sal_True: invalid entry
+ StgDirEntry( const void*, sal_Bool * pbOk );
StgDirEntry( const StgEntry& );
~StgDirEntry();
- void Invalidate( BOOL=FALSE ); // invalidate all open entries
- void Enum( INT32& ); // enumerate entries for iteration
- void DelTemp( BOOL ); // delete temporary entries
- BOOL Store( StgDirStrm& ); // save entry into dir strm
- BOOL IsContained( StgDirEntry* ); // check if subentry
+ void Invalidate( sal_Bool=sal_False ); // invalidate all open entries
+ void Enum( sal_Int32& ); // enumerate entries for iteration
+ void DelTemp( sal_Bool ); // delete temporary entries
+ sal_Bool Store( StgDirStrm& ); // save entry into dir strm
+ sal_Bool IsContained( StgDirEntry* ); // check if subentry
- void SetDirty() { bDirty = TRUE; }
- BOOL IsDirty();
+ void SetDirty() { bDirty = sal_True; }
+ sal_Bool IsDirty();
void ClearDirty();
- BOOL Commit();
- BOOL Revert();
+ sal_Bool Commit();
+ sal_Bool Revert();
- void OpenStream( StgIo&, BOOL=FALSE ); // set up an approbiate stream
+ void OpenStream( StgIo&, sal_Bool=sal_False ); // set up an approbiate stream
void Close();
- INT32 GetSize();
- BOOL SetSize( INT32 );
- INT32 Seek( INT32 );
- INT32 Tell() { return nPos; }
- INT32 Read( void*, INT32 );
- INT32 Write( const void*, INT32 );
+ sal_Int32 GetSize();
+ sal_Bool SetSize( sal_Int32 );
+ sal_Int32 Seek( sal_Int32 );
+ sal_Int32 Tell() { return nPos; }
+ sal_Int32 Read( void*, sal_Int32 );
+ sal_Int32 Write( const void*, sal_Int32 );
void Copy( StgDirEntry& );
void Copy( BaseStorageStream& );
};
@@ -104,19 +104,19 @@ class StgDirStrm : public StgDataStrm
friend class StgIterator;
StgDirEntry* pRoot; // root of dir tree
short nEntries; // entries per page
- void SetupEntry( INT32, StgDirEntry* );
+ void SetupEntry( sal_Int32, StgDirEntry* );
public:
StgDirStrm( StgIo& );
~StgDirStrm();
- virtual BOOL SetSize( INT32 ); // change the size
- BOOL Store();
- void* GetEntry( INT32 n, BOOL=FALSE );// get an entry
+ virtual sal_Bool SetSize( sal_Int32 ); // change the size
+ sal_Bool Store();
+ void* GetEntry( sal_Int32 n, sal_Bool=sal_False );// get an entry
StgDirEntry* GetRoot() { return pRoot; }
StgDirEntry* Find( StgDirEntry&, const String& );
StgDirEntry* Create( StgDirEntry&, const String&, StgEntryType );
- BOOL Remove( StgDirEntry&, const String& );
- BOOL Rename( StgDirEntry&, const String&, const String& );
- BOOL Move( StgDirEntry&, StgDirEntry&, const String& );
+ sal_Bool Remove( StgDirEntry&, const String& );
+ sal_Bool Rename( StgDirEntry&, const String&, const String& );
+ sal_Bool Move( StgDirEntry&, StgDirEntry&, const String& );
};
class StgIterator : public StgAvlIterator
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index b140c7fb27e2..b781e4051c3d 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -39,7 +39,7 @@
#include "stgdir.hxx"
#include "stgio.hxx"
-static BYTE cStgSignature[ 8 ] = { 0xD0,0xCF,0x11,0xE0,0xA1,0xB1,0x1A,0xE1 };
+static sal_uInt8 cStgSignature[ 8 ] = { 0xD0,0xCF,0x11,0xE0,0xA1,0xB1,0x1A,0xE1 };
////////////////////////////// struct ClsId /////////////////////////////
@@ -62,17 +62,17 @@ SvStream& operator >>( SvStream& r, ClsId& rId )
SvStream& operator <<( SvStream& r, const ClsId& rId )
{
return
- r << (INT32) rId.n1
- << (INT16) rId.n2
- << (INT16) rId.n3
- << (UINT8) rId.n4
- << (UINT8) rId.n5
- << (UINT8) rId.n6
- << (UINT8) rId.n7
- << (UINT8) rId.n8
- << (UINT8) rId.n9
- << (UINT8) rId.n10
- << (UINT8) rId.n11;
+ r << (sal_Int32) rId.n1
+ << (sal_Int16) rId.n2
+ << (sal_Int16) rId.n3
+ << (sal_uInt8) rId.n4
+ << (sal_uInt8) rId.n5
+ << (sal_uInt8) rId.n6
+ << (sal_uInt8) rId.n7
+ << (sal_uInt8) rId.n8
+ << (sal_uInt8) rId.n9
+ << (sal_uInt8) rId.n10
+ << (sal_uInt8) rId.n11;
}
///////////////////////////// class StgHeader ////////////////////////////
@@ -99,14 +99,14 @@ void StgHeader::Init()
SetFATPage( i, STG_FREE );
}
-BOOL StgHeader::Load( StgIo& rIo )
+sal_Bool StgHeader::Load( StgIo& rIo )
{
SvStream& r = *rIo.GetStrm();
Load( r );
return rIo.Good();
}
-BOOL StgHeader::Load( SvStream& r )
+sal_Bool StgHeader::Load( SvStream& r )
{
r.Seek( 0L );
r.Read( cSignature, 8 );
@@ -129,10 +129,10 @@ BOOL StgHeader::Load( SvStream& r )
return r.GetErrorCode() == ERRCODE_NONE;
}
-BOOL StgHeader::Store( StgIo& rIo )
+sal_Bool StgHeader::Store( StgIo& rIo )
{
if( !bDirty )
- return TRUE;
+ return sal_True;
SvStream& r = *rIo.GetStrm();
r.Seek( 0L );
r.Write( cSignature, 8 + 16 );
@@ -140,7 +140,7 @@ BOOL StgHeader::Store( StgIo& rIo )
<< nByteOrder // 1C Unicode byte order indicator
<< nPageSize // 1E 1 << nPageSize = block size
<< nDataPageSize // 20 1 << this size == data block size
- << (INT32) 0 << (INT32) 0 << (INT16) 0
+ << (sal_Int32) 0 << (sal_Int32) 0 << (sal_Int16) 0
<< nFATSize // 2C total number of FAT pages
<< nTOCstrm // 30 starting page for the TOC stream
<< nReserved // 34
@@ -152,7 +152,7 @@ BOOL StgHeader::Store( StgIo& rIo )
for( short i = 0; i < 109; i++ )
r << nMasterFAT[ i ];
bDirty = !rIo.Good();
- return BOOL( !bDirty );
+ return sal_Bool( !bDirty );
}
static bool lcl_wontoverflow(short shift)
@@ -161,15 +161,15 @@ static bool lcl_wontoverflow(short shift)
}
// Perform thorough checks also on unknown variables
-BOOL StgHeader::Check()
+sal_Bool StgHeader::Check()
{
- return BOOL( memcmp( cSignature, cStgSignature, 8 ) == 0
+ return sal_Bool( memcmp( cSignature, cStgSignature, 8 ) == 0
&& (short) ( nVersion >> 16 ) == 3 )
&& lcl_wontoverflow(nPageSize)
&& lcl_wontoverflow(nDataPageSize);
}
-INT32 StgHeader::GetFATPage( short n ) const
+sal_Int32 StgHeader::GetFATPage( short n ) const
{
if( n >= 0 && n < 109 )
return nMasterFAT[ n ];
@@ -177,50 +177,50 @@ INT32 StgHeader::GetFATPage( short n ) const
return STG_EOF;
}
-void StgHeader::SetFATPage( short n, INT32 nb )
+void StgHeader::SetFATPage( short n, sal_Int32 nb )
{
if( n >= 0 && n < 109 )
{
if( nMasterFAT[ n ] != nb )
- bDirty = TRUE, nMasterFAT[ n ] = nb;
+ bDirty = sal_True, nMasterFAT[ n ] = nb;
}
}
void StgHeader::SetClassId( const ClsId& r )
{
if( memcmp( &aClsId, &r, sizeof( ClsId ) ) )
- bDirty = TRUE, memcpy( &aClsId, &r, sizeof( ClsId ) );
+ bDirty = sal_True, memcpy( &aClsId, &r, sizeof( ClsId ) );
}
-void StgHeader::SetTOCStart( INT32 n )
+void StgHeader::SetTOCStart( sal_Int32 n )
{
- if( n != nTOCstrm ) bDirty = TRUE, nTOCstrm = n;
+ if( n != nTOCstrm ) bDirty = sal_True, nTOCstrm = n;
}
-void StgHeader::SetDataFATStart( INT32 n )
+void StgHeader::SetDataFATStart( sal_Int32 n )
{
- if( n != nDataFAT ) bDirty = TRUE, nDataFAT = n;
+ if( n != nDataFAT ) bDirty = sal_True, nDataFAT = n;
}
-void StgHeader::SetDataFATSize( INT32 n )
+void StgHeader::SetDataFATSize( sal_Int32 n )
{
- if( n != nDataFATSize ) bDirty = TRUE, nDataFATSize = n;
+ if( n != nDataFATSize ) bDirty = sal_True, nDataFATSize = n;
}
-void StgHeader::SetFATSize( INT32 n )
+void StgHeader::SetFATSize( sal_Int32 n )
{
- if( n != nFATSize ) bDirty = TRUE, nFATSize = n;
+ if( n != nFATSize ) bDirty = sal_True, nFATSize = n;
}
-void StgHeader::SetFATChain( INT32 n )
+void StgHeader::SetFATChain( sal_Int32 n )
{
if( n != nMasterChain )
- bDirty = TRUE, nMasterChain = n;
+ bDirty = sal_True, nMasterChain = n;
}
-void StgHeader::SetMasters( INT32 n )
+void StgHeader::SetMasters( sal_Int32 n )
{
- if( n != nMaster ) bDirty = TRUE, nMaster = n;
+ if( n != nMaster ) bDirty = sal_True, nMaster = n;
}
///////////////////////////// class StgEntry /////////////////////////////
@@ -237,11 +237,11 @@ void ToUnicode_Impl( String& rName )
rName.Erase( 32 );
rName.Convert( ::GetSystemCharSet(), CHARSET_ANSI );
// brute force is OK
- BYTE* p = (BYTE*) rName.GetCharStr();
- for( USHORT i = 0; i < rName.Len(); i++, p++ )
+ sal_uInt8* p = (sal_uInt8*) rName.GetCharStr();
+ for( sal_uInt16 i = 0; i < rName.Len(); i++, p++ )
{
// check each character and substitute blanks for illegal ones
- BYTE cChar = *p;
+ sal_uInt8 cChar = *p;
if( cChar == '!' || cChar == ':' || cChar == '\\' || cChar == '/' )
*p = ' ';
}
@@ -253,14 +253,14 @@ static void FromUnicode( String& rName )
rName.Convert( CHARSET_ANSI, ::GetSystemCharSet() );
}
*/
-BOOL StgEntry::Init()
+sal_Bool StgEntry::Init()
{
memset( this, 0, sizeof (StgEntry) - sizeof( String ) );
SetLeaf( STG_LEFT, STG_FREE );
SetLeaf( STG_RIGHT, STG_FREE );
SetLeaf( STG_CHILD, STG_FREE );
SetLeaf( STG_DATA, STG_EOF );
- return TRUE;
+ return sal_True;
}
static String ToUpperUnicode( const String & rStr )
@@ -278,7 +278,7 @@ static String ToUpperUnicode( const String & rStr )
}
-BOOL StgEntry::SetName( const String& rName )
+sal_Bool StgEntry::SetName( const String& rName )
{
// I don't know the locale, so en_US is hopefully fine
aName = ToUpperUnicode( rName );
@@ -290,12 +290,12 @@ BOOL StgEntry::SetName( const String& rName )
while( i < 32 )
nName[ i++ ] = 0;
nNameLen = ( aName.Len() + 1 ) << 1;
- return TRUE;
+ return sal_True;
}
-INT32 StgEntry::GetLeaf( StgEntryRef eRef ) const
+sal_Int32 StgEntry::GetLeaf( StgEntryRef eRef ) const
{
- INT32 n = -1;
+ sal_Int32 n = -1;
switch( eRef )
{
case STG_LEFT: n = nLeft; break;
@@ -306,7 +306,7 @@ INT32 StgEntry::GetLeaf( StgEntryRef eRef ) const
return n;
}
-void StgEntry::SetLeaf( StgEntryRef eRef, INT32 nPage )
+void StgEntry::SetLeaf( StgEntryRef eRef, sal_Int32 nPage )
{
switch( eRef )
{
@@ -317,12 +317,12 @@ void StgEntry::SetLeaf( StgEntryRef eRef, INT32 nPage )
}
}
-const INT32* StgEntry::GetTime( StgEntryTime eTime ) const
+const sal_Int32* StgEntry::GetTime( StgEntryTime eTime ) const
{
return( eTime == STG_MODIFIED ) ? nMtime : nAtime;
}
-void StgEntry::SetTime( StgEntryTime eTime, INT32* pTime )
+void StgEntry::SetTime( StgEntryTime eTime, sal_Int32* pTime )
{
if( eTime == STG_MODIFIED )
nMtime[ 0 ] = *pTime++, nMtime[ 1 ] = *pTime;
@@ -337,7 +337,7 @@ void StgEntry::SetClassId( const ClsId& r )
void StgEntry::GetName( String& rName ) const
{
- UINT16 n = nNameLen;
+ sal_uInt16 n = nNameLen;
if( n )
n = ( n >> 1 ) - 1;
rName = String( nName, n );
@@ -362,7 +362,7 @@ short StgEntry::Compare( const StgEntry& r ) const
// These load/store operations are a bit more complicated,
// since they have to copy their contents into a packed structure.
-BOOL StgEntry::Load( const void* pFrom )
+sal_Bool StgEntry::Load( const void* pFrom )
{
SvMemoryStream r( (sal_Char*) pFrom, 128, STREAM_READ );
for( short i = 0; i < 32; i++ )
@@ -383,14 +383,14 @@ BOOL StgEntry::Load( const void* pFrom )
>> nSize // 78 file size
>> nUnknown; // 7C unknown
- UINT16 n = nNameLen;
+ sal_uInt16 n = nNameLen;
if( n )
n = ( n >> 1 ) - 1;
if( n > 31 || (nSize < 0 && cType != STG_STORAGE) )
{
// the size makes no sence for the substorage
// TODO/LATER: actually the size should be an unsigned value, but in this case it would mean a stream of more than 2Gb
- return FALSE;
+ return sal_False;
}
aName = String( nName, n );
@@ -398,7 +398,7 @@ BOOL StgEntry::Load( const void* pFrom )
aName = ToUpperUnicode( aName );
aName.Erase( 31 );
- return TRUE;
+ return sal_True;
}
void StgEntry::Store( void* pTo )
diff --git a/sot/source/sdstor/stgelem.hxx b/sot/source/sdstor/stgelem.hxx
index 951d3503adbc..9730813bb0ff 100644
--- a/sot/source/sdstor/stgelem.hxx
+++ b/sot/source/sdstor/stgelem.hxx
@@ -46,51 +46,51 @@ SvStream& operator<<( SvStream&, const ClsId& );
class StgHeader
{
- BYTE cSignature[ 8 ]; // 00 signature (see below)
+ sal_uInt8 cSignature[ 8 ]; // 00 signature (see below)
ClsId aClsId; // 08 Class ID
- INT32 nVersion; // 18 version number
- UINT16 nByteOrder; // 1C Unicode byte order indicator
- INT16 nPageSize; // 1E 1 << nPageSize = block size
- INT16 nDataPageSize; // 20 1 << this size == data block size
- BYTE bDirty; // 22 internal dirty flag
- BYTE cReserved[ 9 ]; // 23
- INT32 nFATSize; // 2C total number of FAT pages
- INT32 nTOCstrm; // 30 starting page for the TOC stream
- INT32 nReserved; // 34
- INT32 nThreshold; // 38 minimum file size for big data
- INT32 nDataFAT; // 3C page # of 1st data FAT block
- INT32 nDataFATSize; // 40 # of data fat blocks
- INT32 nMasterChain; // 44 chain to the next master block
- INT32 nMaster; // 48 # of additional master blocks
- INT32 nMasterFAT[ 109 ]; // 4C first 109 master FAT pages
+ sal_Int32 nVersion; // 18 version number
+ sal_uInt16 nByteOrder; // 1C Unicode byte order indicator
+ sal_Int16 nPageSize; // 1E 1 << nPageSize = block size
+ sal_Int16 nDataPageSize; // 20 1 << this size == data block size
+ sal_uInt8 bDirty; // 22 internal dirty flag
+ sal_uInt8 cReserved[ 9 ]; // 23
+ sal_Int32 nFATSize; // 2C total number of FAT pages
+ sal_Int32 nTOCstrm; // 30 starting page for the TOC stream
+ sal_Int32 nReserved; // 34
+ sal_Int32 nThreshold; // 38 minimum file size for big data
+ sal_Int32 nDataFAT; // 3C page # of 1st data FAT block
+ sal_Int32 nDataFATSize; // 40 # of data fat blocks
+ sal_Int32 nMasterChain; // 44 chain to the next master block
+ sal_Int32 nMaster; // 48 # of additional master blocks
+ sal_Int32 nMasterFAT[ 109 ]; // 4C first 109 master FAT pages
public:
StgHeader();
void Init(); // initialize the header
- BOOL Load( StgIo& );
- BOOL Load( SvStream& );
- BOOL Store( StgIo& );
- BOOL Check(); // check the signature and version
+ sal_Bool Load( StgIo& );
+ sal_Bool Load( SvStream& );
+ sal_Bool Store( StgIo& );
+ sal_Bool Check(); // check the signature and version
short GetByteOrder() const { return nByteOrder; }
- INT32 GetTOCStart() const { return nTOCstrm; }
- void SetTOCStart( INT32 n );
- INT32 GetDataFATStart() const { return nDataFAT; }
- void SetDataFATStart( INT32 n );
- INT32 GetDataFATSize() const { return nDataFATSize; }
- void SetDataFATSize( INT32 n );
- INT32 GetThreshold() const { return nThreshold; }
+ sal_Int32 GetTOCStart() const { return nTOCstrm; }
+ void SetTOCStart( sal_Int32 n );
+ sal_Int32 GetDataFATStart() const { return nDataFAT; }
+ void SetDataFATStart( sal_Int32 n );
+ sal_Int32 GetDataFATSize() const { return nDataFATSize; }
+ void SetDataFATSize( sal_Int32 n );
+ sal_Int32 GetThreshold() const { return nThreshold; }
short GetPageSize() const { return nPageSize; }
short GetDataPageSize() const { return nDataPageSize; }
- INT32 GetFATSize() const { return nFATSize; }
- void SetFATSize( INT32 n );
- INT32 GetFATChain() const { return nMasterChain; }
- void SetFATChain( INT32 n );
- INT32 GetMasters() const { return nMaster; }
- void SetMasters( INT32 n );
+ sal_Int32 GetFATSize() const { return nFATSize; }
+ void SetFATSize( sal_Int32 n );
+ sal_Int32 GetFATChain() const { return nMasterChain; }
+ void SetFATChain( sal_Int32 n );
+ sal_Int32 GetMasters() const { return nMaster; }
+ void SetMasters( sal_Int32 n );
short GetFAT1Size() const { return 109; }
const ClsId& GetClassId() const { return aClsId; }
void SetClassId( const ClsId& );
- INT32 GetFATPage( short ) const;
- void SetFATPage( short, INT32 );
+ sal_Int32 GetFATPage( short ) const;
+ void SetFATPage( short, sal_Int32 );
};
enum StgEntryType { // dir entry types:
@@ -119,42 +119,42 @@ class StgStream;
#define STGENTRY_SIZE 128
class StgEntry { // directory enty
- UINT16 nName[ 32 ]; // 00 name as WCHAR
- INT16 nNameLen; // 40 size of name in bytes including 00H
- BYTE cType; // 42 entry type
- BYTE cFlags; // 43 0 or 1 (tree balance?)
- INT32 nLeft; // 44 left node entry
- INT32 nRight; // 48 right node entry
- INT32 nChild; // 4C 1st child entry if storage
+ sal_uInt16 nName[ 32 ]; // 00 name as WCHAR
+ sal_Int16 nNameLen; // 40 size of name in bytes including 00H
+ sal_uInt8 cType; // 42 entry type
+ sal_uInt8 cFlags; // 43 0 or 1 (tree balance?)
+ sal_Int32 nLeft; // 44 left node entry
+ sal_Int32 nRight; // 48 right node entry
+ sal_Int32 nChild; // 4C 1st child entry if storage
ClsId aClsId; // 50 class ID (optional)
- INT32 nFlags; // 60 state flags(?)
- INT32 nMtime[ 2 ]; // 64 modification time
- INT32 nAtime[ 2 ]; // 6C creation and access time
- INT32 nPage1; // 74 starting block (either direct or translated)
- INT32 nSize; // 78 file size
- INT32 nUnknown; // 7C unknown
+ sal_Int32 nFlags; // 60 state flags(?)
+ sal_Int32 nMtime[ 2 ]; // 64 modification time
+ sal_Int32 nAtime[ 2 ]; // 6C creation and access time
+ sal_Int32 nPage1; // 74 starting block (either direct or translated)
+ sal_Int32 nSize; // 78 file size
+ sal_Int32 nUnknown; // 7C unknown
String aName; // Name as Compare String (ascii, upper)
public:
- BOOL Init(); // initialize the data
- BOOL SetName( const String& ); // store a name (ASCII, up to 32 chars)
+ sal_Bool Init(); // initialize the data
+ sal_Bool SetName( const String& ); // store a name (ASCII, up to 32 chars)
void GetName( String& rName ) const;
// fill in the name
short Compare( const StgEntry& ) const; // compare two entries
- BOOL Load( const void* );
+ sal_Bool Load( const void* );
void Store( void* );
StgEntryType GetType() const { return (StgEntryType) cType; }
- INT32 GetStartPage() const { return nPage1; }
- void SetType( StgEntryType t ) { cType = (BYTE) t; }
- BYTE GetFlags() const { return cFlags; }
- void SetFlags( BYTE c ) { cFlags = c; }
- INT32 GetSize() const { return nSize; }
- void SetSize( INT32 n ) { nSize = n; }
+ sal_Int32 GetStartPage() const { return nPage1; }
+ void SetType( StgEntryType t ) { cType = (sal_uInt8) t; }
+ sal_uInt8 GetFlags() const { return cFlags; }
+ void SetFlags( sal_uInt8 c ) { cFlags = c; }
+ sal_Int32 GetSize() const { return nSize; }
+ void SetSize( sal_Int32 n ) { nSize = n; }
const ClsId& GetClassId() const { return aClsId; }
void SetClassId( const ClsId& );
- INT32 GetLeaf( StgEntryRef ) const;
- void SetLeaf( StgEntryRef, INT32 );
- const INT32* GetTime( StgEntryTime ) const;
- void SetTime( StgEntryTime, INT32* );
+ sal_Int32 GetLeaf( StgEntryRef ) const;
+ void SetLeaf( StgEntryRef, sal_Int32 );
+ const sal_Int32* GetTime( StgEntryTime ) const;
+ void SetTime( StgEntryTime, sal_Int32* );
};
diff --git a/sot/source/sdstor/stgio.cxx b/sot/source/sdstor/stgio.cxx
index 7970156e72aa..0a10192528c1 100644
--- a/sot/source/sdstor/stgio.cxx
+++ b/sot/source/sdstor/stgio.cxx
@@ -46,7 +46,7 @@ StgIo::StgIo() : StgCache()
pDataFAT = NULL;
pDataStrm = NULL;
pFAT = NULL;
- bCopied = FALSE;
+ bCopied = sal_False;
}
StgIo::~StgIo()
@@ -59,7 +59,7 @@ StgIo::~StgIo()
// Load the header. Do not set an error code if the header is invalid.
-BOOL StgIo::Load()
+sal_Bool StgIo::Load()
{
if( pStrm )
{
@@ -68,7 +68,7 @@ BOOL StgIo::Load()
if( aHdr.Check() )
SetupStreams();
else
- return FALSE;
+ return sal_False;
}
}
return Good();
@@ -76,7 +76,7 @@ BOOL StgIo::Load()
// Set up an initial, empty storage
-BOOL StgIo::Init()
+sal_Bool StgIo::Init()
{
aHdr.Init();
SetupStreams();
@@ -122,7 +122,7 @@ short StgIo::GetDataPageSize()
// Commit everything
-BOOL StgIo::CommitAll()
+sal_Bool StgIo::CommitAll()
{
// Store the data (all streams and the TOC)
if( pTOC->Store() )
@@ -135,81 +135,81 @@ BOOL StgIo::CommitAll()
if( aHdr.Store( *this ) )
{
pStrm->Flush();
- ULONG n = pStrm->GetError();
+ sal_uLong n = pStrm->GetError();
SetError( n );
#ifdef DBG_UTIL
if( n==0 ) ValidateFATs();
#endif
- return BOOL( n == 0 );
+ return sal_Bool( n == 0 );
}
}
}
SetError( SVSTREAM_WRITE_ERROR );
- return FALSE;
+ return sal_False;
}
class EasyFat
{
- INT32 *pFat;
- BOOL *pFree;
- INT32 nPages;
- INT32 nPageSize;
+ sal_Int32 *pFat;
+ sal_Bool *pFree;
+ sal_Int32 nPages;
+ sal_Int32 nPageSize;
public:
- EasyFat( StgIo & rIo, StgStrm *pFatStream, INT32 nPSize );
+ EasyFat( StgIo & rIo, StgStrm *pFatStream, sal_Int32 nPSize );
~EasyFat() { delete[] pFat; delete[] pFree; }
- INT32 GetPageSize() { return nPageSize; }
- INT32 Count() { return nPages; }
- INT32 operator[]( INT32 nOffset ) { return pFat[ nOffset ]; }
+ sal_Int32 GetPageSize() { return nPageSize; }
+ sal_Int32 Count() { return nPages; }
+ sal_Int32 operator[]( sal_Int32 nOffset ) { return pFat[ nOffset ]; }
- ULONG Mark( INT32 nPage, INT32 nCount, INT32 nExpect );
- BOOL HasUnrefChains();
+ sal_uLong Mark( sal_Int32 nPage, sal_Int32 nCount, sal_Int32 nExpect );
+ sal_Bool HasUnrefChains();
};
-EasyFat::EasyFat( StgIo& rIo, StgStrm* pFatStream, INT32 nPSize )
+EasyFat::EasyFat( StgIo& rIo, StgStrm* pFatStream, sal_Int32 nPSize )
{
nPages = pFatStream->GetSize() >> 2;
nPageSize = nPSize;
- pFat = new INT32[ nPages ];
- pFree = new BOOL[ nPages ];
+ pFat = new sal_Int32[ nPages ];
+ pFree = new sal_Bool[ nPages ];
StgPage *pPage = NULL;
- INT32 nFatPageSize = (1 << rIo.aHdr.GetPageSize()) - 2;
+ sal_Int32 nFatPageSize = (1 << rIo.aHdr.GetPageSize()) - 2;
- for( INT32 nPage = 0; nPage < nPages; nPage++ )
+ for( sal_Int32 nPage = 0; nPage < nPages; nPage++ )
{
if( ! (nPage % nFatPageSize) )
{
pFatStream->Pos2Page( nPage << 2 );
- INT32 nPhysPage = pFatStream->GetPage();
- pPage = rIo.Get( nPhysPage, TRUE );
+ sal_Int32 nPhysPage = pFatStream->GetPage();
+ pPage = rIo.Get( nPhysPage, sal_True );
}
pFat[ nPage ] = pPage->GetPage( short( nPage % nFatPageSize ) );
- pFree[ nPage ] = TRUE;
+ pFree[ nPage ] = sal_True;
}
}
-BOOL EasyFat::HasUnrefChains()
+sal_Bool EasyFat::HasUnrefChains()
{
- for( INT32 nPage = 0; nPage < nPages; nPage++ )
+ for( sal_Int32 nPage = 0; nPage < nPages; nPage++ )
{
if( pFree[ nPage ] && pFat[ nPage ] != -1 )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-ULONG EasyFat::Mark( INT32 nPage, INT32 nCount, INT32 nExpect )
+sal_uLong EasyFat::Mark( sal_Int32 nPage, sal_Int32 nCount, sal_Int32 nExpect )
{
if( nCount > 0 )
--nCount /= GetPageSize(), nCount++;
- INT32 nCurPage = nPage;
+ sal_Int32 nCurPage = nPage;
while( nCount != 0 )
{
- pFree[ nCurPage ] = FALSE;
+ pFree[ nCurPage ] = sal_False;
nCurPage = pFat[ nCurPage ];
//Stream zu lang
if( nCurPage != nExpect && nCount == 1 )
@@ -231,22 +231,22 @@ ULONG EasyFat::Mark( INT32 nPage, INT32 nCount, INT32 nExpect )
class Validator
{
- ULONG nError;
+ sal_uLong nError;
EasyFat aSmallFat;
EasyFat aFat;
StgIo &rIo;
- ULONG ValidateMasterFATs();
- ULONG ValidateDirectoryEntries();
- ULONG FindUnrefedChains();
- ULONG MarkAll( StgDirEntry *pEntry );
+ sal_uLong ValidateMasterFATs();
+ sal_uLong ValidateDirectoryEntries();
+ sal_uLong FindUnrefedChains();
+ sal_uLong MarkAll( StgDirEntry *pEntry );
public:
Validator( StgIo &rIo );
- BOOL IsError() { return nError != 0; }
+ sal_Bool IsError() { return nError != 0; }
};
Validator::Validator( StgIo &rIoP )
@@ -254,7 +254,7 @@ Validator::Validator( StgIo &rIoP )
aFat( rIoP, rIoP.pFAT, 1 << rIoP.aHdr.GetPageSize() ),
rIo( rIoP )
{
- ULONG nErr = nError = FAT_OK;
+ sal_uLong nErr = nError = FAT_OK;
if( ( nErr = ValidateMasterFATs() ) != FAT_OK )
nError = nErr;
@@ -264,13 +264,13 @@ Validator::Validator( StgIo &rIoP )
nError = nErr;
}
-ULONG Validator::ValidateMasterFATs()
+sal_uLong Validator::ValidateMasterFATs()
{
- INT32 nCount = rIo.aHdr.GetFATSize();
- ULONG nErr;
- for( INT32 i = 0; i < nCount; i++ )
+ sal_Int32 nCount = rIo.aHdr.GetFATSize();
+ sal_uLong nErr;
+ for( sal_Int32 i = 0; i < nCount; i++ )
{
- if( ( nErr = aFat.Mark(rIo.pFAT->GetPage( short(i), FALSE ), aFat.GetPageSize(), -3 )) != FAT_OK )
+ if( ( nErr = aFat.Mark(rIo.pFAT->GetPage( short(i), sal_False ), aFat.GetPageSize(), -3 )) != FAT_OK )
return nErr;
}
if( rIo.aHdr.GetMasters() )
@@ -279,10 +279,10 @@ ULONG Validator::ValidateMasterFATs()
return FAT_OK;
}
-ULONG Validator::MarkAll( StgDirEntry *pEntry )
+sal_uLong Validator::MarkAll( StgDirEntry *pEntry )
{
StgIterator aIter( *pEntry );
- ULONG nErr = FAT_OK;
+ sal_uLong nErr = FAT_OK;
for( StgDirEntry* p = aIter.First(); p ; p = aIter.Next() )
{
if( p->aEntry.GetType() == STG_STORAGE )
@@ -293,7 +293,7 @@ ULONG Validator::MarkAll( StgDirEntry *pEntry )
}
else
{
- INT32 nSize = p->aEntry.GetSize();
+ sal_Int32 nSize = p->aEntry.GetSize();
if( nSize < rIo.aHdr.GetThreshold() )
nErr = aSmallFat.Mark( p->aEntry.GetStartPage(),nSize, -2 );
else
@@ -305,10 +305,10 @@ ULONG Validator::MarkAll( StgDirEntry *pEntry )
return FAT_OK;
}
-ULONG Validator::ValidateDirectoryEntries()
+sal_uLong Validator::ValidateDirectoryEntries()
{
// Normale DirEntries
- ULONG nErr = MarkAll( rIo.pTOC->GetRoot() );
+ sal_uLong nErr = MarkAll( rIo.pTOC->GetRoot() );
if( nErr != FAT_OK )
return nErr;
// Small Data
@@ -328,7 +328,7 @@ ULONG Validator::ValidateDirectoryEntries()
return nErr;
}
-ULONG Validator::FindUnrefedChains()
+sal_uLong Validator::FindUnrefedChains()
{
if( aSmallFat.HasUnrefChains() ||
aFat.HasUnrefChains() )
@@ -349,12 +349,12 @@ const Link& StgIo::GetErrorLink()
return ErrorLink::get();
}
-ULONG StgIo::ValidateFATs()
+sal_uLong StgIo::ValidateFATs()
{
if( bFile )
{
Validator *pV = new Validator( *this );
- BOOL bRet1 = !pV->IsError(), bRet2 = TRUE ;
+ sal_Bool bRet1 = !pV->IsError(), bRet2 = sal_True ;
delete pV;
SvFileStream *pFileStrm = ( SvFileStream *) GetStrm();
StgIo aIo;
@@ -367,7 +367,7 @@ ULONG StgIo::ValidateFATs()
delete pV;
}
- ULONG nErr;
+ sal_uLong nErr;
if( bRet1 != bRet2 )
nErr = bRet1 ? FAT_ONFILEERROR : FAT_INMEMORYERROR;
else nErr = bRet1 ? FAT_OK : FAT_BOTHERROR;
@@ -377,7 +377,7 @@ ULONG StgIo::ValidateFATs()
aArg.aFile = pFileStrm->GetFileName();
aArg.nErr = nErr;
ErrorLink::get().Call( &aArg );
- bCopied = TRUE;
+ bCopied = sal_True;
}
// DBG_ASSERT( nErr == FAT_OK ,"Storage kaputt");
return nErr;
diff --git a/sot/source/sdstor/stgio.hxx b/sot/source/sdstor/stgio.hxx
index db1c00b8d521..45b1985618f1 100644
--- a/sot/source/sdstor/stgio.hxx
+++ b/sot/source/sdstor/stgio.hxx
@@ -53,12 +53,12 @@ enum FAT_ERROR
struct StgLinkArg
{
String aFile;
- ULONG nErr;
+ sal_uLong nErr;
};
class StgIo : public StgCache {
void SetupStreams(); // load all internal streams
- BOOL bCopied;
+ sal_Bool bCopied;
public:
StgIo();
~StgIo();
@@ -68,13 +68,13 @@ public:
StgDataStrm* pDataFAT; // small data FAT stream
StgDataStrm* pDataStrm; // small data stream
short GetDataPageSize(); // get the logical data page size
- BOOL Load(); // load a storage file
- BOOL Init(); // set up an empty file
- BOOL CommitAll(); // commit everything (root commit)
+ sal_Bool Load(); // load a storage file
+ sal_Bool Init(); // set up an empty file
+ sal_Bool CommitAll(); // commit everything (root commit)
static void SetErrorLink( const Link& );
static const Link& GetErrorLink();
- ULONG ValidateFATs( );
+ sal_uLong ValidateFATs( );
};
#endif
diff --git a/sot/source/sdstor/stgole.cxx b/sot/source/sdstor/stgole.cxx
index 0bb5887eed76..80481957b3d0 100644
--- a/sot/source/sdstor/stgole.cxx
+++ b/sot/source/sdstor/stgole.cxx
@@ -40,10 +40,10 @@
///////////////////////// class StgInternalStream ////////////////////////
StgInternalStream::StgInternalStream
- ( BaseStorage& rStg, const String& rName, BOOL bWr )
+ ( BaseStorage& rStg, const String& rName, sal_Bool bWr )
{
- bIsWritable = TRUE;
- USHORT nMode = bWr
+ bIsWritable = sal_True;
+ sal_uInt16 nMode = bWr
? STREAM_WRITE | STREAM_SHARE_DENYALL
: STREAM_READ | STREAM_SHARE_DENYWRITE | STREAM_NOCREATE;
pStrm = rStg.OpenStream( rName, nMode );
@@ -58,7 +58,7 @@ StgInternalStream::~StgInternalStream()
delete pStrm;
}
-ULONG StgInternalStream::GetData( void* pData, ULONG nSize )
+sal_uLong StgInternalStream::GetData( void* pData, sal_uLong nSize )
{
if( pStrm )
{
@@ -70,7 +70,7 @@ ULONG StgInternalStream::GetData( void* pData, ULONG nSize )
return 0;
}
-ULONG StgInternalStream::PutData( const void* pData, ULONG nSize )
+sal_uLong StgInternalStream::PutData( const void* pData, sal_uLong nSize )
{
if( pStrm )
{
@@ -82,7 +82,7 @@ ULONG StgInternalStream::PutData( const void* pData, ULONG nSize )
return 0;
}
-ULONG StgInternalStream::SeekPos( ULONG nPos )
+sal_uLong StgInternalStream::SeekPos( sal_uLong nPos )
{
return pStrm ? pStrm->Seek( nPos ) : 0;
}
@@ -104,43 +104,43 @@ void StgInternalStream::Commit()
///////////////////////// class StgCompObjStream /////////////////////////
-StgCompObjStream::StgCompObjStream( BaseStorage& rStg, BOOL bWr )
+StgCompObjStream::StgCompObjStream( BaseStorage& rStg, sal_Bool bWr )
: StgInternalStream( rStg, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\1CompObj" ) ), bWr )
{
memset( &aClsId, 0, sizeof( ClsId ) );
nCbFormat = 0;
}
-BOOL StgCompObjStream::Load()
+sal_Bool StgCompObjStream::Load()
{
memset( &aClsId, 0, sizeof( ClsId ) );
nCbFormat = 0;
aUserName.Erase();
if( GetError() != SVSTREAM_OK )
- return FALSE;
+ return sal_False;
Seek( 8L ); // skip the first part
- INT32 nMarker = 0;
+ sal_Int32 nMarker = 0;
*this >> nMarker;
if( nMarker == -1L )
{
*this >> aClsId;
- INT32 nLen1 = 0;
+ sal_Int32 nLen1 = 0;
*this >> nLen1;
// higher bits are ignored
nLen1 &= 0xFFFF;
- sal_Char* p = new sal_Char[ (USHORT) nLen1 ];
- if( Read( p, nLen1 ) == (ULONG) nLen1 )
+ sal_Char* p = new sal_Char[ (sal_uInt16) nLen1 ];
+ if( Read( p, nLen1 ) == (sal_uLong) nLen1 )
{
aUserName = nLen1 ? String( p, gsl_getSystemTextEncoding() ) : String();
/* // Now we can read the CB format
- INT32 nLen2 = 0;
+ sal_Int32 nLen2 = 0;
*this >> nLen2;
if( nLen2 > 0 )
{
// get a string name
if( nLen2 > nLen1 )
delete p, p = new char[ nLen2 ];
- if( Read( p, nLen2 ) == (ULONG) nLen2 && nLen2 )
+ if( Read( p, nLen2 ) == (sal_uLong) nLen2 && nLen2 )
nCbFormat = Exchange::RegisterFormatName( String( p ) );
else
SetError( SVSTREAM_GENERALERROR );
@@ -158,73 +158,73 @@ BOOL StgCompObjStream::Load()
SetError( SVSTREAM_GENERALERROR );
delete [] p;
}
- return BOOL( GetError() == SVSTREAM_OK );
+ return sal_Bool( GetError() == SVSTREAM_OK );
}
-BOOL StgCompObjStream::Store()
+sal_Bool StgCompObjStream::Store()
{
if( GetError() != SVSTREAM_OK )
- return FALSE;
+ return sal_False;
Seek( 0L );
ByteString aAsciiUserName( aUserName, RTL_TEXTENCODING_ASCII_US );
- *this << (INT16) 1 // Version?
- << (INT16) -2 // 0xFFFE = Byte Order Indicator
- << (INT32) 0x0A03 // Windows 3.10
- << (INT32) -1L
+ *this << (sal_Int16) 1 // Version?
+ << (sal_Int16) -2 // 0xFFFE = Byte Order Indicator
+ << (sal_Int32) 0x0A03 // Windows 3.10
+ << (sal_Int32) -1L
<< aClsId // Class ID
- << (INT32) (aAsciiUserName.Len() + 1)
+ << (sal_Int32) (aAsciiUserName.Len() + 1)
<< (const char *)aAsciiUserName.GetBuffer()
- << (UINT8) 0; // string terminator
+ << (sal_uInt8) 0; // string terminator
/* // determine the clipboard format string
String aCbFmt;
if( nCbFormat > FORMAT_GDIMETAFILE )
aCbFmt = Exchange::GetFormatName( nCbFormat );
if( aCbFmt.Len() )
- *this << (INT32) aCbFmt.Len() + 1
+ *this << (sal_Int32) aCbFmt.Len() + 1
<< (const char*) aCbFmt
- << (UINT8) 0;
+ << (sal_uInt8) 0;
else if( nCbFormat )
- *this << (INT32) -1 // for Windows
- << (INT32) nCbFormat;
+ *this << (sal_Int32) -1 // for Windows
+ << (sal_Int32) nCbFormat;
else
- *this << (INT32) 0; // no clipboard format
+ *this << (sal_Int32) 0; // no clipboard format
*/
WriteClipboardFormat( *this, nCbFormat );
- *this << (INT32) 0; // terminator
+ *this << (sal_Int32) 0; // terminator
Commit();
- return BOOL( GetError() == SVSTREAM_OK );
+ return sal_Bool( GetError() == SVSTREAM_OK );
}
/////////////////////////// class StgOleStream ///////////////////////////
-StgOleStream::StgOleStream( BaseStorage& rStg, BOOL bWr )
+StgOleStream::StgOleStream( BaseStorage& rStg, sal_Bool bWr )
: StgInternalStream( rStg, String::CreateFromAscii( RTL_CONSTASCII_STRINGPARAM( "\1Ole" ) ), bWr )
{
nFlags = 0;
}
-BOOL StgOleStream::Load()
+sal_Bool StgOleStream::Load()
{
nFlags = 0;
if( GetError() != SVSTREAM_OK )
- return FALSE;
- INT32 version = 0;
+ return sal_False;
+ sal_Int32 version = 0;
Seek( 0L );
*this >> version >> nFlags;
- return BOOL( GetError() == SVSTREAM_OK );
+ return sal_Bool( GetError() == SVSTREAM_OK );
}
-BOOL StgOleStream::Store()
+sal_Bool StgOleStream::Store()
{
if( GetError() != SVSTREAM_OK )
- return FALSE;
+ return sal_False;
Seek( 0L );
- *this << (INT32) 0x02000001 // OLE version, format
- << (INT32) nFlags // Object flags
- << (INT32) 0 // Update Options
- << (INT32) 0 // reserved
- << (INT32) 0; // Moniker 1
+ *this << (sal_Int32) 0x02000001 // OLE version, format
+ << (sal_Int32) nFlags // Object flags
+ << (sal_Int32) 0 // Update Options
+ << (sal_Int32) 0 // reserved
+ << (sal_Int32) 0; // Moniker 1
Commit();
- return BOOL( GetError() == SVSTREAM_OK );
+ return sal_Bool( GetError() == SVSTREAM_OK );
}
diff --git a/sot/source/sdstor/stgole.hxx b/sot/source/sdstor/stgole.hxx
index a9eebe1aae68..4f3901f5212b 100644
--- a/sot/source/sdstor/stgole.hxx
+++ b/sot/source/sdstor/stgole.hxx
@@ -36,12 +36,12 @@
class StgInternalStream : public SvStream
{
BaseStorageStream* pStrm;
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
+ virtual sal_uLong GetData( void* pData, sal_uLong nSize );
+ virtual sal_uLong PutData( const void* pData, sal_uLong nSize );
+ virtual sal_uLong SeekPos( sal_uLong nPos );
virtual void FlushData();
public:
- StgInternalStream( BaseStorage&, const String&, BOOL );
+ StgInternalStream( BaseStorage&, const String&, sal_Bool );
~StgInternalStream();
void Commit();
};
@@ -52,14 +52,14 @@ class StgCompObjStream : public StgInternalStream
{
ClsId aClsId;
String aUserName;
- ULONG nCbFormat;
+ sal_uLong nCbFormat;
public:
- StgCompObjStream( BaseStorage&, BOOL );
+ StgCompObjStream( BaseStorage&, sal_Bool );
ClsId& GetClsId() { return aClsId; }
String& GetUserName() { return aUserName; }
- ULONG& GetCbFormat() { return nCbFormat; }
- BOOL Load();
- BOOL Store();
+ sal_uLong& GetCbFormat() { return nCbFormat; }
+ sal_Bool Load();
+ sal_Bool Store();
};
// standard stream "\1Ole"
@@ -68,10 +68,10 @@ class StgOleStream : public StgInternalStream
{
sal_uInt32 nFlags;
public:
- StgOleStream( BaseStorage&, BOOL );
+ StgOleStream( BaseStorage&, sal_Bool );
sal_uInt32& GetFlags() { return nFlags; }
- BOOL Load();
- BOOL Store();
+ sal_Bool Load();
+ sal_Bool Store();
};
#endif
diff --git a/sot/source/sdstor/stgstrms.cxx b/sot/source/sdstor/stgstrms.cxx
index 840f2cf2bba8..b3a775417817 100644
--- a/sot/source/sdstor/stgstrms.cxx
+++ b/sot/source/sdstor/stgstrms.cxx
@@ -46,10 +46,10 @@
///////////////////////////// class StgFAT ///////////////////////////////
// The FAT class performs FAT operations on an underlying storage stream.
-// This stream is either the master FAT stream (m == TRUE ) or a normal
+// This stream is either the master FAT stream (m == sal_True ) or a normal
// storage stream, which then holds the FAT for small data allocations.
-StgFAT::StgFAT( StgStrm& r, BOOL m ) : rStrm( r )
+StgFAT::StgFAT( StgStrm& r, sal_Bool m ) : rStrm( r )
{
bPhys = m;
nPageSize = rStrm.GetIo().GetPhysPageSize();
@@ -61,7 +61,7 @@ StgFAT::StgFAT( StgStrm& r, BOOL m ) : rStrm( r )
// Retrieve the physical page for a given byte offset.
-StgPage* StgFAT::GetPhysPage( INT32 nByteOff )
+StgPage* StgFAT::GetPhysPage( sal_Int32 nByteOff )
{
StgPage* pPg = NULL;
// Position within the underlying stream
@@ -69,16 +69,16 @@ StgPage* StgFAT::GetPhysPage( INT32 nByteOff )
if( rStrm.Pos2Page( nByteOff ) )
{
nOffset = rStrm.GetOffset();
- INT32 nPhysPage = rStrm.GetPage();
+ sal_Int32 nPhysPage = rStrm.GetPage();
// get the physical page (must be present)
- pPg = rStrm.GetIo().Get( nPhysPage, TRUE );
+ pPg = rStrm.GetIo().Get( nPhysPage, sal_True );
}
return pPg;
}
// Get the follow page for a certain FAT page.
-INT32 StgFAT::GetNextPage( INT32 nPg )
+sal_Int32 StgFAT::GetNextPage( sal_Int32 nPg )
{
if( nPg >= 0 )
{
@@ -94,16 +94,16 @@ INT32 StgFAT::GetNextPage( INT32 nPg )
// underlying stream size. It is treated as a recommendation
// to abort the search to inhibit excessive file growth.
-INT32 StgFAT::FindBlock( INT32& nPgs )
+sal_Int32 StgFAT::FindBlock( sal_Int32& nPgs )
{
- INT32 nMinStart = STG_EOF, nMinLen = 0;
- INT32 nMaxStart = STG_EOF, nMaxLen = 0x7FFFFFFFL;
- INT32 nTmpStart = STG_EOF, nTmpLen = 0;
- INT32 nPages = rStrm.GetSize() >> 2;
- BOOL bFound = FALSE;
+ sal_Int32 nMinStart = STG_EOF, nMinLen = 0;
+ sal_Int32 nMaxStart = STG_EOF, nMaxLen = 0x7FFFFFFFL;
+ sal_Int32 nTmpStart = STG_EOF, nTmpLen = 0;
+ sal_Int32 nPages = rStrm.GetSize() >> 2;
+ sal_Bool bFound = sal_False;
StgPage* pPg = NULL;
short nEntry = 0;
- for( INT32 i = 0; i < nPages; i++, nEntry++ )
+ for( sal_Int32 i = 0; i < nPages; i++, nEntry++ )
{
if( !( nEntry % nEntries ) )
{
@@ -113,7 +113,7 @@ INT32 StgFAT::FindBlock( INT32& nPgs )
if( !pPg )
return STG_EOF;
}
- INT32 nCur = pPg->GetPage( nEntry );
+ sal_Int32 nCur = pPg->GetPage( nEntry );
if( nCur == STG_FREE )
{
// count the size of this area
@@ -131,12 +131,12 @@ INT32 StgFAT::FindBlock( INT32& nPgs )
{
if( nTmpLen > nPgs && nTmpLen < nMaxLen )
// block > requested size
- nMaxLen = nTmpLen, nMaxStart = nTmpStart, bFound = TRUE;
+ nMaxLen = nTmpLen, nMaxStart = nTmpStart, bFound = sal_True;
else if( nTmpLen >= nMinLen )
{
// block < requested size
nMinLen = nTmpLen, nMinStart = nTmpStart;
- bFound = TRUE;
+ bFound = sal_True;
if( nTmpLen == nPgs )
break;
}
@@ -157,8 +157,8 @@ INT32 StgFAT::FindBlock( INT32& nPgs )
if( nMinStart != STG_EOF && nMaxStart != STG_EOF )
{
// two areas found; return the best fit area
- INT32 nMinDiff = nPgs - nMinLen;
- INT32 nMaxDiff = nMaxLen - nPgs;
+ sal_Int32 nMinDiff = nPgs - nMinLen;
+ sal_Int32 nMaxDiff = nMaxLen - nPgs;
if( nMinDiff > nMaxDiff )
nMinStart = STG_EOF;
}
@@ -174,19 +174,19 @@ INT32 StgFAT::FindBlock( INT32& nPgs )
// Set up the consecutive chain for a given block.
-BOOL StgFAT::MakeChain( INT32 nStart, INT32 nPgs )
+sal_Bool StgFAT::MakeChain( sal_Int32 nStart, sal_Int32 nPgs )
{
- INT32 nPos = nStart << 2;
+ sal_Int32 nPos = nStart << 2;
StgPage* pPg = GetPhysPage( nPos );
if( !pPg || !nPgs )
- return FALSE;
+ return sal_False;
while( --nPgs )
{
if( nOffset >= nPageSize )
{
pPg = GetPhysPage( nPos );
if( !pPg )
- return FALSE;
+ return sal_False;
}
pPg->SetPage( nOffset >> 2, ++nStart );
nOffset += 4;
@@ -196,22 +196,22 @@ BOOL StgFAT::MakeChain( INT32 nStart, INT32 nPgs )
{
pPg = GetPhysPage( nPos );
if( !pPg )
- return FALSE;
+ return sal_False;
}
pPg->SetPage( nOffset >> 2, STG_EOF );
- return TRUE;
+ return sal_True;
}
// Allocate a block of data from the given page number on.
// It the page number is != STG_EOF, chain the block.
-INT32 StgFAT::AllocPages( INT32 nBgn, INT32 nPgs )
+sal_Int32 StgFAT::AllocPages( sal_Int32 nBgn, sal_Int32 nPgs )
{
- INT32 nOrig = nBgn;
- INT32 nLast = nBgn;
- INT32 nBegin = STG_EOF;
- INT32 nAlloc;
- INT32 nPages = rStrm.GetSize() >> 2;
+ sal_Int32 nOrig = nBgn;
+ sal_Int32 nLast = nBgn;
+ sal_Int32 nBegin = STG_EOF;
+ sal_Int32 nAlloc;
+ sal_Int32 nPages = rStrm.GetSize() >> 2;
short nPasses = 0;
// allow for two passes
while( nPasses < 2 )
@@ -247,7 +247,7 @@ INT32 StgFAT::AllocPages( INT32 nBgn, INT32 nPgs )
if( !rStrm.SetSize( ( nPages + nPgs ) << 2 ) )
return STG_EOF;
if( !bPhys && !InitNew( nPages ) )
- return FALSE;
+ return sal_False;
nPages = rStrm.GetSize() >> 2;
nPasses++;
}
@@ -267,9 +267,9 @@ INT32 StgFAT::AllocPages( INT32 nBgn, INT32 nPgs )
// It can be assumed that the stream size is always on
// a page boundary
-BOOL StgFAT::InitNew( INT32 nPage1 )
+sal_Bool StgFAT::InitNew( sal_Int32 nPage1 )
{
- INT32 n = ( ( rStrm.GetSize() >> 2 ) - nPage1 ) / nEntries;
+ sal_Int32 n = ( ( rStrm.GetSize() >> 2 ) - nPage1 ) / nEntries;
while( n-- )
{
StgPage* pPg = NULL;
@@ -279,29 +279,29 @@ BOOL StgFAT::InitNew( INT32 nPage1 )
// Initialize the page
pPg = rStrm.GetIo().Copy( rStrm.GetPage(), STG_FREE );
if ( !pPg )
- return FALSE;
+ return sal_False;
for( short i = 0; i < nEntries; i++ )
pPg->SetPage( i, STG_FREE );
nPage1++;
}
- return TRUE;
+ return sal_True;
}
// Release a chain
-BOOL StgFAT::FreePages( INT32 nStart, BOOL bAll )
+sal_Bool StgFAT::FreePages( sal_Int32 nStart, sal_Bool bAll )
{
while( nStart >= 0 )
{
StgPage* pPg = GetPhysPage( nStart << 2 );
if( !pPg )
- return FALSE;
+ return sal_False;
nStart = pPg->GetPage( nOffset >> 2 );
// The first released page is either set to EOF or FREE
pPg->SetPage( nOffset >> 2, bAll ? STG_FREE : STG_EOF );
- bAll = TRUE;
+ bAll = sal_True;
}
- return TRUE;
+ return sal_True;
}
///////////////////////////// class StgStrm ////////////////////////////////
@@ -339,21 +339,21 @@ void StgStrm::SetEntry( StgDirEntry& r )
// If the position is behind the size, set the stream right
// behind the EOF.
-BOOL StgStrm::Pos2Page( INT32 nBytePos )
+sal_Bool StgStrm::Pos2Page( sal_Int32 nBytePos )
{
- INT32 nRel, nBgn;
+ sal_Int32 nRel, nBgn;
// Values < 0 seek to the end
if( nBytePos < 0 || nBytePos >= nSize )
nBytePos = nSize;
// Adjust the position back to offset 0
nPos -= nOffset;
- INT32 nMask = ~( nPageSize - 1 );
- INT32 nOld = nPos & nMask;
- INT32 nNew = nBytePos & nMask;
+ sal_Int32 nMask = ~( nPageSize - 1 );
+ sal_Int32 nOld = nPos & nMask;
+ sal_Int32 nNew = nBytePos & nMask;
nOffset = (short) ( nBytePos & ~nMask );
nPos = nBytePos;
if( nOld == nNew )
- return TRUE;
+ return sal_True;
if( nNew > nOld )
{
// the new position is behind the current, so an incremental
@@ -370,7 +370,7 @@ BOOL StgStrm::Pos2Page( INT32 nBytePos )
}
// now, traverse the FAT chain.
nRel /= nPageSize;
- INT32 nLast = STG_EOF;
+ sal_Int32 nLast = STG_EOF;
while( nRel && nBgn >= 0 )
{
nLast = nBgn;
@@ -388,12 +388,12 @@ BOOL StgStrm::Pos2Page( INT32 nBytePos )
nOffset = nPageSize;
}
nPage = nBgn;
- return BOOL( nRel == 0 && nPage >= 0 );
+ return sal_Bool( nRel == 0 && nPage >= 0 );
}
// Retrieve the physical page for a given byte offset.
-StgPage* StgStrm::GetPhysPage( INT32 nBytePos, BOOL bForce )
+StgPage* StgStrm::GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce )
{
if( !Pos2Page( nBytePos ) )
return NULL;
@@ -403,16 +403,16 @@ StgPage* StgStrm::GetPhysPage( INT32 nBytePos, BOOL bForce )
// Copy an entire stream. Both streams are allocated in the FAT.
// The target stream is this stream.
-BOOL StgStrm::Copy( INT32 nFrom, INT32 nBytes )
+sal_Bool StgStrm::Copy( sal_Int32 nFrom, sal_Int32 nBytes )
{
- INT32 nTo = nStart;
- INT32 nPgs = ( nBytes + nPageSize - 1 ) / nPageSize;
+ sal_Int32 nTo = nStart;
+ sal_Int32 nPgs = ( nBytes + nPageSize - 1 ) / nPageSize;
while( nPgs-- )
{
if( nTo < 0 )
{
rIo.SetError( SVSTREAM_FILEFORMAT_ERROR );
- return FALSE;
+ return sal_False;
}
rIo.Copy( nTo, nFrom );
if( nFrom >= 0 )
@@ -421,34 +421,34 @@ BOOL StgStrm::Copy( INT32 nFrom, INT32 nBytes )
if( nFrom < 0 )
{
rIo.SetError( SVSTREAM_FILEFORMAT_ERROR );
- return FALSE;
+ return sal_False;
}
}
nTo = pFat->GetNextPage( nTo );
}
- return TRUE;
+ return sal_True;
}
-BOOL StgStrm::SetSize( INT32 nBytes )
+sal_Bool StgStrm::SetSize( sal_Int32 nBytes )
{
// round up to page size
- INT32 nOld = ( ( nSize + nPageSize - 1 ) / nPageSize ) * nPageSize;
- INT32 nNew = ( ( nBytes + nPageSize - 1 ) / nPageSize ) * nPageSize;
+ sal_Int32 nOld = ( ( nSize + nPageSize - 1 ) / nPageSize ) * nPageSize;
+ sal_Int32 nNew = ( ( nBytes + nPageSize - 1 ) / nPageSize ) * nPageSize;
if( nNew > nOld )
{
if( !Pos2Page( nSize ) )
- return FALSE;
- INT32 nBgn = pFat->AllocPages( nPage, ( nNew - nOld ) / nPageSize );
+ return sal_False;
+ sal_Int32 nBgn = pFat->AllocPages( nPage, ( nNew - nOld ) / nPageSize );
if( nBgn == STG_EOF )
- return FALSE;
+ return sal_False;
if( nStart == STG_EOF )
nStart = nPage = nBgn;
}
else if( nNew < nOld )
{
- BOOL bAll = BOOL( nBytes == 0 );
+ sal_Bool bAll = sal_Bool( nBytes == 0 );
if( !Pos2Page( nBytes ) || !pFat->FreePages( nPage, bAll ) )
- return FALSE;
+ return sal_False;
if( bAll )
nStart = nPage = STG_EOF;
}
@@ -462,12 +462,12 @@ BOOL StgStrm::SetSize( INT32 nBytes )
}
nSize = nBytes;
pFat->SetLimit( GetPages() );
- return TRUE;
+ return sal_True;
}
// Return the # of allocated pages
-INT32 StgStrm::GetPages()
+sal_Int32 StgStrm::GetPages()
{
return ( nSize + nPageSize - 1 ) / nPageSize;
}
@@ -480,11 +480,11 @@ INT32 StgStrm::GetPages()
StgFATStrm::StgFATStrm( StgIo& r ) : StgStrm( r )
{
- pFat = new StgFAT( *this, TRUE );
+ pFat = new StgFAT( *this, sal_True );
nSize = rIo.aHdr.GetFATSize() * nPageSize;
}
-BOOL StgFATStrm::Pos2Page( INT32 nBytePos )
+sal_Bool StgFATStrm::Pos2Page( sal_Int32 nBytePos )
{
// Values < 0 seek to the end
if( nBytePos < 0 || nBytePos >= nSize )
@@ -492,38 +492,38 @@ BOOL StgFATStrm::Pos2Page( INT32 nBytePos )
nPage = nBytePos / nPageSize;
nOffset = (short) ( nBytePos % nPageSize );
nPos = nBytePos;
- nPage = GetPage( (short) nPage, FALSE );
- return BOOL( nPage >= 0 );
+ nPage = GetPage( (short) nPage, sal_False );
+ return sal_Bool( nPage >= 0 );
}
// Retrieve the physical page for a given byte offset.
// Since Pos2Page() already has computed the physical offset,
// use the byte offset directly.
-StgPage* StgFATStrm::GetPhysPage( INT32 nBytePos, BOOL bForce )
+StgPage* StgFATStrm::GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce )
{
return rIo.Get( nBytePos / ( nPageSize >> 2 ), bForce );
}
// Get the page number entry for the given page offset.
-INT32 StgFATStrm::GetPage( short nOff, BOOL bMake, USHORT *pnMasterAlloc )
+sal_Int32 StgFATStrm::GetPage( short nOff, sal_Bool bMake, sal_uInt16 *pnMasterAlloc )
{
if( pnMasterAlloc ) *pnMasterAlloc = 0;
if( nOff < rIo.aHdr.GetFAT1Size() )
return rIo.aHdr.GetFATPage( nOff );
- INT32 nMaxPage = nSize >> 2;
+ sal_Int32 nMaxPage = nSize >> 2;
nOff = nOff - rIo.aHdr.GetFAT1Size();
// Anzahl der Masterpages, durch die wir iterieren muessen
- USHORT nMasterCount = ( nPageSize >> 2 ) - 1;
- USHORT nBlocks = nOff / nMasterCount;
+ sal_uInt16 nMasterCount = ( nPageSize >> 2 ) - 1;
+ sal_uInt16 nBlocks = nOff / nMasterCount;
// Offset in letzter Masterpage
nOff = nOff % nMasterCount;
StgPage* pOldPage = 0;
StgPage* pMaster = 0;
- INT32 nFAT = rIo.aHdr.GetFATChain();
- for( USHORT nCount = 0; nCount <= nBlocks; nCount++ )
+ sal_Int32 nFAT = rIo.aHdr.GetFATChain();
+ for( sal_uInt16 nCount = 0; nCount <= nBlocks; nCount++ )
{
if( nFAT == STG_EOF || nFAT == STG_FREE )
{
@@ -550,7 +550,7 @@ INT32 StgFATStrm::GetPage( short nOff, BOOL bMake, USHORT *pnMasterAlloc )
{
if( !Pos2Page( nFAT << 2 ) )
return STG_EOF;
- StgPage* pPg = rIo.Get( nPage, TRUE );
+ StgPage* pPg = rIo.Get( nPage, sal_True );
if( !pPg )
return STG_EOF;
pPg->SetPage( nOffset >> 2, STG_MASTER );
@@ -564,7 +564,7 @@ INT32 StgFATStrm::GetPage( short nOff, BOOL bMake, USHORT *pnMasterAlloc )
}
else
{
- pMaster = rIo.Get( nFAT, TRUE );
+ pMaster = rIo.Get( nFAT, sal_True );
if ( pMaster )
{
nFAT = pMaster->GetPage( nMasterCount );
@@ -581,30 +581,30 @@ INT32 StgFATStrm::GetPage( short nOff, BOOL bMake, USHORT *pnMasterAlloc )
// Set the page number entry for the given page offset.
-BOOL StgFATStrm::SetPage( short nOff, INT32 nNewPage )
+sal_Bool StgFATStrm::SetPage( short nOff, sal_Int32 nNewPage )
{
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if( nOff < rIo.aHdr.GetFAT1Size() )
rIo.aHdr.SetFATPage( nOff, nNewPage );
else
{
nOff = nOff - rIo.aHdr.GetFAT1Size();
// Anzahl der Masterpages, durch die wir iterieren muessen
- USHORT nMasterCount = ( nPageSize >> 2 ) - 1;
- USHORT nBlocks = nOff / nMasterCount;
+ sal_uInt16 nMasterCount = ( nPageSize >> 2 ) - 1;
+ sal_uInt16 nBlocks = nOff / nMasterCount;
// Offset in letzter Masterpage
nOff = nOff % nMasterCount;
StgPage* pMaster = 0;
- INT32 nFAT = rIo.aHdr.GetFATChain();
- for( USHORT nCount = 0; nCount <= nBlocks; nCount++ )
+ sal_Int32 nFAT = rIo.aHdr.GetFATChain();
+ for( sal_uInt16 nCount = 0; nCount <= nBlocks; nCount++ )
{
if( nFAT == STG_EOF || nFAT == STG_FREE )
{
pMaster = 0;
break;
}
- pMaster = rIo.Get( nFAT, TRUE );
+ pMaster = rIo.Get( nFAT, sal_True );
if ( pMaster )
nFAT = pMaster->GetPage( nMasterCount );
}
@@ -613,7 +613,7 @@ BOOL StgFATStrm::SetPage( short nOff, INT32 nNewPage )
else
{
rIo.SetError( SVSTREAM_GENERALERROR );
- bRes = FALSE;
+ bRes = sal_False;
}
}
@@ -621,16 +621,16 @@ BOOL StgFATStrm::SetPage( short nOff, INT32 nNewPage )
if( bRes )
{
Pos2Page( nNewPage << 2 );
- StgPage* pPg = rIo.Get( nPage, TRUE );
+ StgPage* pPg = rIo.Get( nPage, sal_True );
if( pPg )
pPg->SetPage( nOffset >> 2, STG_FAT );
else
- bRes = FALSE;
+ bRes = sal_False;
}
return bRes;
}
-BOOL StgFATStrm::SetSize( INT32 nBytes )
+sal_Bool StgFATStrm::SetSize( sal_Int32 nBytes )
{
// Set the number of entries to a multiple of the page size
short nOld = (short) ( ( nSize + ( nPageSize - 1 ) ) / nPageSize );
@@ -648,17 +648,17 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
{
// allocate master pages
// find a free master page slot
- INT32 nPg = 0;
- USHORT nMasterAlloc = 0;
- nPg = GetPage( nOld, TRUE, &nMasterAlloc );
+ sal_Int32 nPg = 0;
+ sal_uInt16 nMasterAlloc = 0;
+ nPg = GetPage( nOld, sal_True, &nMasterAlloc );
if( nPg == STG_EOF )
- return FALSE;
+ return sal_False;
// 4 Bytes have been used for Allocation of each MegaMasterPage
nBytes += nMasterAlloc << 2;
// find a free page using the FAT allocator
- INT32 n = 1;
- INT32 nNewPage = pFat->FindBlock( n );
+ sal_Int32 n = 1;
+ sal_Int32 nNewPage = pFat->FindBlock( n );
if( nNewPage == STG_EOF )
{
// no free pages found; create a new page
@@ -671,12 +671,12 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
// adjust the file size if necessary
if( nNewPage >= rIo.GetPhysPages() )
if( !rIo.SetSize( nNewPage + 1 ) )
- return FALSE;
+ return sal_False;
}
// Set up the page with empty entries
StgPage* pPg = rIo.Copy( nNewPage, STG_FREE );
if ( !pPg )
- return FALSE;
+ return sal_False;
for( short j = 0; j < ( nPageSize >> 2 ); j++ )
pPg->SetPage( j, STG_FREE );
@@ -687,22 +687,22 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
// MegaMasterPages were created, mark it them as used
- UINT32 nMax = rIo.aHdr.GetMasters( );
- UINT32 nFAT = rIo.aHdr.GetFATChain();
+ sal_uInt32 nMax = rIo.aHdr.GetMasters( );
+ sal_uInt32 nFAT = rIo.aHdr.GetFATChain();
if( nMasterAlloc )
- for( USHORT nCount = 0; nCount < nMax; nCount++ )
+ for( sal_uInt16 nCount = 0; nCount < nMax; nCount++ )
{
if( !Pos2Page( nFAT << 2 ) )
- return FALSE;
+ return sal_False;
if( nMax - nCount <= nMasterAlloc )
{
- StgPage* piPg = rIo.Get( nPage, TRUE );
+ StgPage* piPg = rIo.Get( nPage, sal_True );
if( !piPg )
- return FALSE;
+ return sal_False;
piPg->SetPage( nOffset >> 2, STG_MASTER );
}
- StgPage* pPage = rIo.Get( nFAT, TRUE );
- if( !pPage ) return FALSE;
+ StgPage* pPage = rIo.Get( nFAT, sal_True );
+ if( !pPage ) return sal_False;
nFAT = pPage->GetPage( (nPageSize >> 2 ) - 1 );
}
@@ -715,7 +715,7 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
}
nSize = nNew * nPageSize;
rIo.aHdr.SetFATSize( nNew );
- return TRUE;
+ return sal_True;
}
/////////////////////////// class StgDataStrm //////////////////////////////
@@ -725,7 +725,7 @@ BOOL StgFATStrm::SetSize( INT32 nBytes )
// The stream has a size increment which normally is 1, but which can be
// set to any value is you want the size to be incremented by certain values.
-StgDataStrm::StgDataStrm( StgIo& r, INT32 nBgn, INT32 nLen ) : StgStrm( r )
+StgDataStrm::StgDataStrm( StgIo& r, sal_Int32 nBgn, sal_Int32 nLen ) : StgStrm( r )
{
Init( nBgn, nLen );
}
@@ -737,9 +737,9 @@ StgDataStrm::StgDataStrm( StgIo& r, StgDirEntry* p ) : StgStrm( r )
p->aEntry.GetSize() );
}
-void StgDataStrm::Init( INT32 nBgn, INT32 nLen )
+void StgDataStrm::Init( sal_Int32 nBgn, sal_Int32 nLen )
{
- pFat = new StgFAT( *rIo.pFAT, TRUE );
+ pFat = new StgFAT( *rIo.pFAT, sal_True );
nStart = nPage = nBgn;
nSize = nLen;
nIncr = 1;
@@ -749,7 +749,7 @@ void StgDataStrm::Init( INT32 nBgn, INT32 nLen )
// determine the actual size of the stream by scanning
// the FAT chain and counting the # of pages allocated
nSize = 0;
- INT32 nOldBgn = -1;
+ sal_Int32 nOldBgn = -1;
while( nBgn >= 0 && nBgn != nOldBgn )
{
nOldBgn = nBgn;
@@ -763,18 +763,18 @@ void StgDataStrm::Init( INT32 nBgn, INT32 nLen )
// Set the size of a physical stream.
-BOOL StgDataStrm::SetSize( INT32 nBytes )
+sal_Bool StgDataStrm::SetSize( sal_Int32 nBytes )
{
nBytes = ( ( nBytes + nIncr - 1 ) / nIncr ) * nIncr;
- INT32 nOldSz = nSize;
+ sal_Int32 nOldSz = nSize;
if( ( nOldSz != nBytes ) )
{
if( !StgStrm::SetSize( nBytes ) )
- return FALSE;
- INT32 nMaxPage = pFat->GetMaxPage();
+ return sal_False;
+ sal_Int32 nMaxPage = pFat->GetMaxPage();
if( nMaxPage > rIo.GetPhysPages() )
if( !rIo.SetSize( nMaxPage ) )
- return FALSE;
+ return sal_False;
// If we only allocated one page or less, create this
// page in the cache for faster throughput. The current
// position is the former EOF point.
@@ -785,14 +785,14 @@ BOOL StgDataStrm::SetSize( INT32 nBytes )
rIo.Copy( nPage, STG_FREE );
}
}
- return TRUE;
+ return sal_True;
}
// Get the address of the data byte at a specified offset.
-// If bForce = TRUE, a read of non-existent data causes
+// If bForce = sal_True, a read of non-existent data causes
// a read fault.
-void* StgDataStrm::GetPtr( INT32 Pos, BOOL bForce, BOOL bDirty )
+void* StgDataStrm::GetPtr( sal_Int32 Pos, sal_Bool bForce, sal_Bool bDirty )
{
if( Pos2Page( Pos ) )
{
@@ -802,7 +802,7 @@ void* StgDataStrm::GetPtr( INT32 Pos, BOOL bForce, BOOL bDirty )
pPg->SetOwner( pEntry );
if( bDirty )
pPg->SetDirty();
- return ((BYTE *)pPg->GetData()) + nOffset;
+ return ((sal_uInt8 *)pPg->GetData()) + nOffset;
}
}
return NULL;
@@ -812,24 +812,24 @@ void* StgDataStrm::GetPtr( INT32 Pos, BOOL bForce, BOOL bDirty )
// the amount of consecutable blocks before doing a read. The result
// is the number of bytes read. No error is generated on EOF.
-INT32 StgDataStrm::Read( void* pBuf, INT32 n )
+sal_Int32 StgDataStrm::Read( void* pBuf, sal_Int32 n )
{
if ( n < 0 )
return 0;
if( ( nPos + n ) > nSize )
n = nSize - nPos;
- INT32 nDone = 0;
+ sal_Int32 nDone = 0;
while( n )
{
short nBytes = nPageSize - nOffset;
short nRes;
StgPage* pPg;
- if( (INT32) nBytes > n )
+ if( (sal_Int32) nBytes > n )
nBytes = (short) n;
if( nBytes )
{
- void *p = (BYTE *) pBuf + nDone;
+ void *p = (sal_uInt8 *) pBuf + nDone;
if( nBytes == nPageSize )
{
pPg = rIo.Find( nPage );
@@ -847,11 +847,11 @@ INT32 StgDataStrm::Read( void* pBuf, INT32 n )
else
{
// partial block read thru the cache.
- pPg = rIo.Get( nPage, FALSE );
+ pPg = rIo.Get( nPage, sal_False );
if( !pPg )
break;
pPg->SetOwner( pEntry );
- memcpy( p, (BYTE*)pPg->GetData() + nOffset, nBytes );
+ memcpy( p, (sal_uInt8*)pPg->GetData() + nOffset, nBytes );
nRes = nBytes;
}
nDone += nRes;
@@ -868,14 +868,14 @@ INT32 StgDataStrm::Read( void* pBuf, INT32 n )
return nDone;
}
-INT32 StgDataStrm::Write( const void* pBuf, INT32 n )
+sal_Int32 StgDataStrm::Write( const void* pBuf, sal_Int32 n )
{
- INT32 nDone = 0;
+ sal_Int32 nDone = 0;
if( ( nPos + n ) > nSize )
{
- INT32 nOld = nPos;
+ sal_Int32 nOld = nPos;
if( !SetSize( nPos + n ) )
- return FALSE;
+ return sal_False;
Pos2Page( nOld );
}
while( n )
@@ -883,11 +883,11 @@ INT32 StgDataStrm::Write( const void* pBuf, INT32 n )
short nBytes = nPageSize - nOffset;
short nRes;
StgPage* pPg;
- if( (INT32) nBytes > n )
+ if( (sal_Int32) nBytes > n )
nBytes = (short) n;
if( nBytes )
{
- const void *p = (const BYTE *) pBuf + nDone;
+ const void *p = (const sal_uInt8 *) pBuf + nDone;
if( nBytes == nPageSize )
{
pPg = rIo.Find( nPage );
@@ -906,11 +906,11 @@ INT32 StgDataStrm::Write( const void* pBuf, INT32 n )
else
{
// partial block read thru the cache.
- pPg = rIo.Get( nPage, FALSE );
+ pPg = rIo.Get( nPage, sal_False );
if( !pPg )
break;
pPg->SetOwner( pEntry );
- memcpy( (BYTE*)pPg->GetData() + nOffset, p, nBytes );
+ memcpy( (sal_uInt8*)pPg->GetData() + nOffset, p, nBytes );
pPg->SetDirty();
nRes = nBytes;
}
@@ -935,7 +935,7 @@ INT32 StgDataStrm::Write( const void* pBuf, INT32 n )
// is also a StgStream. The start of the FAT is in the header at DataRootPage,
// the stream itself is pointed to by the root entry (it holds start & size).
-StgSmallStrm::StgSmallStrm( StgIo& r, INT32 nBgn, INT32 nLen ) : StgStrm( r )
+StgSmallStrm::StgSmallStrm( StgIo& r, sal_Int32 nBgn, sal_Int32 nLen ) : StgStrm( r )
{
Init( nBgn, nLen );
}
@@ -947,9 +947,9 @@ StgSmallStrm::StgSmallStrm( StgIo& r, StgDirEntry* p ) : StgStrm( r )
p->aEntry.GetSize() );
}
-void StgSmallStrm::Init( INT32 nBgn, INT32 nLen )
+void StgSmallStrm::Init( sal_Int32 nBgn, sal_Int32 nLen )
{
- pFat = new StgFAT( *rIo.pDataFAT, FALSE );
+ pFat = new StgFAT( *rIo.pDataFAT, sal_False );
pData = rIo.pDataStrm;
nPageSize = rIo.GetDataPageSize();
nStart =
@@ -961,7 +961,7 @@ void StgSmallStrm::Init( INT32 nBgn, INT32 nLen )
// the amount of consecutable blocks before doing a read. The result
// is the number of bytes read. No error is generated on EOF.
-INT32 StgSmallStrm::Read( void* pBuf, INT32 n )
+sal_Int32 StgSmallStrm::Read( void* pBuf, sal_Int32 n )
{
// We can safely assume that reads are not huge, since the
// small stream is likely to be < 64 KBytes.
@@ -971,14 +971,14 @@ INT32 StgSmallStrm::Read( void* pBuf, INT32 n )
while( n )
{
short nBytes = nPageSize - nOffset;
- if( (INT32) nBytes > n )
+ if( (sal_Int32) nBytes > n )
nBytes = (short) n;
if( nBytes )
{
if( !pData->Pos2Page( nPage * nPageSize + nOffset ) )
break;
// all reading thru the stream
- short nRes = (short) pData->Read( (BYTE*)pBuf + nDone, nBytes );
+ short nRes = (short) pData->Read( (sal_uInt8*)pBuf + nDone, nBytes );
nDone = nDone + nRes;
nPos += nRes;
n -= nRes;
@@ -994,33 +994,33 @@ INT32 StgSmallStrm::Read( void* pBuf, INT32 n )
return nDone;
}
-INT32 StgSmallStrm::Write( const void* pBuf, INT32 n )
+sal_Int32 StgSmallStrm::Write( const void* pBuf, sal_Int32 n )
{
// you can safely assume that reads are not huge, since the
// small stream is likely to be < 64 KBytes.
short nDone = 0;
if( ( nPos + n ) > nSize )
{
- INT32 nOld = nPos;
+ sal_Int32 nOld = nPos;
if( !SetSize( nPos + n ) )
- return FALSE;
+ return sal_False;
Pos2Page( nOld );
}
while( n )
{
short nBytes = nPageSize - nOffset;
- if( (INT32) nBytes > n )
+ if( (sal_Int32) nBytes > n )
nBytes = (short) n;
if( nBytes )
{
// all writing goes thru the stream
- INT32 nDataPos = nPage * nPageSize + nOffset;
+ sal_Int32 nDataPos = nPage * nPageSize + nOffset;
if( pData->GetSize() < ( nDataPos + nBytes ) )
if( !pData->SetSize( nDataPos + nBytes ) )
break;
if( !pData->Pos2Page( nDataPos ) )
break;
- short nRes = (short) pData->Write( (BYTE*)pBuf + nDone, nBytes );
+ short nRes = (short) pData->Write( (sal_uInt8*)pBuf + nDone, nBytes );
nDone = nDone + nRes;
nPos += nRes;
n -= nRes;
@@ -1043,7 +1043,7 @@ INT32 StgSmallStrm::Write( const void* pBuf, INT32 n )
#define THRESHOLD 32768L
-StgTmpStrm::StgTmpStrm( ULONG nInitSize )
+StgTmpStrm::StgTmpStrm( sal_uLong nInitSize )
: SvMemoryStream( nInitSize > THRESHOLD
? 16
: ( nInitSize ? nInitSize : 16 ), 4096 )
@@ -1055,19 +1055,19 @@ StgTmpStrm::StgTmpStrm( ULONG nInitSize )
SetSize( nInitSize );
}
-BOOL StgTmpStrm::Copy( StgTmpStrm& rSrc )
+sal_Bool StgTmpStrm::Copy( StgTmpStrm& rSrc )
{
- ULONG n = rSrc.GetSize();
- ULONG nCur = rSrc.Tell();
+ sal_uLong n = rSrc.GetSize();
+ sal_uLong nCur = rSrc.Tell();
SetSize( n );
if( GetError() == SVSTREAM_OK )
{
- BYTE* p = new BYTE[ 4096 ];
+ sal_uInt8* p = new sal_uInt8[ 4096 ];
rSrc.Seek( 0L );
Seek( 0L );
while( n )
{
- ULONG nn = n;
+ sal_uLong nn = n;
if( nn > 4096 )
nn = 4096;
if( rSrc.Read( p, nn ) != nn )
@@ -1079,10 +1079,10 @@ BOOL StgTmpStrm::Copy( StgTmpStrm& rSrc )
delete [] p;
rSrc.Seek( nCur );
Seek( nCur );
- return BOOL( n == 0 );
+ return sal_Bool( n == 0 );
}
else
- return FALSE;
+ return sal_False;
}
StgTmpStrm::~StgTmpStrm()
@@ -1095,12 +1095,12 @@ StgTmpStrm::~StgTmpStrm()
}
}
-ULONG StgTmpStrm::GetSize() const
+sal_uLong StgTmpStrm::GetSize() const
{
- ULONG n;
+ sal_uLong n;
if( pStrm )
{
- ULONG old = pStrm->Tell();
+ sal_uLong old = pStrm->Tell();
n = pStrm->Seek( STREAM_SEEK_TO_END );
pStrm->Seek( old );
}
@@ -1109,7 +1109,7 @@ ULONG StgTmpStrm::GetSize() const
return n;
}
-void StgTmpStrm::SetSize( ULONG n )
+void StgTmpStrm::SetSize( sal_uLong n )
{
if( pStrm )
pStrm->SetStreamSize( n );
@@ -1119,15 +1119,15 @@ void StgTmpStrm::SetSize( ULONG n )
{
aName = TempFile::CreateTempName();
SvFileStream* s = new SvFileStream( aName, STREAM_READWRITE );
- ULONG nCur = Tell();
- ULONG i = nEndOfData;
+ sal_uLong nCur = Tell();
+ sal_uLong i = nEndOfData;
if( i )
{
- BYTE* p = new BYTE[ 4096 ];
+ sal_uInt8* p = new sal_uInt8[ 4096 ];
Seek( 0L );
while( i )
{
- ULONG nb = ( i > 4096 ) ? 4096 : i;
+ sal_uLong nb = ( i > 4096 ) ? 4096 : i;
if( Read( p, nb ) == nb
&& s->Write( p, nb ) == nb )
i -= nb;
@@ -1163,9 +1163,9 @@ void StgTmpStrm::SetSize( ULONG n )
{
if( n > nEndOfData )
{
- ULONG nCur = Tell();
+ sal_uLong nCur = Tell();
Seek( nEndOfData - 1 );
- *this << (BYTE) 0;
+ *this << (sal_uInt8) 0;
Seek( nCur );
}
else
@@ -1174,7 +1174,7 @@ void StgTmpStrm::SetSize( ULONG n )
}
}
-ULONG StgTmpStrm::GetData( void* pData, ULONG n )
+sal_uLong StgTmpStrm::GetData( void* pData, sal_uLong n )
{
if( pStrm )
{
@@ -1186,10 +1186,10 @@ ULONG StgTmpStrm::GetData( void* pData, ULONG n )
return SvMemoryStream::GetData( (sal_Char *)pData, n );
}
-ULONG StgTmpStrm::PutData( const void* pData, ULONG n )
+sal_uLong StgTmpStrm::PutData( const void* pData, sal_uLong n )
{
- UINT32 nCur = Tell();
- UINT32 nNew = nCur + n;
+ sal_uInt32 nCur = Tell();
+ sal_uInt32 nNew = nCur + n;
if( nNew > THRESHOLD && !pStrm )
{
SetSize( nNew );
@@ -1206,7 +1206,7 @@ ULONG StgTmpStrm::PutData( const void* pData, ULONG n )
return nNew;
}
-ULONG StgTmpStrm::SeekPos( ULONG n )
+sal_uLong StgTmpStrm::SeekPos( sal_uLong n )
{
if( n == STREAM_SEEK_TO_END )
n = GetSize();
diff --git a/sot/source/sdstor/stgstrms.hxx b/sot/source/sdstor/stgstrms.hxx
index 9b09f51db43f..a1bb0707cdd7 100644
--- a/sot/source/sdstor/stgstrms.hxx
+++ b/sot/source/sdstor/stgstrms.hxx
@@ -38,29 +38,29 @@ class StgPage;
class StgDirEntry;
// The FAT class performs FAT operations on an underlying storage stream.
-// This stream is either the physical FAT stream (bPhys == TRUE ) or a normal
+// This stream is either the physical FAT stream (bPhys == sal_True ) or a normal
// storage stream, which then holds the FAT for small data allocations.
class StgFAT
{ // FAT allocator
StgStrm& rStrm; // underlying stream
- INT32 nMaxPage; // highest page allocated so far
+ sal_Int32 nMaxPage; // highest page allocated so far
short nPageSize; // physical page size
short nEntries; // FAT entries per page
short nOffset; // current offset within page
- INT32 nLimit; // search limit recommendation
- BOOL bPhys; // TRUE: physical FAT
- StgPage* GetPhysPage( INT32 nPage );
- BOOL MakeChain( INT32 nStart, INT32 nPages );
- BOOL InitNew( INT32 nPage1 );
+ sal_Int32 nLimit; // search limit recommendation
+ sal_Bool bPhys; // sal_True: physical FAT
+ StgPage* GetPhysPage( sal_Int32 nPage );
+ sal_Bool MakeChain( sal_Int32 nStart, sal_Int32 nPages );
+ sal_Bool InitNew( sal_Int32 nPage1 );
public:
- StgFAT( StgStrm& rStrm, BOOL bMark );
- INT32 FindBlock( INT32& nPages );
- INT32 GetNextPage( INT32 nPg );
- INT32 AllocPages( INT32 nStart, INT32 nPages );
- BOOL FreePages( INT32 nStart, BOOL bAll );
- INT32 GetMaxPage() { return nMaxPage; }
- void SetLimit( INT32 n ) { nLimit = n; }
+ StgFAT( StgStrm& rStrm, sal_Bool bMark );
+ sal_Int32 FindBlock( sal_Int32& nPages );
+ sal_Int32 GetNextPage( sal_Int32 nPg );
+ sal_Int32 AllocPages( sal_Int32 nStart, sal_Int32 nPages );
+ sal_Bool FreePages( sal_Int32 nStart, sal_Bool bAll );
+ sal_Int32 GetMaxPage() { return nMaxPage; }
+ void SetLimit( sal_Int32 n ) { nLimit = n; }
};
// The base stream class provides basic functionality for seeking
@@ -72,31 +72,31 @@ protected:
StgIo& rIo; // I/O system
StgFAT* pFat; // FAT stream for allocations
StgDirEntry* pEntry; // dir entry (for ownership)
- INT32 nStart; // 1st data page
- INT32 nSize; // stream size in bytes
- INT32 nPos; // current byte position
- INT32 nPage; // current logical page
+ sal_Int32 nStart; // 1st data page
+ sal_Int32 nSize; // stream size in bytes
+ sal_Int32 nPos; // current byte position
+ sal_Int32 nPage; // current logical page
short nOffset; // offset into current page
short nPageSize; // logical page size
- BOOL Copy( INT32 nFrom, INT32 nBytes );
+ sal_Bool Copy( sal_Int32 nFrom, sal_Int32 nBytes );
StgStrm( StgIo& );
public:
virtual ~StgStrm();
StgIo& GetIo() { return rIo; }
- INT32 GetPos() { return nPos; }
- INT32 GetStart() { return nStart; }
- INT32 GetSize() { return nSize; }
- INT32 GetPage() { return nPage; }
+ sal_Int32 GetPos() { return nPos; }
+ sal_Int32 GetStart() { return nStart; }
+ sal_Int32 GetSize() { return nSize; }
+ sal_Int32 GetPage() { return nPage; }
short GetPageSize() { return nPageSize; }
- INT32 GetPages();
+ sal_Int32 GetPages();
short GetOffset() { return nOffset;}
void SetEntry( StgDirEntry& );
- virtual BOOL SetSize( INT32 );
- virtual BOOL Pos2Page( INT32 nBytePos );
- virtual INT32 Read( void*, INT32 ) { return 0; }
- virtual INT32 Write( const void*, INT32 ) { return 0; }
- virtual StgPage* GetPhysPage( INT32 nBytePos, BOOL bForce = FALSE );
- virtual BOOL IsSmallStrm() { return FALSE; }
+ virtual sal_Bool SetSize( sal_Int32 );
+ virtual sal_Bool Pos2Page( sal_Int32 nBytePos );
+ virtual sal_Int32 Read( void*, sal_Int32 ) { return 0; }
+ virtual sal_Int32 Write( const void*, sal_Int32 ) { return 0; }
+ virtual StgPage* GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce = sal_False );
+ virtual sal_Bool IsSmallStrm() { return sal_False; }
};
// The FAT stream class provides physical access to the master FAT.
@@ -104,15 +104,15 @@ public:
// FAT allocator.
class StgFATStrm : public StgStrm { // the master FAT stream
- virtual BOOL Pos2Page( INT32 nBytePos );
- BOOL SetPage( short, INT32 );
+ virtual sal_Bool Pos2Page( sal_Int32 nBytePos );
+ sal_Bool SetPage( short, sal_Int32 );
public:
StgFATStrm( StgIo& );
virtual ~StgFATStrm() {}
using StgStrm::GetPage;
- INT32 GetPage( short, BOOL, USHORT *pnMasterAlloc = 0);
- virtual BOOL SetSize( INT32 );
- virtual StgPage* GetPhysPage( INT32 nBytePos, BOOL bForce = FALSE );
+ sal_Int32 GetPage( short, sal_Bool, sal_uInt16 *pnMasterAlloc = 0);
+ virtual sal_Bool SetSize( sal_Int32 );
+ virtual StgPage* GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce = sal_False );
};
// The stream has a size increment which normally is 1, but which can be
@@ -121,15 +121,15 @@ public:
class StgDataStrm : public StgStrm // a physical data stream
{
short nIncr; // size adjust increment
- void Init( INT32 nBgn, INT32 nLen );
+ void Init( sal_Int32 nBgn, sal_Int32 nLen );
public:
- StgDataStrm( StgIo&, INT32 nBgn, INT32 nLen=-1 );
+ StgDataStrm( StgIo&, sal_Int32 nBgn, sal_Int32 nLen=-1 );
StgDataStrm( StgIo&, StgDirEntry* );
- void* GetPtr( INT32 nPos, BOOL bForce, BOOL bDirty );
+ void* GetPtr( sal_Int32 nPos, sal_Bool bForce, sal_Bool bDirty );
void SetIncrement( short n ) { nIncr = n ; }
- virtual BOOL SetSize( INT32 );
- virtual INT32 Read( void*, INT32 );
- virtual INT32 Write( const void*, INT32 );
+ virtual sal_Bool SetSize( sal_Int32 );
+ virtual sal_Int32 Read( void*, sal_Int32 );
+ virtual sal_Int32 Write( const void*, sal_Int32 );
};
// The small stream class provides access to streams with a size < 4096 bytes.
@@ -140,13 +140,13 @@ public:
class StgSmallStrm : public StgStrm // a logical data stream
{
StgStrm* pData; // the data stream
- void Init( INT32 nBgn, INT32 nLen );
+ void Init( sal_Int32 nBgn, sal_Int32 nLen );
public:
- StgSmallStrm( StgIo&, INT32 nBgn, INT32 nLen );
+ StgSmallStrm( StgIo&, sal_Int32 nBgn, sal_Int32 nLen );
StgSmallStrm( StgIo&, StgDirEntry* );
- virtual INT32 Read( void*, INT32 );
- virtual INT32 Write( const void*, INT32 );
- virtual BOOL IsSmallStrm() { return TRUE; }
+ virtual sal_Int32 Read( void*, sal_Int32 );
+ virtual sal_Int32 Write( const void*, sal_Int32 );
+ virtual sal_Bool IsSmallStrm() { return sal_True; }
};
class StgTmpStrm : public SvMemoryStream
@@ -154,17 +154,17 @@ class StgTmpStrm : public SvMemoryStream
String aName;
SvFileStream* pStrm;
using SvMemoryStream::GetData;
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
+ virtual sal_uLong GetData( void* pData, sal_uLong nSize );
+ virtual sal_uLong PutData( const void* pData, sal_uLong nSize );
+ virtual sal_uLong SeekPos( sal_uLong nPos );
virtual void FlushData();
public:
- StgTmpStrm( ULONG=16 );
+ StgTmpStrm( sal_uLong=16 );
~StgTmpStrm();
- BOOL Copy( StgTmpStrm& );
- void SetSize( ULONG );
- ULONG GetSize() const;
+ sal_Bool Copy( StgTmpStrm& );
+ void SetSize( sal_uLong );
+ sal_uLong GetSize() const;
};
#endif
diff --git a/sot/source/sdstor/storage.cxx b/sot/source/sdstor/storage.cxx
index e09c5fc864fc..13c254e0cb4d 100644
--- a/sot/source/sdstor/storage.cxx
+++ b/sot/source/sdstor/storage.cxx
@@ -75,12 +75,12 @@ SO2_IMPL_BASIC_CLASS1_DLL(SotStorageStream,SotStorageStreamFactory,SotObject,
SO2_IMPL_INVARIANT(SotStorageStream)
-void SotStorageStream::TestMemberObjRef( BOOL /*bFree*/ )
+void SotStorageStream::TestMemberObjRef( sal_Bool /*bFree*/ )
{
}
#ifdef TEST_INVARIANT
-void SotStorageStream::TestMemberInvariant( BOOL /*bPrint*/ )
+void SotStorageStream::TestMemberInvariant( sal_Bool /*bPrint*/ )
{
}
#endif
@@ -96,12 +96,12 @@ SvLockBytesRef MakeLockBytes_Impl( const String & rName, StreamMode nMode )
if( rName.Len() )
{
SvStream * pFileStm = new SvFileStream( rName, nMode );
- xLB = new SvLockBytes( pFileStm, TRUE );
+ xLB = new SvLockBytes( pFileStm, sal_True );
}
else
{
SvStream * pCacheStm = new SvCacheStream();
- xLB = new SvLockBytes( pCacheStm, TRUE );
+ xLB = new SvLockBytes( pCacheStm, sal_True );
}
return xLB;
}
@@ -116,9 +116,9 @@ SotStorageStream::SotStorageStream( const String & rName, StreamMode nMode,
, pOwnStm( NULL )
{
if( nMode & STREAM_WRITE )
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
else
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
DBG_ASSERT( !nStorageMode,"StorageModes ignored" );
}
@@ -128,9 +128,9 @@ SotStorageStream::SotStorageStream( BaseStorageStream * pStm )
if( pStm )
{
if( STREAM_WRITE & pStm->GetMode() )
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
else
- bIsWritable = FALSE;
+ bIsWritable = sal_False;
pOwnStm = pStm;
SetError( pStm->GetError() );
@@ -139,7 +139,7 @@ SotStorageStream::SotStorageStream( BaseStorageStream * pStm )
else
{
pOwnStm = NULL;
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
SetError( SVSTREAM_INVALID_PARAMETER );
}
}
@@ -148,7 +148,7 @@ SotStorageStream::SotStorageStream()
: pOwnStm( NULL )
{
// ??? wenn Init virtuell ist, entsprechen setzen
- bIsWritable = TRUE;
+ bIsWritable = sal_True;
}
/************************************************************************
@@ -170,7 +170,7 @@ SotStorageStream::~SotStorageStream()
*************************************************************************/
void SotStorageStream::SyncSvStream()
{
- ULONG nPos = 0;
+ sal_uLong nPos = 0;
if( pOwnStm )
{
pOwnStm->Flush();
@@ -197,9 +197,9 @@ void SotStorageStream::ResetError()
|*
|* Beschreibung
*************************************************************************/
-ULONG SotStorageStream::GetData( void* pData, ULONG nSize )
+sal_uLong SotStorageStream::GetData( void* pData, sal_uLong nSize )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if( pOwnStm )
{
@@ -216,9 +216,9 @@ ULONG SotStorageStream::GetData( void* pData, ULONG nSize )
|*
|* Beschreibung
*************************************************************************/
-ULONG SotStorageStream::PutData( const void* pData, ULONG nSize )
+sal_uLong SotStorageStream::PutData( const void* pData, sal_uLong nSize )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if( pOwnStm )
{
@@ -235,9 +235,9 @@ ULONG SotStorageStream::PutData( const void* pData, ULONG nSize )
|*
|* Beschreibung
*************************************************************************/
-ULONG SotStorageStream::SeekPos( ULONG nPos )
+sal_uLong SotStorageStream::SeekPos( sal_uLong nPos )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
if( pOwnStm )
{
@@ -270,9 +270,9 @@ void SotStorageStream::FlushData()
|*
|* Beschreibung
*************************************************************************/
-void SotStorageStream::SetSize( ULONG nNewSize )
+void SotStorageStream::SetSize( sal_uLong nNewSize )
{
- ULONG nPos = Tell();
+ sal_uLong nPos = Tell();
if( pOwnStm )
{
pOwnStm->SetSize( nNewSize );
@@ -295,11 +295,11 @@ void SotStorageStream::SetSize( ULONG nNewSize )
|* Beschreibung
|*
*************************************************************************/
-UINT32 SotStorageStream::GetSize() const
+sal_uInt32 SotStorageStream::GetSize() const
{
- ULONG nPos = Tell();
+ sal_uLong nPos = Tell();
((SotStorageStream *)this)->Seek( STREAM_SEEK_TO_END );
- ULONG nSize = Tell();
+ sal_uLong nSize = Tell();
((SotStorageStream *)this)->Seek( nPos );
return nSize;
}
@@ -309,19 +309,19 @@ UINT32 SotStorageStream::GetSize() const
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorageStream::CopyTo( SotStorageStream * pDestStm )
+sal_Bool SotStorageStream::CopyTo( SotStorageStream * pDestStm )
{
Flush(); // alle Daten schreiben
pDestStm->ClearBuffer();
if( !pOwnStm || !pDestStm->pOwnStm )
{ // Wenn Ole2 oder nicht nur eigene StorageStreams
- ULONG nPos = Tell(); // Position merken
+ sal_uLong nPos = Tell(); // Position merken
Seek( 0L );
pDestStm->SetSize( 0 ); // Ziel-Stream leeren
- void * pMem = new BYTE[ 8192 ];
- ULONG nRead;
+ void * pMem = new sal_uInt8[ 8192 ];
+ sal_uLong nRead;
while( 0 != (nRead = Read( pMem, 8192 )) )
{
if( nRead != pDestStm->Write( pMem, nRead ) )
@@ -330,7 +330,7 @@ BOOL SotStorageStream::CopyTo( SotStorageStream * pDestStm )
break;
}
}
- delete [] static_cast<BYTE*>(pMem);
+ delete [] static_cast<sal_uInt8*>(pMem);
// Position setzen
pDestStm->Seek( nPos );
Seek( nPos );
@@ -361,7 +361,7 @@ BOOL SotStorageStream::CopyTo( SotStorageStream * pDestStm )
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorageStream::Commit()
+sal_Bool SotStorageStream::Commit()
{
if( pOwnStm )
{
@@ -373,7 +373,7 @@ BOOL SotStorageStream::Commit()
return GetError() == SVSTREAM_OK;
}
-BOOL SotStorageStream::Revert()
+sal_Bool SotStorageStream::Revert()
{
if( !pOwnStm )
{
@@ -383,7 +383,7 @@ BOOL SotStorageStream::Revert()
return GetError() == SVSTREAM_OK;
}
-BOOL SotStorageStream::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
+sal_Bool SotStorageStream::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
{
UCBStorageStream* pStg = PTR_CAST( UCBStorageStream, pOwnStm );
if ( pStg )
@@ -393,11 +393,11 @@ BOOL SotStorageStream::SetProperty( const String& rName, const ::com::sun::star:
else
{
DBG_ERROR("Not implemented!");
- return FALSE;
+ return sal_False;
}
}
-BOOL SotStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool SotStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
{
UCBStorageStream* pStg = PTR_CAST( UCBStorageStream, pOwnStm );
if ( pStg )
@@ -407,7 +407,7 @@ BOOL SotStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::
else
{
DBG_ERROR("Not implemented!");
- return FALSE;
+ return sal_False;
}
}
@@ -454,12 +454,12 @@ SO2_IMPL_INVARIANT(SotStorage)
|*
|* Beschreibung
*************************************************************************/
-void SotStorage::TestMemberObjRef( BOOL /*bFree*/ )
+void SotStorage::TestMemberObjRef( sal_Bool /*bFree*/ )
{
}
#ifdef TEST_INVARIANT
-void SotStorage::TestMemberInvariant( BOOL /*bPrint*/ )
+void SotStorage::TestMemberInvariant( sal_Bool /*bPrint*/ )
{
}
#endif
@@ -471,7 +471,7 @@ void SotStorage::TestMemberInvariant( BOOL /*bPrint*/ )
|* Beschreibung Es muss ein I... Objekt an SvObject uebergeben
|* werden, da es sonst selbst ein IUnknown anlegt und
|* festlegt, dass alle weiteren I... Objekte mit
-|* delete zerstoert werden (Owner() == TRUE).
+|* delete zerstoert werden (Owner() == sal_True).
|* Es werden aber nur IStorage Objekte benutzt und nicht
|* selbst implementiert, deshalb wird so getan, als ob
|* das IStorage Objekt von aussen kam und es wird mit
@@ -491,8 +491,8 @@ void SotStorage::TestMemberInvariant( BOOL /*bPrint*/ )
: m_pOwnStg( NULL ) \
, m_pStorStm( NULL ) \
, m_nError( SVSTREAM_OK ) \
- , m_bIsRoot( FALSE ) \
- , m_bDelStm( FALSE ) \
+ , m_bIsRoot( sal_False ) \
+ , m_bDelStm( sal_False ) \
, m_nVersion( SOFFICE_FILEFORMAT_CURRENT )
SotStorage::SotStorage()
@@ -510,7 +510,7 @@ SotStorage::SotStorage( const ::ucbhelper::Content& rContent, const String & rNa
INIT_SotStorage()
{
m_aName = rName; // Namen merken
- m_pOwnStg = new UCBStorage( rContent, m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new UCBStorage( rContent, m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
SetError( m_pOwnStg->GetError() );
@@ -524,12 +524,12 @@ SotStorage::SotStorage( const String & rName, StreamMode nMode, StorageMode nSto
INIT_SotStorage()
{
m_aName = rName; // Namen merken
- CreateStorage( TRUE, nMode, nStorageMode );
+ CreateStorage( sal_True, nMode, nStorageMode );
if ( IsOLEStorage() )
m_nVersion = SOFFICE_FILEFORMAT_50;
}
-void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, StorageMode nStorageMode )
+void SotStorage::CreateStorage( sal_Bool bForceUCBStorage, StreamMode nMode, StorageMode nStorageMode )
{
DBG_ASSERT( !m_pStorStm && !m_pOwnStg, "Use only in ctor!" );
if( m_aName.Len() )
@@ -555,11 +555,11 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
if ( aURL.Len() )
{
::ucbhelper::Content aContent( aURL, ::com::sun::star::uno::Reference < ::com::sun::star::ucb::XCommandEnvironment >() );
- m_pOwnStg = new UCBStorage( aContent, aURL, nMode, FALSE );
+ m_pOwnStg = new UCBStorage( aContent, aURL, nMode, sal_False );
}
else
{
- m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
SetError( ERRCODE_IO_NOTSUPPORTED );
}
}
@@ -573,7 +573,7 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
if ( m_pStorStm )
{
// try as UCBStorage, next try as OLEStorage
- BOOL bIsUCBStorage = UCBStorage::IsStorageFile( m_pStorStm );
+ sal_Bool bIsUCBStorage = UCBStorage::IsStorageFile( m_pStorStm );
if ( !bIsUCBStorage && bForceUCBStorage )
// if UCBStorage has priority, it should not be used only if it is really an OLEStorage
bIsUCBStorage = !Storage::IsStorageFile( m_pStorStm );
@@ -583,8 +583,8 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
if ( UCBStorage::GetLinkedFile( *m_pStorStm ).Len() )
{
// detect special unpacked storages
- m_pOwnStg = new UCBStorage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
- m_bDelStm = TRUE;
+ m_pOwnStg = new UCBStorage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
+ m_bDelStm = sal_True;
}
else
{
@@ -594,24 +594,24 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
// UCBStorage always works directly on the UCB content, so discard the stream first
DELETEZ( m_pStorStm );
- m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
}
}
else
{
// OLEStorage can be opened with a stream
- m_pOwnStg = new Storage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
- m_bDelStm = TRUE;
+ m_pOwnStg = new Storage( *m_pStorStm, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
+ m_bDelStm = sal_True;
}
}
else if ( bForceUCBStorage )
{
- m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
SetError( ERRCODE_IO_NOTSUPPORTED );
}
else
{
- m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
SetError( ERRCODE_IO_NOTSUPPORTED );
}
}
@@ -620,9 +620,9 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
{
// temporary storage
if ( bForceUCBStorage )
- m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new UCBStorage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
else
- m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ m_pOwnStg = new Storage( m_aName, nMode, (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
m_aName = m_pOwnStg->GetName();
}
@@ -631,7 +631,7 @@ void SotStorage::CreateStorage( BOOL bForceUCBStorage, StreamMode nMode, Storage
SignAsRoot( m_pOwnStg->IsRoot() );
}
-SotStorage::SotStorage( BOOL bUCBStorage, const String & rName, StreamMode nMode, StorageMode nStorageMode )
+SotStorage::SotStorage( sal_Bool bUCBStorage, const String & rName, StreamMode nMode, StorageMode nStorageMode )
INIT_SotStorage()
{
m_aName = rName;
@@ -651,22 +651,22 @@ SotStorage::SotStorage( BaseStorage * pStor )
}
m_pOwnStg = pStor;
- ULONG nErr = m_pOwnStg ? m_pOwnStg->GetError() : SVSTREAM_CANNOT_MAKE;
+ sal_uLong nErr = m_pOwnStg ? m_pOwnStg->GetError() : SVSTREAM_CANNOT_MAKE;
SetError( nErr );
if ( IsOLEStorage() )
m_nVersion = SOFFICE_FILEFORMAT_50;
}
-SotStorage::SotStorage( BOOL bUCBStorage, SvStream & rStm )
+SotStorage::SotStorage( sal_Bool bUCBStorage, SvStream & rStm )
INIT_SotStorage()
{
SetError( rStm.GetError() );
// try as UCBStorage, next try as OLEStorage
if ( UCBStorage::IsStorageFile( &rStm ) || bUCBStorage )
- m_pOwnStg = new UCBStorage( rStm, FALSE );
+ m_pOwnStg = new UCBStorage( rStm, sal_False );
else
- m_pOwnStg = new Storage( rStm, FALSE );
+ m_pOwnStg = new Storage( rStm, sal_False );
SetError( m_pOwnStg->GetError() );
@@ -683,9 +683,9 @@ SotStorage::SotStorage( SvStream & rStm )
// try as UCBStorage, next try as OLEStorage
if ( UCBStorage::IsStorageFile( &rStm ) )
- m_pOwnStg = new UCBStorage( rStm, FALSE );
+ m_pOwnStg = new UCBStorage( rStm, sal_False );
else
- m_pOwnStg = new Storage( rStm, FALSE );
+ m_pOwnStg = new Storage( rStm, sal_False );
SetError( m_pOwnStg->GetError() );
@@ -695,16 +695,16 @@ SotStorage::SotStorage( SvStream & rStm )
SignAsRoot( m_pOwnStg->IsRoot() );
}
-SotStorage::SotStorage( SvStream * pStm, BOOL bDelete )
+SotStorage::SotStorage( SvStream * pStm, sal_Bool bDelete )
INIT_SotStorage()
{
SetError( pStm->GetError() );
// try as UCBStorage, next try as OLEStorage
if ( UCBStorage::IsStorageFile( pStm ) )
- m_pOwnStg = new UCBStorage( *pStm, FALSE );
+ m_pOwnStg = new UCBStorage( *pStm, sal_False );
else
- m_pOwnStg = new Storage( *pStm, FALSE );
+ m_pOwnStg = new Storage( *pStm, sal_False );
SetError( m_pOwnStg->GetError() );
@@ -798,7 +798,7 @@ uno::Reference< embed::XStorage > SotStorage::GetUNOAPIDuplicate( const String&
UCBStorage* pChildUCBStg = PTR_CAST( UCBStorage, pChildStorage->m_pOwnStg );
if ( pChildUCBStg )
{
- UCBStorage* pTempStorage = new UCBStorage( pTempFile->GetURL(), STREAM_WRITE, FALSE, TRUE );
+ UCBStorage* pTempStorage = new UCBStorage( pTempFile->GetURL(), STREAM_WRITE, sal_False, sal_True );
if ( pTempStorage )
{
pChildUCBStg->CopyTo( pTempStorage );
@@ -896,7 +896,7 @@ SvMemoryStream * SotStorage::CreateMemoryStream()
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::IsStorageFile( const String & rFileName )
+sal_Bool SotStorage::IsStorageFile( const String & rFileName )
{
String aName( rFileName );
INetURLObject aObj( aName );
@@ -909,25 +909,25 @@ BOOL SotStorage::IsStorageFile( const String & rFileName )
}
SvStream * pStm = ::utl::UcbStreamHelper::CreateStream( aName, STREAM_STD_READ );
- BOOL bRet = SotStorage::IsStorageFile( pStm );
+ sal_Bool bRet = SotStorage::IsStorageFile( pStm );
delete pStm;
return bRet;
}
-BOOL SotStorage::IsStorageFile( SvStream* pStream )
+sal_Bool SotStorage::IsStorageFile( SvStream* pStream )
{
/** code for new storages must come first! **/
if ( pStream )
{
long nPos = pStream->Tell();
- BOOL bRet = UCBStorage::IsStorageFile( pStream );
+ sal_Bool bRet = UCBStorage::IsStorageFile( pStream );
if ( !bRet )
bRet = Storage::IsStorageFile( pStream );
pStream->Seek( nPos );
return bRet;
}
else
- return FALSE;
+ return sal_False;
}
/*************************************************************************
|* SotStorage::GetStorage()
@@ -973,7 +973,7 @@ void SotStorage::ResetError()
|* Beschreibung
*************************************************************************/
void SotStorage::SetClass( const SvGlobalName & rName,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName )
{
DBG_ASSERT( Owner(), "must be owner" );
@@ -984,7 +984,7 @@ void SotStorage::SetClass( const SvGlobalName & rName,
}
void SotStorage::SetConvertClass( const SvGlobalName & rName,
- ULONG nOriginalClipFormat,
+ sal_uLong nOriginalClipFormat,
const String & rUserTypeName )
{
DBG_ASSERT( Owner(), "must be owner" );
@@ -1013,9 +1013,9 @@ SvGlobalName SotStorage::GetClassName()
return aGN;
}
-ULONG SotStorage::GetFormat()
+sal_uLong SotStorage::GetFormat()
{
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
nFormat = m_pOwnStg->GetFormat();
@@ -1035,14 +1035,14 @@ String SotStorage::GetUserName()
return aName;
}
-BOOL SotStorage::ShouldConvert()
+sal_Bool SotStorage::ShouldConvert()
{
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
return m_pOwnStg->ShouldConvert();
else
SetError( SVSTREAM_GENERALERROR );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1062,7 +1062,7 @@ void SotStorage::FillInfoList( SvStorageInfoList * pFillList ) const
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::CopyTo( SotStorage * pDestStg )
+sal_Bool SotStorage::CopyTo( SotStorage * pDestStg )
{
DBG_ASSERT( Owner(), "must be owner" );
DBG_ASSERT( pDestStg->Owner(), "must be owner" );
@@ -1083,7 +1083,7 @@ BOOL SotStorage::CopyTo( SotStorage * pDestStg )
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::Commit()
+sal_Bool SotStorage::Commit()
{
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
@@ -1101,7 +1101,7 @@ BOOL SotStorage::Commit()
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::Revert()
+sal_Bool SotStorage::Revert()
{
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
@@ -1133,7 +1133,7 @@ SotStorageStream * SotStorage::OpenEncryptedSotStream( const String & rEleName,
nMode |= STREAM_SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError();
BaseStorageStream* p = m_pOwnStg->OpenStream( rEleName, nMode,
- (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE, &rKey );
+ (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True, &rKey );
pStm = new SotStorageStream( p );
if( !nE )
@@ -1160,7 +1160,7 @@ SotStorageStream * SotStorage::OpenSotStream( const String & rEleName,
nMode |= STREAM_SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError();
BaseStorageStream * p = m_pOwnStg->OpenStream( rEleName, nMode,
- (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
pStm = new SotStorageStream( p );
if( !nE )
@@ -1189,7 +1189,7 @@ SotStorage * SotStorage::OpenSotStorage( const String & rEleName,
nMode |= STREAM_SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError();
BaseStorage * p = m_pOwnStg->OpenStorage( rEleName, nMode,
- (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
if( p )
{
pStor = new SotStorage( p );
@@ -1216,7 +1216,7 @@ SotStorage * SotStorage::OpenUCBStorage( const String & rEleName,
nMode |= STREAM_SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError();
BaseStorage * p = m_pOwnStg->OpenUCBStorage( rEleName, nMode,
- (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
pStor = new SotStorage( p );
if( !nE )
m_pOwnStg->ResetError(); // kein Fehler setzen
@@ -1237,7 +1237,7 @@ SotStorage * SotStorage::OpenOLEStorage( const String & rEleName,
nMode |= STREAM_SHARE_DENYALL;
ErrCode nE = m_pOwnStg->GetError();
BaseStorage * p = m_pOwnStg->OpenOLEStorage( rEleName, nMode,
- (nStorageMode & STORAGE_TRANSACTED) ? FALSE : TRUE );
+ (nStorageMode & STORAGE_TRANSACTED) ? sal_False : sal_True );
pStor = new SotStorage( p );
if( !nE )
m_pOwnStg->ResetError(); // kein Fehler setzen
@@ -1254,31 +1254,31 @@ SotStorage * SotStorage::OpenOLEStorage( const String & rEleName,
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::IsStorage( const String & rEleName ) const
+sal_Bool SotStorage::IsStorage( const String & rEleName ) const
{
DBG_ASSERT( Owner(), "must be owner" );
// ein bisschen schneller
if( m_pOwnStg )
return m_pOwnStg->IsStorage( rEleName );
- return FALSE;
+ return sal_False;
}
-BOOL SotStorage::IsStream( const String & rEleName ) const
+sal_Bool SotStorage::IsStream( const String & rEleName ) const
{
DBG_ASSERT( Owner(), "must be owner" );
// ein bisschen schneller
if( m_pOwnStg )
return m_pOwnStg->IsStream( rEleName );
- return FALSE;
+ return sal_False;
}
-BOOL SotStorage::IsContained( const String & rEleName ) const
+sal_Bool SotStorage::IsContained( const String & rEleName ) const
{
DBG_ASSERT( Owner(), "must be owner" );
// ein bisschen schneller
if( m_pOwnStg )
return m_pOwnStg->IsContained( rEleName );
- return FALSE;
+ return sal_False;
}
/*************************************************************************
@@ -1286,7 +1286,7 @@ BOOL SotStorage::IsContained( const String & rEleName ) const
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::Remove( const String & rEleName )
+sal_Bool SotStorage::Remove( const String & rEleName )
{
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
@@ -1304,7 +1304,7 @@ BOOL SotStorage::Remove( const String & rEleName )
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::Rename( const String & rEleName, const String & rNewName )
+sal_Bool SotStorage::Rename( const String & rEleName, const String & rNewName )
{
DBG_ASSERT( Owner(), "must be owner" );
if( m_pOwnStg )
@@ -1322,7 +1322,7 @@ BOOL SotStorage::Rename( const String & rEleName, const String & rNewName )
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::CopyTo( const String & rEleName,
+sal_Bool SotStorage::CopyTo( const String & rEleName,
SotStorage * pNewSt, const String & rNewName )
{
DBG_ASSERT( Owner(), "must be owner" );
@@ -1343,7 +1343,7 @@ BOOL SotStorage::CopyTo( const String & rEleName,
|*
|* Beschreibung
*************************************************************************/
-BOOL SotStorage::MoveTo( const String & rEleName,
+sal_Bool SotStorage::MoveTo( const String & rEleName,
SotStorage * pNewSt, const String & rNewName )
{
DBG_ASSERT( Owner(), "must be owner" );
@@ -1378,16 +1378,16 @@ SvStream* SotStorage::GetTargetSvStream() const
}
-BOOL SotStorage::Validate()
+sal_Bool SotStorage::Validate()
{
DBG_ASSERT( m_bIsRoot, "Validate nur an Rootstorage" );
if( m_pOwnStg )
return m_pOwnStg->ValidateFAT();
else
- return TRUE;
+ return sal_True;
}
-BOOL SotStorage::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
+sal_Bool SotStorage::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
{
UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg );
if ( pStg )
@@ -1397,11 +1397,11 @@ BOOL SotStorage::SetProperty( const String& rName, const ::com::sun::star::uno::
else
{
DBG_WARNING("W1:Not implemented!");
- return FALSE;
+ return sal_False;
}
}
-BOOL SotStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool SotStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
{
UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg );
if ( pStg )
@@ -1411,20 +1411,20 @@ BOOL SotStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& r
else if ( rName.CompareToAscii("MediaType") == COMPARE_EQUAL )
{
String aStr = SotExchange::GetFormatMimeType( GetFormat() );
- USHORT nPos = aStr.Search(';');
+ sal_uInt16 nPos = aStr.Search(';');
if ( nPos != STRING_NOTFOUND )
aStr = aStr.Copy( 0, nPos );
rValue <<= (::rtl::OUString) aStr;
- return TRUE;
+ return sal_True;
}
else
{
DBG_WARNING("W1:Not implemented!");
- return FALSE;
+ return sal_False;
}
}
-BOOL SotStorage::GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool SotStorage::GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue )
{
UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg );
if ( pStg )
@@ -1434,22 +1434,22 @@ BOOL SotStorage::GetProperty( const String& rEleName, const String& rName, ::com
else
{
DBG_WARNING("W1:Not implemented!");
- return FALSE;
+ return sal_False;
}
}
-BOOL SotStorage::IsOLEStorage() const
+sal_Bool SotStorage::IsOLEStorage() const
{
UCBStorage* pStg = PTR_CAST( UCBStorage, m_pOwnStg );
return !pStg;
}
-BOOL SotStorage::IsOLEStorage( const String & rFileName )
+sal_Bool SotStorage::IsOLEStorage( const String & rFileName )
{
return Storage::IsStorageFile( rFileName );
}
-BOOL SotStorage::IsOLEStorage( SvStream* pStream )
+sal_Bool SotStorage::IsOLEStorage( SvStream* pStream )
{
return Storage::IsStorageFile( pStream );
}
@@ -1506,7 +1506,7 @@ SotStorage* SotStorage::OpenOLEStorage( const com::sun::star::uno::Reference < c
pStream->SetError( ERRCODE_IO_GENERAL );
}
- return new SotStorage( pStream, TRUE );
+ return new SotStorage( pStream, sal_True );
}
sal_Int32 SotStorage::GetFormatID( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage )
diff --git a/sot/source/sdstor/storinfo.cxx b/sot/source/sdstor/storinfo.cxx
index f912dc6fc83f..383d2f20d1c5 100644
--- a/sot/source/sdstor/storinfo.cxx
+++ b/sot/source/sdstor/storinfo.cxx
@@ -39,7 +39,7 @@ PRV_SV_IMPL_OWNER_LIST(SvStorageInfoList,SvStorageInfo)
const SvStorageInfo * SvStorageInfoList::Get( const String & rEleName )
{
- for( ULONG i = 0; i < Count(); i++ )
+ for( sal_uLong i = 0; i < Count(); i++ )
{
const SvStorageInfo & rType = GetObject( i );
if( rType.GetName() == rEleName )
@@ -50,10 +50,10 @@ const SvStorageInfo * SvStorageInfoList::Get( const String & rEleName )
/************** class SvStorageInfo **************************************
*************************************************************************/
-ULONG ReadClipboardFormat( SvStream & rStm )
+sal_uLong ReadClipboardFormat( SvStream & rStm )
{
sal_uInt32 nFormat = 0;
- INT32 nLen = 0;
+ sal_Int32 nLen = 0;
rStm >> nLen;
if( rStm.IsEof() )
rStm.SetError( SVSTREAM_GENERALERROR );
@@ -61,7 +61,7 @@ ULONG ReadClipboardFormat( SvStream & rStm )
{
// get a string name
sal_Char * p = new sal_Char[ nLen ];
- if( rStm.Read( p, nLen ) == (ULONG) nLen )
+ if( rStm.Read( p, nLen ) == (sal_uLong) nLen )
{
nFormat = SotExchange::RegisterFormatName( String::CreateFromAscii( p, short(nLen-1) ) );
}
@@ -88,7 +88,7 @@ ULONG ReadClipboardFormat( SvStream & rStm )
return nFormat;
}
-void WriteClipboardFormat( SvStream & rStm, ULONG nFormat )
+void WriteClipboardFormat( SvStream & rStm, sal_uLong nFormat )
{
// determine the clipboard format string
String aCbFmt;
@@ -97,15 +97,15 @@ void WriteClipboardFormat( SvStream & rStm, ULONG nFormat )
if( aCbFmt.Len() )
{
ByteString aAsciiCbFmt( aCbFmt, RTL_TEXTENCODING_ASCII_US );
- rStm << (INT32) (aAsciiCbFmt.Len() + 1);
+ rStm << (sal_Int32) (aAsciiCbFmt.Len() + 1);
rStm << (const char *)aAsciiCbFmt.GetBuffer();
- rStm << (UINT8) 0;
+ rStm << (sal_uInt8) 0;
}
else if( nFormat )
- rStm << (INT32) -1 // for Windows
- << (INT32) nFormat;
+ rStm << (sal_Int32) -1 // for Windows
+ << (sal_Int32) nFormat;
else
- rStm << (INT32) 0; // no clipboard format
+ rStm << (sal_Int32) 0; // no clipboard format
}
diff --git a/sot/source/sdstor/ucbstorage.cxx b/sot/source/sdstor/ucbstorage.cxx
index 4f265490a05e..532877117329 100644
--- a/sot/source/sdstor/ucbstorage.cxx
+++ b/sot/source/sdstor/ucbstorage.cxx
@@ -443,10 +443,10 @@ class UCBStorageStream_Impl : public SvRefBase, public SvStream
~UCBStorageStream_Impl();
public:
- virtual ULONG GetData( void* pData, ULONG nSize );
- virtual ULONG PutData( const void* pData, ULONG nSize );
- virtual ULONG SeekPos( ULONG nPos );
- virtual void SetSize( ULONG nSize );
+ virtual sal_uLong GetData( void* pData, sal_uLong nSize );
+ virtual sal_uLong PutData( const void* pData, sal_uLong nSize );
+ virtual sal_uLong SeekPos( sal_uLong nPos );
+ virtual void SetSize( sal_uLong nSize );
virtual void FlushData();
virtual void ResetError();
@@ -466,35 +466,35 @@ public:
RepresentModes m_nRepresentMode; // should it be used as XInputStream or as SvStream
long m_nError;
StreamMode m_nMode; // open mode ( read/write/trunc/nocreate/sharing )
- BOOL m_bSourceRead; // Source still contains useful information
- BOOL m_bModified; // only modified streams will be sent to the original content
- BOOL m_bCommited; // sending the streams is coordinated by the root storage of the package
- BOOL m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
+ sal_Bool m_bSourceRead; // Source still contains useful information
+ sal_Bool m_bModified; // only modified streams will be sent to the original content
+ sal_Bool m_bCommited; // sending the streams is coordinated by the root storage of the package
+ sal_Bool m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
// this means that the root storage does an autocommit when its external
// reference is destroyed
- BOOL m_bIsOLEStorage;// an OLEStorage on a UCBStorageStream makes this an Autocommit-stream
+ sal_Bool m_bIsOLEStorage;// an OLEStorage on a UCBStorageStream makes this an Autocommit-stream
- UCBStorageStream_Impl( const String&, StreamMode, UCBStorageStream*, BOOL, const ByteString* pKey=0, BOOL bRepair = FALSE, Reference< XProgressHandler > xProgress = Reference< XProgressHandler >() );
+ UCBStorageStream_Impl( const String&, StreamMode, UCBStorageStream*, sal_Bool, const ByteString* pKey=0, sal_Bool bRepair = sal_False, Reference< XProgressHandler > xProgress = Reference< XProgressHandler >() );
void Free();
- BOOL Init();
- BOOL Clear();
+ sal_Bool Init();
+ sal_Bool Clear();
sal_Int16 Commit(); // if modified and commited: transfer an XInputStream to the content
- BOOL Revert(); // discard all changes
+ sal_Bool Revert(); // discard all changes
BaseStorage* CreateStorage();// create an OLE Storage on the UCBStorageStream
- ULONG GetSize();
+ sal_uLong GetSize();
- ULONG ReadSourceWriteTemporary( ULONG aLength ); // read aLength from source and copy to temporary,
+ sal_uLong ReadSourceWriteTemporary( sal_uLong aLength ); // read aLength from source and copy to temporary,
// no seeking is produced
- ULONG ReadSourceWriteTemporary(); // read source till the end and copy to temporary,
+ sal_uLong ReadSourceWriteTemporary(); // read source till the end and copy to temporary,
// no seeking is produced
#if 0
- ULONG CopySourceToTemporary( ULONG aLength ); // same as ReadSourceWriteToTemporary( aLength )
+ sal_uLong CopySourceToTemporary( sal_uLong aLength ); // same as ReadSourceWriteToTemporary( aLength )
// but the writing is done at the end of temporary
// pointer position is not changed
#endif
- ULONG CopySourceToTemporary(); // same as ReadSourceWriteToTemporary()
+ sal_uLong CopySourceToTemporary(); // same as ReadSourceWriteToTemporary()
// but the writing is done at the end of temporary
// pointer position is not changed
Reference<XInputStream> GetXInputStream(); // return XInputStream, after that
@@ -527,34 +527,34 @@ public:
//SvStream* m_pStream; // the corresponding editable stream, only for storage on a stream
long m_nError;
StreamMode m_nMode; // open mode ( read/write/trunc/nocreate/sharing )
- BOOL m_bModified; // only modified elements will be sent to the original content
- BOOL m_bCommited; // sending the streams is coordinated by the root storage of the package
- BOOL m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
+ sal_Bool m_bModified; // only modified elements will be sent to the original content
+ sal_Bool m_bCommited; // sending the streams is coordinated by the root storage of the package
+ sal_Bool m_bDirect; // the storage and its streams are opened in direct mode; for UCBStorages
// this means that the root storage does an autocommit when its external
// reference is destroyed
- BOOL m_bIsRoot; // marks this storage as root storages that manages all oommits and reverts
- BOOL m_bDirty; // ???
- BOOL m_bIsLinked;
- BOOL m_bListCreated;
- ULONG m_nFormat;
+ sal_Bool m_bIsRoot; // marks this storage as root storages that manages all oommits and reverts
+ sal_Bool m_bDirty; // ???
+ sal_Bool m_bIsLinked;
+ sal_Bool m_bListCreated;
+ sal_uLong m_nFormat;
String m_aUserTypeName;
SvGlobalName m_aClassId;
UCBStorageElementList_Impl m_aChildrenList;
- BOOL m_bRepairPackage;
+ sal_Bool m_bRepairPackage;
Reference< XProgressHandler > m_xProgressHandler;
UNOStorageHolderList* m_pUNOStorageHolderList;
- UCBStorage_Impl( const ::ucbhelper::Content&, const String&, StreamMode, UCBStorage*, BOOL, BOOL, BOOL = FALSE, Reference< XProgressHandler > = Reference< XProgressHandler >() );
- UCBStorage_Impl( const String&, StreamMode, UCBStorage*, BOOL, BOOL, BOOL = FALSE, Reference< XProgressHandler > = Reference< XProgressHandler >() );
- UCBStorage_Impl( SvStream&, UCBStorage*, BOOL );
+ UCBStorage_Impl( const ::ucbhelper::Content&, const String&, StreamMode, UCBStorage*, sal_Bool, sal_Bool, sal_Bool = sal_False, Reference< XProgressHandler > = Reference< XProgressHandler >() );
+ UCBStorage_Impl( const String&, StreamMode, UCBStorage*, sal_Bool, sal_Bool, sal_Bool = sal_False, Reference< XProgressHandler > = Reference< XProgressHandler >() );
+ UCBStorage_Impl( SvStream&, UCBStorage*, sal_Bool );
void Init();
sal_Int16 Commit();
- BOOL Revert();
- BOOL Insert( ::ucbhelper::Content *pContent );
- UCBStorage_Impl* OpenStorage( UCBStorageElement_Impl* pElement, StreamMode nMode, BOOL bDirect );
- UCBStorageStream_Impl* OpenStream( UCBStorageElement_Impl*, StreamMode, BOOL, const ByteString* pKey=0 );
+ sal_Bool Revert();
+ sal_Bool Insert( ::ucbhelper::Content *pContent );
+ UCBStorage_Impl* OpenStorage( UCBStorageElement_Impl* pElement, StreamMode nMode, sal_Bool bDirect );
+ UCBStorageStream_Impl* OpenStream( UCBStorageElement_Impl*, StreamMode, sal_Bool, const ByteString* pKey=0 );
void SetProps( const Sequence < Sequence < PropertyValue > >& rSequence, const String& );
void GetProps( sal_Int32&, Sequence < Sequence < PropertyValue > >& rSequence, const String& );
sal_Int32 GetObjectCount();
@@ -589,32 +589,32 @@ struct UCBStorageElement_Impl
{
String m_aName; // the actual URL relative to the root "folder"
String m_aOriginalName;// the original name in the content
- ULONG m_nSize;
- BOOL m_bIsFolder; // Only TRUE when it is a UCBStorage !
- BOOL m_bIsStorage; // Also TRUE when it is an OLEStorage !
- BOOL m_bIsRemoved; // element will be removed on commit
- BOOL m_bIsInserted; // element will be removed on revert
+ sal_uLong m_nSize;
+ sal_Bool m_bIsFolder; // Only sal_True when it is a UCBStorage !
+ sal_Bool m_bIsStorage; // Also sal_True when it is an OLEStorage !
+ sal_Bool m_bIsRemoved; // element will be removed on commit
+ sal_Bool m_bIsInserted; // element will be removed on revert
UCBStorage_ImplRef m_xStorage; // reference to the "real" storage
UCBStorageStream_ImplRef m_xStream; // reference to the "real" stream
UCBStorageElement_Impl( const ::rtl::OUString& rName,
- BOOL bIsFolder = FALSE, ULONG nSize = 0 )
+ sal_Bool bIsFolder = sal_False, sal_uLong nSize = 0 )
: m_aName( rName )
, m_aOriginalName( rName )
, m_nSize( nSize )
, m_bIsFolder( bIsFolder )
, m_bIsStorage( bIsFolder )
- , m_bIsRemoved( FALSE )
- , m_bIsInserted( FALSE )
+ , m_bIsRemoved( sal_False )
+ , m_bIsInserted( sal_False )
{
}
::ucbhelper::Content* GetContent();
- BOOL IsModified();
+ sal_Bool IsModified();
String GetContentType();
void SetContentType( const String& );
String GetOriginalContentType();
- BOOL IsLoaded()
+ sal_Bool IsLoaded()
{ return m_xStream.Is() || m_xStorage.Is(); }
};
@@ -664,9 +664,9 @@ String UCBStorageElement_Impl::GetOriginalContentType()
return String();
}
-BOOL UCBStorageElement_Impl::IsModified()
+sal_Bool UCBStorageElement_Impl::IsModified()
{
- BOOL bModified = m_bIsRemoved || m_bIsInserted || m_aName != m_aOriginalName;
+ sal_Bool bModified = m_bIsRemoved || m_bIsInserted || m_aName != m_aOriginalName;
if ( bModified )
{
if ( m_xStream.Is() )
@@ -678,7 +678,7 @@ BOOL UCBStorageElement_Impl::IsModified()
return bModified;
}
-UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nMode, UCBStorageStream* pStream, BOOL bDirect, const ByteString* pKey, BOOL bRepair, Reference< XProgressHandler > xProgress )
+UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nMode, UCBStorageStream* pStream, sal_Bool bDirect, const ByteString* pKey, sal_Bool bRepair, Reference< XProgressHandler > xProgress )
: m_pAntiImpl( pStream )
, m_aURL( rName )
, m_pContent( NULL )
@@ -687,10 +687,10 @@ UCBStorageStream_Impl::UCBStorageStream_Impl( const String& rName, StreamMode nM
, m_nError( 0 )
, m_nMode( nMode )
, m_bSourceRead( !( nMode & STREAM_TRUNC ) )
- , m_bModified( FALSE )
- , m_bCommited( FALSE )
+ , m_bModified( sal_False )
+ , m_bCommited( sal_False )
, m_bDirect( bDirect )
- , m_bIsOLEStorage( FALSE )
+ , m_bIsOLEStorage( sal_False )
{
// name is last segment in URL
INetURLObject aObj( rName );
@@ -775,7 +775,7 @@ Reference<XInputStream> UCBStorageStream_Impl::GetXInputStream()
CopySourceToTemporary();
// owner transfer of stream to wrapper
- aResult = new ::utl::OInputStreamWrapper( m_pStream, TRUE );
+ aResult = new ::utl::OInputStreamWrapper( m_pStream, sal_True );
m_pStream->Seek(0);
if( aResult.is() )
@@ -812,13 +812,13 @@ Reference<XInputStream> UCBStorageStream_Impl::GetXInputStream()
return aResult;
}
-BOOL UCBStorageStream_Impl::Init()
+sal_Bool UCBStorageStream_Impl::Init()
{
if( m_nRepresentMode == xinputstream )
{
DBG_ERROR( "XInputStream misuse!" );
SetError( ERRCODE_IO_ACCESSDENIED );
- return FALSE;
+ return sal_False;
}
if( !m_pStream )
@@ -840,7 +840,7 @@ BOOL UCBStorageStream_Impl::Init()
{
DBG_ERROR( "Suspicious temporary stream creation!" );
SetError( SVSTREAM_CANNOT_MAKE );
- return FALSE;
+ return sal_False;
}
SetError( m_pStream->GetError() );
@@ -871,12 +871,12 @@ BOOL UCBStorageStream_Impl::Init()
catch( BufferSizeExceededException& )
{
// the temporary stream already contain all the data
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
}
catch( Exception& )
{
// something is really wrong
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
DBG_ERROR( "Can not operate original stream!" );
SetError( SVSTREAM_CANNOT_MAKE );
}
@@ -886,7 +886,7 @@ BOOL UCBStorageStream_Impl::Init()
else
{
// if the new file is edited than no source exist
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
//SetError( SVSTREAM_CANNOT_MAKE );
}
}
@@ -896,12 +896,12 @@ BOOL UCBStorageStream_Impl::Init()
return sal_True;
}
-ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary()
+sal_uLong UCBStorageStream_Impl::ReadSourceWriteTemporary()
{
// read source stream till the end and copy all the data to
// the current position of the temporary stream
- ULONG aResult = 0;
+ sal_uLong aResult = 0;
if( m_bSourceRead )
{
@@ -909,7 +909,7 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary()
try
{
- ULONG aReaded;
+ sal_uLong aReaded;
do
{
aReaded = m_rSource->readBytes( aData, 32000 );
@@ -919,7 +919,7 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary()
#if OSL_DEBUG_LEVEL > 1
catch( Exception & e )
{
- OSL_ENSURE( FALSE, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_ENSURE( sal_False, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
#else
catch( Exception & )
{
@@ -927,18 +927,18 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary()
}
}
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
return aResult;
}
-ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary( ULONG aLength )
+sal_uLong UCBStorageStream_Impl::ReadSourceWriteTemporary( sal_uLong aLength )
{
// read aLength bite from the source stream and copy them to the current
// position of the temporary stream
- ULONG aResult = 0;
+ sal_uLong aResult = 0;
if( m_bSourceRead )
{
@@ -947,22 +947,22 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary( ULONG aLength )
try
{
- ULONG aReaded = 32000;
+ sal_uLong aReaded = 32000;
- for( ULONG pInd = 0; pInd < aLength && aReaded == 32000 ; pInd += 32000 )
+ for( sal_uLong pInd = 0; pInd < aLength && aReaded == 32000 ; pInd += 32000 )
{
- ULONG aToCopy = min( aLength - pInd, 32000 );
+ sal_uLong aToCopy = min( aLength - pInd, 32000 );
aReaded = m_rSource->readBytes( aData, aToCopy );
aResult += m_pStream->Write( aData.getArray(), aReaded );
}
if( aResult < aLength )
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
}
#if OSL_DEBUG_LEVEL > 1
catch( Exception & e )
{
- OSL_ENSURE( FALSE, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_ENSURE( sal_False, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
#else
catch( Exception & )
{
@@ -973,14 +973,14 @@ ULONG UCBStorageStream_Impl::ReadSourceWriteTemporary( ULONG aLength )
return aResult;
}
-ULONG UCBStorageStream_Impl::CopySourceToTemporary()
+sal_uLong UCBStorageStream_Impl::CopySourceToTemporary()
{
// current position of the temporary stream is not changed
- ULONG aResult = 0;
+ sal_uLong aResult = 0;
if( m_bSourceRead )
{
- ULONG aPos = m_pStream->Tell();
+ sal_uLong aPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
aResult = ReadSourceWriteTemporary();
m_pStream->Seek( aPos );
@@ -991,14 +991,14 @@ ULONG UCBStorageStream_Impl::CopySourceToTemporary()
}
#if 0
-ULONG UCBStorageStream_Impl::CopySourceToTemporary( ULONG aLength )
+sal_uLong UCBStorageStream_Impl::CopySourceToTemporary( sal_uLong aLength )
{
// current position of the temporary stream is not changed
- ULONG aResult = 0;
+ sal_uLong aResult = 0;
if( m_bSourceRead )
{
- ULONG aPos = m_pStream->Tell();
+ sal_uLong aPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
aResult = ReadSourceWriteTemporary( aLength );
m_pStream->Seek( aPos );
@@ -1011,9 +1011,9 @@ ULONG UCBStorageStream_Impl::CopySourceToTemporary( ULONG aLength )
// UCBStorageStream_Impl must have a SvStream interface, because it then can be used as underlying stream
// of an OLEStorage; so every write access caused by storage operations marks the UCBStorageStream as modified
-ULONG UCBStorageStream_Impl::GetData( void* pData, ULONG nSize )
+sal_uLong UCBStorageStream_Impl::GetData( void* pData, sal_uLong nSize )
{
- ULONG aResult = 0;
+ sal_uLong aResult = 0;
if( !Init() )
return 0;
@@ -1026,20 +1026,20 @@ ULONG UCBStorageStream_Impl::GetData( void* pData, ULONG nSize )
// read the tail of the data from original stream
// copy this tail to the temporary stream
- ULONG aToRead = nSize - aResult;
+ sal_uLong aToRead = nSize - aResult;
pData = (void*)( (char*)pData + aResult );
try
{
Sequence<sal_Int8> aData( aToRead );
- ULONG aReaded = m_rSource->readBytes( aData, aToRead );
+ sal_uLong aReaded = m_rSource->readBytes( aData, aToRead );
aResult += m_pStream->Write( (void*)aData.getArray(), aReaded );
memcpy( pData, aData.getArray(), aReaded );
}
#if OSL_DEBUG_LEVEL > 1
catch( Exception & e )
{
- OSL_ENSURE( FALSE, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
+ OSL_ENSURE( sal_False, ::rtl::OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US ).getStr() );
#else
catch( Exception & )
{
@@ -1047,13 +1047,13 @@ ULONG UCBStorageStream_Impl::GetData( void* pData, ULONG nSize )
}
if( aResult < nSize )
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
}
return aResult;
}
-ULONG UCBStorageStream_Impl::PutData( const void* pData, ULONG nSize )
+sal_uLong UCBStorageStream_Impl::PutData( const void* pData, sal_uLong nSize )
{
if ( !(m_nMode & STREAM_WRITE) )
{
@@ -1064,7 +1064,7 @@ ULONG UCBStorageStream_Impl::PutData( const void* pData, ULONG nSize )
if( !nSize || !Init() )
return 0;
- ULONG aResult = m_pStream->Write( pData, nSize );
+ sal_uLong aResult = m_pStream->Write( pData, nSize );
m_bModified = aResult > 0;
@@ -1072,12 +1072,12 @@ ULONG UCBStorageStream_Impl::PutData( const void* pData, ULONG nSize )
}
-ULONG UCBStorageStream_Impl::SeekPos( ULONG nPos )
+sal_uLong UCBStorageStream_Impl::SeekPos( sal_uLong nPos )
{
if( !Init() )
return 0;
- ULONG aResult;
+ sal_uLong aResult;
if( nPos == STREAM_SEEK_TO_END )
{
@@ -1108,7 +1108,7 @@ ULONG UCBStorageStream_Impl::SeekPos( ULONG nPos )
{
aResult += ReadSourceWriteTemporary( nPos - aResult );
if( aResult < nPos )
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
DBG_ASSERT( aResult == m_pStream->Tell(), "Error in stream arithmetic!\n" );
}
@@ -1129,7 +1129,7 @@ ULONG UCBStorageStream_Impl::SeekPos( ULONG nPos )
return aResult;
}
-void UCBStorageStream_Impl::SetSize( ULONG nSize )
+void UCBStorageStream_Impl::SetSize( sal_uLong nSize )
{
if ( !(m_nMode & STREAM_WRITE) )
{
@@ -1140,11 +1140,11 @@ void UCBStorageStream_Impl::SetSize( ULONG nSize )
if( !Init() )
return;
- m_bModified = TRUE;
+ m_bModified = sal_True;
if( m_bSourceRead )
{
- ULONG aPos = m_pStream->Tell();
+ sal_uLong aPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
if( m_pStream->Tell() < nSize )
ReadSourceWriteTemporary( nSize - m_pStream->Tell() );
@@ -1152,7 +1152,7 @@ void UCBStorageStream_Impl::SetSize( ULONG nSize )
}
m_pStream->SetStreamSize( nSize );
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
}
void UCBStorageStream_Impl::FlushData()
@@ -1163,7 +1163,7 @@ void UCBStorageStream_Impl::FlushData()
m_pStream->Flush();
}
- m_bCommited = TRUE;
+ m_bCommited = sal_True;
}
void UCBStorageStream_Impl::SetError( sal_uInt32 nErr )
@@ -1184,15 +1184,15 @@ void UCBStorageStream_Impl::ResetError()
m_pAntiImpl->ResetError();
}
-ULONG UCBStorageStream_Impl::GetSize()
+sal_uLong UCBStorageStream_Impl::GetSize()
{
if( !Init() )
return 0;
- ULONG nPos = m_pStream->Tell();
+ sal_uLong nPos = m_pStream->Tell();
m_pStream->Seek( STREAM_SEEK_TO_END );
ReadSourceWriteTemporary();
- ULONG nRet = m_pStream->Tell();
+ sal_uLong nRet = m_pStream->Tell();
m_pStream->Seek( nPos );
return nRet;
@@ -1252,8 +1252,8 @@ sal_Int16 UCBStorageStream_Impl::Commit()
INetURLObject aObj( m_aURL );
aObj.SetName( m_aName );
m_aURL = aObj.GetMainURL( INetURLObject::NO_DECODE );
- m_bModified = FALSE;
- m_bSourceRead = TRUE;
+ m_bModified = sal_False;
+ m_bSourceRead = sal_True;
}
catch ( CommandAbortedException& )
{
@@ -1274,7 +1274,7 @@ sal_Int16 UCBStorageStream_Impl::Commit()
return COMMIT_RESULT_FAILURE;
}
- m_bCommited = FALSE;
+ m_bCommited = sal_False;
return COMMIT_RESULT_SUCCESS;
}
}
@@ -1282,13 +1282,13 @@ sal_Int16 UCBStorageStream_Impl::Commit()
return COMMIT_RESULT_NOTHING_TO_DO;
}
-BOOL UCBStorageStream_Impl::Revert()
+sal_Bool UCBStorageStream_Impl::Revert()
{
// if an OLEStorage is created on this stream, no "revert" is neccessary because OLEStorages do nothing on "Revert" !
if ( m_bCommited )
{
DBG_ERROR("Revert while commit is in progress!" );
- return FALSE; // ???
+ return sal_False; // ???
}
Free();
@@ -1298,7 +1298,7 @@ BOOL UCBStorageStream_Impl::Revert()
m_aTempURL.Erase();
}
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
try
{
m_rSource = m_pContent->openStream();
@@ -1306,11 +1306,11 @@ BOOL UCBStorageStream_Impl::Revert()
{
if ( m_pAntiImpl && ( m_nMode & STREAM_TRUNC ) )
// stream is in use and should be truncated
- m_bSourceRead = FALSE;
+ m_bSourceRead = sal_False;
else
{
m_nMode &= ~STREAM_TRUNC;
- m_bSourceRead = TRUE;
+ m_bSourceRead = sal_True;
}
}
else
@@ -1328,15 +1328,15 @@ BOOL UCBStorageStream_Impl::Revert()
{
}
- m_bModified = FALSE;
+ m_bModified = sal_False;
m_aName = m_aOriginalName;
m_aContentType = m_aOriginalContentType;
return ( GetError() == ERRCODE_NONE );
}
-BOOL UCBStorageStream_Impl::Clear()
+sal_Bool UCBStorageStream_Impl::Clear()
{
- BOOL bRet = ( m_pAntiImpl == NULL );
+ sal_Bool bRet = ( m_pAntiImpl == NULL );
DBG_ASSERT( bRet, "Removing used stream!" );
if( bRet )
{
@@ -1387,7 +1387,7 @@ void UCBStorageStream_Impl::PrepareCachedForReopen( StreamMode nMode )
}
}
-UCBStorageStream::UCBStorageStream( const String& rName, StreamMode nMode, BOOL bDirect, const ByteString* pKey )
+UCBStorageStream::UCBStorageStream( const String& rName, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey )
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorageStream !
@@ -1396,7 +1396,7 @@ UCBStorageStream::UCBStorageStream( const String& rName, StreamMode nMode, BOOL
StorageBase::m_nMode = pImp->m_nMode;
}
-UCBStorageStream::UCBStorageStream( const String& rName, StreamMode nMode, BOOL bDirect, const ByteString* pKey, BOOL bRepair, Reference< XProgressHandler > xProgress )
+UCBStorageStream::UCBStorageStream( const String& rName, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey, sal_Bool bRepair, Reference< XProgressHandler > xProgress )
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorageStream !
@@ -1423,13 +1423,13 @@ UCBStorageStream::~UCBStorageStream()
pImp->ReleaseRef();
}
-ULONG UCBStorageStream::Read( void * pData, ULONG nSize )
+sal_uLong UCBStorageStream::Read( void * pData, sal_uLong nSize )
{
//return pImp->m_pStream->Read( pData, nSize );
return pImp->GetData( pData, nSize );
}
-ULONG UCBStorageStream::Write( const void* pData, ULONG nSize )
+sal_uLong UCBStorageStream::Write( const void* pData, sal_uLong nSize )
{
/*
// mba: does occur in writer !
@@ -1439,18 +1439,18 @@ ULONG UCBStorageStream::Write( const void* pData, ULONG nSize )
return 0;
}
*/
- // pImp->m_bModified = TRUE;
+ // pImp->m_bModified = sal_True;
//return pImp->m_pStream->Write( pData, nSize );
return pImp->PutData( pData, nSize );
}
-ULONG UCBStorageStream::Seek( ULONG nPos )
+sal_uLong UCBStorageStream::Seek( sal_uLong nPos )
{
//return pImp->m_pStream->Seek( nPos );
return pImp->Seek( nPos );
}
-ULONG UCBStorageStream::Tell()
+sal_uLong UCBStorageStream::Tell()
{
if( !pImp->Init() )
return 0;
@@ -1463,32 +1463,32 @@ void UCBStorageStream::Flush()
Commit();
}
-BOOL UCBStorageStream::SetSize( ULONG nNewSize )
+sal_Bool UCBStorageStream::SetSize( sal_uLong nNewSize )
{
/*
if ( pImp->m_bCommited )
{
DBG_ERROR("Changing stream size while commit is in progress!" );
- return FALSE;
+ return sal_False;
}
*/
- // pImp->m_bModified = TRUE;
+ // pImp->m_bModified = sal_True;
//return pImp->m_pStream->SetStreamSize( nNewSize );
pImp->SetSize( nNewSize );
return !pImp->GetError();
}
-BOOL UCBStorageStream::Validate( BOOL bWrite ) const
+sal_Bool UCBStorageStream::Validate( sal_Bool bWrite ) const
{
return ( !bWrite || ( pImp->m_nMode & STREAM_WRITE ) );
}
-BOOL UCBStorageStream::ValidateMode( StreamMode m ) const
+sal_Bool UCBStorageStream::ValidateMode( StreamMode m ) const
{
// ???
if( m == ( STREAM_READ | STREAM_TRUNC ) ) // from stg.cxx
- return TRUE;
- USHORT nCurMode = 0xFFFF;
+ return sal_True;
+ sal_uInt16 nCurMode = 0xFFFF;
if( ( m & 3 ) == STREAM_READ )
{
// only SHARE_DENYWRITE or SHARE_DENYALL allowed
@@ -1496,7 +1496,7 @@ BOOL UCBStorageStream::ValidateMode( StreamMode m ) const
&& ( nCurMode & STREAM_SHARE_DENYWRITE ) )
|| ( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) ) )
- return TRUE;
+ return sal_True;
}
else
{
@@ -1505,10 +1505,10 @@ BOOL UCBStorageStream::ValidateMode( StreamMode m ) const
// the commit may fail
if( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) )
- return TRUE;
+ return sal_True;
}
- return TRUE;
+ return sal_True;
}
const SvStream* UCBStorageStream::GetSvStream() const
@@ -1530,28 +1530,28 @@ Reference< XInputStream > UCBStorageStream::GetXInputStream() const
return pImp->GetXInputStream();
}
-BOOL UCBStorageStream::Equals( const BaseStorageStream& rStream ) const
+sal_Bool UCBStorageStream::Equals( const BaseStorageStream& rStream ) const
{
// ???
return ((BaseStorageStream*) this ) == &rStream;
}
-BOOL UCBStorageStream::Commit()
+sal_Bool UCBStorageStream::Commit()
{
// mark this stream for sending it on root commit
pImp->FlushData();
- return TRUE;
+ return sal_True;
}
-BOOL UCBStorageStream::Revert()
+sal_Bool UCBStorageStream::Revert()
{
return pImp->Revert();
}
-BOOL UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
+sal_Bool UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
{
if( !pImp->Init() )
- return FALSE;
+ return sal_False;
UCBStorageStream* pStg = PTR_CAST( UCBStorageStream, pDestStm );
if ( pStg )
@@ -1559,18 +1559,18 @@ BOOL UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
pDestStm->SetSize( 0 );
Seek( STREAM_SEEK_TO_END );
- INT32 n = Tell();
+ sal_Int32 n = Tell();
if( n < 0 )
- return FALSE;
+ return sal_False;
if( pDestStm->SetSize( n ) && n )
{
- BYTE* p = new BYTE[ 4096 ];
+ sal_uInt8* p = new sal_uInt8[ 4096 ];
Seek( 0L );
pDestStm->Seek( 0L );
while( n )
{
- UINT32 nn = n;
+ sal_uInt32 nn = n;
if( nn > 4096 )
nn = 4096;
if( Read( p, nn ) != nn )
@@ -1583,13 +1583,13 @@ BOOL UCBStorageStream::CopyTo( BaseStorageStream* pDestStm )
delete[] p;
}
- return TRUE;
+ return sal_True;
}
-BOOL UCBStorageStream::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
+sal_Bool UCBStorageStream::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
{
if ( rName.CompareToAscii("Title") == COMPARE_EQUAL )
- return FALSE;
+ return sal_False;
if ( rName.CompareToAscii("MediaType") == COMPARE_EQUAL )
{
@@ -1603,34 +1603,34 @@ BOOL UCBStorageStream::SetProperty( const String& rName, const ::com::sun::star:
if ( pImp->m_pContent )
{
pImp->m_pContent->setPropertyValue( rName, rValue );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
{
}
- return FALSE;
+ return sal_False;
}
-BOOL UCBStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool UCBStorageStream::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
{
try
{
if ( pImp->m_pContent )
{
rValue = pImp->m_pContent->getPropertyValue( rName );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
{
}
- return FALSE;
+ return sal_False;
}
-UCBStorage::UCBStorage( SvStream& rStrm, BOOL bDirect )
+UCBStorage::UCBStorage( SvStream& rStrm, sal_Bool bDirect )
{
String aURL = GetLinkedFile( rStrm );
if ( aURL.Len() )
@@ -1640,7 +1640,7 @@ UCBStorage::UCBStorage( SvStream& rStrm, BOOL bDirect )
nMode = STREAM_READ | STREAM_WRITE;
::ucbhelper::Content aContent( aURL, Reference < XCommandEnvironment >() );
- pImp = new UCBStorage_Impl( aContent, aURL, nMode, this, bDirect, TRUE );
+ pImp = new UCBStorage_Impl( aContent, aURL, nMode, this, bDirect, sal_True );
}
else
{
@@ -1654,7 +1654,7 @@ UCBStorage::UCBStorage( SvStream& rStrm, BOOL bDirect )
StorageBase::m_nMode = pImp->m_nMode;
}
-UCBStorage::UCBStorage( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, BOOL bDirect, BOOL bIsRoot )
+UCBStorage::UCBStorage( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, sal_Bool bDirect, sal_Bool bIsRoot )
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorage !
@@ -1664,7 +1664,7 @@ UCBStorage::UCBStorage( const ::ucbhelper::Content& rContent, const String& rNam
StorageBase::m_nMode = pImp->m_nMode;
}
-UCBStorage::UCBStorage( const String& rName, StreamMode nMode, BOOL bDirect, BOOL bIsRoot, BOOL bIsRepair, Reference< XProgressHandler > xProgressHandler )
+UCBStorage::UCBStorage( const String& rName, StreamMode nMode, sal_Bool bDirect, sal_Bool bIsRoot, sal_Bool bIsRepair, Reference< XProgressHandler > xProgressHandler )
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorage !
@@ -1674,7 +1674,7 @@ UCBStorage::UCBStorage( const String& rName, StreamMode nMode, BOOL bDirect, BOO
StorageBase::m_nMode = pImp->m_nMode;
}
-UCBStorage::UCBStorage( const String& rName, StreamMode nMode, BOOL bDirect, BOOL bIsRoot )
+UCBStorage::UCBStorage( const String& rName, StreamMode nMode, sal_Bool bDirect, sal_Bool bIsRoot )
{
// pImp must be initialized in the body, because otherwise the vtable of the stream is not initialized
// to class UCBStorage !
@@ -1703,7 +1703,7 @@ UCBStorage::~UCBStorage()
pImp->ReleaseRef();
}
-UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, UCBStorage* pStorage, BOOL bDirect, BOOL bIsRoot, BOOL bIsRepair, Reference< XProgressHandler > xProgressHandler )
+UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, UCBStorage* pStorage, sal_Bool bDirect, sal_Bool bIsRoot, sal_Bool bIsRepair, Reference< XProgressHandler > xProgressHandler )
: m_pAntiImpl( pStorage )
, m_pContent( new ::ucbhelper::Content( rContent ) )
, m_pTempFile( NULL )
@@ -1711,13 +1711,13 @@ UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const St
//, m_pStream( NULL )
, m_nError( 0 )
, m_nMode( nMode )
- , m_bModified( FALSE )
- , m_bCommited( FALSE )
+ , m_bModified( sal_False )
+ , m_bCommited( sal_False )
, m_bDirect( bDirect )
, m_bIsRoot( bIsRoot )
- , m_bDirty( FALSE )
- , m_bIsLinked( TRUE )
- , m_bListCreated( FALSE )
+ , m_bDirty( sal_False )
+ , m_bIsLinked( sal_True )
+ , m_bListCreated( sal_False )
, m_nFormat( 0 )
, m_aClassId( SvGlobalName() )
, m_bRepairPackage( bIsRepair )
@@ -1731,14 +1731,14 @@ UCBStorage_Impl::UCBStorage_Impl( const ::ucbhelper::Content& rContent, const St
// no name given = use temporary name!
DBG_ASSERT( m_bIsRoot, "SubStorage must have a name!" );
m_pTempFile = new ::utl::TempFile;
- m_pTempFile->EnableKillingFile( TRUE );
+ m_pTempFile->EnableKillingFile( sal_True );
m_aName = m_aOriginalName = aName = m_pTempFile->GetURL();
}
m_aURL = rName;
}
-UCBStorage_Impl::UCBStorage_Impl( const String& rName, StreamMode nMode, UCBStorage* pStorage, BOOL bDirect, BOOL bIsRoot, BOOL bIsRepair, Reference< XProgressHandler > xProgressHandler )
+UCBStorage_Impl::UCBStorage_Impl( const String& rName, StreamMode nMode, UCBStorage* pStorage, sal_Bool bDirect, sal_Bool bIsRoot, sal_Bool bIsRepair, Reference< XProgressHandler > xProgressHandler )
: m_pAntiImpl( pStorage )
, m_pContent( NULL )
, m_pTempFile( NULL )
@@ -1746,13 +1746,13 @@ UCBStorage_Impl::UCBStorage_Impl( const String& rName, StreamMode nMode, UCBStor
//, m_pStream( NULL )
, m_nError( 0 )
, m_nMode( nMode )
- , m_bModified( FALSE )
- , m_bCommited( FALSE )
+ , m_bModified( sal_False )
+ , m_bCommited( sal_False )
, m_bDirect( bDirect )
, m_bIsRoot( bIsRoot )
- , m_bDirty( FALSE )
- , m_bIsLinked( FALSE )
- , m_bListCreated( FALSE )
+ , m_bDirty( sal_False )
+ , m_bIsLinked( sal_False )
+ , m_bListCreated( sal_False )
, m_nFormat( 0 )
, m_aClassId( SvGlobalName() )
, m_bRepairPackage( bIsRepair )
@@ -1765,7 +1765,7 @@ UCBStorage_Impl::UCBStorage_Impl( const String& rName, StreamMode nMode, UCBStor
// no name given = use temporary name!
DBG_ASSERT( m_bIsRoot, "SubStorage must have a name!" );
m_pTempFile = new ::utl::TempFile;
- m_pTempFile->EnableKillingFile( TRUE );
+ m_pTempFile->EnableKillingFile( sal_True );
m_aName = m_aOriginalName = aName = m_pTempFile->GetURL();
}
@@ -1788,31 +1788,31 @@ UCBStorage_Impl::UCBStorage_Impl( const String& rName, StreamMode nMode, UCBStor
// substorages are opened like streams: the URL is a "child URL" of the root package URL
m_aURL = rName;
if ( m_aURL.CompareToAscii( "vnd.sun.star.pkg://", 19 ) != 0 )
- m_bIsLinked = TRUE;
+ m_bIsLinked = sal_True;
}
}
-UCBStorage_Impl::UCBStorage_Impl( SvStream& rStream, UCBStorage* pStorage, BOOL bDirect )
+UCBStorage_Impl::UCBStorage_Impl( SvStream& rStream, UCBStorage* pStorage, sal_Bool bDirect )
: m_pAntiImpl( pStorage )
, m_pContent( NULL )
, m_pTempFile( new ::utl::TempFile )
, m_pSource( &rStream )
, m_nError( 0 )
- , m_bModified( FALSE )
- , m_bCommited( FALSE )
+ , m_bModified( sal_False )
+ , m_bCommited( sal_False )
, m_bDirect( bDirect )
- , m_bIsRoot( TRUE )
- , m_bDirty( FALSE )
- , m_bIsLinked( FALSE )
- , m_bListCreated( FALSE )
+ , m_bIsRoot( sal_True )
+ , m_bDirty( sal_False )
+ , m_bIsLinked( sal_False )
+ , m_bListCreated( sal_False )
, m_nFormat( 0 )
, m_aClassId( SvGlobalName() )
- , m_bRepairPackage( FALSE )
+ , m_bRepairPackage( sal_False )
, m_pUNOStorageHolderList( NULL )
{
// opening in direct mode is too fuzzy because the data is transferred to the stream in the Commit() call,
// which will be called in the storages' dtor
- m_pTempFile->EnableKillingFile( TRUE );
+ m_pTempFile->EnableKillingFile( sal_True );
DBG_ASSERT( !bDirect, "Storage on a stream must not be opened in direct mode!" );
// UCBStorages work on a content, so a temporary file for a content must be created, even if the stream is only
@@ -1973,7 +1973,7 @@ void UCBStorage_Impl::ReadContent()
if ( m_bListCreated )
return;
- m_bListCreated = TRUE;
+ m_bListCreated = sal_True;
// create cursor for access to children
Sequence< ::rtl::OUString > aProps(4);
@@ -2011,9 +2011,9 @@ void UCBStorage_Impl::ReadContent()
aContentType = xRow->getString(3);
}
- BOOL bIsFolder( xRow->getBoolean(2) );
+ sal_Bool bIsFolder( xRow->getBoolean(2) );
sal_Int64 nSize = xRow->getLong(4);
- UCBStorageElement_Impl* pElement = new UCBStorageElement_Impl( aTitle, bIsFolder, (ULONG) nSize );
+ UCBStorageElement_Impl* pElement = new UCBStorageElement_Impl( aTitle, bIsFolder, (sal_uLong) nSize );
m_aChildrenList.Insert( pElement, LIST_APPEND );
sal_Bool bIsOfficeDocument = m_bIsLinked || ( m_aClassId != SvGlobalName() );
@@ -2044,13 +2044,13 @@ void UCBStorage_Impl::ReadContent()
::rtl::OUString aMediaType;
Any aAny = aContent.getPropertyValue( ::rtl::OUString::createFromAscii( "MediaType" ) );
if ( ( aAny >>= aMediaType ) && ( aMediaType.compareToAscii("application/vnd.sun.star.oleobject") == 0 ) )
- pElement->m_bIsStorage = TRUE;
+ pElement->m_bIsStorage = sal_True;
else if ( !aMediaType.getLength() )
{
// older files didn't have that special content type, so they must be detected
OpenStream( pElement, STREAM_STD_READ, m_bDirect );
if ( Storage::IsStorageFile( pElement->m_xStream ) )
- pElement->m_bIsStorage = TRUE;
+ pElement->m_bIsStorage = sal_True;
else
pElement->m_xStream->Free();
}
@@ -2118,7 +2118,7 @@ sal_Int32 UCBStorage_Impl::GetObjectCount()
::rtl::OUString Find_Impl( const Sequence < Sequence < PropertyValue > >& rSequence, const ::rtl::OUString& rPath )
{
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
for ( sal_Int32 nSeqs=0; nSeqs<rSequence.getLength(); nSeqs++ )
{
const Sequence < PropertyValue >& rMyProps = rSequence[nSeqs];
@@ -2131,7 +2131,7 @@ sal_Int32 UCBStorage_Impl::GetObjectCount()
{
rtl::OUString aTmp;
if ( ( rAny.Value >>= aTmp ) && aTmp == rPath )
- bFound = TRUE;
+ bFound = sal_True;
if ( aType.getLength() )
break;
}
@@ -2269,11 +2269,11 @@ UCBStorage_Impl::~UCBStorage_Impl()
delete m_pTempFile;
}
-BOOL UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
+sal_Bool UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
{
// a new substorage is inserted into a UCBStorage ( given by the parameter pContent )
// it must be inserted with a title and a type
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
@@ -2310,7 +2310,7 @@ BOOL UCBStorage_Impl::Insert( ::ucbhelper::Content *pContent )
// remove old content, create an "empty" new one and initialize it with the new inserted
DELETEZ( m_pContent );
m_pContent = new ::ucbhelper::Content( aNewFolder );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -2349,11 +2349,11 @@ sal_Int16 UCBStorage_Impl::Commit()
while ( pElement && nRet )
{
::ucbhelper::Content* pContent = pElement->GetContent();
- BOOL bDeleteContent = FALSE;
+ sal_Bool bDeleteContent = sal_False;
if ( !pContent && pElement->IsModified() )
{
// if the element has never been opened, no content has been created until now
- bDeleteContent = TRUE; // remember to delete it later
+ bDeleteContent = sal_True; // remember to delete it later
String aName( m_aURL );
aName += '/';
aName += pElement->m_aOriginalName;
@@ -2401,7 +2401,7 @@ sal_Int16 UCBStorage_Impl::Commit()
// OLE storage should be stored encrytped, if the storage uses encryption
pElement->m_xStream->m_aContentType = String::CreateFromAscii("application/vnd.sun.star.oleobject");
Any aValue;
- aValue <<= (BOOL) TRUE;
+ aValue <<= (sal_Bool) sal_True;
pElement->m_xStream->m_pContent->setPropertyValue(String::CreateFromAscii("Encrypted"), aValue );
}
@@ -2483,7 +2483,7 @@ sal_Int16 UCBStorage_Impl::Commit()
// write a manifest file
// first create a subfolder "META-inf"
Content aNewSubFolder;
- BOOL bRet = ::utl::UCBContentHelper::MakeFolder( *m_pContent, String::CreateFromAscii("META-INF"), aNewSubFolder );
+ sal_Bool bRet = ::utl::UCBContentHelper::MakeFolder( *m_pContent, String::CreateFromAscii("META-INF"), aNewSubFolder );
if ( bRet )
{
// create a stream to write the manifest file - use a temp file
@@ -2584,7 +2584,7 @@ sal_Int16 UCBStorage_Impl::Commit()
// after successfull root commit all elements names and types are adjusted and all removed elements
// are also removed from the lists
UCBStorageElement_Impl* pInnerElement = m_aChildrenList.First();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
while ( pInnerElement && bRet )
{
UCBStorageElement_Impl* pNext = m_aChildrenList.Next();
@@ -2596,26 +2596,26 @@ sal_Int16 UCBStorage_Impl::Commit()
else
{
pInnerElement->m_aOriginalName = pInnerElement->m_aName;
- pInnerElement->m_bIsInserted = FALSE;
+ pInnerElement->m_bIsInserted = sal_False;
}
pInnerElement = pNext;
}
}
- m_bCommited = FALSE;
+ m_bCommited = sal_False;
}
return nRet;
}
-BOOL UCBStorage_Impl::Revert()
+sal_Bool UCBStorage_Impl::Revert()
{
UCBStorageElement_Impl* pElement = m_aChildrenList.First();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
while ( pElement && bRet )
{
- pElement->m_bIsRemoved = FALSE;
+ pElement->m_bIsRemoved = sal_False;
if ( pElement->m_bIsInserted )
{
m_aChildrenList.Remove( pElement ); // correct usage of list ???
@@ -2634,7 +2634,7 @@ BOOL UCBStorage_Impl::Revert()
}
pElement->m_aName = pElement->m_aOriginalName;
- pElement->m_bIsRemoved = FALSE;
+ pElement->m_bIsRemoved = sal_False;
}
pElement = m_aChildrenList.Next();
@@ -2648,17 +2648,17 @@ const String& UCBStorage::GetName() const
return pImp->m_aName; // pImp->m_aURL ?!
}
-BOOL UCBStorage::IsRoot() const
+sal_Bool UCBStorage::IsRoot() const
{
return pImp->m_bIsRoot;
}
void UCBStorage::SetDirty()
{
- pImp->m_bDirty = TRUE;
+ pImp->m_bDirty = sal_True;
}
-void UCBStorage::SetClass( const SvGlobalName & rClass, ULONG nOriginalClipFormat, const String & rUserTypeName )
+void UCBStorage::SetClass( const SvGlobalName & rClass, sal_uLong nOriginalClipFormat, const String & rUserTypeName )
{
pImp->m_aClassId = rClass;
pImp->m_nFormat = nOriginalClipFormat;
@@ -2697,15 +2697,15 @@ const ClsId& UCBStorage::GetClassId() const
return ( const ClsId& ) pImp->m_aClassId.GetCLSID();
}
-void UCBStorage::SetConvertClass( const SvGlobalName & /*rConvertClass*/, ULONG /*nOriginalClipFormat*/, const String & /*rUserTypeName*/ )
+void UCBStorage::SetConvertClass( const SvGlobalName & /*rConvertClass*/, sal_uLong /*nOriginalClipFormat*/, const String & /*rUserTypeName*/ )
{
// ???
}
-BOOL UCBStorage::ShouldConvert()
+sal_Bool UCBStorage::ShouldConvert()
{
// ???
- return FALSE;
+ return sal_False;
}
SvGlobalName UCBStorage::GetClassName()
@@ -2713,7 +2713,7 @@ SvGlobalName UCBStorage::GetClassName()
return pImp->m_aClassId;
}
-ULONG UCBStorage::GetFormat()
+sal_uLong UCBStorage::GetFormat()
{
return pImp->m_nFormat;
}
@@ -2733,7 +2733,7 @@ void UCBStorage::FillInfoList( SvStorageInfoList* pList ) const
if ( !pElement->m_bIsRemoved )
{
// problem: what about the size of a substorage ?!
- ULONG nSize = pElement->m_nSize;
+ sal_uLong nSize = pElement->m_nSize;
if ( pElement->m_xStream.Is() )
nSize = pElement->m_xStream->GetSize();
SvStorageInfo aInfo( pElement->m_aName, nSize, pElement->m_bIsStorage );
@@ -2744,7 +2744,7 @@ void UCBStorage::FillInfoList( SvStorageInfoList* pList ) const
}
}
-BOOL UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, BaseStorage* pDest, const String& rNew ) const
+sal_Bool UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, BaseStorage* pDest, const String& rNew ) const
{
// insert stream or storage into the list or stream of the destination storage
// not into the content, this will be done on commit !
@@ -2755,7 +2755,7 @@ BOOL UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base
// the destination stream must not be open
BaseStorageStream* pOtherStream = pDest->OpenStream( rNew, STREAM_WRITE | STREAM_SHARE_DENYALL, pImp->m_bDirect );
BaseStorageStream* pStream = NULL;
- BOOL bDeleteStream = FALSE;
+ sal_Bool bDeleteStream = sal_False;
// if stream is already open, it is allowed to copy it, so be aware of this
if ( rElement.m_xStream.Is() )
@@ -2763,7 +2763,7 @@ BOOL UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base
if ( !pStream )
{
pStream = ( const_cast < UCBStorage* > (this) )->OpenStream( rElement.m_aName, STREAM_STD_READ, pImp->m_bDirect );
- bDeleteStream = TRUE;
+ bDeleteStream = sal_True;
}
pStream->CopyTo( pOtherStream );
@@ -2784,19 +2784,19 @@ BOOL UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base
BaseStorage* pStorage = NULL;
// if stream is already open, it is allowed to copy it, so be aware of this
- BOOL bDeleteStorage = FALSE;
+ sal_Bool bDeleteStorage = sal_False;
if ( rElement.m_xStorage.Is() )
pStorage = rElement.m_xStorage->m_pAntiImpl;
if ( !pStorage )
{
pStorage = ( const_cast < UCBStorage* > (this) )->OpenStorage( rElement.m_aName, pImp->m_nMode, pImp->m_bDirect );
- bDeleteStorage = TRUE;
+ bDeleteStorage = sal_True;
}
UCBStorage* pUCBDest = PTR_CAST( UCBStorage, pDest );
UCBStorage* pUCBCopy = PTR_CAST( UCBStorage, pStorage );
- BOOL bOpenUCBStorage = pUCBDest && pUCBCopy;
+ sal_Bool bOpenUCBStorage = pUCBDest && pUCBCopy;
BaseStorage* pOtherStorage = bOpenUCBStorage ?
pDest->OpenUCBStorage( rNew, STREAM_WRITE | STREAM_SHARE_DENYALL, pImp->m_bDirect ) :
pDest->OpenOLEStorage( rNew, STREAM_WRITE | STREAM_SHARE_DENYALL, pImp->m_bDirect );
@@ -2821,7 +2821,7 @@ BOOL UCBStorage::CopyStorageElement_Impl( UCBStorageElement_Impl& rElement, Base
delete pOtherStorage;
}
- return BOOL( Good() && pDest->Good() );
+ return sal_Bool( Good() && pDest->Good() );
}
UCBStorageElement_Impl* UCBStorage::FindElement_Impl( const String& rName ) const
@@ -2838,11 +2838,11 @@ UCBStorageElement_Impl* UCBStorage::FindElement_Impl( const String& rName ) cons
return pElement;
}
-BOOL UCBStorage::CopyTo( BaseStorage* pDestStg ) const
+sal_Bool UCBStorage::CopyTo( BaseStorage* pDestStg ) const
{
DBG_ASSERT( pDestStg != ((BaseStorage*)this), "Self-Copying is not possible!" );
if ( pDestStg == ((BaseStorage*)this) )
- return FALSE;
+ return sal_False;
// perhaps it's also a problem if one storage is a parent of the other ?!
// or if not: could be optimized ?!
@@ -2856,7 +2856,7 @@ BOOL UCBStorage::CopyTo( BaseStorage* pDestStg ) const
pDestStg->SetClassId( GetClassId() );
pDestStg->SetDirty();
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
UCBStorageElement_Impl* pElement = pImp->GetChildrenList().First();
while ( pElement && bRet )
{
@@ -2867,18 +2867,18 @@ BOOL UCBStorage::CopyTo( BaseStorage* pDestStg ) const
if( !bRet )
SetError( pDestStg->GetError() );
- return BOOL( Good() && pDestStg->Good() );
+ return sal_Bool( Good() && pDestStg->Good() );
}
-BOOL UCBStorage::CopyTo( const String& rElemName, BaseStorage* pDest, const String& rNew )
+sal_Bool UCBStorage::CopyTo( const String& rElemName, BaseStorage* pDest, const String& rNew )
{
if( !rElemName.Len() )
- return FALSE;
+ return sal_False;
if ( pDest == ((BaseStorage*) this) )
{
// can't double an element
- return FALSE;
+ return sal_False;
}
else
{
@@ -2889,28 +2889,28 @@ BOOL UCBStorage::CopyTo( const String& rElemName, BaseStorage* pDest, const Stri
else
{
SetError( SVSTREAM_FILE_NOT_FOUND );
- return FALSE;
+ return sal_False;
}
}
}
-BOOL UCBStorage::Commit()
+sal_Bool UCBStorage::Commit()
{
// mark this storage for sending it on root commit
- pImp->m_bCommited = TRUE;
+ pImp->m_bCommited = sal_True;
if ( pImp->m_bIsRoot )
// the root storage coordinates commiting by sending a Commit command to its content
return ( pImp->Commit() != COMMIT_RESULT_FAILURE );
else
- return TRUE;
+ return sal_True;
}
-BOOL UCBStorage::Revert()
+sal_Bool UCBStorage::Revert()
{
return pImp->Revert();
}
-BaseStorageStream* UCBStorage::OpenStream( const String& rEleName, StreamMode nMode, BOOL bDirect, const ByteString* pKey )
+BaseStorageStream* UCBStorage::OpenStream( const String& rEleName, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey )
{
if( !rEleName.Len() )
return NULL;
@@ -2935,7 +2935,7 @@ BaseStorageStream* UCBStorage::OpenStream( const String& rEleName, StreamMode nM
{
// create a new UCBStorageElement and insert it into the list
pElement = new UCBStorageElement_Impl( rEleName );
- pElement->m_bIsInserted = TRUE;
+ pElement->m_bIsInserted = sal_True;
pImp->m_aChildrenList.Insert( pElement, LIST_APPEND );
}
}
@@ -2980,7 +2980,7 @@ BaseStorageStream* UCBStorage::OpenStream( const String& rEleName, StreamMode nM
return NULL;
}
-UCBStorageStream_Impl* UCBStorage_Impl::OpenStream( UCBStorageElement_Impl* pElement, StreamMode nMode, BOOL bDirect, const ByteString* pKey )
+UCBStorageStream_Impl* UCBStorage_Impl::OpenStream( UCBStorageElement_Impl* pElement, StreamMode nMode, sal_Bool bDirect, const ByteString* pKey )
{
String aName( m_aURL );
aName += '/';
@@ -2989,31 +2989,31 @@ UCBStorageStream_Impl* UCBStorage_Impl::OpenStream( UCBStorageElement_Impl* pEle
return pElement->m_xStream;
}
-BaseStorage* UCBStorage::OpenUCBStorage( const String& rEleName, StreamMode nMode, BOOL bDirect )
+BaseStorage* UCBStorage::OpenUCBStorage( const String& rEleName, StreamMode nMode, sal_Bool bDirect )
{
if( !rEleName.Len() )
return NULL;
- return OpenStorage_Impl( rEleName, nMode, bDirect, TRUE );
+ return OpenStorage_Impl( rEleName, nMode, bDirect, sal_True );
}
-BaseStorage* UCBStorage::OpenOLEStorage( const String& rEleName, StreamMode nMode, BOOL bDirect )
+BaseStorage* UCBStorage::OpenOLEStorage( const String& rEleName, StreamMode nMode, sal_Bool bDirect )
{
if( !rEleName.Len() )
return NULL;
- return OpenStorage_Impl( rEleName, nMode, bDirect, FALSE );
+ return OpenStorage_Impl( rEleName, nMode, bDirect, sal_False );
}
-BaseStorage* UCBStorage::OpenStorage( const String& rEleName, StreamMode nMode, BOOL bDirect )
+BaseStorage* UCBStorage::OpenStorage( const String& rEleName, StreamMode nMode, sal_Bool bDirect )
{
if( !rEleName.Len() )
return NULL;
- return OpenStorage_Impl( rEleName, nMode, bDirect, TRUE );
+ return OpenStorage_Impl( rEleName, nMode, bDirect, sal_True );
}
-BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nMode, BOOL bDirect, BOOL bForceUCBStorage )
+BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nMode, sal_Bool bDirect, sal_Bool bForceUCBStorage )
{
// try to find the storage element
UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
@@ -3026,8 +3026,8 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
String aName( pImp->m_aURL );
aName += '/';
aName += rEleName; // ???
- UCBStorage *pStorage = new UCBStorage( aName, nMode, bDirect, FALSE, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
- pStorage->pImp->m_bIsRoot = FALSE;
+ UCBStorage *pStorage = new UCBStorage( aName, nMode, bDirect, sal_False, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
+ pStorage->pImp->m_bIsRoot = sal_False;
pStorage->pImp->m_bListCreated = sal_True; // the storage is pretty new, nothing to read
pStorage->SetError( GetError() );
return pStorage;
@@ -3037,7 +3037,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
// problem: perhaps an OLEStorage should be created ?!
// Because nothing is known about the element that should be created, an external parameter is needed !
pElement = new UCBStorageElement_Impl( rEleName );
- pElement->m_bIsInserted = TRUE;
+ pElement->m_bIsInserted = sal_True;
pImp->m_aChildrenList.Insert( pElement, LIST_APPEND );
}
@@ -3064,7 +3064,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
pElement->m_xStream->PrepareCachedForReopen( nMode );
pElement->m_xStream->Init();
- pElement->m_bIsStorage = TRUE;
+ pElement->m_bIsStorage = sal_True;
return pElement->m_xStream->CreateStorage(); // can only be created in transacted mode
}
else if ( pElement->m_xStorage.Is() )
@@ -3077,13 +3077,13 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
}
else
{
- BOOL bIsWritable = (( pElement->m_xStorage->m_nMode & STREAM_WRITE ) != 0);
+ sal_Bool bIsWritable = (( pElement->m_xStorage->m_nMode & STREAM_WRITE ) != 0);
if ( !bIsWritable && (( nMode & STREAM_WRITE ) != 0 ))
{
String aName( pImp->m_aURL );
aName += '/';
aName += pElement->m_aOriginalName;
- UCBStorage* pStorage = new UCBStorage( aName, nMode, bDirect, FALSE, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
+ UCBStorage* pStorage = new UCBStorage( aName, nMode, bDirect, sal_False, pImp->m_bRepairPackage, pImp->m_xProgressHandler );
pElement->m_xStorage = pStorage->pImp;
return pStorage;
}
@@ -3097,7 +3097,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
else if ( !pElement->m_xStream.Is() )
{
// storage is opened the first time
- BOOL bIsWritable = (( pImp->m_nMode & STREAM_WRITE ) != 0 );
+ sal_Bool bIsWritable = (( pImp->m_nMode & STREAM_WRITE ) != 0 );
if ( pImp->m_bIsLinked && pImp->m_bIsRoot && bIsWritable )
{
// make sure that the root storage object has been created before substorages will be created
@@ -3107,7 +3107,7 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
Content aFolder( aFolderObj.GetMainURL( INetURLObject::NO_DECODE ), Reference < XCommandEnvironment >() );
pImp->m_pContent = new Content;
- BOOL bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, pImp->m_aName, *pImp->m_pContent );
+ sal_Bool bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, pImp->m_aName, *pImp->m_pContent );
if ( !bRet )
{
SetError( SVSTREAM_CANNOT_MAKE );
@@ -3128,31 +3128,31 @@ BaseStorage* UCBStorage::OpenStorage_Impl( const String& rEleName, StreamMode nM
return NULL;
}
-UCBStorage_Impl* UCBStorage_Impl::OpenStorage( UCBStorageElement_Impl* pElement, StreamMode nMode, BOOL bDirect )
+UCBStorage_Impl* UCBStorage_Impl::OpenStorage( UCBStorageElement_Impl* pElement, StreamMode nMode, sal_Bool bDirect )
{
UCBStorage_Impl* pRet = NULL;
String aName( m_aURL );
aName += '/';
aName += pElement->m_aOriginalName; // ???
- pElement->m_bIsStorage = pElement->m_bIsFolder = TRUE;
+ pElement->m_bIsStorage = pElement->m_bIsFolder = sal_True;
if ( m_bIsLinked && !::utl::UCBContentHelper::Exists( aName ) )
{
Content aNewFolder;
- BOOL bRet = ::utl::UCBContentHelper::MakeFolder( *m_pContent, pElement->m_aOriginalName, aNewFolder );
+ sal_Bool bRet = ::utl::UCBContentHelper::MakeFolder( *m_pContent, pElement->m_aOriginalName, aNewFolder );
if ( bRet )
- pRet = new UCBStorage_Impl( aNewFolder, aName, nMode, NULL, bDirect, FALSE, m_bRepairPackage, m_xProgressHandler );
+ pRet = new UCBStorage_Impl( aNewFolder, aName, nMode, NULL, bDirect, sal_False, m_bRepairPackage, m_xProgressHandler );
}
else
{
- pRet = new UCBStorage_Impl( aName, nMode, NULL, bDirect, FALSE, m_bRepairPackage, m_xProgressHandler );
+ pRet = new UCBStorage_Impl( aName, nMode, NULL, bDirect, sal_False, m_bRepairPackage, m_xProgressHandler );
}
if ( pRet )
{
pRet->m_bIsLinked = m_bIsLinked;
- pRet->m_bIsRoot = FALSE;
+ pRet->m_bIsRoot = sal_False;
// if name has been changed before creating the stream: set name!
pRet->m_aName = pElement->m_aOriginalName;
@@ -3165,41 +3165,41 @@ UCBStorage_Impl* UCBStorage_Impl::OpenStorage( UCBStorageElement_Impl* pElement,
return pRet;
}
-BOOL UCBStorage::IsStorage( const String& rEleName ) const
+sal_Bool UCBStorage::IsStorage( const String& rEleName ) const
{
if( !rEleName.Len() )
- return FALSE;
+ return sal_False;
const UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
return ( pElement && pElement->m_bIsStorage );
}
-BOOL UCBStorage::IsStream( const String& rEleName ) const
+sal_Bool UCBStorage::IsStream( const String& rEleName ) const
{
if( !rEleName.Len() )
- return FALSE;
+ return sal_False;
const UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
return ( pElement && !pElement->m_bIsStorage );
}
-BOOL UCBStorage::IsContained( const String & rEleName ) const
+sal_Bool UCBStorage::IsContained( const String & rEleName ) const
{
if( !rEleName.Len() )
- return FALSE;
+ return sal_False;
const UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
return ( pElement != NULL );
}
-BOOL UCBStorage::Remove( const String& rEleName )
+sal_Bool UCBStorage::Remove( const String& rEleName )
{
if( !rEleName.Len() )
- return FALSE;
+ return sal_False;
UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
if ( pElement )
{
- pElement->m_bIsRemoved = TRUE;
+ pElement->m_bIsRemoved = sal_True;
}
else
SetError( SVSTREAM_FILE_NOT_FOUND );
@@ -3207,16 +3207,16 @@ BOOL UCBStorage::Remove( const String& rEleName )
return ( pElement != NULL );
}
-BOOL UCBStorage::Rename( const String& rEleName, const String& rNewName )
+sal_Bool UCBStorage::Rename( const String& rEleName, const String& rNewName )
{
if( !rEleName.Len()|| !rNewName.Len() )
- return FALSE;
+ return sal_False;
UCBStorageElement_Impl *pAlreadyExisting = FindElement_Impl( rNewName );
if ( pAlreadyExisting )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return FALSE; // can't change to a name that is already used
+ return sal_False; // can't change to a name that is already used
}
UCBStorageElement_Impl *pElement = FindElement_Impl( rEleName );
@@ -3230,10 +3230,10 @@ BOOL UCBStorage::Rename( const String& rEleName, const String& rNewName )
return pElement != NULL;
}
-BOOL UCBStorage::MoveTo( const String& rEleName, BaseStorage* pNewSt, const String& rNewName )
+sal_Bool UCBStorage::MoveTo( const String& rEleName, BaseStorage* pNewSt, const String& rNewName )
{
if( !rEleName.Len() || !rNewName.Len() )
- return FALSE;
+ return sal_False;
if ( pNewSt == ((BaseStorage*) this) && !FindElement_Impl( rNewName ) )
{
@@ -3257,31 +3257,31 @@ BOOL UCBStorage::MoveTo( const String& rEleName, BaseStorage* pNewSt, const Stri
}
*/
// MoveTo is done by first copying to the new destination and then removing the old element
- BOOL bRet = CopyTo( rEleName, pNewSt, rNewName );
+ sal_Bool bRet = CopyTo( rEleName, pNewSt, rNewName );
if ( bRet )
bRet = Remove( rEleName );
return bRet;
}
}
-BOOL UCBStorage::ValidateFAT()
+sal_Bool UCBStorage::ValidateFAT()
{
// ???
- return TRUE;
+ return sal_True;
}
-BOOL UCBStorage::Validate( BOOL bWrite ) const
+sal_Bool UCBStorage::Validate( sal_Bool bWrite ) const
{
// ???
return ( !bWrite || ( pImp->m_nMode & STREAM_WRITE ) );
}
-BOOL UCBStorage::ValidateMode( StreamMode m ) const
+sal_Bool UCBStorage::ValidateMode( StreamMode m ) const
{
// ???
if( m == ( STREAM_READ | STREAM_TRUNC ) ) // from stg.cxx
- return TRUE;
- USHORT nCurMode = 0xFFFF;
+ return sal_True;
+ sal_uInt16 nCurMode = 0xFFFF;
if( ( m & 3 ) == STREAM_READ )
{
// only SHARE_DENYWRITE or SHARE_DENYALL allowed
@@ -3289,7 +3289,7 @@ BOOL UCBStorage::ValidateMode( StreamMode m ) const
&& ( nCurMode & STREAM_SHARE_DENYWRITE ) )
|| ( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) ) )
- return TRUE;
+ return sal_True;
}
else
{
@@ -3298,10 +3298,10 @@ BOOL UCBStorage::ValidateMode( StreamMode m ) const
// the commit may fail
if( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) )
- return TRUE;
+ return sal_True;
}
- return TRUE;
+ return sal_True;
}
const SvStream* UCBStorage::GetSvStream() const
@@ -3311,13 +3311,13 @@ const SvStream* UCBStorage::GetSvStream() const
return pImp->m_pSource;
}
-BOOL UCBStorage::Equals( const BaseStorage& rStorage ) const
+sal_Bool UCBStorage::Equals( const BaseStorage& rStorage ) const
{
// ???
return ((BaseStorage*)this) == &rStorage;
}
-BOOL UCBStorage::IsStorageFile( const String& rFileName )
+sal_Bool UCBStorage::IsStorageFile( const String& rFileName )
{
String aFileURL = rFileName;
INetURLObject aObj( aFileURL );
@@ -3329,27 +3329,27 @@ BOOL UCBStorage::IsStorageFile( const String& rFileName )
}
SvStream * pStm = ::utl::UcbStreamHelper::CreateStream( aFileURL, STREAM_STD_READ );
- BOOL bRet = UCBStorage::IsStorageFile( pStm );
+ sal_Bool bRet = UCBStorage::IsStorageFile( pStm );
delete pStm;
return bRet;
}
-BOOL UCBStorage::IsStorageFile( SvStream* pFile )
+sal_Bool UCBStorage::IsStorageFile( SvStream* pFile )
{
if ( !pFile )
- return FALSE;
+ return sal_False;
- ULONG nPos = pFile->Tell();
+ sal_uLong nPos = pFile->Tell();
pFile->Seek( STREAM_SEEK_TO_END );
if ( pFile->Tell() < 4 )
- return FALSE;
+ return sal_False;
pFile->Seek(0);
- UINT32 nBytes;
+ sal_uInt32 nBytes;
*pFile >> nBytes;
// search for the magic bytes
- BOOL bRet = ( nBytes == 0x04034b50 );
+ sal_Bool bRet = ( nBytes == 0x04034b50 );
if ( !bRet )
{
// disk spanned file have an additional header in front of the usual one
@@ -3365,22 +3365,22 @@ BOOL UCBStorage::IsStorageFile( SvStream* pFile )
return bRet;
}
-BOOL UCBStorage::IsDiskSpannedFile( SvStream* pFile )
+sal_Bool UCBStorage::IsDiskSpannedFile( SvStream* pFile )
{
if ( !pFile )
- return FALSE;
+ return sal_False;
- ULONG nPos = pFile->Tell();
+ sal_uLong nPos = pFile->Tell();
pFile->Seek( STREAM_SEEK_TO_END );
if ( !pFile->Tell() )
- return FALSE;
+ return sal_False;
pFile->Seek(0);
- UINT32 nBytes;
+ sal_uInt32 nBytes;
*pFile >> nBytes;
// disk spanned file have an additional header in front of the usual one
- BOOL bRet = ( nBytes == 0x08074b50 );
+ sal_Bool bRet = ( nBytes == 0x08074b50 );
if ( bRet )
{
*pFile >> nBytes;
@@ -3394,13 +3394,13 @@ BOOL UCBStorage::IsDiskSpannedFile( SvStream* pFile )
String UCBStorage::GetLinkedFile( SvStream &rStream )
{
String aString;
- ULONG nPos = rStream.Tell();
+ sal_uLong nPos = rStream.Tell();
rStream.Seek( STREAM_SEEK_TO_END );
if ( !rStream.Tell() )
return aString;
rStream.Seek(0);
- UINT32 nBytes;
+ sal_uInt32 nBytes;
rStream >> nBytes;
if( nBytes == 0x04034b50 )
{
@@ -3430,7 +3430,7 @@ String UCBStorage::CreateLinkFile( const String& rName )
SvStream* pStream = pTempFile->GetStream( STREAM_STD_READWRITE | STREAM_TRUNC );
// write header
- *pStream << ( UINT32 ) 0x04034b50;
+ *pStream << ( sal_uInt32 ) 0x04034b50;
// assemble a new folder name in the destination folder
INetURLObject aObj( rName );
@@ -3441,7 +3441,7 @@ String UCBStorage::CreateLinkFile( const String& rName )
// create a folder and store its URL
Content aFolder( aFolderURL, Reference < XCommandEnvironment >() );
Content aNewFolder;
- BOOL bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, aTitle, aNewFolder );
+ sal_Bool bRet = ::utl::UCBContentHelper::MakeFolder( aFolder, aTitle, aNewFolder );
if ( !bRet )
{
aFolderObj.insertName( aTitle );
@@ -3487,15 +3487,15 @@ String UCBStorage::CreateLinkFile( const String& rName )
return aURL;
}
- pTempFile->EnableKillingFile( TRUE );
+ pTempFile->EnableKillingFile( sal_True );
delete pTempFile;
return String();
}
-BOOL UCBStorage::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
+sal_Bool UCBStorage::SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue )
{
if ( rName.CompareToAscii("Title") == COMPARE_EQUAL )
- return FALSE;
+ return sal_False;
if ( rName.CompareToAscii("MediaType") == COMPARE_EQUAL )
{
@@ -3509,38 +3509,38 @@ BOOL UCBStorage::SetProperty( const String& rName, const ::com::sun::star::uno::
if ( pImp->GetContent() )
{
pImp->m_pContent->setPropertyValue( rName, rValue );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
{
}
- return FALSE;
+ return sal_False;
}
-BOOL UCBStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool UCBStorage::GetProperty( const String& rName, ::com::sun::star::uno::Any& rValue )
{
try
{
if ( pImp->GetContent() )
{
rValue = pImp->m_pContent->getPropertyValue( rName );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
{
}
- return FALSE;
+ return sal_False;
}
-BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue )
+sal_Bool UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue )
{
UCBStorageElement_Impl *pEle = FindElement_Impl( rEleName );
if ( !pEle )
- return FALSE;
+ return sal_False;
if ( !pEle->m_bIsFolder )
{
@@ -3549,7 +3549,7 @@ BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com
if ( pEle->m_xStream->m_nError )
{
pEle->m_xStream.Clear();
- return FALSE;
+ return sal_False;
}
try
@@ -3557,7 +3557,7 @@ BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com
if ( pEle->m_xStream->m_pContent )
{
rValue = pEle->m_xStream->m_pContent->getPropertyValue( rName );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
@@ -3571,7 +3571,7 @@ BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com
if ( pEle->m_xStorage->m_nError )
{
pEle->m_xStorage.Clear();
- return FALSE;
+ return sal_False;
}
try
@@ -3579,7 +3579,7 @@ BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com
if ( pEle->m_xStorage->GetContent() )
{
rValue = pEle->m_xStorage->m_pContent->getPropertyValue( rName );
- return TRUE;
+ return sal_True;
}
}
catch ( Exception& )
@@ -3587,7 +3587,7 @@ BOOL UCBStorage::GetProperty( const String& rEleName, const String& rName, ::com
}
}
- return FALSE;
+ return sal_False;
}
UNOStorageHolderList* UCBStorage::GetUNOStorageHolderList()
diff --git a/sot/source/sdstor/unostorageholder.cxx b/sot/source/sdstor/unostorageholder.cxx
index 6224925c1820..00a905125ff6 100644
--- a/sot/source/sdstor/unostorageholder.cxx
+++ b/sot/source/sdstor/unostorageholder.cxx
@@ -133,7 +133,7 @@ void SAL_CALL UNOStorageHolder::commited( const lang::EventObject& /*aEvent*/ )
xComp->dispose();
- SotStorageRef rTempStorage = new SotStorage( TRUE, aTmpStorFile.GetURL(), STREAM_WRITE, STORAGE_TRANSACTED );
+ SotStorageRef rTempStorage = new SotStorage( sal_True, aTmpStorFile.GetURL(), STREAM_WRITE, STORAGE_TRANSACTED );
if ( !rTempStorage.Is() || rTempStorage->GetError() != ERRCODE_NONE )
throw uno::RuntimeException();