summaryrefslogtreecommitdiff
path: root/include/sot
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-07-03 15:54:21 -0500
committerFridrich Strba <fridrich@documentfoundation.org>2013-07-04 09:58:22 +0000
commit7c136e7ba27382d5f73454bdf5fa78d0b779e0b7 (patch)
tree2d200cc67d4442e7f87b119905de9b5c522be619 /include/sot
parente2f002c044243ddd79eea7837167a72c82b98599 (diff)
module sot: String, bool and other clean-up
Change-Id: Ibe2bfdf20c500e9fd98c3baef66d36aa79ca4b52 Reviewed-on: https://gerrit.libreoffice.org/4710 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'include/sot')
-rw-r--r--include/sot/exchange.hxx22
-rw-r--r--include/sot/factory.hxx9
-rw-r--r--include/sot/filelist.hxx8
-rw-r--r--include/sot/object.hxx20
-rw-r--r--include/sot/stg.hxx351
-rw-r--r--include/sot/storage.hxx116
-rw-r--r--include/sot/storinfo.hxx18
7 files changed, 272 insertions, 272 deletions
diff --git a/include/sot/exchange.hxx b/include/sot/exchange.hxx
index b4273682de40..489ed9d9d310 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 406333df6f5a..dd5a78b497f1 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 2e69a95e5498..9dc70a77e894 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 435dda8d4626..349efbc23cac 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 bd124cc8df00..4a4472d8b47b 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 db3995dfc374..a46373f2d99c 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 08fc5ea7f6f6..a91b636a8440 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;