[Libreoffice-commits] core.git: framework/inc include/sfx2 include/sot include/svtools sfx2/source sot/qa sot/source
Norbert Thiebaud
nthiebaud at gmail.com
Thu Jul 4 02:58:43 PDT 2013
framework/inc/classes/droptargetlistener.hxx | 1
include/sfx2/lnkbase.hxx | 1
include/sfx2/objsh.hxx | 2
include/sot/exchange.hxx | 22
include/sot/factory.hxx | 9
include/sot/filelist.hxx | 8
include/sot/object.hxx | 20
include/sot/stg.hxx | 351 ++++++------
include/sot/storage.hxx | 116 ++--
include/sot/storinfo.hxx | 18
include/svtools/transfer.hxx | 1
sfx2/source/doc/objxtor.cxx | 6
sfx2/source/doc/oleprops.hxx | 1
sot/qa/cppunit/test_sot.cxx | 4
sot/source/base/exchange.cxx | 59 +-
sot/source/base/factory.cxx | 13
sot/source/base/filelist.cxx | 24
sot/source/base/formats.cxx | 12
sot/source/base/object.cxx | 25
sot/source/sdstor/stg.cxx | 279 ++++-----
sot/source/sdstor/stgavl.cxx | 43 -
sot/source/sdstor/stgavl.hxx | 8
sot/source/sdstor/stgcache.cxx | 46 -
sot/source/sdstor/stgcache.hxx | 31 -
sot/source/sdstor/stgdir.cxx | 9
sot/source/sdstor/stgdir.hxx | 14
sot/source/sdstor/stgelem.cxx | 81 +-
sot/source/sdstor/stgelem.hxx | 70 +-
sot/source/sdstor/stgio.cxx | 42 -
sot/source/sdstor/stgio.hxx | 13
sot/source/sdstor/stgole.cxx | 43 -
sot/source/sdstor/stgole.hxx | 26
sot/source/sdstor/stgstrms.hxx | 2
sot/source/sdstor/storage.cxx | 440 +++++----------
sot/source/sdstor/storinfo.cxx | 10
sot/source/sdstor/ucbstorage.cxx | 713 ++++++++++++-------------
sot/source/unoolestorage/xolesimplestorage.cxx | 38 -
sot/source/unoolestorage/xolesimplestorage.hxx | 4
38 files changed, 1236 insertions(+), 1369 deletions(-)
New commits:
commit 7c136e7ba27382d5f73454bdf5fa78d0b779e0b7
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Wed Jul 3 15:54:21 2013 -0500
module sot: String, bool and other clean-up
Change-Id: Ibe2bfdf20c500e9fd98c3baef66d36aa79ca4b52
Reviewed-on: https://gerrit.libreoffice.org/4710
Tested-by: LibreOffice gerrit bot <gerrit at libreoffice.org>
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/framework/inc/classes/droptargetlistener.hxx b/framework/inc/classes/droptargetlistener.hxx
index 0a7e7d2..c6fc73d 100644
--- a/framework/inc/classes/droptargetlistener.hxx
+++ b/framework/inc/classes/droptargetlistener.hxx
@@ -29,6 +29,7 @@
#include <cppuhelper/implbase1.hxx>
#include <sot/exchange.hxx>
+#include <tools/string.hxx>
namespace framework
{
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index ebd76db..88bec2d 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -24,6 +24,7 @@
#include "sfx2/dllapi.h"
#include <sot/exchange.hxx>
#include <tools/ref.hxx>
+#include <tools/string.hxx>
#include <sfx2/linksrc.hxx>
namespace com { namespace sun { namespace star { namespace uno
diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx
index d3aa202..64e738f 100644
--- a/include/sfx2/objsh.hxx
+++ b/include/sfx2/objsh.hxx
@@ -212,7 +212,7 @@ protected:
virtual ~SfxObjectShell();
virtual void ModifyChanged();
- virtual sal_Bool Close();
+ virtual bool Close();
/** declares the document to have capabilities to contain basic/dialog libraries
*/
diff --git a/include/sot/exchange.hxx b/include/sot/exchange.hxx
index b427368..489ed9d 100644
--- a/include/sot/exchange.hxx
+++ b/include/sot/exchange.hxx
@@ -22,11 +22,11 @@
#include <list>
#include <vector>
-#include <tools/string.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/datatransfer/DataFlavor.hpp>
#include <com/sun/star/datatransfer/dnd/DNDConstants.hpp>
#include "sot/sotdllapi.h"
+#include <tools/solar.h>
class SotDataObject;
@@ -62,8 +62,8 @@ struct DataFlavorExVector : public _DataFlavorExVector
typedef ::std::list< ::com::sun::star::datatransfer::DataFlavor > DataFlavorList;
typedef ::std::list< DataFlavorEx > DataFlavorExList;
-SOT_DLLPUBLIC sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector,
- sal_uLong nId );
+SOT_DLLPUBLIC bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector,
+ sal_uLong nId );
// -------------------------
// - Vordefinierte Formate -
@@ -175,15 +175,15 @@ class SOT_DLLPUBLIC SotExchange
{
public:
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 sal_uLong RegisterFormatName( const OUString& rName );
+ static sal_uLong RegisterFormatMimeType( const OUString& 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 );
+ static OUString GetFormatName( sal_uLong nFormat );
+ static bool GetFormatDataFlavor( sal_uLong nFormat, ::com::sun::star::datatransfer::DataFlavor& rFlavor );
+ static OUString GetFormatMimeType( sal_uLong nFormat );
+ static bool IsInternal( const SvGlobalName& );
+ static sal_uLong GetFormatIdFromMimeType( const OUString& rMimeType );
// bestimme die SotFormatStringId von dem registrierten Format
//JP 12.11.98: diese 3 Methoden sind ab sofort ueberfluessig, da
@@ -191,7 +191,7 @@ public:
// SotFormatStringId ist!
static SotFormatStringId GetFormatStringId( sal_uLong nFormat )
{ return nFormat; }
- static SotFormatStringId GetFormatStringId( const String& rName )
+ static SotFormatStringId GetFormatStringId( const OUString& rName )
{ return SotExchange::RegisterFormatMimeType( rName ); }
static sal_uLong RegisterSotFormatName( SotFormatStringId nId )
{ return nId; }
diff --git a/include/sot/factory.hxx b/include/sot/factory.hxx
index 406333d..dd5a78b 100644
--- a/include/sot/factory.hxx
+++ b/include/sot/factory.hxx
@@ -21,7 +21,6 @@
#define _SOT_FACTORY_HXX
#include <tools/globname.hxx>
-#include <tools/string.hxx>
#include <tools/rtti.hxx>
#include "sot/sotdllapi.h"
#include <vector>
@@ -41,9 +40,9 @@ class SOT_DLLPUBLIC SotFactory : public SvGlobalName
const SotFactory ** pSuperClasses; // Superklassen
CreateInstanceType pCreateFunc;
- String aClassName;
+ OUString aClassName;
- static sal_Bool ExistTest( const SvGlobalName & );
+ static bool ExistTest( const SvGlobalName & );
protected:
virtual ~SotFactory();
public:
@@ -54,12 +53,12 @@ public:
static const SotFactory * Find( const SvGlobalName & );
SotFactory( const SvGlobalName &,
- const String & rClassName, CreateInstanceType );
+ const OUString & rClassName, CreateInstanceType );
void PutSuperClass( const SotFactory * );
virtual void * CreateInstance( SotObject ** ppObj = NULL ) const;
- sal_Bool Is( const SotFactory * pSuperClass ) const;
+ bool Is( const SotFactory * pSuperClass ) const;
const SotFactory * GetSuper( sal_uInt16 nPos ) const
{
return nPos < nSuperCount ?
diff --git a/include/sot/filelist.hxx b/include/sot/filelist.hxx
index 2e69a95..9dc70a7 100644
--- a/include/sot/filelist.hxx
+++ b/include/sot/filelist.hxx
@@ -20,11 +20,11 @@
#ifndef _FILELIST_HXX
#define _FILELIST_HXX
-#include <tools/stream.hxx>
#include "sot/sotdllapi.h"
+#include <tools/stream.hxx>
#include <vector>
-typedef ::std::vector< String* > FileStringList;
+typedef ::std::vector< OUString* > FileStringList;
class SOT_DLLPUBLIC FileList : public SvDataCopyStream
{
@@ -54,8 +54,8 @@ public:
SOT_DLLPUBLIC friend SvStream& operator>>( SvStream& rIStm, FileList& rFileList );
// Liste fuellen/abfragen
- void AppendFile( const String& rStr );
- String GetFile( size_t i ) const;
+ void AppendFile( const OUString& rStr );
+ OUString GetFile( size_t i ) const;
size_t Count( void ) const;
};
diff --git a/include/sot/object.hxx b/include/sot/object.hxx
index 435dda8..349efbc 100644
--- a/include/sot/object.hxx
+++ b/include/sot/object.hxx
@@ -270,14 +270,14 @@ class SOT_DLLPUBLIC SotObject : virtual public SvRefBase
friend class SotFactory;
friend class SvObject;
sal_uInt16 nOwnerLockCount;
- sal_Bool bOwner:1,
- bSVObject:1, // Ist Proxy, dann TRUE wenn andere Seite SV ist
- bInClose:1; // TRUE, im DoClose
+ bool bOwner;
+ bool bSVObject; // Ist Proxy, dann TRUE wenn andere Seite SV ist
+ bool bInClose; // TRUE, im DoClose
protected:
virtual ~SotObject();
- void SetExtern() { bOwner = sal_False; }
- virtual sal_Bool Close();
+ void SetExtern() { bOwner = false; }
+ virtual bool Close();
public:
SotObject();
SO2_DECL_BASIC_CLASS_DLL(SotObject,SOTDATA())
@@ -285,13 +285,13 @@ public:
// Nur damit die Makros in So3 nicht ganz ausufern
virtual IUnknown * GetInterface( const SvGlobalName & );
- sal_Bool Owner() const { return bOwner; }
+ bool Owner() const { return bOwner; }
- sal_uInt16 GetOwnerLockCount() const { return nOwnerLockCount; }
+ sal_uInt16 GetOwnerLockCount() const { return nOwnerLockCount; }
- void OwnerLock( sal_Bool bLock );
- sal_Bool DoClose();
- sal_Bool IsInClose() const { return bInClose; }
+ void OwnerLock( bool bLock );
+ bool DoClose();
+ bool IsInClose() const { return bInClose; }
private:
// Kopieren und Zuweisen dieses Objekttyps ist nicht erlaubt
diff --git a/include/sot/stg.hxx b/include/sot/stg.hxx
index bd124cc..4a4472d 100644
--- a/include/sot/stg.hxx
+++ b/include/sot/stg.hxx
@@ -31,6 +31,7 @@
#include <tools/rtti.hxx>
+#include <tools/solar.h>
#include <tools/stream.hxx>
#include <tools/globname.hxx>
#include "sot/storinfo.hxx"
@@ -52,86 +53,86 @@ struct ClsId
class SOT_DLLPUBLIC StorageBase : public SvRefBase
{
protected:
- sal_uLong m_nError; // error code
+ sal_uLong m_nError; // error code
StreamMode m_nMode; // open mode
- sal_Bool m_bAutoCommit;
+ bool m_bAutoCommit;
StorageBase();
virtual ~StorageBase();
public:
TYPEINFO();
virtual const SvStream* GetSvStream() const = 0;
- virtual sal_Bool Validate( sal_Bool=sal_False ) const = 0;
- virtual sal_Bool ValidateMode( StreamMode ) const = 0;
+ virtual bool Validate( bool=false ) const = 0;
+ virtual bool ValidateMode( StreamMode ) const = 0;
void ResetError() const;
void SetError( sal_uLong ) const;
- sal_uLong GetError() const;
- sal_Bool Good() const { return sal_Bool( m_nError == SVSTREAM_OK ); }
+ sal_uLong GetError() const;
+ bool Good() const { return bool( m_nError == SVSTREAM_OK ); }
StreamMode GetMode() const { return m_nMode; }
- void SetAutoCommit( sal_Bool bSet )
+ void SetAutoCommit( bool bSet )
{ m_bAutoCommit = bSet; }
};
class BaseStorageStream : public StorageBase
{
public:
- TYPEINFO();
+ TYPEINFO();
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 sal_Bool SetSize( sal_uLong nNewSize ) = 0;
+ virtual void Flush() = 0;
+ virtual bool SetSize( sal_uLong nNewSize ) = 0;
virtual sal_uLong GetSize() const = 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;
+ virtual bool CopyTo( BaseStorageStream * pDestStm ) = 0;
+ virtual bool Commit() = 0;
+ virtual bool Revert() = 0;
+ virtual bool Equals( const BaseStorageStream& rStream ) const = 0;
};
class BaseStorage : public StorageBase
{
public:
TYPEINFO();
- virtual const String& GetName() const = 0;
- virtual sal_Bool IsRoot() const = 0;
+ virtual const OUString& GetName() const = 0;
+ virtual 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,
- sal_uLong nOriginalClipFormat,
- const String & rUserTypeName ) = 0;
+ sal_uLong nOriginalClipFormat,
+ const OUString & rUserTypeName ) = 0;
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- sal_uLong nOriginalClipFormat,
- const String & rUserTypeName ) = 0;
+ sal_uLong nOriginalClipFormat,
+ const OUString & rUserTypeName ) = 0;
virtual SvGlobalName GetClassName() = 0;
- virtual sal_uLong GetFormat() = 0;
- virtual String GetUserName() = 0;
- virtual sal_Bool ShouldConvert() = 0;
+ virtual sal_uLong GetFormat() = 0;
+ virtual OUString GetUserName() = 0;
+ virtual bool ShouldConvert() = 0;
virtual void FillInfoList( SvStorageInfoList* ) const = 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,
- sal_Bool bDirect = sal_True, const OString* pKey=0 ) = 0;
- virtual BaseStorage* OpenStorage( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- bool bDirect = false ) = 0;
- virtual BaseStorage* OpenUCBStorage( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- sal_Bool bDirect = sal_False ) = 0;
- virtual BaseStorage* OpenOLEStorage( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- 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;
+ virtual bool CopyTo( BaseStorage* pDestStg ) const = 0;
+ virtual bool Commit() = 0;
+ virtual bool Revert() = 0;
+ virtual BaseStorageStream* OpenStream( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = true, const OString* pKey=0 ) = 0;
+ virtual BaseStorage* OpenStorage( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = false ) = 0;
+ virtual BaseStorage* OpenUCBStorage( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = false ) = 0;
+ virtual BaseStorage* OpenOLEStorage( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = false ) = 0;
+ virtual bool IsStream( const OUString& rEleName ) const = 0;
+ virtual bool IsStorage( const OUString& rEleName ) const = 0;
+ virtual bool IsContained( const OUString& rEleName ) const = 0;
+ virtual bool Remove( const OUString & rEleName ) = 0;
+ virtual bool Rename( const OUString & rEleName, const OUString & rNewName ) = 0;
+ virtual bool CopyTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName ) = 0;
+ virtual bool MoveTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName ) = 0;
+ virtual bool ValidateFAT() = 0;
+ virtual bool Equals( const BaseStorage& rStream ) const = 0;
};
class OLEStorageBase
@@ -142,8 +143,8 @@ protected:
StgDirEntry* pEntry; // the dir entry
OLEStorageBase( StgIo*, StgDirEntry*, StreamMode& );
~OLEStorageBase();
- sal_Bool Validate_Impl( sal_Bool=sal_False ) const;
- sal_Bool ValidateMode_Impl( StreamMode, StgDirEntry* p = NULL ) const ;
+ bool Validate_Impl( bool=false ) const;
+ bool ValidateMode_Impl( StreamMode, StgDirEntry* p = NULL ) const ;
const SvStream* GetSvStream_Impl() const;
public:
};
@@ -153,89 +154,89 @@ class StorageStream : public BaseStorageStream, public OLEStorageBase
//friend class Storage;
sal_uLong nPos; // current position
protected:
- ~StorageStream();
+ ~StorageStream();
public:
- TYPEINFO();
- StorageStream( StgIo*, StgDirEntry*, StreamMode );
+ TYPEINFO();
+ StorageStream( StgIo*, StgDirEntry*, StreamMode );
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 sal_Bool SetSize( sal_uLong nNewSize );
+ virtual void Flush();
+ virtual bool SetSize( sal_uLong nNewSize );
virtual sal_uLong GetSize() const;
- 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 sal_Bool Equals( const BaseStorageStream& rStream ) const;
+ virtual bool CopyTo( BaseStorageStream * pDestStm );
+ virtual bool Commit();
+ virtual bool Revert();
+ virtual bool Validate( bool=false ) const;
+ virtual bool ValidateMode( StreamMode ) const;
+ const SvStream* GetSvStream() const;
+ virtual bool Equals( const BaseStorageStream& rStream ) const;
};
class UCBStorageStream;
class SOT_DLLPUBLIC Storage : public BaseStorage, public OLEStorageBase
{
- String aName;
- sal_Bool bIsRoot;
- void Init( sal_Bool bCreate );
+ OUString aName;
+ bool bIsRoot;
+ void Init( bool bCreate );
Storage( StgIo*, StgDirEntry*, StreamMode );
protected:
~Storage();
public:
TYPEINFO();
- 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 );
+ Storage( const OUString &, StreamMode = STREAM_STD_READWRITE, bool bDirect = true );
+ Storage( SvStream& rStrm, bool bDirect = true );
+ Storage( UCBStorageStream& rStrm, bool bDirect = true );
- static sal_Bool IsStorageFile( const String & rFileName );
- static sal_Bool IsStorageFile( SvStream* );
+ static bool IsStorageFile( const OUString & rFileName );
+ static bool IsStorageFile( SvStream* );
- virtual const String& GetName() const;
- virtual sal_Bool IsRoot() const { return bIsRoot; }
+ virtual const OUString& GetName() const;
+ virtual bool IsRoot() const { return bIsRoot; }
virtual void SetClassId( const ClsId& );
virtual const ClsId& GetClassId() const;
virtual void SetDirty();
virtual void SetClass( const SvGlobalName & rClass,
- sal_uLong nOriginalClipFormat,
- const String & rUserTypeName );
+ sal_uLong nOriginalClipFormat,
+ const OUString & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- sal_uLong nOriginalClipFormat,
- const String & rUserTypeName );
+ sal_uLong nOriginalClipFormat,
+ const OUString & rUserTypeName );
virtual SvGlobalName GetClassName();
- virtual sal_uLong GetFormat();
- virtual String GetUserName();
- virtual sal_Bool ShouldConvert();
+ virtual sal_uLong GetFormat();
+ virtual OUString GetUserName();
+ virtual bool ShouldConvert();
virtual void FillInfoList( SvStorageInfoList* ) const;
- 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,
- sal_Bool bDirect = sal_True, const OString* pKey=0 );
- virtual BaseStorage* OpenStorage( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- bool bDirect = false );
- virtual BaseStorage* OpenUCBStorage( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- sal_Bool bDirect = sal_False );
- virtual BaseStorage* OpenOLEStorage( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- 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 bool CopyTo( BaseStorage* pDestStg ) const;
+ virtual bool Commit();
+ virtual bool Revert();
+ virtual BaseStorageStream* OpenStream( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = true, const OString* pKey=0 );
+ virtual BaseStorage* OpenStorage( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = false );
+ virtual BaseStorage* OpenUCBStorage( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = false );
+ virtual BaseStorage* OpenOLEStorage( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = false );
+ virtual bool IsStream( const OUString& rEleName ) const;
+ virtual bool IsStorage( const OUString& rEleName ) const;
+ virtual bool IsContained( const OUString& rEleName ) const;
+ virtual bool Remove( const OUString & rEleName );
+ virtual bool Rename( const OUString & rEleName, const OUString & rNewName );
+ virtual bool CopyTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName );
+ virtual bool MoveTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName );
+ virtual bool ValidateFAT();
+ virtual bool Validate( bool=false ) const;
+ virtual bool ValidateMode( StreamMode ) const;
+ bool ValidateMode( StreamMode, StgDirEntry* p ) const;
virtual const SvStream* GetSvStream() const;
- virtual sal_Bool Equals( const BaseStorage& rStream ) const;
+ virtual bool Equals( const BaseStorage& rStream ) const;
};
class UCBStorageStream_Impl;
@@ -249,24 +250,24 @@ protected:
~UCBStorageStream();
public:
TYPEINFO();
- UCBStorageStream( const String& rName, StreamMode nMode, sal_Bool bDirect, const OString* pKey, sal_Bool bRepair, ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler > xProgress );
+ UCBStorageStream( const OUString& rName, StreamMode nMode, bool bDirect, const OString* pKey, bool bRepair, ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler > xProgress );
UCBStorageStream( UCBStorageStream_Impl* );
- 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 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 sal_Bool SetSize( sal_uLong nNewSize );
- virtual sal_uLong GetSize() const;
- 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;
+ virtual bool SetSize( sal_uLong nNewSize );
+ virtual sal_uLong GetSize() const;
+ virtual bool CopyTo( BaseStorageStream * pDestStm );
+ virtual bool Commit();
+ virtual bool Revert();
+ virtual bool Validate( bool=false ) const;
+ virtual bool ValidateMode( StreamMode ) const;
const SvStream* GetSvStream() const;
- virtual sal_Bool Equals( const BaseStorageStream& rStream ) const;
- sal_Bool SetProperty( const String& rName, const ::com::sun::star::uno::Any& rValue );
+ virtual bool Equals( const BaseStorageStream& rStream ) const;
+ bool SetProperty( const OUString& rName, const ::com::sun::star::uno::Any& rValue );
SvStream* GetModifySvStream();
};
@@ -285,79 +286,79 @@ class SOT_DLLPUBLIC UCBStorage : public BaseStorage
protected:
~UCBStorage();
public:
- static sal_Bool IsStorageFile( SvStream* );
- static sal_Bool IsDiskSpannedFile( SvStream* );
- static String GetLinkedFile( SvStream& );
- static String CreateLinkFile( const String& rName );
+ static bool IsStorageFile( SvStream* );
+ static bool IsDiskSpannedFile( SvStream* );
+ static OUString GetLinkedFile( SvStream& );
+ static OUString CreateLinkFile( const OUString& rName );
- UCBStorage( const ::ucbhelper::Content& rContent, const String& rName, StreamMode nMode, sal_Bool bDirect = sal_True, sal_Bool bIsRoot = sal_True );
- UCBStorage( const String& rName,
+ UCBStorage( const ::ucbhelper::Content& rContent, const OUString& rName, StreamMode nMode, bool bDirect = true, bool bIsRoot = true );
+ UCBStorage( const OUString& rName,
StreamMode nMode,
- sal_Bool bDirect = sal_True,
- sal_Bool bIsRoot = sal_True );
+ bool bDirect = true,
+ bool bIsRoot = true );
- UCBStorage( const String& rName,
+ UCBStorage( const OUString& rName,
StreamMode nMode,
- sal_Bool bDirect,
- sal_Bool bIsRoot,
- sal_Bool bIsRepair,
+ bool bDirect,
+ bool bIsRoot,
+ bool bIsRepair,
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XProgressHandler >
- xProgressHandler );
+ xProgressHandler );
UCBStorage( UCBStorage_Impl* );
- UCBStorage( SvStream& rStrm, sal_Bool bDirect = sal_True );
+ UCBStorage( SvStream& rStrm, bool bDirect = true );
TYPEINFO();
- virtual const String& GetName() const;
- virtual sal_Bool IsRoot() const;
+ virtual const OUString& GetName() const;
+ virtual bool IsRoot() const;
virtual void SetClassId( const ClsId& );
virtual const ClsId& GetClassId() const;
virtual void SetDirty();
virtual void SetClass( const SvGlobalName & rClass,
- sal_uLong nOriginalClipFormat,
- const String & rUserTypeName );
+ sal_uLong nOriginalClipFormat,
+ const OUString & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
- sal_uLong nOriginalClipFormat,
- const String & rUserTypeName );
+ sal_uLong nOriginalClipFormat,
+ const OUString & rUserTypeName );
virtual SvGlobalName GetClassName();
- virtual sal_uLong GetFormat();
- virtual String GetUserName();
- virtual sal_Bool ShouldConvert();
+ virtual sal_uLong GetFormat();
+ virtual OUString GetUserName();
+ virtual bool ShouldConvert();
virtual void FillInfoList( SvStorageInfoList* ) const;
- 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,
- sal_Bool bDirect = sal_True, const OString* pKey=0 );
- virtual BaseStorage* OpenStorage( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- bool bDirect = false );
- virtual BaseStorage* OpenUCBStorage( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- sal_Bool bDirect = sal_False );
- virtual BaseStorage* OpenOLEStorage( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- 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 bool CopyTo( BaseStorage* pDestStg ) const;
+ virtual bool Commit();
+ virtual bool Revert();
+ virtual BaseStorageStream* OpenStream( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = true, const OString* pKey=0 );
+ virtual BaseStorage* OpenStorage( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = false );
+ virtual BaseStorage* OpenUCBStorage( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = false );
+ virtual BaseStorage* OpenOLEStorage( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ bool bDirect = false );
+ virtual bool IsStream( const OUString& rEleName ) const;
+ virtual bool IsStorage( const OUString& rEleName ) const;
+ virtual bool IsContained( const OUString& rEleName ) const;
+ virtual bool Remove( const OUString & rEleName );
+ virtual bool Rename( const OUString & rEleName, const OUString & rNewName );
+ virtual bool CopyTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName );
+ virtual bool MoveTo( const OUString & rEleName, BaseStorage * pDest, const OUString & rNewName );
+ virtual bool ValidateFAT();
+ virtual bool Validate( bool=false ) const;
+ virtual bool ValidateMode( StreamMode ) const;
virtual const SvStream* GetSvStream() const;
- virtual sal_Bool Equals( const BaseStorage& rStream ) const;
- sal_Bool GetProperty( const String& rEleName, const String& rName, ::com::sun::star::uno::Any& rValue );
-
- UCBStorageElement_Impl* FindElement_Impl( const String& rName ) const;
- sal_Bool CopyStorageElement_Impl( UCBStorageElement_Impl& rElement,
- BaseStorage* pDest, const String& rNew ) const;
- BaseStorage* OpenStorage_Impl( const String & rEleName,
- StreamMode, sal_Bool bDirect, sal_Bool bForceUCBStorage );
+ virtual bool Equals( const BaseStorage& rStream ) const;
+ bool GetProperty( const OUString& rEleName, const OUString& rName, ::com::sun::star::uno::Any& rValue );
+
+ UCBStorageElement_Impl* FindElement_Impl( const OUString& rName ) const;
+ bool CopyStorageElement_Impl( UCBStorageElement_Impl& rElement,
+ BaseStorage* pDest, const OUString& rNew ) const;
+ BaseStorage* OpenStorage_Impl( const OUString & rEleName,
+ StreamMode, bool bDirect, bool bForceUCBStorage );
};
diff --git a/include/sot/storage.hxx b/include/sot/storage.hxx
index db3995d..a46373f 100644
--- a/include/sot/storage.hxx
+++ b/include/sot/storage.hxx
@@ -60,9 +60,9 @@ protected:
virtual void FlushData();
~SotStorageStream();
public:
- SotStorageStream( const String &,
- StreamMode = STREAM_STD_READWRITE,
- StorageMode = 0 );
+ SotStorageStream( const OUString &,
+ StreamMode = STREAM_STD_READWRITE,
+ StorageMode = 0 );
SotStorageStream( BaseStorageStream *pStm );
SotStorageStream();
SO2_DECL_BASIC_CLASS_DLL(SotStorageStream,SOTDATA())
@@ -71,10 +71,10 @@ public:
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 );
+ bool CopyTo( SotStorageStream * pDestStm );
+ virtual bool Commit();
+ virtual bool Revert();
+ bool SetProperty( const OUString& rName, const ::com::sun::star::uno::Any& rValue );
virtual sal_Size remainingSize();
};
@@ -98,41 +98,41 @@ friend class SvStorage;
BaseStorage * m_pTmpStg; // Temp-Storage fuer Transacted, nur auf diesem schreiben! ??? Useless ???
BaseStorage * m_pOwnStg; // Zielstorage
- SvStream * m_pStorStm; // nur fuer SDSTORAGES
+ SvStream * m_pStorStm; // nur fuer SDSTORAGES
sal_uLong m_nError;
- String m_aName; // Name des Storage
- sal_Bool m_bIsRoot:1, // z.B.: File-Storage
- m_bDelStm:1;
- OString m_aKey; // aKey.Len != 0 -> Verschluesselung
- long m_nVersion;
+ OUString m_aName; // Name des Storage
+ bool m_bIsRoot; // z.B.: File-Storage
+ bool m_bDelStm;
+ OString m_aKey; // aKey.Len != 0 -> Verschluesselung
+ long m_nVersion;
protected:
~SotStorage();
- void CreateStorage( sal_Bool bUCBStorage, StreamMode, StorageMode );
+ void CreateStorage( bool bUCBStorage, StreamMode, StorageMode );
public:
- SotStorage( const String &,
- StreamMode = STREAM_STD_READWRITE,
- StorageMode = 0 );
- SotStorage( sal_Bool bUCBStorage, const String &,
- StreamMode = STREAM_STD_READWRITE,
- StorageMode = 0 );
+ SotStorage( const OUString &,
+ StreamMode = STREAM_STD_READWRITE,
+ StorageMode = 0 );
+ SotStorage( bool bUCBStorage, const OUString &,
+ StreamMode = STREAM_STD_READWRITE,
+ StorageMode = 0 );
SotStorage( BaseStorage * );
SotStorage( SvStream & rStm );
- SotStorage( sal_Bool bUCBStorage, SvStream & rStm );
- SotStorage( SvStream * pStm, sal_Bool bDelete );
+ SotStorage( bool bUCBStorage, SvStream & rStm );
+ SotStorage( SvStream * pStm, bool bDelete );
SotStorage();
SO2_DECL_BASIC_CLASS_DLL(SotStorage,SOTDATA())
SvMemoryStream * CreateMemoryStream();
- static sal_Bool IsStorageFile( const String & rFileName );
- static sal_Bool IsStorageFile( SvStream* pStream );
+ static bool IsStorageFile( const OUString & rFileName );
+ static bool IsStorageFile( SvStream* pStream );
- virtual const String & GetName() const;
+ virtual const OUString& GetName() const;
- virtual sal_Bool Validate();
+ virtual bool Validate();
- const OString& GetKey() const;
+ const OString& GetKey() const;
void SetVersion( long nVers )
{
@@ -152,57 +152,57 @@ public:
}
virtual void ResetError();
- 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; }
+ bool IsRoot() const { return m_bIsRoot; }
+ void SignAsRoot( bool b = true ) { m_bIsRoot = b; }
+ void SetDeleteStream( bool bDelete ) { m_bDelStm = bDelete; }
// eigener Datenbereich
virtual void SetClass( const SvGlobalName & rClass,
sal_uLong bOriginalClipFormat,
- const String & rUserTypeName );
+ const OUString & rUserTypeName );
virtual void SetConvertClass( const SvGlobalName & rConvertClass,
sal_uLong bOriginalClipFormat,
- const String & rUserTypeName );
+ const OUString & rUserTypeName );
virtual SvGlobalName GetClassName();// Typ der Daten im Storage
- virtual sal_uLong GetFormat();
- virtual String GetUserName();
- virtual sal_Bool ShouldConvert();
+ virtual sal_uLong GetFormat();
+ virtual OUString GetUserName();
+ virtual bool ShouldConvert();
// Liste aller Elemente
virtual void FillInfoList( SvStorageInfoList * ) const;
- virtual sal_Bool CopyTo( SotStorage * pDestStg );
- virtual sal_Bool Commit();
- virtual sal_Bool Revert();
+ virtual bool CopyTo( SotStorage * pDestStg );
+ virtual bool Commit();
+ virtual bool Revert();
/* Element Methoden */
// Stream mit Verbindung zu Storage erzeugen,
// in etwa eine Parent-Child Beziehung
- SotStorageStream * OpenSotStream( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- StorageMode = 0 );
- SotStorage * OpenSotStorage( const String & rEleName,
- StreamMode = STREAM_STD_READWRITE,
- StorageMode = STORAGE_TRANSACTED );
+ SotStorageStream * OpenSotStream( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ StorageMode = 0 );
+ SotStorage * OpenSotStorage( const OUString & rEleName,
+ StreamMode = STREAM_STD_READWRITE,
+ StorageMode = STORAGE_TRANSACTED );
// Abfrage auf Storage oder Stream
- 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 bool IsStream( const OUString & rEleName ) const;
+ virtual bool IsStorage( const OUString & rEleName ) const;
+ virtual bool IsContained( const OUString & rEleName ) const;
// Element loeschen
- virtual sal_Bool Remove( const String & rEleName );
+ virtual bool Remove( const OUString & rEleName );
// Elementnamen aendern
- virtual sal_Bool Rename( const String & rEleName,
- const String & rNewName );
- virtual sal_Bool CopyTo( const String & rEleName, SotStorage * pDest,
- const String & rNewName );
- virtual sal_Bool MoveTo( const String & rEleName, SotStorage * pDest,
- const String & rNewName );
+ virtual bool Rename( const OUString & rEleName,
+ const OUString & rNewName );
+ virtual bool CopyTo( const OUString & rEleName, SotStorage * pDest,
+ const OUString & rNewName );
+ virtual bool MoveTo( const OUString & rEleName, SotStorage * pDest,
+ const OUString & rNewName );
- sal_Bool IsOLEStorage() const;
- static sal_Bool IsOLEStorage( const String & rFileName );
- static sal_Bool IsOLEStorage( SvStream* pStream );
+ bool IsOLEStorage() const;
+ static bool IsOLEStorage( const OUString & rFileName );
+ static bool IsOLEStorage( SvStream* pStream );
static SotStorage* OpenOLEStorage( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage,
- const String& rEleName, StreamMode = STREAM_STD_READWRITE );
+ const OUString& rEleName, StreamMode = STREAM_STD_READWRITE );
static sal_Int32 GetFormatID( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage );
static sal_Int32 GetVersion( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& xStorage );
};
diff --git a/include/sot/storinfo.hxx b/include/sot/storinfo.hxx
index 08fc5ea..a91b636 100644
--- a/include/sot/storinfo.hxx
+++ b/include/sot/storinfo.hxx
@@ -21,7 +21,7 @@
#define _SOT_STORINFO_HXX
#include <tools/globname.hxx>
-#include <tools/string.hxx>
+#include <tools/solar.h>
#include <vector>
#include "sot/sotdllapi.h"
@@ -29,16 +29,16 @@ class StgDirEntry;
class SvStorageInfo
{
friend class SvStorage;
- String aName;
+ OUString aName;
SvGlobalName aClassName;
sal_uLong nSize;
- sal_Bool bStream:1,
- bStorage:1;
+ bool bStream;
+ bool bStorage;
SvStorageInfo(){}; // Fuer SvStorage
public:
SvStorageInfo( const StgDirEntry& );
- SvStorageInfo( const String& rName, sal_uLong nSz, sal_Bool bIsStorage )
+ SvStorageInfo( const OUString& rName, sal_uLong nSz, bool bIsStorage )
: aName( rName )
, nSize( nSz )
, bStream( !bIsStorage )
@@ -46,10 +46,10 @@ public:
{}
const SvGlobalName & GetClassName() const { return aClassName; }
- const String & GetName() const { return aName; }
- sal_Bool IsStream() const { return bStream; }
- sal_Bool IsStorage() const { return bStorage; }
- sal_uLong GetSize() const { return nSize; }
+ const OUString & GetName() const { return aName; }
+ bool IsStream() const { return bStream; }
+ bool IsStorage() const { return bStorage; }
+ sal_uLong GetSize() const { return nSize; }
};
typedef ::std::vector< SvStorageInfo > SvStorageInfoList;
diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx
index 4f8966b..54a2dcf 100644
--- a/include/svtools/transfer.hxx
+++ b/include/svtools/transfer.hxx
@@ -23,6 +23,7 @@
#include "svtools/svtdllapi.h"
#include <tools/globname.hxx>
#include <tools/gen.hxx>
+#include <tools/string.hxx>
#include <sot/formats.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase4.hxx>
diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx
index 2c2d58a..2acf6c4 100644
--- a/sfx2/source/doc/objxtor.cxx
+++ b/sfx2/source/doc/objxtor.cxx
@@ -441,7 +441,7 @@ void SfxObjectShell::ViewAssigned()
//--------------------------------------------------------------------
// closes the Object and all its views
-sal_Bool SfxObjectShell::Close()
+bool SfxObjectShell::Close()
{
{DBG_CHKTHIS(SfxObjectShell, 0);}
SfxObjectShellRef aRef(this);
@@ -449,7 +449,7 @@ sal_Bool SfxObjectShell::Close()
{
// Do not close if a progress is still running
if ( !pImp->bDisposing && GetProgress() )
- return sal_False;
+ return false;
pImp->bClosing = sal_True;
Reference< util::XCloseable > xCloseable( GetBaseModel(), UNO_QUERY );
@@ -478,7 +478,7 @@ sal_Bool SfxObjectShell::Close()
}
}
- return sal_True;
+ return true;
}
//--------------------------------------------------------------------
diff --git a/sfx2/source/doc/oleprops.hxx b/sfx2/source/doc/oleprops.hxx
index f61ce8a..396572c 100644
--- a/sfx2/source/doc/oleprops.hxx
+++ b/sfx2/source/doc/oleprops.hxx
@@ -20,6 +20,7 @@
#include <map>
#include <boost/shared_ptr.hpp>
#include <sot/storage.hxx>
+#include <tools/string.hxx>
#include <vcl/bitmapex.hxx>
#include <com/sun/star/util/DateTime.hpp>
diff --git a/sot/qa/cppunit/test_sot.cxx b/sot/qa/cppunit/test_sot.cxx
index c88bcac..66f1d5e 100644
--- a/sot/qa/cppunit/test_sot.cxx
+++ b/sot/qa/cppunit/test_sot.cxx
@@ -27,7 +27,7 @@ namespace
SotTest() {}
bool checkStream( const SotStorageRef &xObjStor,
- const String &rStreamName,
+ const OUString &rStreamName,
sal_uLong nSize );
bool checkStorage( const SotStorageRef &xObjStor );
@@ -43,7 +43,7 @@ namespace
};
bool SotTest::checkStream( const SotStorageRef &xObjStor,
- const String &rStreamName,
+ const OUString &rStreamName,
sal_uLong nSize )
{
unsigned char *pData = (unsigned char*)malloc( nSize );
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index 8aba238..5b13c74 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -21,7 +21,6 @@
#include <tools/debug.hxx>
#include <tools/solar.h>
#include <tools/globname.hxx>
-#include <tools/string.hxx>
#include <sot/sotdata.hxx>
#include <sot/exchange.hxx>
#include <sot/formats.hxx>
@@ -229,13 +228,13 @@ static tDataFlavorList& InitFormats_Impl()
|*
|* Beschreibung CLIP.SDW
*************************************************************************/
-sal_uLong SotExchange::RegisterFormatName( const String& rName )
+sal_uLong SotExchange::RegisterFormatName( const OUString& rName )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
// teste zuerst die Standard - Name
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 ) )
+ if( rName.equalsAscii( pFormatArray_Impl[ i ].pName ) )
return i;
// BM: the chart format 105 ("StarChartDocument 5.0") was written
@@ -243,7 +242,7 @@ sal_uLong SotExchange::RegisterFormatName( const String& rName )
// The registry only contains the entry for the 42 format id.
nMax = SOT_FORMATSTR_ID_USER_END;
for( i = SOT_FORMAT_RTF; i <= nMax; ++i )
- if( rName.EqualsAscii( pFormatArray_Impl[ i ].pName ) )
+ if( rName.equalsAscii( pFormatArray_Impl[ i ].pName ) )
return ( (i == SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50)
? SOT_FORMATSTR_ID_STARCHART_50
: i );
@@ -253,7 +252,7 @@ sal_uLong SotExchange::RegisterFormatName( const String& rName )
for( i = 0, nMax = rL.size(); i < nMax; i++ )
{
DataFlavor* pFlavor = rL[ i ];
- if( pFlavor && rName == String( pFlavor->HumanPresentableName ) )
+ if( pFlavor && rName == OUString( pFlavor->HumanPresentableName ) )
return i + SOT_FORMATSTR_ID_USER_END + 1;
}
@@ -269,18 +268,18 @@ sal_uLong SotExchange::RegisterFormatName( const String& rName )
return nMax + SOT_FORMATSTR_ID_USER_END + 1;
}
-sal_uLong SotExchange::RegisterFormatMimeType( const String& rMimeType )
+sal_uLong SotExchange::RegisterFormatMimeType( const OUString& rMimeType )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
// teste zuerst die Standard - Name
sal_uLong i, nMax = SOT_FORMAT_FILE_LIST;
for( i = SOT_FORMAT_STRING; i <= nMax; ++i )
- if( rMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
+ if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) )
return i;
nMax = SOT_FORMATSTR_ID_USER_END;
for( i = SOT_FORMAT_RTF; i <= nMax; ++i )
- if( rMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
+ if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) )
return i;
// dann in der dynamischen Liste
@@ -288,7 +287,7 @@ sal_uLong SotExchange::RegisterFormatMimeType( const String& rMimeType )
for( i = 0, nMax = rL.size(); i < nMax; i++ )
{
DataFlavor* pFlavor = rL[ i ];
- if( pFlavor && rMimeType == String( pFlavor->MimeType ) )
+ if( pFlavor && rMimeType == OUString( pFlavor->MimeType ) )
return i + SOT_FORMATSTR_ID_USER_END + 1;
}
@@ -330,9 +329,9 @@ sal_uLong SotExchange::RegisterFormat( const DataFlavor& rFlavor )
|*
*************************************************************************/
-sal_Bool SotExchange::GetFormatDataFlavor( sal_uLong nFormat, DataFlavor& rFlavor )
+bool SotExchange::GetFormatDataFlavor( sal_uLong nFormat, DataFlavor& rFlavor )
{
- sal_Bool bRet;
+ bool bRet;
if( SOT_FORMATSTR_ID_USER_END >= nFormat )
{
@@ -341,7 +340,7 @@ sal_Bool SotExchange::GetFormatDataFlavor( sal_uLong nFormat, DataFlavor& rFlavo
rFlavor.HumanPresentableName = OUString::createFromAscii( rData.pName );
rFlavor.DataType = *rData.pType;
- bRet = sal_True;
+ bRet = true;
}
else
{
@@ -352,12 +351,12 @@ sal_Bool SotExchange::GetFormatDataFlavor( sal_uLong nFormat, DataFlavor& rFlavo
if( rL.size() > nFormat )
{
rFlavor = *rL[ nFormat ];
- bRet = sal_True;
+ bRet = true;
}
else
{
rFlavor = DataFlavor();
- bRet = sal_False;
+ bRet = false;
}
}
@@ -372,11 +371,11 @@ sal_Bool SotExchange::GetFormatDataFlavor( sal_uLong nFormat, DataFlavor& rFlavo
|*
*************************************************************************/
-String SotExchange::GetFormatMimeType( sal_uLong nFormat )
+OUString SotExchange::GetFormatMimeType( sal_uLong nFormat )
{
- String sMimeType;
+ OUString sMimeType;
if( SOT_FORMATSTR_ID_USER_END >= nFormat )
- sMimeType.AssignAscii( FormatArray_Impl::get()[nFormat].pMimeType );
+ sMimeType = OUString::createFromAscii( FormatArray_Impl::get()[nFormat].pMimeType );
else
{
tDataFlavorList& rL = InitFormats_Impl();
@@ -398,12 +397,12 @@ String SotExchange::GetFormatMimeType( sal_uLong nFormat )
|*
*************************************************************************/
-sal_uLong SotExchange::GetFormatIdFromMimeType( const String& rMimeType )
+sal_uLong SotExchange::GetFormatIdFromMimeType( const OUString& rMimeType )
{
const DataFlavorRepresentation *pFormatArray_Impl = FormatArray_Impl::get();
sal_uLong i, nMax = SOT_FORMAT_FILE_LIST;
for( i = SOT_FORMAT_STRING; i <= nMax; ++i )
- if( rMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
+ if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) )
return i;
// BM: the chart format 105 ("StarChartDocument 5.0") was written
@@ -411,18 +410,18 @@ sal_uLong SotExchange::GetFormatIdFromMimeType( const String& rMimeType )
// The registry only contains the entry for the 42 format id.
nMax = SOT_FORMATSTR_ID_USER_END;
for( i = SOT_FORMAT_RTF; i <= nMax; ++i )
- if( rMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
+ if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) )
return ( (i == SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50)
? SOT_FORMATSTR_ID_STARCHART_50
: i );
// dann in der dynamischen Liste
tDataFlavorList& rL = InitFormats_Impl();
- OUString aMimeType( rMimeType );
+
for( i = 0, nMax = rL.size(); i < nMax; i++ )
{
DataFlavor* pFlavor = rL[ i ];
- if( pFlavor && aMimeType == pFlavor->MimeType )
+ if( pFlavor && rMimeType == pFlavor->MimeType )
return i + SOT_FORMATSTR_ID_USER_END + 1;
}
@@ -439,11 +438,11 @@ sal_uLong SotExchange::GetFormat( const DataFlavor& rFlavor )
{
// teste zuerst die Standard - Name
const OUString& rMimeType = rFlavor.MimeType;
- const String aMimeType( rMimeType );
+
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 ) )
+ if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) )
return i;
// BM: the chart format 105 ("StarChartDocument 5.0") was written
@@ -451,7 +450,7 @@ sal_uLong SotExchange::GetFormat( const DataFlavor& rFlavor )
// The registry only contains the entry for the 42 format id.
nMax = SOT_FORMATSTR_ID_USER_END;
for( i = SOT_FORMAT_RTF; i <= nMax; ++i )
- if( aMimeType.EqualsAscii( pFormatArray_Impl[ i ].pMimeType ) )
+ if( rMimeType.equalsAscii( pFormatArray_Impl[ i ].pMimeType ) )
return ( (i == SOT_FORMATSTR_ID_STARCHARTDOCUMENT_50)
? SOT_FORMATSTR_ID_STARCHART_50
: i );
@@ -474,10 +473,10 @@ sal_uLong SotExchange::GetFormat( const DataFlavor& rFlavor )
|*
|* Beschreibung CLIP.SDW
*************************************************************************/
-String SotExchange::GetFormatName( sal_uLong nFormat )
+OUString SotExchange::GetFormatName( sal_uLong nFormat )
{
DataFlavor aFlavor;
- String aRet;
+ OUString aRet;
if( GetFormatDataFlavor( nFormat, aFlavor ) )
aRet = aFlavor.HumanPresentableName;
@@ -485,7 +484,7 @@ String SotExchange::GetFormatName( sal_uLong nFormat )
return aRet;
}
-sal_Bool SotExchange::IsInternal( const SvGlobalName& rName )
+bool SotExchange::IsInternal( const SvGlobalName& rName )
{
if ( rName == SvGlobalName(SO3_SW_CLASSID_60) ||
rName == SvGlobalName(SO3_SC_CLASSID_60) ||
@@ -495,8 +494,8 @@ sal_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 sal_True;
- return sal_False;
+ return true;
+ return false;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sot/source/base/factory.cxx b/sot/source/base/factory.cxx
index 6aa6cd0..0cd94cd 100644
--- a/sot/source/base/factory.cxx
+++ b/sot/source/base/factory.cxx
@@ -19,7 +19,6 @@
#include <sot/factory.hxx>
#include <tools/debug.hxx>
-#include <tools/string.hxx>
#include <sot/object.hxx>
#include <sot/sotdata.hxx>
#include <comphelper/classids.hxx>
@@ -76,8 +75,8 @@ SotData_Impl * SOTDATA()
TYPEINIT0(SotFactory);
SotFactory::SotFactory( const SvGlobalName & rName,
- const String & rClassName,
- CreateInstanceType pCreateFuncP )
+ const OUString & rClassName,
+ CreateInstanceType pCreateFuncP )
: SvGlobalName ( rName )
, nSuperCount ( 0 )
, pSuperClasses ( NULL )
@@ -200,17 +199,17 @@ void * SotFactory::CreateInstance( SotObject ** ppObj ) const
|*
|* Beschreibung
*************************************************************************/
-sal_Bool SotFactory::Is( const SotFactory * pSuperCl ) const
+bool SotFactory::Is( const SotFactory * pSuperCl ) const
{
if( this == pSuperCl )
- return sal_True;
+ return true;
for( sal_uInt16 i = 0; i < nSuperCount; i++ )
{
if( pSuperClasses[ i ]->Is( pSuperCl ) )
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
diff --git a/sot/source/base/filelist.cxx b/sot/source/base/filelist.cxx
index d9f85d5..da4cd9f 100644
--- a/sot/source/base/filelist.cxx
+++ b/sot/source/base/filelist.cxx
@@ -17,12 +17,11 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-
+#include <rtl/ustrbuf.hxx>
#include <tools/stream.hxx>
-#include <tools/string.hxx>
#include <tools/rtti.hxx>
#include <sot/exchange.hxx>
-#include<sot/filelist.hxx>
+#include <sot/filelist.hxx>
#include <osl/thread.h>
TYPEINIT1_AUTOFACTORY( FileList, SvDataCopyStream );
@@ -54,7 +53,7 @@ void FileList::ClearAll( void )
FileList& FileList::operator=( const FileList& rFileList )
{
for ( size_t i = 0, n = rFileList.aStrList.size(); i < n; ++i )
- aStrList.push_back( new String( *rFileList.aStrList[ i ] ) );
+ aStrList.push_back( new OUString( *rFileList.aStrList[ i ] ) );
return *this;
}
@@ -106,13 +105,11 @@ SvStream& operator>>( SvStream& rIStm, FileList& rFileList )
{
rFileList.ClearAll();
- String aStr;
+ OUStringBuffer sBuf(512);
sal_uInt16 c;
while (!rIStm.IsEof())
{
- aStr.Erase();
-
// read first character of filepath; c==0 > reach end of stream
rIStm >> c;
if (!c)
@@ -121,12 +118,13 @@ SvStream& operator>>( SvStream& rIStm, FileList& rFileList )
// read string till c==0
while (c && !rIStm.IsEof())
{
- aStr += (sal_Unicode)c;
+ sBuf.append((sal_Unicode)c);
rIStm >> c;
}
// append the filepath
- rFileList.AppendFile(aStr);
+ rFileList.AppendFile(sBuf.toString());
+ sBuf.truncate();
}
return rIStm;
}
@@ -137,14 +135,14 @@ SvStream& operator>>( SvStream& rIStm, FileList& rFileList )
|*
\******************************************************************************/
-void FileList::AppendFile( const String& rStr )
+void FileList::AppendFile( const OUString& rStr )
{
- aStrList.push_back( new String( rStr ) );
+ aStrList.push_back( new OUString( rStr ) );
}
-String FileList::GetFile( size_t i ) const
+OUString FileList::GetFile( size_t i ) const
{
- String aStr;
+ OUString aStr;
if( i < aStrList.size() )
aStr = *aStrList[ i ];
return aStr;
diff --git a/sot/source/base/formats.cxx b/sot/source/base/formats.cxx
index f4d473f..7f7d101 100644
--- a/sot/source/base/formats.cxx
+++ b/sot/source/base/formats.cxx
@@ -1256,17 +1256,17 @@ static SotDestinationEntry_Impl const aDestinationArray[] = \
// - new style GetExchange methods -
// ---------------------------------
-sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, sal_uLong nId )
+bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, sal_uLong nId )
{
DataFlavorExVector::iterator aIter( ( (DataFlavorExVector&) rDataFlavorExVector ).begin() );
DataFlavorExVector::iterator aEnd( ( (DataFlavorExVector&) rDataFlavorExVector ).end() );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
while( aIter != aEnd )
{
if( nId == (*aIter++).mnSotId )
{
- bRet = sal_True;
+ bRet = true;
aIter = aEnd;
}
}
@@ -1276,10 +1276,10 @@ sal_Bool IsFormatSupported( const DataFlavorExVector& rDataFlavorExVector, sal_u
// -----------------------------------------------------------------------------
-static sal_Bool CheckTransferableContext_Impl( const Reference< XTransferable >* pxTransferable, const SotAction_Impl& rEntry )
+static bool CheckTransferableContext_Impl( const Reference< XTransferable >* pxTransferable, const SotAction_Impl& rEntry )
{
DataFlavor aFlavor;
- sal_Bool bRet = sal_True;
+ bool bRet = true;
try
{
@@ -1292,7 +1292,7 @@ static sal_Bool CheckTransferableContext_Impl( const Reference< XTransferable >*
{
case FILEGRPDSC_ONLY_URL:
{
- bRet = sal_False;
+ bRet = false;
if( SotExchange::GetFormatDataFlavor( SOT_FORMATSTR_ID_FILECONTENT, aFlavor ) &&
(*pxTransferable)->isDataFlavorSupported( aFlavor ) &&
diff --git a/sot/source/base/object.cxx b/sot/source/base/object.cxx
index 5c49251..cd14c74 100644
--- a/sot/source/base/object.cxx
+++ b/sot/source/base/object.cxx
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <tools/string.hxx>
#include <sot/object.hxx>
#include <sot/factory.hxx>
@@ -27,8 +26,8 @@ class SotObjectFactory : public SotFactory
public:
TYPEINFO();
SotObjectFactory( const SvGlobalName & rName,
- const String & rClassName,
- CreateInstanceType pCreateFuncP )
+ const OUString & rClassName,
+ CreateInstanceType pCreateFuncP )
: SotFactory( rName, rClassName, pCreateFuncP )
{}
};
@@ -46,9 +45,9 @@ SO2_IMPL_BASIC_CLASS_DLL(SotObject,SotObjectFactory,
*************************************************************************/
SotObject::SotObject()
: nOwnerLockCount( 0 )
- , bOwner ( sal_True )
- , bSVObject ( sal_False )
- , bInClose ( sal_False )
+ , bOwner ( true )
+ , bSVObject ( false )
+ , bInClose ( false )
{
SotFactory::IncSvObjectCount( this );
}
@@ -76,7 +75,7 @@ IUnknown * SotObject::GetInterface( const SvGlobalName & )
//=========================================================================
void SotObject::OwnerLock
(
- sal_Bool bLock /* sal_True, lock. sal_False, unlock. */
+ bool bLock /* true, lock. false, unlock. */
)
/* [Beschreibung]
@@ -100,23 +99,23 @@ void SotObject::OwnerLock
}
//=========================================================================
-sal_Bool SotObject::DoClose()
+bool SotObject::DoClose()
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if( !bInClose )
{
SotObjectRef xHoldAlive( this );
- bInClose = sal_True;
+ bInClose = true;
bRet = Close();
- bInClose = sal_False;
+ bInClose = false;
}
return bRet;
}
//=========================================================================
-sal_Bool SotObject::Close()
+bool SotObject::Close()
{
- return sal_True;
+ return true;
}
diff --git a/sot/source/sdstor/stg.cxx b/sot/source/sdstor/stg.cxx
index 635272a..4606aa1 100644
--- a/sot/source/sdstor/stg.cxx
+++ b/sot/source/sdstor/stg.cxx
@@ -21,7 +21,6 @@
#include <sot/storinfo.hxx>
#include <osl/file.hxx>
#include <tools/tempfile.hxx>
-#include <tools/string.hxx>
#include <tools/stream.hxx>
#include <tools/debug.hxx>
@@ -49,7 +48,7 @@ TYPEINIT1( BaseStorageStream, StorageBase );
TYPEINIT1( BaseStorage, StorageBase );
StorageBase::StorageBase()
- : m_bAutoCommit( sal_False )
+ : m_bAutoCommit( false )
{
m_nMode = STREAM_READ;
m_nError = SVSTREAM_OK;
@@ -122,21 +121,21 @@ OLEStorageBase::~OLEStorageBase()
// Validate the instance for I/O
-sal_Bool OLEStorageBase::Validate_Impl( sal_Bool bWrite ) const
+bool OLEStorageBase::Validate_Impl( bool bWrite ) const
{
if( pIo
&& pIo->pTOC
&& pEntry
&& !pEntry->bInvalid
&& ( !bWrite || !pEntry->bDirect || ( nStreamMode & STREAM_WRITE ) ) )
- return sal_True;
- return sal_False;
+ return true;
+ return false;
}
-sal_Bool OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
+bool OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
{
if( m == INTERNAL_MODE )
- return sal_True;
+ return true;
sal_uInt16 nCurMode = ( p && p->nRefCnt ) ? p->nMode : 0xFFFF;
if( ( m & 3 ) == STREAM_READ )
{
@@ -145,7 +144,7 @@ sal_Bool OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
&& ( nCurMode & STREAM_SHARE_DENYWRITE ) )
|| ( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) ) )
- return sal_True;
+ return true;
}
else
{
@@ -154,9 +153,9 @@ sal_Bool OLEStorageBase::ValidateMode_Impl( StreamMode m, StgDirEntry* p ) const
// the commit may fail
if( ( m & STREAM_SHARE_DENYALL )
&& ( nCurMode & STREAM_SHARE_DENYALL ) )
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
@@ -190,7 +189,7 @@ StorageStream::~StorageStream()
pEntry->Commit();
}
-sal_Bool StorageStream::Equals( const BaseStorageStream& rStream ) const
+bool StorageStream::Equals( const BaseStorageStream& rStream ) const
{
const StorageStream* pOther = PTR_CAST( StorageStream, &rStream );
return pOther && ( pOther->pEntry == pEntry );
@@ -212,7 +211,7 @@ sal_uLong StorageStream::Read( void* pData, sal_uLong nSize )
sal_uLong StorageStream::Write( const void* pData, sal_uLong nSize )
{
- if( Validate( sal_True ) )
+ if( Validate( true ) )
{
pEntry->Seek( nPos );
nSize = pEntry->Write( pData, (sal_Int32) nSize );
@@ -238,16 +237,16 @@ void StorageStream::Flush()
Commit();
}
-sal_Bool StorageStream::SetSize( sal_uLong nNewSize )
+bool StorageStream::SetSize( sal_uLong nNewSize )
{
- if( Validate( sal_True ) )
+ if( Validate( true ) )
{
- sal_Bool b = pEntry->SetSize( (sal_Int32) nNewSize );
+ bool b = pEntry->SetSize( (sal_Int32) nNewSize );
pIo->MoveError( *this );
return b;
}
else
- return sal_False;
+ return false;
}
sal_uLong StorageStream::GetSize() const
@@ -257,14 +256,14 @@ sal_uLong StorageStream::GetSize() const
return 0;
}
-sal_Bool StorageStream::Commit()
+bool StorageStream::Commit()
{
if( !Validate() )
- return sal_False;
+ return false;
if( !( m_nMode & STREAM_WRITE ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return sal_False;
+ return false;
}
else
{
@@ -274,9 +273,9 @@ sal_Bool StorageStream::Commit()
}
}
-sal_Bool StorageStream::Revert()
+bool StorageStream::Revert()
{
- sal_Bool bResult = sal_False;
+ bool bResult = false;
if ( Validate() )
{
@@ -288,15 +287,15 @@ sal_Bool StorageStream::Revert()
return bResult;
}
-sal_Bool StorageStream::CopyTo( BaseStorageStream* pDest )
+bool StorageStream::CopyTo( BaseStorageStream* pDest )
{
- if( !Validate() || !pDest || !pDest->Validate( sal_True ) || Equals( *pDest ) )
- return sal_False;
+ if( !Validate() || !pDest || !pDest->Validate( true ) || Equals( *pDest ) )
+ return false;
pEntry->Copy( *pDest );
pDest->Commit();
pIo->MoveError( *this );
SetError( pDest->GetError() );
- return sal_Bool( Good() && pDest->Good() );
+ return Good() && pDest->Good();
}
const SvStream* StorageStream::GetSvStream() const
@@ -304,17 +303,17 @@ const SvStream* StorageStream::GetSvStream() const
return GetSvStream_Impl();
}
-sal_Bool StorageStream::Validate( sal_Bool bValidate ) const
+bool StorageStream::Validate( bool bValidate ) const
{
- sal_Bool bRet = Validate_Impl( bValidate );
+ bool bRet = Validate_Impl( bValidate );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-sal_Bool StorageStream::ValidateMode( StreamMode nMode ) const
+bool StorageStream::ValidateMode( StreamMode nMode ) const
{
- sal_Bool bRet = ValidateMode_Impl( nMode, NULL );
+ bool bRet = ValidateMode_Impl( nMode, NULL );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
@@ -325,24 +324,24 @@ sal_Bool StorageStream::ValidateMode( StreamMode nMode ) const
SvStorageInfo::SvStorageInfo( const StgDirEntry& rE )
{
rE.aEntry.GetName( aName );
- bStorage = sal_Bool( rE.aEntry.GetType() == STG_STORAGE );
- bStream = sal_Bool( rE.aEntry.GetType() == STG_STREAM );
+ bStorage = rE.aEntry.GetType() == STG_STORAGE;
+ bStream = rE.aEntry.GetType() == STG_STREAM;
nSize = bStorage ? 0 : rE.aEntry.GetSize();
}
/////////////////////////// class Storage ////////////////////////////////
-sal_Bool Storage::IsStorageFile( const String & rFileName )
+bool Storage::IsStorageFile( const OUString & rFileName )
{
StgIo aIo;
if( aIo.Open( rFileName, STREAM_STD_READ ) )
return aIo.Load();
- return sal_False;
+ return false;
}
-sal_Bool Storage::IsStorageFile( SvStream* pStream )
+bool Storage::IsStorageFile( SvStream* pStream )
{
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if ( pStream )
{
@@ -364,21 +363,22 @@ sal_Bool Storage::IsStorageFile( SvStream* pStream )
TYPEINIT1( Storage, BaseStorage );
-Storage::Storage( const String& rFile, StreamMode m, sal_Bool bDirect )
- : OLEStorageBase( new StgIo, NULL, m_nMode ), aName( rFile ), bIsRoot( sal_False )
+Storage::Storage( const OUString& rFile, StreamMode m, bool bDirect )
+ : OLEStorageBase( new StgIo, NULL, m_nMode )
+ , aName( rFile ), bIsRoot( false )
{
- sal_Bool bTemp = sal_False;
- if( !aName.Len() )
+ bool bTemp = false;
+ if( aName.isEmpty() )
{
// no name = temporary name!
aName = TempFile::CreateTempName();
- bTemp = sal_True;
+ bTemp = true;
}
// the root storage creates the I/O system
m_nMode = m;
if( pIo->Open( aName, m ) )
{
- Init( sal_Bool( ( m & ( STREAM_TRUNC | STREAM_NOCREATE ) ) == STREAM_TRUNC ) );
+ Init( ( m & ( STREAM_TRUNC | STREAM_NOCREATE ) ) == STREAM_TRUNC );
if( pEntry )
{
pEntry->bDirect = bDirect;
@@ -395,19 +395,20 @@ Storage::Storage( const String& rFile, StreamMode m, sal_Bool bDirect )
// Create a storage on a given stream.
-Storage::Storage( SvStream& r, sal_Bool bDirect )
- : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( sal_False )
+Storage::Storage( SvStream& r, bool bDirect )
+ : OLEStorageBase( new StgIo, NULL, m_nMode )
+ , bIsRoot( false )
{
m_nMode = STREAM_READ;
if( r.IsWritable() )
m_nMode = STREAM_READ | STREAM_WRITE;
if( r.GetError() == SVSTREAM_OK )
{
- pIo->SetStrm( &r, sal_False );
+ pIo->SetStrm( &r, false );
sal_uLong nSize = r.Seek( STREAM_SEEK_TO_END );
r.Seek( 0L );
// Initializing is OK if the stream is empty
- Init( sal_Bool( nSize == 0 ) );
+ Init( nSize == 0 );
if( pEntry )
{
pEntry->bDirect = bDirect;
@@ -423,8 +424,8 @@ Storage::Storage( SvStream& r, sal_Bool bDirect )
}
-Storage::Storage( UCBStorageStream& rStrm, sal_Bool bDirect )
- : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( sal_False )
+Storage::Storage( UCBStorageStream& rStrm, bool bDirect )
+ : OLEStorageBase( new StgIo, NULL, m_nMode ), bIsRoot( false )
{
m_nMode = STREAM_READ;
@@ -452,7 +453,7 @@ Storage::Storage( UCBStorageStream& rStrm, sal_Bool bDirect )
sal_uLong nSize = pStream->Seek( STREAM_SEEK_TO_END );
pStream->Seek( 0L );
// Initializing is OK if the stream is empty
- Init( sal_Bool( nSize == 0 ) );
+ Init( nSize == 0 );
if( pEntry )
{
pEntry->bDirect = bDirect;
@@ -465,11 +466,11 @@ Storage::Storage( UCBStorageStream& rStrm, sal_Bool bDirect )
// Perform common code for both ctors above.
-void Storage::Init( sal_Bool bCreate )
+void Storage::Init( bool bCreate )
{
pEntry = NULL;
- sal_Bool bHdrLoaded = sal_False;
- bIsRoot = sal_True;
+ bool bHdrLoaded = false;
+ bIsRoot = true;
OSL_ENSURE( pIo, "The pointer may not be empty at this point!" );
if( pIo->Good() && pIo->GetStrm() )
@@ -503,7 +504,7 @@ void Storage::Init( sal_Bool bCreate )
// Internal ctor
Storage::Storage( StgIo* p, StgDirEntry* q, StreamMode m )
- : OLEStorageBase( p, q, m_nMode ), bIsRoot( sal_False )
+ : OLEStorageBase( p, q, m_nMode ), bIsRoot( false )
{
if( q )
q->aEntry.GetName( aName );
@@ -537,7 +538,7 @@ Storage::~Storage()
}
}
-const String& Storage::GetName() const
+const OUString& Storage::GetName() const
{
if( !bIsRoot && Validate() )
pEntry->aEntry.GetName( ((Storage*) this)->aName );
@@ -566,18 +567,18 @@ void Storage::FillInfoList( SvStorageInfoList* pList ) const
// Open or create a substorage
-BaseStorage* Storage::OpenUCBStorage( const String& rName, StreamMode m, sal_Bool bDirect )
+BaseStorage* Storage::OpenUCBStorage( const OUString& rName, StreamMode m, bool bDirect )
{
OSL_FAIL("Not supported!");
return OpenStorage( rName, m, bDirect );
}
-BaseStorage* Storage::OpenOLEStorage( const String& rName, StreamMode m, sal_Bool bDirect )
+BaseStorage* Storage::OpenOLEStorage( const OUString& rName, StreamMode m, bool bDirect )
{
return OpenStorage( rName, m, bDirect );
}
-BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, bool bDirect )
+BaseStorage* Storage::OpenStorage( const OUString& rName, StreamMode m, bool bDirect )
{
if( !Validate() || !ValidateMode( m ) )
return new Storage( pIo, NULL, m );
@@ -589,14 +590,13 @@ BaseStorage* Storage::OpenStorage( const String& rName, StreamMode m, bool bDire
{
if( !( m & STREAM_NOCREATE ) )
{
- sal_Bool bTemp = sal_False;
+ bool bTemp = false;
// create a new storage
- String aNewName = rName;
- if( !aNewName.Len() )
+ OUString aNewName = rName;
+ if( aNewName.isEmpty() )
{
- aNewName.AssignAscii( "Temp Stg " );
- aNewName.Append( OUString::number( ++nTmpCount ) );
- bTemp = sal_True;
+ aNewName = OUString( "Temp Stg " ) + OUString::number( ++nTmpCount );
+ bTemp = true;
}
p = pIo->pTOC->Create( *pEntry, aNewName, STG_STORAGE );
if( p )
@@ -626,16 +626,16 @@ 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 = sal_True;
+ if( m & STREAM_WRITE ) pStg->m_bAutoCommit = true;
return pStg;
}
// Open a stream
-BaseStorageStream* Storage::OpenStream( const String& rName, StreamMode m, sal_Bool,
-const OString*
+BaseStorageStream* Storage::OpenStream( const OUString& rName, StreamMode m, bool,
+ const OString*
#ifdef DBG_UTIL
-pB
+ pB
#endif
)
{
@@ -644,19 +644,18 @@ pB
if( !Validate() || !ValidateMode( m ) )
return new StorageStream( pIo, NULL, m );
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
- sal_Bool bTemp = sal_False;
+ bool bTemp = false;
if( !p )
{
if( !( m & STREAM_NOCREATE ) )
{
// create a new stream
// make a name if the stream is temporary (has no name)
- String aNewName( rName );
- if( !aNewName.Len() )
+ OUString aNewName( rName );
+ if( aNewName.isEmpty() )
{
- aNewName.AssignAscii( "Temp Strm " );
- aNewName.Append( OUString::number( ++nTmpCount ) );
- bTemp = sal_True;
+ aNewName = OUString( "Temp Strm " ) + OUString::number( ++nTmpCount );
+ bTemp = true;
}
p = pIo->pTOC->Create( *pEntry, aNewName, STG_STREAM );
}
@@ -678,50 +677,50 @@ pB
}
StorageStream* pStm = new StorageStream( pIo, p, m );
if( p && !p->bDirect )
- pStm->SetAutoCommit( sal_True );
+ pStm->SetAutoCommit( true );
pIo->MoveError( *pStm );
return pStm;
}
// Delete a stream or substorage by setting the temp bit.
-sal_Bool Storage::Remove( const String& rName )
+bool Storage::Remove( const OUString& rName )
{
- if( !Validate( sal_True ) )
- return sal_False;
+ if( !Validate( true ) )
+ return false;
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
if( p )
{
- p->Invalidate( sal_True );
- return sal_True;
+ p->Invalidate( true );
+ return true;
}
else
{
SetError( SVSTREAM_FILE_NOT_FOUND );
- return sal_False;
+ return false;
}
}
// Rename a storage element
-sal_Bool Storage::Rename( const String& rOld, const String& rNew )
+bool Storage::Rename( const OUString& rOld, const OUString& rNew )
{
- if( Validate( sal_True ) )
+ if( Validate( true ) )
{
- sal_Bool b = pIo->pTOC->Rename( *pEntry, rOld, rNew );
+ bool b = pIo->pTOC->Rename( *pEntry, rOld, rNew );
pIo->MoveError( *this );
return b;
}
else
- return sal_False;
+ return false;
}
// Copy one element
-sal_Bool Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String& rNew )
+bool Storage::CopyTo( const OUString& rElem, BaseStorage* pDest, const OUString& rNew )
{
- if( !Validate() || !pDest || !pDest->Validate( sal_True ) )
- return sal_False;
+ if( !Validate() || !pDest || !pDest->Validate( true ) )
+ return false;
StgDirEntry* pElem = pIo->pTOC->Find( *pEntry, rElem );
if( pElem )
{
@@ -752,7 +751,7 @@ sal_Bool Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String&
delete p1;
delete p2;
- return sal_Bool( Good() && pDest->Good() );
+ return Good() && pDest->Good();
}
else
{
@@ -780,26 +779,26 @@ sal_Bool Storage::CopyTo( const String& rElem, BaseStorage* pDest, const String&
delete p1;
delete p2;
- return sal_Bool( Good() && pDest->Good() );
+ return Good() && pDest->Good();
}
}
SetError( SVSTREAM_FILE_NOT_FOUND );
- return sal_False;
+ return false;
}
-sal_Bool Storage::CopyTo( BaseStorage* pDest ) const
+bool Storage::CopyTo( BaseStorage* pDest ) const
{
- if( !Validate() || !pDest || !pDest->Validate( sal_True ) || Equals( *pDest ) )
+ if( !Validate() || !pDest || !pDest->Validate( true ) || Equals( *pDest ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return sal_False;
+ return false;
}
Storage* pThis = (Storage*) this;
pDest->SetClassId( GetClassId() );
pDest->SetDirty();
SvStorageInfoList aList;
FillInfoList( &aList );
- sal_Bool bRes = sal_True;
+ bool bRes = true;
for( size_t i = 0; i < aList.size() && bRes; i++ )
{
SvStorageInfo& rInfo = aList[ i ];
@@ -807,24 +806,24 @@ sal_Bool Storage::CopyTo( BaseStorage* pDest ) const
}
if( !bRes )
SetError( pDest->GetError() );
- return sal_Bool( Good() && pDest->Good() );
+ return Good() && pDest->Good();
}
// Move one element
-sal_Bool Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String& rNew )
+bool Storage::MoveTo( const OUString& rElem, BaseStorage* pODest, const OUString& rNew )
{
- if( !Validate() || !pODest || !pODest->Validate( sal_True ) || Equals( *pODest ) )
+ if( !Validate() || !pODest || !pODest->Validate( true ) || Equals( *pODest ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return sal_False;
+ return false;
}
StgDirEntry* pElem = pIo->pTOC->Find( *pEntry, rElem );
if( pElem )
{
// Simplest case: both storages share the same file
- sal_Bool bRes;
+ bool bRes;
Storage *pOther = PTR_CAST( Storage, pODest );
if( pOther && pIo == pOther->pIo && rElem == rNew )
{
@@ -835,7 +834,7 @@ sal_Bool Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String
{
// cyclic move
SetError( SVSTREAM_ACCESS_DENIED );
- return sal_False;
+ return false;
}
bRes = pIo->pTOC->Move( *pEntry, *pDest->pEntry, rNew );
if( !bRes )
@@ -860,51 +859,51 @@ sal_Bool Storage::MoveTo( const String& rElem, BaseStorage* pODest, const String
return bRes;
}
SetError( SVSTREAM_FILE_NOT_FOUND );
- return sal_False;
+ return false;
}
-sal_Bool Storage::IsStorage( const String& rName ) const
+bool Storage::IsStorage( const OUString& rName ) const
{
if( Validate() )
{
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
if( p )
- return sal_Bool( p->aEntry.GetType() == STG_STORAGE );
+ return p->aEntry.GetType() == STG_STORAGE;
}
- return sal_False;
+ return false;
}
-sal_Bool Storage::IsStream( const String& rName ) const
+bool Storage::IsStream( const OUString& rName ) const
{
if( Validate() )
{
StgDirEntry* p = pIo->pTOC->Find( *pEntry, rName );
if( p )
- return sal_Bool( p->aEntry.GetType() == STG_STREAM );
+ return p->aEntry.GetType() == STG_STREAM;
}
- return sal_False;
+ return false;
}
-sal_Bool Storage::IsContained( const String& rName ) const
+bool Storage::IsContained( const OUString& rName ) const
{
if( Validate() )
- return sal_Bool( pIo->pTOC->Find( *pEntry, rName ) != NULL );
+ return pIo->pTOC->Find( *pEntry, rName ) != NULL;
else
- return sal_False;
+ return false;
}
// Commit all sub-elements within this storage. If this is
// the root, commit the FAT, the TOC and the header as well.
-sal_Bool Storage::Commit()
+bool Storage::Commit()
{
- sal_Bool bRes = sal_True;
+ bool bRes = true;
if( !Validate() )
- return sal_False;
+ return false;
if( !( m_nMode & STREAM_WRITE ) )
{
SetError( SVSTREAM_ACCESS_DENIED );
- return sal_False;
+ return false;
}
else
{
@@ -923,9 +922,9 @@ sal_Bool Storage::Commit()
return bRes;
}
-sal_Bool Storage::Revert()
+bool Storage::Revert()
{
- return sal_True;
+ return true;
}
///////////////////////////// OLE Support ////////////////////////////////
@@ -933,16 +932,16 @@ sal_Bool Storage::Revert()
// Set the storage type
void Storage::SetClass( const SvGlobalName & rClass,
- sal_uLong nOriginalClipFormat,
- const String & rUserTypeName )
+ sal_uLong nOriginalClipFormat,
+ const OUString & rUserTypeName )
{
- if( Validate( sal_True ) )
+ if( Validate( 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, sal_True );
+ StgCompObjStream aCompObj( *this, true );
aCompObj.GetClsId() = (const ClsId&) rClass.GetCLSID();
aCompObj.GetCbFormat() = nOriginalClipFormat;
aCompObj.GetUserName() = rUserTypeName;
@@ -960,14 +959,14 @@ void Storage::SetClass( const SvGlobalName & rClass,
}
void Storage::SetConvertClass( const SvGlobalName & rConvertClass,
- sal_uLong nOriginalClipFormat,
- const String & rUserTypeName )
+ sal_uLong nOriginalClipFormat,
+ const OUString & rUserTypeName )
{
- if( Validate( sal_True ) )
+ if( Validate( true ) )
{
SetClass( rConvertClass, nOriginalClipFormat, rUserTypeName );
// plus the convert flag:
- StgOleStream aOle( *this, sal_True );
+ StgOleStream aOle( *this, true );
aOle.GetFlags() |= 4;
if( !aOle.Store() )
SetError( aOle.GetError() );
@@ -976,7 +975,7 @@ void Storage::SetConvertClass( const SvGlobalName & rConvertClass,
SvGlobalName Storage::GetClassName()
{
- StgCompObjStream aCompObj( *this, sal_False );
+ StgCompObjStream aCompObj( *this, false );
if( aCompObj.Load() )
return SvGlobalName( (const CLSID&) aCompObj.GetClsId() );
pIo->ResetError();
@@ -989,35 +988,35 @@ SvGlobalName Storage::GetClassName()
sal_uLong Storage::GetFormat()
{
- StgCompObjStream aCompObj( *this, sal_False );
+ StgCompObjStream aCompObj( *this, false );
if( aCompObj.Load() )
return aCompObj.GetCbFormat();
pIo->ResetError();
return 0;
}
-String Storage::GetUserName()
+OUString Storage::GetUserName()
{
- StgCompObjStream aCompObj( *this, sal_False );
+ StgCompObjStream aCompObj( *this, false );
if( aCompObj.Load() )
return aCompObj.GetUserName();
pIo->ResetError();
- return String();
+ return OUString();
}
-sal_Bool Storage::ShouldConvert()
+bool Storage::ShouldConvert()
{
- StgOleStream aOle( *this, sal_False );
+ StgOleStream aOle( *this, false );
if( aOle.Load() )
- return sal_Bool( ( aOle.GetFlags() & 4 ) != 0 );
+ return ( aOle.GetFlags() & 4 ) != 0;
else
{
pIo->ResetError();
- return sal_False;
+ return false;
}
}
-sal_Bool Storage::ValidateFAT()
+bool Storage::ValidateFAT()
{
Link aLink = StgIo::GetErrorLink();
ErrCode nErr = pIo->ValidateFATs();
@@ -1051,31 +1050,31 @@ const SvStream* Storage::GetSvStream() const
return GetSvStream_Impl();
}
-sal_Bool Storage::Validate( sal_Bool bValidate ) const
+bool Storage::Validate( bool bValidate ) const
{
- sal_Bool bRet = Validate_Impl( bValidate );
+ bool bRet = Validate_Impl( bValidate );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-sal_Bool Storage::ValidateMode( StreamMode nMode ) const
+bool Storage::ValidateMode( StreamMode nMode ) const
{
- sal_Bool bRet = ValidateMode_Impl( nMode );
+ bool bRet = ValidateMode_Impl( nMode );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-sal_Bool Storage::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
+bool Storage::ValidateMode( StreamMode nMode, StgDirEntry* p ) const
{
- sal_Bool bRet = ValidateMode_Impl( nMode, p );
+ bool bRet = ValidateMode_Impl( nMode, p );
if ( !bRet )
SetError( SVSTREAM_ACCESS_DENIED );
return bRet;
}
-sal_Bool Storage::Equals( const BaseStorage& rStorage ) const
+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 eb43a7a..807f023 100644
--- a/sot/source/sdstor/stgavl.cxx
+++ b/sot/source/sdstor/stgavl.cxx
@@ -214,7 +214,7 @@ StgAvlNode* StgAvlNode::RotRL()
// Remove a tree element. Return the removed element or NULL.
-StgAvlNode* StgAvlNode::Rem( StgAvlNode** p, StgAvlNode* pDel, sal_Bool bPtrs )
+StgAvlNode* StgAvlNode::Rem( StgAvlNode** p, StgAvlNode* pDel, bool bPtrs )
{
if( p && *p && pDel )
{
@@ -278,24 +278,24 @@ void StgAvlNode::StgEnum( short& n )
}
// Add node to AVL tree.
-// Return sal_False if the element already exists.
+// Return false if the element already exists.
-sal_Bool StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
+bool StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
{
StgAvlNode* pPivot, *pHeavy, *pNewRoot, *pParent, *pPrev;
if ( !pRoot )
- return sal_False;
+ return false;
// special case - empty tree
if( *pRoot == NULL )
{
*pRoot = pIns;
- return sal_True;
+ return true;
}
// find insertion point and return if already present
short nRes = (*pRoot)->Locate( pIns, &pPivot, &pParent, &pPrev );
if( !nRes )
- return sal_False;
+ return false;
OSL_ENSURE( pPivot && pPrev, "The pointers may not be NULL!" );
// add new node
@@ -327,22 +327,22 @@ sal_Bool StgAvlNode::Insert( StgAvlNode** pRoot, StgAvlNode* pIns )
else if( pPivot == pParent->pRight )
pParent->pRight = pNewRoot;
}
- return sal_True;
+ return true;
}
-// Remove node from tree. Returns sal_True is found and removed.
+// Remove node from tree. Returns true is found and removed.
// Actually delete if bDel
-sal_Bool StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, sal_Bool bDel )
+bool StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, bool bDel )
{
if ( !pRoot )
- return sal_False;
+ return false;
// special case - empty tree
if( *pRoot == NULL )
- return sal_False;
+ return false;
// delete the element
- pDel = Rem( pRoot, pDel, sal_False );
+ pDel = Rem( pRoot, pDel, false );
if( pDel )
{
if( bDel )
@@ -352,33 +352,32 @@ sal_Bool StgAvlNode::Remove( StgAvlNode** pRoot, StgAvlNode* pDel, sal_Bool bDel
/* StgAvlNode* pNew = NULL;
while( *pRoot )
{
- StgAvlNode* p = Rem( pRoot, *pRoot, sal_False );
+ StgAvlNode* p = Rem( pRoot, *pRoot, false );
Insert( &pNew, p );
}
*pRoot = pNew;*/
- return sal_True;
+ return true;
}
else
- return sal_False;
+ return false;
}
-// Move node to a different tree. Returns sal_True is found and moved. This routine
+// Move node to a different tree. Returns true is found and moved. This routine
// may be called when the key has changed.
-sal_Bool StgAvlNode::Move
- ( StgAvlNode** pRoot1, StgAvlNode** pRoot2, StgAvlNode* pMove )
+bool StgAvlNode::Move( StgAvlNode** pRoot1, StgAvlNode** pRoot2, StgAvlNode* pMove )
{
if ( !pRoot1 )
- return sal_False;
+ return false;
// special case - empty tree
if( *pRoot1 == NULL )
- return sal_False;
- pMove = Rem( pRoot1, pMove, sal_False );
+ return false;
+ pMove = Rem( pRoot1, pMove, false );
if( pMove )
return Insert( pRoot2, pMove );
else
- return sal_False;
+ return false;
}
////////////////////////// class AvlIterator /////////////////////////
diff --git a/sot/source/sdstor/stgavl.hxx b/sot/source/sdstor/stgavl.hxx
index 0926542..31d1c0f 100644
--- a/sot/source/sdstor/stgavl.hxx
+++ b/sot/source/sdstor/stgavl.hxx
@@ -36,7 +36,7 @@ private:
StgAvlNode* RotRR();
StgAvlNode* RotRL();
void StgEnum( short& );
- static StgAvlNode* Rem( StgAvlNode**, StgAvlNode*, sal_Bool );
+ static StgAvlNode* Rem( StgAvlNode**, StgAvlNode*, bool );
protected:
short nId; // iterator ID
short nBalance; // indicates tree balance
@@ -45,9 +45,9 @@ protected:
public:
virtual ~StgAvlNode();
StgAvlNode* Find( 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* );
+ static bool Insert( StgAvlNode**, StgAvlNode* );
+ static bool Remove( StgAvlNode**, StgAvlNode*, bool bDel = true );
+ static 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 0a2371c..02f8e38 100644
--- a/sot/source/sdstor/stgcache.cxx
+++ b/sot/source/sdstor/stgcache.cxx
@@ -19,7 +19,7 @@
#include <string.h>
#include <osl/endian.h>
-#include <tools/string.hxx>
+#include <tools/solar.h>
#include "sot/stg.hxx"
#include "stgelem.hxx"
@@ -96,15 +96,15 @@ StgCache::StgCache()
, nPageSize( 512 )
, pStorageStream( NULL )
, pStrm( NULL )
- , bMyStream( sal_False )
- , bFile( sal_False )
+ , bMyStream( false )
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list