summaryrefslogtreecommitdiff
path: root/package
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-04-17 13:40:46 +0200
committerNoel Grandin <noel@peralex.com>2014-04-22 09:53:14 +0200
commit5df6dcf747a36989a3891c855737fe9bdb206a36 (patch)
treecb6ab57cf4f275860df7be2ec16a2fbd45f2692d /package
parente4107bb8b7230c039e7fc76951bfb3634fe4b9e0 (diff)
package: sal_Bool->bool
Change-Id: I05dd5070d0618ef7539b26c7edcaf01b0a84732c
Diffstat (limited to 'package')
-rw-r--r--package/inc/HashMaps.hxx2
-rw-r--r--package/inc/ZipEnumeration.hxx2
-rw-r--r--package/inc/ZipFile.hxx34
-rw-r--r--package/inc/ZipOutputStream.hxx4
-rw-r--r--package/inc/ZipPackage.hxx16
-rw-r--r--package/inc/ZipPackageBuffer.hxx2
-rw-r--r--package/inc/ZipPackageEntry.hxx2
-rw-r--r--package/inc/ZipPackageFolder.hxx8
-rw-r--r--package/inc/ZipPackageStream.hxx36
-rw-r--r--package/inc/mutexholder.hxx2
-rw-r--r--package/inc/zipfileaccess.hxx4
-rw-r--r--package/source/manifest/ManifestExport.cxx12
-rw-r--r--package/source/manifest/ManifestImport.cxx12
-rw-r--r--package/source/manifest/ManifestImport.hxx2
-rw-r--r--package/source/xstor/ocompinstream.cxx8
-rw-r--r--package/source/xstor/ocompinstream.hxx2
-rw-r--r--package/source/xstor/ohierarchyholder.cxx4
-rw-r--r--package/source/xstor/ohierarchyholder.hxx2
-rw-r--r--package/source/xstor/owriteablestream.cxx166
-rw-r--r--package/source/xstor/owriteablestream.hxx62
-rw-r--r--package/source/xstor/switchpersistencestream.cxx38
-rw-r--r--package/source/xstor/xfactory.cxx4
-rw-r--r--package/source/xstor/xstorage.cxx246
-rw-r--r--package/source/xstor/xstorage.hxx44
-rw-r--r--package/source/zipapi/XUnbufferedStream.cxx18
-rw-r--r--package/source/zipapi/XUnbufferedStream.hxx8
-rw-r--r--package/source/zipapi/ZipEnumeration.cxx2
-rw-r--r--package/source/zipapi/ZipFile.cxx50
-rw-r--r--package/source/zipapi/ZipOutputStream.cxx12
-rw-r--r--package/source/zippackage/ZipPackage.cxx80
-rw-r--r--package/source/zippackage/ZipPackageBuffer.cxx6
-rw-r--r--package/source/zippackage/ZipPackageEntry.cxx8
-rw-r--r--package/source/zippackage/ZipPackageFolder.cxx40
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx80
-rw-r--r--package/source/zippackage/zipfileaccess.cxx26
35 files changed, 522 insertions, 522 deletions
diff --git a/package/inc/HashMaps.hxx b/package/inc/HashMaps.hxx
index a98b04ac68de..55b1c183ecd9 100644
--- a/package/inc/HashMaps.hxx
+++ b/package/inc/HashMaps.hxx
@@ -25,7 +25,7 @@
struct eqFunc
{
- sal_Bool operator()( const OUString &r1,
+ bool operator()( const OUString &r1,
const OUString &r2) const
{
return r1 == r2;
diff --git a/package/inc/ZipEnumeration.hxx b/package/inc/ZipEnumeration.hxx
index e84339c3ff84..f9f517a4a45e 100644
--- a/package/inc/ZipEnumeration.hxx
+++ b/package/inc/ZipEnumeration.hxx
@@ -27,7 +27,7 @@ protected:
EntryHash &rEntryHash;
EntryHash::const_iterator aIterator;
public:
- sal_Bool SAL_CALL hasMoreElements();
+ bool SAL_CALL hasMoreElements();
const ZipEntry * SAL_CALL nextElement();
ZipEnumeration( EntryHash &rNewEntryHash );
~ZipEnumeration();
diff --git a/package/inc/ZipFile.hxx b/package/inc/ZipFile.hxx
index 976c43f94f27..a5a96e02c83e 100644
--- a/package/inc/ZipFile.hxx
+++ b/package/inc/ZipFile.hxx
@@ -66,19 +66,19 @@ protected:
const ::com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_xContext;
::com::sun::star::uno::Reference < ::com::sun::star::ucb::XProgressHandler > xProgressHandler;
- sal_Bool bRecoveryMode;
+ bool bRecoveryMode;
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > createMemoryStream(
ZipEntry & rEntry,
const ::rtl::Reference < EncryptionData > &rData,
- sal_Bool bRawStream,
- sal_Bool bDecrypt );
+ bool bRawStream,
+ bool bDecrypt );
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > createFileStream(
ZipEntry & rEntry,
const ::rtl::Reference < EncryptionData > &rData,
- sal_Bool bRawStream,
- sal_Bool bDecrypt );
+ bool bRawStream,
+ bool bDecrypt );
// aMediaType parameter is used only for raw stream header creation
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > createUnbufferedStream(
@@ -86,12 +86,12 @@ protected:
ZipEntry & rEntry,
const ::rtl::Reference < EncryptionData > &rData,
sal_Int8 nStreamMode,
- sal_Bool bDecrypt,
+ bool bDecrypt,
const OUString& aMediaType = OUString() );
- sal_Bool hasValidPassword ( ZipEntry & rEntry, const rtl::Reference < EncryptionData > &rData );
+ bool hasValidPassword ( ZipEntry & rEntry, const rtl::Reference < EncryptionData > &rData );
- sal_Bool checkSizeAndCRC( const ZipEntry& aEntry );
+ bool checkSizeAndCRC( const ZipEntry& aEntry );
sal_Int32 getCRC( sal_Int64 nOffset, sal_Int64 nSize );
@@ -101,14 +101,14 @@ public:
ZipFile( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > &xInput,
const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > &rxContext,
- sal_Bool bInitialise
+ bool bInitialise
)
throw(::com::sun::star::io::IOException, com::sun::star::packages::zip::ZipException, com::sun::star::uno::RuntimeException);
ZipFile( com::sun::star::uno::Reference < com::sun::star::io::XInputStream > &xInput,
const com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > &rxContext,
- sal_Bool bInitialise,
- sal_Bool bForceRecover,
+ bool bInitialise,
+ bool bForceRecover,
::com::sun::star::uno::Reference < ::com::sun::star::ucb::XProgressHandler > xProgress
)
throw(::com::sun::star::io::IOException, com::sun::star::packages::zip::ZipException, com::sun::star::uno::RuntimeException);
@@ -121,7 +121,7 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawData(
ZipEntry& rEntry,
const ::rtl::Reference < EncryptionData > &rData,
- sal_Bool bDecrypt,
+ bool bDecrypt,
SotMutexHolderRef aMutexHolder )
throw(::com::sun::star::io::IOException, ::com::sun::star::packages::zip::ZipException, ::com::sun::star::uno::RuntimeException);
@@ -139,7 +139,7 @@ public:
const OUString& aMediaType,
sal_Int8 * & pHeader );
- static sal_Bool StaticFillData ( ::rtl::Reference < BaseEncryptionData > & rData,
+ static bool StaticFillData ( ::rtl::Reference < BaseEncryptionData > & rData,
sal_Int32 &rEncAlgorithm,
sal_Int32 &rChecksumAlgorithm,
sal_Int32 &rDerivedKeySize,
@@ -156,7 +156,7 @@ public:
::com::sun::star::packages::zip::ZipIOException,
::com::sun::star::uno::RuntimeException );
- static sal_Bool StaticHasValidPassword (
+ static bool StaticHasValidPassword (
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Sequence< sal_Int8 > &aReadBuffer,
const ::rtl::Reference < EncryptionData > &rData );
@@ -164,14 +164,14 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getInputStream(
ZipEntry& rEntry,
const ::rtl::Reference < EncryptionData > &rData,
- sal_Bool bDecrypt,
+ bool bDecrypt,
SotMutexHolderRef aMutexHolder )
throw(::com::sun::star::io::IOException, ::com::sun::star::packages::zip::ZipException, ::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getDataStream(
ZipEntry& rEntry,
const ::rtl::Reference < EncryptionData > &rData,
- sal_Bool bDecrypt,
+ bool bDecrypt,
SotMutexHolderRef aMutexHolder )
throw ( ::com::sun::star::packages::WrongPasswordException,
::com::sun::star::io::IOException,
@@ -190,7 +190,7 @@ public:
ZipEnumeration * SAL_CALL entries( );
protected:
- sal_Bool readLOC ( ZipEntry &rEntry)
+ bool readLOC ( ZipEntry &rEntry)
throw(::com::sun::star::io::IOException, com::sun::star::packages::zip::ZipException, com::sun::star::uno::RuntimeException);
sal_Int32 readCEN()
throw(::com::sun::star::io::IOException, com::sun::star::packages::zip::ZipException, com::sun::star::uno::RuntimeException);
diff --git a/package/inc/ZipOutputStream.hxx b/package/inc/ZipOutputStream.hxx
index 3f237eb23877..f2f9ce1f6171 100644
--- a/package/inc/ZipOutputStream.hxx
+++ b/package/inc/ZipOutputStream.hxx
@@ -58,7 +58,7 @@ protected:
ByteChucker aChucker;
ZipEntry *pCurrentEntry;
sal_Int16 nMethod, nLevel, mnDigested;
- sal_Bool bFinished, bEncryptCurrentEntry;
+ bool bFinished, bEncryptCurrentEntry;
ZipPackageStream* m_pCurrentStream;
public:
@@ -80,7 +80,7 @@ public:
throw(::com::sun::star::uno::RuntimeException);
void SAL_CALL putNextEntry( ZipEntry& rEntry,
ZipPackageStream* pStream,
- sal_Bool bEncrypt = sal_False )
+ bool bEncrypt = false )
throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
void SAL_CALL closeEntry( )
throw(::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException);
diff --git a/package/inc/ZipPackage.hxx b/package/inc/ZipPackage.hxx
index 9e0eb133747d..1ac84f1ea5ea 100644
--- a/package/inc/ZipPackage.hxx
+++ b/package/inc/ZipPackage.hxx
@@ -86,15 +86,15 @@ protected:
sal_Int32 m_nStartKeyGenerationID;
sal_Int32 m_nChecksumDigestID;
sal_Int32 m_nCommonEncryptionID;
- sal_Bool m_bHasEncryptedEntries;
- sal_Bool m_bHasNonEncryptedEntries;
+ bool m_bHasEncryptedEntries;
+ bool m_bHasNonEncryptedEntries;
- sal_Bool m_bInconsistent;
- sal_Bool m_bForceRecovery;
+ bool m_bInconsistent;
+ bool m_bForceRecovery;
- sal_Bool m_bMediaTypeFallbackUsed;
+ bool m_bMediaTypeFallbackUsed;
sal_Int32 m_nFormat;
- sal_Bool m_bAllowRemoveOnInsert;
+ bool m_bAllowRemoveOnInsert;
InitialisationMode m_eMode;
@@ -107,7 +107,7 @@ protected:
ZipPackageFolder *m_pRootFolder;
ZipFile *m_pZipFile;
- sal_Bool isLocalFile() const;
+ bool isLocalFile() const;
void parseManifest();
void parseContentType();
@@ -191,7 +191,7 @@ public:
static OUString static_getImplementationName();
static ::com::sun::star::uno::Sequence < OUString > static_getSupportedServiceNames();
static ::com::sun::star::uno::Reference < com::sun::star::lang::XSingleServiceFactory > createServiceFactory( com::sun::star::uno::Reference < com::sun::star::lang::XMultiServiceFactory > const & rServiceFactory );
- sal_Bool SAL_CALL static_supportsService(OUString const & rServiceName);
+ bool SAL_CALL static_supportsService(OUString const & rServiceName);
};
#endif
diff --git a/package/inc/ZipPackageBuffer.hxx b/package/inc/ZipPackageBuffer.hxx
index 5519aac50e84..bdffcb729156 100644
--- a/package/inc/ZipPackageBuffer.hxx
+++ b/package/inc/ZipPackageBuffer.hxx
@@ -34,7 +34,7 @@ class ZipPackageBuffer : public ::cppu::WeakImplHelper3
protected:
com::sun::star::uno::Sequence < sal_Int8 > m_aBuffer;
sal_Int64 m_nBufferSize, m_nEnd, m_nCurrent;
- sal_Bool m_bMustInitBuffer;
+ bool m_bMustInitBuffer;
public:
ZipPackageBuffer(sal_Int64 nNewBufferSize);
virtual ~ZipPackageBuffer(void);
diff --git a/package/inc/ZipPackageEntry.hxx b/package/inc/ZipPackageEntry.hxx
index d7746361f45b..c8cf1fa0a732 100644
--- a/package/inc/ZipPackageEntry.hxx
+++ b/package/inc/ZipPackageEntry.hxx
@@ -53,7 +53,7 @@ public:
OUString & GetMediaType () { return sMediaType; }
void SetMediaType ( const OUString & sNewType) { sMediaType = sNewType; }
- void doSetParent ( ZipPackageFolder * pNewParent, sal_Bool bInsert );
+ void doSetParent ( ZipPackageFolder * pNewParent, bool bInsert );
bool IsFolder ( ) { return mbIsFolder; }
ZipPackageFolder* GetParent ( ) { return pParent; }
void SetFolder ( bool bSetFolder ) { mbIsFolder = bSetFolder; }
diff --git a/package/inc/ZipPackageFolder.hxx b/package/inc/ZipPackageFolder.hxx
index 51dff1feaf50..b885e3bf6339 100644
--- a/package/inc/ZipPackageFolder.hxx
+++ b/package/inc/ZipPackageFolder.hxx
@@ -57,17 +57,17 @@ private:
public:
ZipPackageFolder( sal_Int32 nFormat,
- sal_Bool bAllowRemoveOnInsert );
+ bool bAllowRemoveOnInsert );
virtual ~ZipPackageFolder();
OUString& GetVersion() { return m_sVersion; }
void SetVersion( const OUString& aVersion ) { m_sVersion = aVersion; }
- sal_Bool LookForUnexpectedODF12Streams( const OUString& aPath );
+ bool LookForUnexpectedODF12Streams( const OUString& aPath );
void setChildStreamsTypeByExtension( const ::com::sun::star::beans::StringPair& aPair );
- void doInsertByName ( ZipPackageEntry *pEntry, sal_Bool bSetParent )
+ void doInsertByName ( ZipPackageEntry *pEntry, bool bSetParent )
throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::container::ElementExistException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
com::sun::star::packages::ContentInfo & doGetByName( const OUString& aName )
@@ -77,7 +77,7 @@ public:
static ::com::sun::star::uno::Sequence < sal_Int8 > static_getImplementationId();
void setPackageFormat_Impl( sal_Int32 nFormat ) { m_nFormat = nFormat; }
- void setRemoveOnInsertMode_Impl( sal_Bool bRemove ) { this->mbAllowRemoveOnInsert = bRemove; }
+ void setRemoveOnInsertMode_Impl( bool bRemove ) { this->mbAllowRemoveOnInsert = bRemove; }
bool saveChild(const OUString &rShortName, const com::sun::star::packages::ContentInfo &rInfo, OUString &rPath, std::vector < com::sun::star::uno::Sequence < com::sun::star::beans::PropertyValue > > &rManList, ZipOutputStream & rZipOut, const com::sun::star::uno::Sequence < sal_Int8 >& rEncryptionKey, rtlRandomPool & rRandomPool);
diff --git a/package/inc/ZipPackageStream.hxx b/package/inc/ZipPackageStream.hxx
index 9a1dbb4ccc79..cabc62004d39 100644
--- a/package/inc/ZipPackageStream.hxx
+++ b/package/inc/ZipPackageStream.hxx
@@ -50,7 +50,7 @@ private:
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xStream;
const ::com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_xContext;
ZipPackage &rZipPackage;
- sal_Bool bToBeCompressed, bToBeEncrypted, bHaveOwnKey, bIsEncrypted;
+ bool bToBeCompressed, bToBeEncrypted, bHaveOwnKey, bIsEncrypted;
::rtl::Reference< BaseEncryptionData > m_xBaseEncryptionData;
::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > m_aStorageEncryptionKeys;
@@ -65,25 +65,25 @@ private:
sal_uInt32 m_nMagicalHackPos;
sal_uInt32 m_nMagicalHackSize;
- sal_Bool m_bHasSeekable;
+ bool m_bHasSeekable;
- sal_Bool m_bCompressedIsSetFromOutside;
+ bool m_bCompressedIsSetFromOutside;
- sal_Bool m_bFromManifest;
+ bool m_bFromManifest;
bool m_bUseWinEncoding;
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetOwnSeekStream();
public:
- sal_Bool HasOwnKey () const { return bHaveOwnKey;}
- sal_Bool IsToBeCompressed () const { return bToBeCompressed;}
- sal_Bool IsToBeEncrypted () const { return bToBeEncrypted;}
- sal_Bool IsEncrypted () const { return bIsEncrypted;}
- sal_Bool IsPackageMember () const { return m_nStreamMode == PACKAGE_STREAM_PACKAGEMEMBER;}
+ bool HasOwnKey () const { return bHaveOwnKey;}
+ bool IsToBeCompressed () const { return bToBeCompressed;}
+ bool IsToBeEncrypted () const { return bToBeEncrypted;}
+ bool IsEncrypted () const { return bIsEncrypted;}
+ bool IsPackageMember () const { return m_nStreamMode == PACKAGE_STREAM_PACKAGEMEMBER;}
- sal_Bool IsFromManifest() const { return m_bFromManifest; }
- void SetFromManifest( sal_Bool bValue ) { m_bFromManifest = bValue; }
+ bool IsFromManifest() const { return m_bFromManifest; }
+ void SetFromManifest( bool bValue ) { m_bFromManifest = bValue; }
::rtl::Reference< EncryptionData > GetEncryptionData( bool bWinEncoding = false );
@@ -108,13 +108,13 @@ public:
sal_Int32 GetEncryptionAlgorithm() const;
sal_Int32 GetBlockSize() const;
- void SetToBeCompressed (sal_Bool bNewValue) { bToBeCompressed = bNewValue;}
- void SetIsEncrypted (sal_Bool bNewValue) { bIsEncrypted = bNewValue;}
+ void SetToBeCompressed (bool bNewValue) { bToBeCompressed = bNewValue;}
+ void SetIsEncrypted (bool bNewValue) { bIsEncrypted = bNewValue;}
void SetImportedStartKeyAlgorithm( sal_Int32 nAlgorithm ) { m_nImportedStartKeyAlgorithm = nAlgorithm; }
void SetImportedEncryptionAlgorithm( sal_Int32 nAlgorithm ) { m_nImportedEncryptionAlgorithm = nAlgorithm; }
void SetImportedChecksumAlgorithm( sal_Int32 nAlgorithm ) { m_nImportedChecksumAlgorithm = nAlgorithm; }
void SetImportedDerivedKeySize( sal_Int32 nSize ) { m_nImportedDerivedKeySize = nSize; }
- void SetToBeEncrypted (sal_Bool bNewValue)
+ void SetToBeEncrypted (bool bNewValue)
{
bToBeEncrypted = bNewValue;
if ( bToBeEncrypted && !m_xBaseEncryptionData.is())
@@ -122,7 +122,7 @@ public:
else if ( !bToBeEncrypted && m_xBaseEncryptionData.is() )
m_xBaseEncryptionData.clear();
}
- void SetPackageMember (sal_Bool bNewValue);
+ void SetPackageMember (bool bNewValue);
void setKey (const com::sun::star::uno::Sequence < sal_Int8 >& rNewKey )
{ m_aEncryptionKey = rNewKey; m_aStorageEncryptionKeys.realloc( 0 ); }
@@ -142,14 +142,14 @@ public:
ZipPackageStream ( ZipPackage & rNewPackage,
const ::com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext >& xContext,
- sal_Bool bAllowRemoveOnInsert );
+ bool bAllowRemoveOnInsert );
virtual ~ZipPackageStream( void );
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetRawEncrStreamNoHeaderCopy();
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > TryToGetRawFromDataStream(
- sal_Bool bAddHeaderForEncr );
+ bool bAddHeaderForEncr );
- sal_Bool ParsePackageRawStream();
+ bool ParsePackageRawStream();
void setZipEntryOnLoading( const ZipEntry &rInEntry);
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > SAL_CALL getRawData()
diff --git a/package/inc/mutexholder.hxx b/package/inc/mutexholder.hxx
index b4255187a22c..4b2e47f208dc 100644
--- a/package/inc/mutexholder.hxx
+++ b/package/inc/mutexholder.hxx
@@ -113,7 +113,7 @@ public:
return m_pHolder;
}
- sal_Bool Is() const
+ bool Is() const
{
return m_pHolder != NULL;
}
diff --git a/package/inc/zipfileaccess.hxx b/package/inc/zipfileaccess.hxx
index 3280e866cc20..af3258e88839 100644
--- a/package/inc/zipfileaccess.hxx
+++ b/package/inc/zipfileaccess.hxx
@@ -50,7 +50,7 @@ class OZipFileAccess : public ::cppu::WeakImplHelper4<
::cppu::OInterfaceContainerHelper* m_pListenersContainer;
- sal_Bool m_bDisposed;
+ bool m_bDisposed;
bool m_bOwnContent;
public:
@@ -60,7 +60,7 @@ public:
::com::sun::star::uno::Sequence< OUString > GetPatternsFromString_Impl( const OUString& aString );
- sal_Bool StringGoodForPattern_Impl( const OUString& aString,
+ bool StringGoodForPattern_Impl( const OUString& aString,
const ::com::sun::star::uno::Sequence< OUString >& aPattern );
static ::com::sun::star::uno::Sequence< OUString > SAL_CALL impl_staticGetSupportedServiceNames();
diff --git a/package/source/manifest/ManifestExport.cxx b/package/source/manifest/ManifestExport.cxx
index 0572cf73f0bc..ddfe008381b5 100644
--- a/package/source/manifest/ManifestExport.cxx
+++ b/package/source/manifest/ManifestExport.cxx
@@ -132,9 +132,9 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
}
}
- sal_Bool bProvideDTD = sal_False;
- sal_Bool bAcceptNonemptyVersion = sal_False;
- sal_Bool bStoreStartKeyGeneration = sal_False;
+ bool bProvideDTD = false;
+ bool bAcceptNonemptyVersion = false;
+ bool bStoreStartKeyGeneration = false;
if ( !aDocMediaType.isEmpty() )
{
if ( aDocMediaType == MIMETYPE_OASIS_OPENDOCUMENT_TEXT_ASCII
@@ -158,11 +158,11 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
pRootAttrList->AddAttribute ( ATTRIBUTE_XMLNS,
sCdataAttribute,
MANIFEST_OASIS_NAMESPACE );
- bAcceptNonemptyVersion = sal_True;
+ bAcceptNonemptyVersion = true;
if ( aDocVersion.compareTo( ODFVER_012_TEXT ) >= 0 )
{
// this is ODF12 generation, let encrypted streams contain start-key-generation entry
- bStoreStartKeyGeneration = sal_True;
+ bStoreStartKeyGeneration = true;
pRootAttrList->AddAttribute ( sVersionAttribute, sCdataAttribute, aDocVersion );
}
}
@@ -174,7 +174,7 @@ ManifestExport::ManifestExport( uno::Reference< xml::sax::XDocumentHandler > xHa
sCdataAttribute,
MANIFEST_NAMESPACE );
- bProvideDTD = sal_True;
+ bProvideDTD = true;
}
}
diff --git a/package/source/manifest/ManifestImport.cxx b/package/source/manifest/ManifestImport.cxx
index c20bb1eaa008..6c2511534686 100644
--- a/package/source/manifest/ManifestImport.cxx
+++ b/package/source/manifest/ManifestImport.cxx
@@ -31,7 +31,7 @@ using namespace com::sun::star;
using namespace std;
ManifestImport::ManifestImport( vector < Sequence < PropertyValue > > & rNewManVector )
-: bIgnoreEncryptData ( sal_False )
+: bIgnoreEncryptData ( false )
, nDerivedKeySize( 0 )
, rManVector ( rNewManVector )
@@ -152,7 +152,7 @@ void ManifestImport::doEncryptionData(StringHashMap &rConvertedAttribs)
aSequence[PKG_MNFST_DIGESTALG].Value <<= xml::crypto::DigestID::SHA256_1K;
}
else
- bIgnoreEncryptData = sal_True;
+ bIgnoreEncryptData = true;
if ( !bIgnoreEncryptData )
{
@@ -198,7 +198,7 @@ void ManifestImport::doAlgorithm(StringHashMap &rConvertedAttribs)
nDerivedKeySize = 16;
}
else
- bIgnoreEncryptData = sal_True;
+ bIgnoreEncryptData = true;
if ( !bIgnoreEncryptData )
{
@@ -245,7 +245,7 @@ void ManifestImport::doKeyDerivation(StringHashMap &rConvertedAttribs)
aSequence[PKG_MNFST_DERKEYSIZE].Value <<= nDerivedKeySize;
}
else
- bIgnoreEncryptData = sal_True;
+ bIgnoreEncryptData = true;
}
}
@@ -264,7 +264,7 @@ void ManifestImport::doStartKeyAlg(StringHashMap &rConvertedAttribs)
aSequence[PKG_MNFST_STARTALG].Value <<= xml::crypto::DigestID::SHA1;
}
else
- bIgnoreEncryptData = sal_True;
+ bIgnoreEncryptData = true;
}
void SAL_CALL ManifestImport::startElement( const OUString& aName, const uno::Reference< xml::sax::XAttributeList >& xAttribs )
@@ -349,7 +349,7 @@ void SAL_CALL ManifestImport::endElement( const OUString& aName )
aSequence.erase(std::remove_if(aSequence.begin(), aSequence.end(),
isEmpty), aSequence.end());
- bIgnoreEncryptData = sal_False;
+ bIgnoreEncryptData = false;
rManVector.push_back ( aSequence.getAsConstList() );
aSequence.clear();
diff --git a/package/source/manifest/ManifestImport.hxx b/package/source/manifest/ManifestImport.hxx
index 55e80df9d6fa..4f2815d9bc34 100644
--- a/package/source/manifest/ManifestImport.hxx
+++ b/package/source/manifest/ManifestImport.hxx
@@ -57,7 +57,7 @@ class ManifestImport : public cppu::WeakImplHelper1 < com::sun::star::xml::sax::
protected:
comphelper::SequenceAsVector< com::sun::star::beans::PropertyValue > aSequence;
ManifestStack aStack;
- sal_Bool bIgnoreEncryptData;
+ bool bIgnoreEncryptData;
sal_Int32 nDerivedKeySize;
::std::vector < ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > > & rManVector;
diff --git a/package/source/xstor/ocompinstream.cxx b/package/source/xstor/ocompinstream.cxx
index 0165d0acf872..bf6b186d9838 100644
--- a/package/source/xstor/ocompinstream.cxx
+++ b/package/source/xstor/ocompinstream.cxx
@@ -36,7 +36,7 @@ OInputCompStream::OInputCompStream( OWriteStream_Impl& aImpl,
, m_xStream( xStream )
, m_pInterfaceContainer( NULL )
, m_aProperties( aProps )
-, m_bDisposed( sal_False )
+, m_bDisposed( false )
, m_nStorageType( nStorageType )
{
OSL_ENSURE( m_pImpl->m_rMutexRef.Is(), "No mutex is provided!\n" );
@@ -54,7 +54,7 @@ OInputCompStream::OInputCompStream( uno::Reference < io::XInputStream > xStream,
, m_xStream( xStream )
, m_pInterfaceContainer( NULL )
, m_aProperties( aProps )
-, m_bDisposed( sal_False )
+, m_bDisposed( false )
, m_nStorageType( nStorageType )
{
OSL_ENSURE( xStream.is(), "No stream is provided!\n" );
@@ -258,7 +258,7 @@ void OInputCompStream::InternalDispose()
{}
m_pImpl = NULL;
- m_bDisposed = sal_True;
+ m_bDisposed = true;
}
void SAL_CALL OInputCompStream::dispose( )
@@ -285,7 +285,7 @@ void SAL_CALL OInputCompStream::dispose( )
m_pImpl = NULL;
}
- m_bDisposed = sal_True;
+ m_bDisposed = true;
}
void SAL_CALL OInputCompStream::addEventListener( const uno::Reference< lang::XEventListener >& xListener )
diff --git a/package/source/xstor/ocompinstream.hxx b/package/source/xstor/ocompinstream.hxx
index c8db28a58cc3..bbc5b26d4f5d 100644
--- a/package/source/xstor/ocompinstream.hxx
+++ b/package/source/xstor/ocompinstream.hxx
@@ -50,7 +50,7 @@ protected:
::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue > m_aProperties;
- sal_Bool m_bDisposed;
+ bool m_bDisposed;
sal_Int32 m_nStorageType;
diff --git a/package/source/xstor/ohierarchyholder.cxx b/package/source/xstor/ohierarchyholder.cxx
index 0a3f926cc613..1ba6d913294c 100644
--- a/package/source/xstor/ohierarchyholder.cxx
+++ b/package/source/xstor/ohierarchyholder.cxx
@@ -125,7 +125,7 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea
}
else
{
- sal_Bool bNewElement = sal_False;
+ bool bNewElement = false;
::rtl::Reference< OHierarchyElement_Impl > aElement;
OHierarchyElementList_Impl::iterator aIter = m_aChildren.find( aNextName );
if ( aIter != m_aChildren.end() )
@@ -133,7 +133,7 @@ uno::Reference< embed::XExtendedStorageStream > OHierarchyElement_Impl::GetStrea
if ( !aElement.is() )
{
- bNewElement = sal_True;
+ bNewElement = true;
uno::Reference< embed::XStorage > xChildStorage = xOwnStor->openStorageElement( aNextName, nStorageMode );
if ( !xChildStorage.is() )
throw uno::RuntimeException();
diff --git a/package/source/xstor/ohierarchyholder.hxx b/package/source/xstor/ohierarchyholder.hxx
index 1eb76a6f5eb8..75aa3477c7b9 100644
--- a/package/source/xstor/ohierarchyholder.hxx
+++ b/package/source/xstor/ohierarchyholder.hxx
@@ -37,7 +37,7 @@ struct OHierarchyElement_Impl;
struct eqFunc
{
- sal_Bool operator()( const OUString &r1,
+ bool operator()( const OUString &r1,
const OUString &r2) const
{
return r1 == r2;
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index 272307f909a3..c4b49cb22cd3 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -181,19 +181,19 @@ bool SequencesEqual( const uno::Sequence< beans::NamedValue >& aSequence1, const
return true;
}
-sal_Bool KillFile( const OUString& aURL, const uno::Reference< uno::XComponentContext >& xContext )
+bool KillFile( const OUString& aURL, const uno::Reference< uno::XComponentContext >& xContext )
{
if ( !xContext.is() )
- return sal_False;
+ return false;
- sal_Bool bRet = sal_False;
+ bool bRet = false;
try
{
uno::Reference < ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create( xContext ) );
xAccess->kill( aURL );
- bRet = sal_True;
+ bRet = true;
}
catch( const uno::Exception& rException )
{
@@ -242,25 +242,25 @@ OWriteStream_Impl::OWriteStream_Impl( OStorage_Impl* pParent,
const uno::Reference< packages::XDataSinkEncrSupport >& xPackageStream,
const uno::Reference< lang::XSingleServiceFactory >& xPackage,
const uno::Reference< uno::XComponentContext >& xContext,
- sal_Bool bForceEncrypted,
+ bool bForceEncrypted,
sal_Int32 nStorageType,
- sal_Bool bDefaultCompress,
+ bool bDefaultCompress,
const uno::Reference< io::XInputStream >& xRelInfoStream )
: m_pAntiImpl( NULL )
-, m_bHasDataToFlush( sal_False )
-, m_bFlushed( sal_False )
+, m_bHasDataToFlush( false )
+, m_bFlushed( false )
, m_xPackageStream( xPackageStream )
, m_xContext( xContext )
, m_pParent( pParent )
, m_bForceEncrypted( bForceEncrypted )
, m_bUseCommonEncryption( !bForceEncrypted && nStorageType == embed::StorageFormats::PACKAGE )
-, m_bHasCachedEncryptionData( sal_False )
+, m_bHasCachedEncryptionData( false )
, m_bCompressedSetExplicit( !bDefaultCompress )
, m_xPackage( xPackage )
-, m_bHasInsertedStreamOptimization( sal_False )
+, m_bHasInsertedStreamOptimization( false )
, m_nStorageType( nStorageType )
, m_xOrigRelInfoStream( xRelInfoStream )
-, m_bOrigRelInfoBroken( sal_False )
+, m_bOrigRelInfoBroken( false )
, m_nRelInfoStatus( RELINFO_NO_INIT )
, m_nRelId( 1 )
{
@@ -345,25 +345,25 @@ void OWriteStream_Impl::InsertIntoPackageFolder( const OUString& aName,
xParentPackageFolder->insertByName( aName, uno::makeAny( xTunnel ) );
- m_bFlushed = sal_False;
- m_bHasInsertedStreamOptimization = sal_False;
+ m_bFlushed = false;
+ m_bHasInsertedStreamOptimization = false;
}
}
-sal_Bool OWriteStream_Impl::IsEncrypted()
+bool OWriteStream_Impl::IsEncrypted()
{
if ( m_nStorageType != embed::StorageFormats::PACKAGE )
- return sal_False;
+ return false;
if ( m_bForceEncrypted || m_bHasCachedEncryptionData )
- return sal_True;
+ return true;
if ( !m_aTempURL.isEmpty() || m_xCacheStream.is() )
- return sal_False;
+ return false;
GetStreamProperties();
// the following value can not be cached since it can change after root commit
- sal_Bool bWasEncr = sal_False;
+ bool bWasEncr = false;
uno::Reference< beans::XPropertySet > xPropSet( m_xPackageStream, uno::UNO_QUERY );
if ( xPropSet.is() )
{
@@ -374,7 +374,7 @@ sal_Bool OWriteStream_Impl::IsEncrypted()
}
}
- sal_Bool bToBeEncr = sal_False;
+ bool bToBeEncr = false;
for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ )
{
if ( m_aProps[nInd].Name == "Encrypted" )
@@ -401,8 +401,8 @@ sal_Bool OWriteStream_Impl::IsEncrypted()
if ( !bWasEncr && bToBeEncr && !aKey.getLength() )
{
// the stream is intended to use common storage password
- m_bUseCommonEncryption = sal_True;
- return sal_False;
+ m_bUseCommonEncryption = true;
+ return false;
}
else
return bToBeEncr;
@@ -418,11 +418,11 @@ void OWriteStream_Impl::SetDecrypted()
// let the stream be modified
FillTempGetFileName();
- m_bHasDataToFlush = sal_True;
+ m_bHasDataToFlush = true;
// remove encryption
- m_bForceEncrypted = sal_False;
- m_bHasCachedEncryptionData = sal_False;
+ m_bForceEncrypted = false;
+ m_bHasCachedEncryptionData = false;
m_aEncryptionData.clear();
for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ )
@@ -445,7 +445,7 @@ void OWriteStream_Impl::SetEncrypted( const ::comphelper::SequenceAsHashMap& aEn
// let the stream be modified
FillTempGetFileName();
- m_bHasDataToFlush = sal_True;
+ m_bHasDataToFlush = true;
// introduce encryption info
for ( sal_Int32 nInd = 0; nInd < m_aProps.getLength(); nInd++ )
@@ -454,9 +454,9 @@ void OWriteStream_Impl::SetEncrypted( const ::comphelper::SequenceAsHashMap& aEn
m_aProps[nInd].Value <<= sal_True;
}
- m_bUseCommonEncryption = sal_False; // very important to set it to false
+ m_bUseCommonEncryption = false; // very important to set it to false
- m_bHasCachedEncryptionData = sal_True;
+ m_bHasCachedEncryptionData = true;
m_aEncryptionData = aEncryptionData;
}
@@ -729,15 +729,15 @@ void OWriteStream_Impl::InsertStreamDirectly( const uno::Reference< io::XInputSt
// Depending from MediaType value the package can change the compressed property itself
// Thus if Compressed property is provided it must be set as the latest one
- sal_Bool bCompressedIsSet = sal_False;
- sal_Bool bCompressed = sal_False;
+ bool bCompressedIsSet = false;
+ bool bCompressed = false;
OUString aComprPropName( "Compressed" );
OUString aMedTypePropName( "MediaType" );
for ( sal_Int32 nInd = 0; nInd < aProps.getLength(); nInd++ )
{
if ( aProps[nInd].Name.equals( aComprPropName ) )
{
- bCompressedIsSet = sal_True;
+ bCompressedIsSet = true;
aProps[nInd].Value >>= bCompressed;
}
else if ( ( m_nStorageType == embed::StorageFormats::OFOPXML || m_nStorageType == embed::StorageFormats::PACKAGE )
@@ -761,8 +761,8 @@ void OWriteStream_Impl::InsertStreamDirectly( const uno::Reference< io::XInputSt
if ( bCompressedIsSet )
{
- xPropertySet->setPropertyValue( aComprPropName, uno::makeAny( (sal_Bool)bCompressed ) );
- m_bCompressedSetExplicit = sal_True;
+ xPropertySet->setPropertyValue( aComprPropName, uno::makeAny( bCompressed ) );
+ m_bCompressedSetExplicit = true;
}
if ( m_bUseCommonEncryption )
@@ -777,9 +777,9 @@ void OWriteStream_Impl::InsertStreamDirectly( const uno::Reference< io::XInputSt
}
// the stream should be free soon, after package is stored
- m_bHasDataToFlush = sal_False;
- m_bFlushed = sal_True; // will allow to use transaction on stream level if will need it
- m_bHasInsertedStreamOptimization = sal_True;
+ m_bHasDataToFlush = false;
+ m_bFlushed = true; // will allow to use transaction on stream level if will need it
+ m_bHasInsertedStreamOptimization = true;
}
void OWriteStream_Impl::Commit()
@@ -884,8 +884,8 @@ void OWriteStream_Impl::Commit()
// the stream should be free soon, after package is stored
m_xPackageStream = xNewPackageStream;
- m_bHasDataToFlush = sal_False;
- m_bFlushed = sal_True; // will allow to use transaction on stream level if will need it
+ m_bHasDataToFlush = false;
+ m_bFlushed = true; // will allow to use transaction on stream level if will need it
}
void OWriteStream_Impl::Revert()
@@ -914,10 +914,10 @@ void OWriteStream_Impl::Revert()
m_aProps.realloc( 0 );
- m_bHasDataToFlush = sal_False;
+ m_bHasDataToFlush = false;
- m_bUseCommonEncryption = sal_True;
- m_bHasCachedEncryptionData = sal_False;
+ m_bUseCommonEncryption = true;
+ m_bHasCachedEncryptionData = false;
m_aEncryptionData.clear();
if ( m_nStorageType == embed::StorageFormats::OFOPXML )
@@ -952,7 +952,7 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::GetStreamProperties()
uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps(
const uno::Sequence< beans::PropertyValue >& aProps,
- sal_Bool bUseCommonEncryption )
+ bool bUseCommonEncryption )
{
uno::Sequence< beans::PropertyValue > aResult( aProps );
sal_Int32 nLen = aResult.getLength();
@@ -998,7 +998,7 @@ uno::Sequence< beans::PropertyValue > OWriteStream_Impl::InsertOwnProps(
return aResult;
}
-sal_Bool OWriteStream_Impl::IsTransacted()
+bool OWriteStream_Impl::IsTransacted()
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
return ( m_pAntiImpl && m_pAntiImpl->m_bTransacted );
@@ -1032,7 +1032,7 @@ void OWriteStream_Impl::ReadRelInfoIfNecessary()
AddLog( "Quiet exception" );
m_nRelInfoStatus = RELINFO_BROKEN;
- m_bOrigRelInfoBroken = sal_True;
+ m_bOrigRelInfoBroken = true;
}
}
else if ( m_nRelInfoStatus == RELINFO_CHANGED_STREAM )
@@ -1128,7 +1128,7 @@ void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream
}
else
{
- uno::Reference< io::XStream > xOwnStream = GetStream( embed::ElementModes::READ, aEncryptionData, sal_False );
+ uno::Reference< io::XStream > xOwnStream = GetStream( embed::ElementModes::READ, aEncryptionData, false );
if ( !xOwnStream.is() )
throw io::IOException(); // TODO
@@ -1166,7 +1166,7 @@ void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream
}
else
{
- uno::Reference< io::XStream > xOwnStream = GetStream( embed::ElementModes::READ, sal_False );
+ uno::Reference< io::XStream > xOwnStream = GetStream( embed::ElementModes::READ, false );
if ( !xOwnStream.is() )
throw io::IOException(); // TODO
@@ -1174,7 +1174,7 @@ void OWriteStream_Impl::CopyInternallyTo_Impl( const uno::Reference< io::XStream
}
}
-uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData, sal_Bool bHierarchyAccess )
+uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMode, const ::comphelper::SequenceAsHashMap& aEncryptionData, bool bHierarchyAccess )
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
@@ -1207,8 +1207,8 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod
try {
xResultStream = GetStream_Impl( nStreamMode, bHierarchyAccess );
- m_bUseCommonEncryption = sal_False; // very important to set it to false
- m_bHasCachedEncryptionData = sal_True;
+ m_bUseCommonEncryption = false; // very important to set it to false
+ m_bHasCachedEncryptionData = true;
m_aEncryptionData = aEncryptionData;
}
catch( const packages::WrongPasswordException& rWrongPasswordException )
@@ -1234,7 +1234,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod
return xResultStream;
}
-uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMode, sal_Bool bHierarchyAccess )
+uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMode, bool bHierarchyAccess )
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() ) ;
@@ -1268,7 +1268,7 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream( sal_Int32 nStreamMod
return xResultStream;
}
-uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStreamMode, sal_Bool bHierarchyAccess )
+uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStreamMode, bool bHierarchyAccess )
{
// private method, no mutex is used
GetStreamProperties();
@@ -1337,11 +1337,11 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre
if ( m_xCacheStream.is() )
CleanCacheStream();
- m_bHasDataToFlush = sal_True;
+ m_bHasDataToFlush = true;
// this call is triggered by the parent and it will recognize the change of the state
if ( m_pParent )
- m_pParent->m_bIsModified = sal_True;
+ m_pParent->m_bIsModified = true;
xStream = CreateMemoryStream( m_xContext );
m_xCacheSeek.set( xStream, uno::UNO_QUERY_THROW );
@@ -1352,11 +1352,11 @@ uno::Reference< io::XStream > OWriteStream_Impl::GetStream_Impl( sal_Int32 nStre
if ( m_aTempURL.isEmpty() && !m_xCacheStream.is() && !( m_xPackageStream->getDataStream().is() ) )
{
// The stream does not exist in the storage
- m_bHasDataToFlush = sal_True;
+ m_bHasDataToFlush = true;
// this call is triggered by the parent and it will recognize the change of the state
if ( m_pParent )
- m_pParent->m_bIsModified = sal_True;
+ m_pParent->m_bIsModified = true;
xStream = GetTempFileAsStream();
}
@@ -1427,7 +1427,7 @@ void OWriteStream_Impl::InputStreamDisposed( OInputCompStream* pStream )
m_aInputStreamsList.remove( pStream );
}
-void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io::XInputStream >& xDataToCopy, const uno::Sequence< beans::PropertyValue >& aProps, sal_Bool, uno::Reference< io::XStream >& xTargetStream )
+void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io::XInputStream >& xDataToCopy, const uno::Sequence< beans::PropertyValue >& aProps, bool, uno::Reference< io::XStream >& xTargetStream )
{
uno::Reference < io::XStream > xTempFile;
if ( !xTargetStream.is() )
@@ -1524,7 +1524,7 @@ void OWriteStream_Impl::GetCopyOfLastCommit( uno::Reference< io::XStream >& xTar
if ( !xProps.is() )
throw uno::RuntimeException();
- sal_Bool bEncr = sal_False;
+ bool bEncr = false;
xProps->getPropertyValue( "Encrypted" ) >>= bEncr;
if ( !bEncr )
throw packages::NoEncryptionException();
@@ -1591,7 +1591,7 @@ void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStora
OUString aNewRelStreamName = aNewStreamName;
aNewRelStreamName += ".rels";
- sal_Bool bRenamed = !aOrigRelStreamName.equals( aNewRelStreamName );
+ bool bRenamed = !aOrigRelStreamName.equals( aNewRelStreamName );
if ( m_nRelInfoStatus == RELINFO_CHANGED
|| m_nRelInfoStatus == RELINFO_CHANGED_STREAM_READ
|| m_nRelInfoStatus == RELINFO_CHANGED_STREAM )
@@ -1656,7 +1656,7 @@ void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStora
// the original stream makes no sence after this step
m_xOrigRelInfoStream = m_xNewRelInfoStream;
m_aOrigRelInfo = m_aNewRelInfo;
- m_bOrigRelInfoBroken = sal_False;
+ m_bOrigRelInfoBroken = false;
m_aNewRelInfo = uno::Sequence< uno::Sequence< beans::StringPair > >();
m_xNewRelInfoStream = uno::Reference< io::XInputStream >();
}
@@ -1671,10 +1671,10 @@ void OWriteStream_Impl::CommitStreamRelInfo( const uno::Reference< embed::XStora
// OWriteStream implementation
-OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, sal_Bool bTransacted )
+OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, bool bTransacted )
: m_pImpl( pImpl )
-, m_bInStreamDisconnected( sal_False )
-, m_bInitOnDemand( sal_True )
+, m_bInStreamDisconnected( false )
+, m_bInitOnDemand( true )
, m_nInitPosition( 0 )
, m_bTransacted( bTransacted )
{
@@ -1687,10 +1687,10 @@ OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, sal_Bool bTransacted )
m_pData = new WSInternalData_Impl( pImpl->m_rMutexRef, m_pImpl->m_nStorageType );
}
-OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, uno::Reference< io::XStream > xStream, sal_Bool bTransacted )
+OWriteStream::OWriteStream( OWriteStream_Impl* pImpl, uno::Reference< io::XStream > xStream, bool bTransacted )
: m_pImpl( pImpl )
-, m_bInStreamDisconnected( sal_False )
-, m_bInitOnDemand( sal_False )
+, m_bInStreamDisconnected( false )
+, m_bInitOnDemand( false )
, m_nInitPosition( 0 )
, m_bTransacted( bTransacted )
{
@@ -1747,7 +1747,7 @@ void OWriteStream::DeInit()
m_xInStream = uno::Reference< io::XInputStream >();
m_xOutStream = uno::Reference< io::XOutputStream >();
m_xSeekable = uno::Reference< io::XSeekable >();
- m_bInitOnDemand = sal_True;
+ m_bInitOnDemand = true;
}
void OWriteStream::CheckInitOnDemand()
@@ -1770,7 +1770,7 @@ void OWriteStream::CheckInitOnDemand()
m_xSeekable->seek( m_nInitPosition );
m_nInitPosition = 0;
- m_bInitOnDemand = sal_False;
+ m_bInitOnDemand = false;
}
}
}
@@ -1799,14 +1799,14 @@ void OWriteStream::CopyToStreamInternally_Impl( const uno::Reference< io::XStrea
m_xSeekable->seek( 0 );
uno::Exception eThrown;
- sal_Bool bThrown = sal_False;
+ bool bThrown = false;
try {
::comphelper::OStorageHelper::CopyInputToOutput( m_xInStream, xDestOutStream );
}
catch ( const uno::Exception& e )
{
eThrown = e;
- bThrown = sal_True;
+ bThrown = true;
}
// position-related section below is critical
@@ -1855,7 +1855,7 @@ void OWriteStream::ModifyParentUnlockMutex_Impl( ::osl::ResettableMutexGuard& aG
xParentModif->setModified( sal_True );
}
else
- m_pImpl->m_pParent->m_bIsModified = sal_True;
+ m_pImpl->m_pParent->m_bIsModified = true;
}
}
@@ -2146,7 +2146,7 @@ void SAL_CALL OWriteStream::closeInput( )
// the input part of the stream stays open for internal purposes ( to allow reading during copiing )
// since it can not be reopened until output part is closed, it will be closed with output part.
- m_bInStreamDisconnected = sal_True;
+ m_bInStreamDisconnected = true;
// m_xInStream->closeInput();
// m_xInStream = uno::Reference< io::XInputStream >();
@@ -2244,7 +2244,7 @@ void SAL_CALL OWriteStream::writeBytes( const uno::Sequence< sal_Int8 >& aData )
m_xSeekable->seek( m_nInitPosition );
m_nInitPosition = 0;
- m_bInitOnDemand = sal_False;
+ m_bInitOnDemand = false;
}
}
@@ -2252,7 +2252,7 @@ void SAL_CALL OWriteStream::writeBytes( const uno::Sequence< sal_Int8 >& aData )
throw io::NotConnectedException();
m_xOutStream->writeBytes( aData );
- m_pImpl->m_bHasDataToFlush = sal_True;
+ m_pImpl->m_bHasDataToFlush = true;
ModifyParentUnlockMutex_Impl( aGuard );
}
@@ -2421,7 +2421,7 @@ void SAL_CALL OWriteStream::truncate()
xTruncate->truncate();
- m_pImpl->m_bHasDataToFlush = sal_True;
+ m_pImpl->m_bHasDataToFlush = true;
ModifyParentUnlockMutex_Impl( aGuard );
}
@@ -2592,7 +2592,7 @@ sal_Bool SAL_CALL OWriteStream::hasEncryptionData()
if (!m_pImpl)
return sal_False;
- sal_Bool bRet = m_pImpl->IsEncrypted();
+ bool bRet = m_pImpl->IsEncrypted();
if (!bRet && m_pImpl->m_bUseCommonEncryption && m_pImpl->m_pParent)
bRet = m_pImpl->m_pParent->m_bHasCommonEncryptionData;
@@ -2919,14 +2919,14 @@ void SAL_CALL OWriteStream::insertRelationships( const uno::Sequence< uno::Sequ
for ( sal_Int32 nIndSource1 = 0; nIndSource1 < aEntries.getLength(); nIndSource1++ )
{
aResultSeq[nResultInd].realloc( aEntries[nIndSource1].getLength() );
- sal_Bool bHasID = sal_False;
+ bool bHasID = false;
sal_Int32 nResInd2 = 1;
for ( sal_Int32 nIndSource2 = 0; nIndSource2 < aEntries[nIndSource1].getLength(); nIndSource2++ )
if ( aEntries[nIndSource1][nIndSource2].First.equals( aIDTag ) )
{
aResultSeq[nResultInd][0] = aEntries[nIndSource1][nIndSource2];
- bHasID = sal_True;
+ bHasID = true;
}
else if ( nResInd2 < aResultSeq[nResultInd].getLength() )
aResultSeq[nResultInd][nResInd2++] = aEntries[nIndSource1][nIndSource2];
@@ -2995,14 +2995,14 @@ void SAL_CALL OWriteStream::setPropertyValue( const OUString& aPropertyName, con
if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE && aPropertyName.equals( aMediaTypeString ) )
{
// if the "Compressed" property is not set explicitly, the MediaType can change the default value
- sal_Bool bCompressedValueFromType = sal_True;
+ bool bCompressedValueFromType = true;
OUString aType;
aValue >>= aType;
if ( !m_pImpl->m_bCompressedSetExplicit )
{
if ( aType == "image/jpeg" || aType == "image/png" || aType == "image/gif" )
- bCompressedValueFromType = sal_False;
+ bCompressedValueFromType = false;
}
for ( sal_Int32 nInd = 0; nInd < m_pImpl->m_aProps.getLength(); nInd++ )
@@ -3016,7 +3016,7 @@ void SAL_CALL OWriteStream::setPropertyValue( const OUString& aPropertyName, con
else if ( aPropertyName.equals( aCompressedString ) )
{
// if the "Compressed" property is not set explicitly, the MediaType can change the default value
- m_pImpl->m_bCompressedSetExplicit = sal_True;
+ m_pImpl->m_bCompressedSetExplicit = true;
for ( sal_Int32 nInd = 0; nInd < m_pImpl->m_aProps.getLength(); nInd++ )
{
if ( aPropertyName.equals( m_pImpl->m_aProps[nInd].Name ) )
@@ -3026,7 +3026,7 @@ void SAL_CALL OWriteStream::setPropertyValue( const OUString& aPropertyName, con
else if ( m_pData->m_nStorageType == embed::StorageFormats::PACKAGE
&& aPropertyName == "UseCommonStoragePasswordEncryption" )
{
- sal_Bool bUseCommonEncryption = sal_False;
+ bool bUseCommonEncryption = false;
if ( aValue >>= bUseCommonEncryption )
{
if ( m_bInitOnDemand && m_pImpl->m_bHasInsertedStreamOptimization )
@@ -3039,11 +3039,11 @@ void SAL_CALL OWriteStream::setPropertyValue( const OUString& aPropertyName, con
if ( !m_pImpl->m_bUseCommonEncryption )
{
m_pImpl->SetDecrypted();
- m_pImpl->m_bUseCommonEncryption = sal_True;
+ m_pImpl->m_bUseCommonEncryption = true;
}
}
else
- m_pImpl->m_bUseCommonEncryption = sal_False;
+ m_pImpl->m_bUseCommonEncryption = false;
}
else
throw lang::IllegalArgumentException(); //TODO
@@ -3097,7 +3097,7 @@ void SAL_CALL OWriteStream::setPropertyValue( const OUString& aPropertyName, con
else
throw beans::UnknownPropertyException(); // TODO
- m_pImpl->m_bHasDataToFlush = sal_True;
+ m_pImpl->m_bHasDataToFlush = true;
ModifyParentUnlockMutex_Impl( aGuard );
}
diff --git a/package/source/xstor/owriteablestream.hxx b/package/source/xstor/owriteablestream.hxx
index 5ee893fdb364..2599753d7aea 100644
--- a/package/source/xstor/owriteablestream.hxx
+++ b/package/source/xstor/owriteablestream.hxx
@@ -108,8 +108,8 @@ struct OWriteStream_Impl : public PreCreationStruct
InputStreamsList_Impl m_aInputStreamsList;
- sal_Bool m_bHasDataToFlush; // only modified elements will be sent to the original content
- sal_Bool m_bFlushed; // sending the streams is coordinated by the root storage of the package
+ bool m_bHasDataToFlush; // only modified elements will be sent to the original content
+ bool m_bFlushed; // sending the streams is coordinated by the root storage of the package
::com::sun::star::uno::Reference< ::com::sun::star::packages::XDataSinkEncrSupport > m_xPackageStream;
::com::sun::star::uno::Reference< ::com::sun::star::logging::XSimpleLogRing > m_xLogRing;
@@ -120,24 +120,24 @@ struct OWriteStream_Impl : public PreCreationStruct
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_aProps;
- sal_Bool m_bForceEncrypted;
+ bool m_bForceEncrypted;
- sal_Bool m_bUseCommonEncryption;
- sal_Bool m_bHasCachedEncryptionData;
+ bool m_bUseCommonEncryption;
+ bool m_bHasCachedEncryptionData;
::comphelper::SequenceAsHashMap m_aEncryptionData;
- sal_Bool m_bCompressedSetExplicit;
+ bool m_bCompressedSetExplicit;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory > m_xPackage;
- sal_Bool m_bHasInsertedStreamOptimization;
+ bool m_bHasInsertedStreamOptimization;
sal_Int32 m_nStorageType;
// Relations info related data, stored in *.rels file in OFOPXML format
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xOrigRelInfoStream;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > m_aOrigRelInfo;
- sal_Bool m_bOrigRelInfoBroken;
+ bool m_bOrigRelInfoBroken;
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::beans::StringPair > > m_aNewRelInfo;
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xNewRelInfoStream;
@@ -151,14 +151,14 @@ private:
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetTempFileAsInputStream();
::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetStream_Impl( sal_Int32 nStreamMode,
- sal_Bool bHierarchyAccess );
+ bool bHierarchyAccess );
::comphelper::SequenceAsHashMap GetCommonRootEncryptionData() throw ( ::com::sun::star::packages::NoEncryptionException );
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > ReadPackageStreamProperties();
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > InsertOwnProps(
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps,
- sal_Bool bUseCommonEncryption );
+ bool bUseCommonEncryption );
public:
OWriteStream_Impl(
@@ -166,9 +166,9 @@ public:
const ::com::sun::star::uno::Reference< ::com::sun::star::packages::XDataSinkEncrSupport >& xPackageStream,
const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XSingleServiceFactory >& xPackage,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext,
- sal_Bool bForceEncrypted,
+ bool bForceEncrypted,
sal_Int32 nStorageType,
- sal_Bool bDefaultCompress,
+ bool bDefaultCompress,
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xRelInfoStream =
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >() );
@@ -178,24 +178,24 @@ public:
void AddLog( const OUString& aMessage );
- sal_Bool UsesCommonEncryption_Impl() { return m_bUseCommonEncryption; }
- sal_Bool HasTempFile_Impl() const { return ( m_aTempURL.getLength() != 0 ); }
- sal_Bool IsTransacted();
+ bool UsesCommonEncryption_Impl() { return m_bUseCommonEncryption; }
+ bool HasTempFile_Impl() const { return ( m_aTempURL.getLength() != 0 ); }
+ bool IsTransacted();
- sal_Bool HasWriteOwner_Impl() const { return ( m_pAntiImpl != NULL ); }
+ bool HasWriteOwner_Impl() const { return ( m_pAntiImpl != NULL ); }
void InsertIntoPackageFolder(
const OUString& aName,
const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameContainer >& xParentPackageFolder );
- void SetToBeCommited() { m_bFlushed = sal_True; }
+ void SetToBeCommited() { m_bFlushed = true; }
- sal_Bool HasCachedEncryptionData() { return m_bHasCachedEncryptionData; }
+ bool HasCachedEncryptionData() { return m_bHasCachedEncryptionData; }
::comphelper::SequenceAsHashMap& GetCachedEncryptionData() { return m_aEncryptionData; }
- sal_Bool IsModified() { return m_bHasDataToFlush || m_bFlushed; }
+ bool IsModified() { return m_bHasDataToFlush || m_bFlushed; }
- sal_Bool IsEncrypted();
+ bool IsEncrypted();
void SetDecrypted();
void SetEncrypted( const ::comphelper::SequenceAsHashMap& aEncryptionData );
@@ -208,9 +208,9 @@ public:
void Commit();
void Revert();
- void Free( sal_Bool bMust ); // allows to try to disconnect from the temporary stream
- // in case bMust is set to sal_True the method
- // will throw exception in case the file is still busy
+ void Free( bool bMust ); // allows to try to disconnect from the temporary stream
+ // in case bMust is set to sal_True the method
+ // will throw exception in case the file is still busy
void SetModified(); // can be done only by parent storage after renaming
@@ -225,11 +225,11 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetStream(
sal_Int32 nStreamMode,
const ::comphelper::SequenceAsHashMap& aEncryptionData,
- sal_Bool bHierarchyAccess );
+ bool bHierarchyAccess );
::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > GetStream(
sal_Int32 nStreamMode,
- sal_Bool bHierarchyAccess );
+ bool bHierarchyAccess );
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetRawInStream();
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > GetPlainRawInStream();
@@ -239,7 +239,7 @@ public:
void CreateReadonlyCopyBasedOnData(
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xDataToCopy,
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& aProps,
- sal_Bool bUseCommonEncryption,
+ bool bUseCommonEncryption,
::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream );
void GetCopyOfLastCommit( ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream );
@@ -280,14 +280,14 @@ protected:
OWriteStream_Impl* m_pImpl;
WSInternalData_Impl* m_pData;
- sal_Bool m_bInStreamDisconnected;
- sal_Bool m_bInitOnDemand;
+ bool m_bInStreamDisconnected;
+ bool m_bInitOnDemand;
sal_Int64 m_nInitPosition;
- sal_Bool m_bTransacted;
+ bool m_bTransacted;
- OWriteStream( OWriteStream_Impl* pImpl, sal_Bool bTransacted );
- OWriteStream( OWriteStream_Impl* pImpl, ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xStream, sal_Bool bTransacted );
+ OWriteStream( OWriteStream_Impl* pImpl, bool bTransacted );
+ OWriteStream( OWriteStream_Impl* pImpl, ::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > xStream, bool bTransacted );
void CloseOutput_Impl();
diff --git a/package/source/xstor/switchpersistencestream.cxx b/package/source/xstor/switchpersistencestream.cxx
index 08683628b3f9..c187b4bafadc 100644
--- a/package/source/xstor/switchpersistencestream.cxx
+++ b/package/source/xstor/switchpersistencestream.cxx
@@ -28,7 +28,7 @@ using namespace ::com::sun::star;
struct SPStreamData_Impl
{
- sal_Bool m_bInStreamBased;
+ bool m_bInStreamBased;
// the streams below are not visible from outside so there is no need to remember position
@@ -39,18 +39,18 @@ struct SPStreamData_Impl
uno::Reference< io::XInputStream > m_xOrigInStream;
uno::Reference< io::XOutputStream > m_xOrigOutStream;
- sal_Bool m_bInOpen;
- sal_Bool m_bOutOpen;
+ bool m_bInOpen;
+ bool m_bOutOpen;
SPStreamData_Impl(
- sal_Bool bInStreamBased,
+ bool bInStreamBased,
const uno::Reference< io::XStream >& xOrigStream,
const uno::Reference< io::XTruncate >& xOrigTruncate,
const uno::Reference< io::XSeekable >& xOrigSeekable,
const uno::Reference< io::XInputStream >& xOrigInStream,
const uno::Reference< io::XOutputStream >& xOrigOutStream,
- sal_Bool bInOpen,
- sal_Bool bOutOpen )
+ bool bInOpen,
+ bool bOutOpen )
: m_bInStreamBased( bInStreamBased )
, m_xOrigStream( xOrigStream )
, m_xOrigTruncate( xOrigTruncate )
@@ -96,8 +96,8 @@ void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io:
throw uno::RuntimeException();
sal_Int64 nPos = 0;
- sal_Bool bInOpen = sal_False;
- sal_Bool bOutOpen = sal_False;
+ bool bInOpen = false;
+ bool bOutOpen = false;
if ( m_pStreamData && m_pStreamData->m_xOrigSeekable.is() )
{
@@ -115,7 +115,7 @@ void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io:
CloseAll_Impl();
- m_pStreamData = new SPStreamData_Impl( sal_False,
+ m_pStreamData = new SPStreamData_Impl( false,
xStream, xNewTruncate, xNewSeekable, xNewInStream, xNewOutStream,
bInOpen, bOutOpen );
}
@@ -130,8 +130,8 @@ void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io:
throw uno::RuntimeException();
sal_Int64 nPos = 0;
- sal_Bool bInOpen = sal_False;
- sal_Bool bOutOpen = sal_False;
+ bool bInOpen = false;
+ bool bOutOpen = false;
if ( m_pStreamData && m_pStreamData->m_xOrigSeekable.is() )
{
@@ -149,7 +149,7 @@ void SwitchablePersistenceStream::SwitchPersistenceTo( const uno::Reference< io:
CloseAll_Impl();
- m_pStreamData = new SPStreamData_Impl( sal_True,
+ m_pStreamData = new SPStreamData_Impl( true,
xNewStream, xNewTruncate, xNewSeekable, xInputStream, xNewOutStream,
bInOpen, bOutOpen );
@@ -191,12 +191,12 @@ void SwitchablePersistenceStream::CopyAndSwitchPersistenceTo( const uno::Referen
xTargetOutStream->flush();
xTargetSeek->seek( nPos );
- sal_Bool bInOpen = m_pStreamData->m_bInOpen;
- sal_Bool bOutOpen = m_pStreamData->m_bOutOpen;
+ bool bInOpen = m_pStreamData->m_bInOpen;
+ bool bOutOpen = m_pStreamData->m_bOutOpen;
CloseAll_Impl();
- m_pStreamData = new SPStreamData_Impl( sal_False,
+ m_pStreamData = new SPStreamData_Impl( false,
xTargetStream, xTargetTruncate, xTargetSeek, xTargetInStream, xTargetOutStream,
bInOpen, bOutOpen );
}
@@ -217,7 +217,7 @@ uno::Reference< io::XInputStream > SAL_CALL SwitchablePersistenceStream::getInpu
::osl::MutexGuard aGuard( m_aMutex );
if ( m_pStreamData )
- m_pStreamData->m_bInOpen = sal_True;
+ m_pStreamData->m_bInOpen = true;
return static_cast< io::XInputStream* >( this );
}
@@ -227,7 +227,7 @@ uno::Reference< io::XOutputStream > SAL_CALL SwitchablePersistenceStream::getOut
::osl::MutexGuard aGuard( m_aMutex );
if ( m_pStreamData )
- m_pStreamData->m_bOutOpen = sal_True;
+ m_pStreamData->m_bOutOpen = true;
return static_cast< io::XOutputStream* >( this );
}
@@ -300,7 +300,7 @@ void SAL_CALL SwitchablePersistenceStream::closeInput()
if ( !m_pStreamData )
throw io::NotConnectedException();
- m_pStreamData->m_bInOpen = sal_False;
+ m_pStreamData->m_bInOpen = false;
if ( !m_pStreamData->m_bOutOpen )
CloseAll_Impl();
}
@@ -353,7 +353,7 @@ void SAL_CALL SwitchablePersistenceStream::closeOutput( )
if ( !m_pStreamData )
throw io::NotConnectedException();
- m_pStreamData->m_bOutOpen = sal_False;
+ m_pStreamData->m_bOutOpen = false;
if ( !m_pStreamData->m_bInOpen )
CloseAll_Impl();
}
diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx
index 1f9ab09c6176..ffc3f2216c58 100644
--- a/package/source/xstor/xfactory.cxx
+++ b/package/source/xstor/xfactory.cxx
@@ -39,7 +39,7 @@ using namespace ::com::sun::star;
#define THROW_WHERE ""
#endif
-sal_Bool CheckPackageSignature_Impl( const uno::Reference< io::XInputStream >& xInputStream,
+bool CheckPackageSignature_Impl( const uno::Reference< io::XInputStream >& xInputStream,
const uno::Reference< io::XSeekable >& xSeekable )
{
if ( !xInputStream.is() || !xSeekable.is() )
@@ -57,7 +57,7 @@ sal_Bool CheckPackageSignature_Impl( const uno::Reference< io::XInputStream >& x
return ( nRead == 4 && aData[0] == 0x50 && aData[1] == 0x4b && aData[2] == 0x03 && aData[3] == 0x04 );
}
else
- return sal_True; // allow to create a storage based on empty stream
+ return true; // allow to create a storage based on empty stream
}
uno::Sequence< OUString > SAL_CALL OStorageFactory::impl_staticGetSupportedServiceNames()
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index c25e3de2cd51..4ac877c1b9b0 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -68,9 +68,9 @@ struct StorInternalData_Impl
SotMutexHolderRef m_rSharedMutexRef;
::cppu::OMultiTypeInterfaceContainerHelper m_aListenersContainer; // list of listeners
::cppu::OTypeCollection* m_pTypeCollection;
- sal_Bool m_bIsRoot;
+ bool m_bIsRoot;
sal_Int32 m_nStorageType; // the mode in which the storage is used
- sal_Bool m_bReadOnlyWrap;
+ bool m_bReadOnlyWrap;
OChildDispListener_Impl* m_pSubElDispListener;
@@ -79,7 +79,7 @@ struct StorInternalData_Impl
::rtl::Reference< OHierarchyHolder_Impl > m_rHierarchyHolder;
// the mutex reference MUST NOT be empty
- StorInternalData_Impl( const SotMutexHolderRef& rMutexRef, sal_Bool bRoot, sal_Int32 nStorageType, sal_Bool bReadOnlyWrap )
+ StorInternalData_Impl( const SotMutexHolderRef& rMutexRef, bool bRoot, sal_Int32 nStorageType, bool bReadOnlyWrap )
: m_rSharedMutexRef( rMutexRef )
, m_aListenersContainer( rMutexRef->GetMutex() )
, m_pTypeCollection( NULL )
@@ -161,10 +161,10 @@ StorInternalData_Impl::~StorInternalData_Impl()
delete m_pTypeCollection;
}
-SotElement_Impl::SotElement_Impl( const OUString& rName, sal_Bool bStor, sal_Bool bNew )
+SotElement_Impl::SotElement_Impl( const OUString& rName, bool bStor, bool bNew )
: m_aName( rName )
, m_aOriginalName( rName )
-, m_bIsRemoved( sal_False )
+, m_bIsRemoved( false )
, m_bIsInserted( bNew )
, m_bIsStorage( bStor )
, m_pStorage( NULL )
@@ -191,18 +191,18 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XInputStream > xInputStream,
, m_pAntiImpl( NULL )
, m_nStorageMode( nMode & ~embed::ElementModes::SEEKABLE )
, m_bIsModified( ( nMode & ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) ) == ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) )
-, m_bBroadcastModified( sal_False )
-, m_bCommited( sal_False )
-, m_bIsRoot( sal_True )
-, m_bListCreated( sal_False )
+, m_bBroadcastModified( false )
+, m_bCommited( false )
+, m_bIsRoot( true )
+, m_bListCreated( false )
, m_nModifiedListenerCount( 0 )
, m_xContext( xContext )
, m_xProperties( xProperties )
-, m_bHasCommonEncryptionData( sal_False )
+, m_bHasCommonEncryptionData( false )
, m_pParent( NULL )
-, m_bControlMediaType( sal_False )
-, m_bMTFallbackUsed( sal_False )
-, m_bControlVersion( sal_False )
+, m_bControlMediaType( false )
+, m_bMTFallbackUsed( false )
+, m_bControlVersion( false )
, m_pSwitchStream( NULL )
, m_nStorageType( nStorageType )
, m_pRelStorElement( NULL )
@@ -231,18 +231,18 @@ OStorage_Impl::OStorage_Impl( uno::Reference< io::XStream > xStream,
, m_pAntiImpl( NULL )
, m_nStorageMode( nMode & ~embed::ElementModes::SEEKABLE )
, m_bIsModified( ( nMode & ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) ) == ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) )
-, m_bBroadcastModified( sal_False )
-, m_bCommited( sal_False )
-, m_bIsRoot( sal_True )
-, m_bListCreated( sal_False )
+, m_bBroadcastModified( false )
+, m_bCommited( false )
+, m_bIsRoot( true )
+, m_bListCreated( false )
, m_nModifiedListenerCount( 0 )
, m_xContext( xContext )
, m_xProperties( xProperties )
-, m_bHasCommonEncryptionData( sal_False )
+, m_bHasCommonEncryptionData( false )
, m_pParent( NULL )
-, m_bControlMediaType( sal_False )
-, m_bMTFallbackUsed( sal_False )
-, m_bControlVersion( sal_False )
+, m_bControlMediaType( false )
+, m_bMTFallbackUsed( false )
+, m_bControlVersion( false )
, m_pSwitchStream( NULL )
, m_nStorageType( nStorageType )
, m_pRelStorElement( NULL )
@@ -274,19 +274,19 @@ OStorage_Impl::OStorage_Impl( OStorage_Impl* pParent,
, m_pAntiImpl( NULL )
, m_nStorageMode( nMode & ~embed::ElementModes::SEEKABLE )
, m_bIsModified( ( nMode & ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) ) == ( embed::ElementModes::WRITE | embed::ElementModes::TRUNCATE ) )
-, m_bBroadcastModified( sal_False )
-, m_bCommited( sal_False )
-, m_bIsRoot( sal_False )
-, m_bListCreated( sal_False )
+, m_bBroadcastModified( false )
+, m_bCommited( false )
+, m_bIsRoot( false )
+, m_bListCreated( false )
, m_nModifiedListenerCount( 0 )
, m_xPackageFolder( xPackageFolder )
, m_xPackage( xPackage )
, m_xContext( xContext )
-, m_bHasCommonEncryptionData( sal_False )
+, m_bHasCommonEncryptionData( false )
, m_pParent( pParent ) // can be empty in case of temporary readonly substorages and relation storage
-, m_bControlMediaType( sal_False )
-, m_bMTFallbackUsed( sal_False )
-, m_bControlVersion( sal_False )
+, m_bControlMediaType( false )
+, m_bMTFallbackUsed( false )
+, m_bControlVersion( false )
, m_pSwitchStream( NULL )
, m_nStorageType( nStorageType )
, m_pRelStorElement( NULL )
@@ -304,7 +304,7 @@ OStorage_Impl::~OStorage_Impl()
SAL_WARN_IF( m_bIsRoot, "package.xstor", "The root storage wrapper must be disposed already" );
try {
- m_pAntiImpl->InternalDispose( sal_False );
+ m_pAntiImpl->InternalDispose( false );
}
catch ( const uno::Exception& rException )
{
@@ -321,7 +321,7 @@ OStorage_Impl::~OStorage_Impl()
uno::Reference< embed::XStorage > xTmp = pStorageIter->m_xWeakRef;
if ( xTmp.is() )
try {
- pStorageIter->m_pPointer->InternalDispose( sal_False );
+ pStorageIter->m_pPointer->InternalDispose( false );
} catch( const uno::Exception& rException )
{
AddLog( rException.Message );
@@ -427,7 +427,7 @@ void OStorage_Impl::RemoveReadOnlyWrap( OStorage& aStorage )
if ( !xTmp.is() || pStorageIter->m_pPointer == &aStorage )
{
try {
- pStorageIter->m_pPointer->InternalDispose( sal_False );
+ pStorageIter->m_pPointer->InternalDispose( false );
} catch( const uno::Exception& rException )
{
AddLog( THROW_WHERE "Quiet exception" );
@@ -466,7 +466,7 @@ void OStorage_Impl::OpenOwnPackage()
// do not allow elements to remove themself from the old container in case of insertion to another container
aArguments[ 1 ] <<= beans::NamedValue( "AllowRemoveOnInsert",
- uno::makeAny( (sal_Bool)sal_False ) );
+ uno::makeAny( false ) );
sal_Int32 nArgNum = 2;
for ( sal_Int32 aInd = 0; aInd < m_xProperties.getLength(); aInd++ )
@@ -554,13 +554,13 @@ void OStorage_Impl::GetStorageProperties()
xPackageProps->getPropertyValue( MEDIATYPE_FALLBACK_USED_PROPERTY ) >>= m_bMTFallbackUsed;
xProps->getPropertyValue( "MediaType" ) >>= m_aMediaType;
- m_bControlMediaType = sal_True;
+ m_bControlMediaType = true;
}
if ( !m_bControlVersion )
{
xProps->getPropertyValue( "Version" ) >>= m_aVersion;
- m_bControlVersion = sal_True;
+ m_bControlVersion = true;
}
}
@@ -622,7 +622,7 @@ void OStorage_Impl::ReadContents()
if ( !xEnum.is() )
throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
- m_bListCreated = sal_True;
+ m_bListCreated = true;
while( xEnum->hasMoreElements() )
{
@@ -641,7 +641,7 @@ void OStorage_Impl::ReadContents()
uno::Reference< container::XNameContainer > xNameContainer( xNamed, uno::UNO_QUERY );
- SotElement_Impl* pNewElement = new SotElement_Impl( aName, xNameContainer.is(), sal_False );
+ SotElement_Impl* pNewElement = new SotElement_Impl( aName, xNameContainer.is(), false );
if ( m_nStorageType == embed::StorageFormats::OFOPXML && aName == "_rels" )
{
if ( !pNewElement->m_bIsStorage )
@@ -655,7 +655,7 @@ void OStorage_Impl::ReadContents()
if ( ( m_nStorageMode & embed::ElementModes::TRUNCATE ) == embed::ElementModes::TRUNCATE )
{
// if a storage is truncated all of it elements are marked as deleted
- pNewElement->m_bIsRemoved = sal_True;
+ pNewElement->m_bIsRemoved = true;
}
m_aChildrenList.push_back( pNewElement );
@@ -682,7 +682,7 @@ void OStorage_Impl::ReadContents()
GetStorageProperties();
}
-void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDest, sal_Bool bDirect )
+void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDest, bool bDirect )
{
::osl::MutexGuard aGuard( m_rMutexRef->GetMutex() );
@@ -720,7 +720,7 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes
if ( m_nStorageType == embed::StorageFormats::PACKAGE )
{
// if this is a root storage, the common key from current one should be moved there
- sal_Bool bIsRoot = sal_False;
+ bool bIsRoot = false;
OUString aRootString = "IsRoot";
if ( ( xPropSet->getPropertyValue( aRootString ) >>= bIsRoot ) && bIsRoot )
{
@@ -775,7 +775,7 @@ void OStorage_Impl::CopyToStorage( const uno::Reference< embed::XStorage >& xDes
void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
uno::Reference< embed::XStorage > xDest,
const OUString& aName,
- sal_Bool bDirect )
+ bool bDirect )
{
SAL_WARN_IF( !xDest.is(), "package.xstor", "No destination storage!" );
SAL_WARN_IF( aName.isEmpty(), "package.xstor", "Empty element name!" );
@@ -838,7 +838,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
{
aStrProps.realloc( ++nNum );
aStrProps[nNum-1].Name = "UseCommonStoragePasswordEncryption";
- aStrProps[nNum-1].Value <<= (sal_Bool)( pElement->m_pStream->UsesCommonEncryption_Impl() );
+ aStrProps[nNum-1].Value <<= pElement->m_pStream->UsesCommonEncryption_Impl();
}
else if ( m_nStorageType == embed::StorageFormats::OFOPXML )
{
@@ -900,11 +900,11 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
&& ( pElement->m_pStream->IsModified() || pElement->m_pStream->HasWriteOwner_Impl() ) )
{
::comphelper::SequenceAsHashMap aCommonEncryptionData;
- sal_Bool bHasCommonEncryptionData = sal_False;
+ bool bHasCommonEncryptionData = false;
try
{
aCommonEncryptionData = GetCommonRootEncryptionData();
- bHasCommonEncryptionData = sal_True;
+ bHasCommonEncryptionData = true;
}
catch( const packages::NoEncryptionException& rNoEncryptionException )
{
@@ -925,7 +925,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
uno::Reference< beans::XPropertySet > xProps( xDestStream, uno::UNO_QUERY_THROW );
xProps->setPropertyValue(
"UseCommonStoragePasswordEncryption",
- uno::Any( (sal_Bool) sal_True ) );
+ uno::Any( true ) );
}
else
{
@@ -949,7 +949,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
// it must be stored with the common storage password as well
uno::Reference< io::XStream > xOwnStream = pElement->m_pStream->GetStream( embed::ElementModes::READ,
- sal_False );
+ false );
uno::Reference< io::XStream > xDestStream =
xDest->openStreamElement( aName,
embed::ElementModes::READWRITE | embed::ElementModes::TRUNCATE );
@@ -959,7 +959,7 @@ void OStorage_Impl::CopyStorageElement( SotElement_Impl* pElement,
uno::Reference< beans::XPropertySet > xProps( xDestStream, uno::UNO_QUERY_THROW );
xProps->setPropertyValue(
"UseCommonStoragePasswordEncryption",
- uno::Any( (sal_Bool) sal_True ) );
+ uno::Any( true ) );
}
catch( const packages::WrongPasswordException& rWrongPasswordException )
{
@@ -1009,7 +1009,7 @@ void OStorage_Impl::CopyLastCommitTo( const uno::Reference< embed::XStorage >& x
m_nStorageType);
// TODO/LATER: could use direct copying
- aTempRepresent.CopyToStorage( xNewStor, sal_False );
+ aTempRepresent.CopyToStorage( xNewStor, false );
}
void OStorage_Impl::InsertIntoPackageFolder( const OUString& aName,
@@ -1024,7 +1024,7 @@ void OStorage_Impl::InsertIntoPackageFolder( const OUString& aName,
xParentPackageFolder->insertByName( aName, uno::makeAny( xTunnel ) );
- m_bCommited = sal_False;
+ m_bCommited = false;
}
void OStorage_Impl::Commit()
@@ -1202,7 +1202,7 @@ void OStorage_Impl::Commit()
(*pElementIter)->m_pStorage->InsertIntoPackageFolder( (*pElementIter)->m_aName, xNewPackageFolder );
- (*pElementIter)->m_bIsInserted = sal_False;
+ (*pElementIter)->m_bIsInserted = false;
}
}
else
@@ -1221,7 +1221,7 @@ void OStorage_Impl::Commit()
(*pElementIter)->m_pStream->InsertIntoPackageFolder( (*pElementIter)->m_aName, xNewPackageFolder );
- (*pElementIter)->m_bIsInserted = sal_False;
+ (*pElementIter)->m_bIsInserted = false;
}
}
}
@@ -1272,11 +1272,11 @@ void OStorage_Impl::Commit()
else if ( !m_bCommited )
{
m_xPackageFolder = xNewPackageFolder;
- m_bCommited = sal_True;
+ m_bCommited = true;
}
// after commit the mediatype treated as the correct one
- m_bMTFallbackUsed = sal_False;
+ m_bMTFallbackUsed = false;
}
void OStorage_Impl::Revert()
@@ -1306,7 +1306,7 @@ void OStorage_Impl::Revert()
ClearElement( *pElementIter );
(*pElementIter)->m_aName = (*pElementIter)->m_aOriginalName;
- (*pElementIter)->m_bIsRemoved = sal_False;
+ (*pElementIter)->m_bIsRemoved = false;
++pElementIter;
}
@@ -1322,12 +1322,12 @@ void OStorage_Impl::Revert()
ClearElement( *pDeletedIter );
(*pDeletedIter)->m_aName = (*pDeletedIter)->m_aOriginalName;
- (*pDeletedIter)->m_bIsRemoved = sal_False;
+ (*pDeletedIter)->m_bIsRemoved = false;
}
m_aDeletedList.clear();
- m_bControlMediaType = sal_False;
- m_bControlVersion = sal_False;
+ m_bControlMediaType = false;
+ m_bControlVersion = false;
GetStorageProperties();
@@ -1382,7 +1382,7 @@ SotElement_Impl* OStorage_Impl::FindElement( const OUString& rName )
return NULL;
}
-SotElement_Impl* OStorage_Impl::InsertStream( const OUString& aName, sal_Bool bEncr )
+SotElement_Impl* OStorage_Impl::InsertStream( const OUString& aName, bool bEncr )
{
SAL_WARN_IF( !m_xPackage.is(), "package.xstor", "Not possible to refer to package as to factory!" );
if ( !m_xPackage.is() )
@@ -1406,12 +1406,12 @@ SotElement_Impl* OStorage_Impl::InsertStream( const OUString& aName, sal_Bool bE
throw packages::NoEncryptionException( THROW_WHERE, uno::Reference< uno::XInterface >() );
// the mode is not needed for storage stream internal implementation
- SotElement_Impl* pNewElement = InsertElement( aName, sal_False );
- pNewElement->m_pStream = new OWriteStream_Impl( this, xPackageSubStream, m_xPackage, m_xContext, bEncr, m_nStorageType, sal_True );
+ SotElement_Impl* pNewElement = InsertElement( aName, false );
+ pNewElement->m_pStream = new OWriteStream_Impl( this, xPackageSubStream, m_xPackage, m_xContext, bEncr, m_nStorageType, true );
m_aChildrenList.push_back( pNewElement );
- m_bIsModified = sal_True;
- m_bBroadcastModified = sal_True;
+ m_bIsModified = true;
+ m_bBroadcastModified = true;
return pNewElement;
}
@@ -1446,14 +1446,14 @@ SotElement_Impl* OStorage_Impl::InsertRawStream( const OUString& aName, const un
xPackageSubStream->setRawStream( xInStrToInsert );
// the mode is not needed for storage stream internal implementation
- SotElement_Impl* pNewElement = InsertElement( aName, sal_False );
- pNewElement->m_pStream = new OWriteStream_Impl( this, xPackageSubStream, m_xPackage, m_xContext, sal_True, m_nStorageType, sal_False );
+ SotElement_Impl* pNewElement = InsertElement( aName, false );
+ pNewElement->m_pStream = new OWriteStream_Impl( this, xPackageSubStream, m_xPackage, m_xContext, true, m_nStorageType, false );
// the stream is inserted and must be treated as a commited one
pNewElement->m_pStream->SetToBeCommited();
m_aChildrenList.push_back( pNewElement );
- m_bIsModified = sal_True;
- m_bBroadcastModified = sal_True;
+ m_bIsModified = true;
+ m_bBroadcastModified = true;
return pNewElement;
}
@@ -1479,14 +1479,14 @@ OStorage_Impl* OStorage_Impl::CreateNewStorageImpl( sal_Int32 nStorageMode )
OStorage_Impl* pResult =
new OStorage_Impl( this, nStorageMode, xPackageSubFolder, m_xPackage, m_xContext, m_nStorageType );
- pResult->m_bIsModified = sal_True;
+ pResult->m_bIsModified = true;
return pResult;
}
SotElement_Impl* OStorage_Impl::InsertStorage( const OUString& aName, sal_Int32 nStorageMode )
{
- SotElement_Impl* pNewElement = InsertElement( aName, sal_True );
+ SotElement_Impl* pNewElement = InsertElement( aName, true );
pNewElement->m_pStorage = CreateNewStorageImpl( nStorageMode );
@@ -1495,7 +1495,7 @@ SotElement_Impl* OStorage_Impl::InsertStorage( const OUString& aName, sal_Int32
return pNewElement;
}
-SotElement_Impl* OStorage_Impl::InsertElement( const OUString& aName, sal_Bool bIsStorage )
+SotElement_Impl* OStorage_Impl::InsertElement( const OUString& aName, bool bIsStorage )
{
OSL_ENSURE( FindElement( aName ) == NULL, "Should not try to insert existing element" );
@@ -1530,7 +1530,7 @@ SotElement_Impl* OStorage_Impl::InsertElement( const OUString& aName, sal_Bool b
}
// create new element
- return new SotElement_Impl( aName, bIsStorage, sal_True );
+ return new SotElement_Impl( aName, bIsStorage, true );
}
void OStorage_Impl::OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorageMode )
@@ -1581,7 +1581,7 @@ void OStorage_Impl::OpenSubStream( SotElement_Impl* pElement )
throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
// the stream can never be inserted here, because inserted stream element holds the stream till commit or destruction
- pElement->m_pStream = new OWriteStream_Impl( this, xPackageSubStream, m_xPackage, m_xContext, sal_False, m_nStorageType, sal_False, GetRelInfoStreamForName( pElement->m_aOriginalName ) );
+ pElement->m_pStream = new OWriteStream_Impl( this, xPackageSubStream, m_xPackage, m_xContext, false, m_nStorageType, false, GetRelInfoStreamForName( pElement->m_aOriginalName ) );
}
}
@@ -1624,7 +1624,7 @@ void OStorage_Impl::RemoveElement( SotElement_Impl* pElement )
}
else
{
- pElement->m_bIsRemoved = sal_True;
+ pElement->m_bIsRemoved = true;
ClearElement( pElement );
}
@@ -1647,7 +1647,7 @@ void OStorage_Impl::ClearElement( SotElement_Impl* pElement )
}
void OStorage_Impl::CloneStreamElement( const OUString& aStreamName,
- sal_Bool bEncryptionDataProvided,
+ bool bEncryptionDataProvided,
const ::comphelper::SequenceAsHashMap& aEncryptionData,
uno::Reference< io::XStream >& xTargetStream )
throw ( embed::InvalidStorageException,
@@ -1713,7 +1713,7 @@ void OStorage_Impl::CreateRelStorage()
{
if ( !m_pRelStorElement )
{
- m_pRelStorElement = new SotElement_Impl( "_rels", sal_True, sal_True );
+ m_pRelStorElement = new SotElement_Impl( "_rels", true, true );
m_pRelStorElement->m_pStorage = CreateNewStorageImpl( embed::ElementModes::WRITE );
if ( m_pRelStorElement->m_pStorage )
m_pRelStorElement->m_pStorage->m_pParent = NULL; // the relation storage is completely controlled by parent
@@ -1725,7 +1725,7 @@ void OStorage_Impl::CreateRelStorage()
if ( !m_pRelStorElement->m_pStorage )
throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
- OStorage* pResultStorage = new OStorage( m_pRelStorElement->m_pStorage, sal_False );
+ OStorage* pResultStorage = new OStorage( m_pRelStorElement->m_pStorage, false );
m_xRelStorage = uno::Reference< embed::XStorage >( (embed::XStorage*) pResultStorage );
}
}
@@ -1886,7 +1886,7 @@ OStorage::OStorage( uno::Reference< io::XInputStream > xInputStream,
: m_pImpl( new OStorage_Impl( xInputStream, nMode, xProperties, xContext, nStorageType ) )
{
m_pImpl->m_pAntiImpl = this;
- m_pData = new StorInternalData_Impl( m_pImpl->m_rMutexRef, m_pImpl->m_bIsRoot, m_pImpl->m_nStorageType, sal_False );
+ m_pData = new StorInternalData_Impl( m_pImpl->m_rMutexRef, m_pImpl->m_bIsRoot, m_pImpl->m_nStorageType, false );
}
OStorage::OStorage( uno::Reference< io::XStream > xStream,
@@ -1897,10 +1897,10 @@ OStorage::OStorage( uno::Reference< io::XStream > xStream,
: m_pImpl( new OStorage_Impl( xStream, nMode, xProperties, xContext, nStorageType ) )
{
m_pImpl->m_pAntiImpl = this;
- m_pData = new StorInternalData_Impl( m_pImpl->m_rMutexRef, m_pImpl->m_bIsRoot, m_pImpl->m_nStorageType, sal_False );
+ m_pData = new StorInternalData_Impl( m_pImpl->m_rMutexRef, m_pImpl->m_bIsRoot, m_pImpl->m_nStorageType, false );
}
-OStorage::OStorage( OStorage_Impl* pImpl, sal_Bool bReadOnlyWrap )
+OStorage::OStorage( OStorage_Impl* pImpl, bool bReadOnlyWrap )
: m_pImpl( pImpl )
{
// this call can be done only from OStorage_Impl implementation to create child storage
@@ -1952,7 +1952,7 @@ OStorage::~OStorage()
}
}
-void SAL_CALL OStorage::InternalDispose( sal_Bool bNotifyImpl )
+void SAL_CALL OStorage::InternalDispose( bool bNotifyImpl )
{
SAL_INFO( "package.xstor", "package (mv76033) OStorage::InternalDispose" );
@@ -2063,7 +2063,7 @@ void OStorage::BroadcastModifiedIfNecessary()
if ( !m_pImpl->m_bBroadcastModified )
return;
- m_pImpl->m_bBroadcastModified = sal_False;
+ m_pImpl->m_bBroadcastModified = false;
SAL_WARN_IF( m_pData->m_bReadOnlyWrap, "package.xstor", "The storage can not be modified at all!" );
@@ -2130,7 +2130,7 @@ void OStorage::BroadcastTransaction( sal_Int8 nMessage )
}
}
-SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName, sal_Int32 nOpenMode, sal_Bool bEncr )
+SotElement_Impl* OStorage::OpenStreamElement_Impl( const OUString& aStreamName, sal_Int32 nOpenMode, bool bEncr )
{
::osl::MutexGuard aGuard( m_pData->m_rSharedMutexRef->GetMutex() );
@@ -2357,7 +2357,7 @@ void SAL_CALL OStorage::copyToStorage( const uno::Reference< embed::XStorage >&
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 1 );
try {
- m_pImpl->CopyToStorage( xDest, sal_False );
+ m_pImpl->CopyToStorage( xDest, false );
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
{
@@ -2432,10 +2432,10 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openStreamElement(
uno::Reference< io::XStream > xResult;
try
{
- SotElement_Impl *pElement = OpenStreamElement_Impl( aStreamName, nOpenMode, sal_False );
+ SotElement_Impl *pElement = OpenStreamElement_Impl( aStreamName, nOpenMode, false );
OSL_ENSURE( pElement && pElement->m_pStream, "In case element can not be created an exception must be thrown!" );
- xResult = pElement->m_pStream->GetStream( nOpenMode, sal_False );
+ xResult = pElement->m_pStream->GetStream( nOpenMode, false );
SAL_WARN_IF( !xResult.is(), "package.xstor", "The method must throw exception instead of removing empty result!" );
if ( m_pData->m_bReadOnlyWrap )
@@ -2609,7 +2609,7 @@ uno::Reference< embed::XStorage > SAL_CALL OStorage::openStorageElement(
if ( !pElement->m_pStorage )
throw io::IOException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: general_error
- sal_Bool bReadOnlyWrap = ( ( nStorageMode & embed::ElementModes::WRITE ) != embed::ElementModes::WRITE );
+ bool bReadOnlyWrap = ( ( nStorageMode & embed::ElementModes::WRITE ) != embed::ElementModes::WRITE );
OStorage* pResultStorage = new OStorage( pElement->m_pStorage, bReadOnlyWrap );
xResult = uno::Reference< embed::XStorage >( (embed::XStorage*) pResultStorage );
@@ -2697,7 +2697,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneStreamElement( const OUStr
try
{
uno::Reference< io::XStream > xResult;
- m_pImpl->CloneStreamElement( aStreamName, sal_False, ::comphelper::SequenceAsHashMap(), xResult );
+ m_pImpl->CloneStreamElement( aStreamName, false, ::comphelper::SequenceAsHashMap(), xResult );
if ( !xResult.is() )
throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
return xResult;
@@ -3098,8 +3098,8 @@ void SAL_CALL OStorage::removeElement( const OUString& aElementName )
m_pImpl->RemoveElement( pElement );
- m_pImpl->m_bIsModified = sal_True;
- m_pImpl->m_bBroadcastModified = sal_True;
+ m_pImpl->m_bIsModified = true;
+ m_pImpl->m_bBroadcastModified = true;
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
{
@@ -3194,8 +3194,8 @@ void SAL_CALL OStorage::renameElement( const OUString& aElementName, const OUStr
pElement->m_aName = aNewName;
- m_pImpl->m_bIsModified = sal_True;
- m_pImpl->m_bBroadcastModified = sal_True;
+ m_pImpl->m_bIsModified = true;
+ m_pImpl->m_bBroadcastModified = true;
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
{
@@ -3300,7 +3300,7 @@ void SAL_CALL OStorage::copyElementTo( const OUString& aElementName,
if ( xNameAccess->hasByName( aNewName ) )
throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
- m_pImpl->CopyStorageElement( pElement, xDest, aNewName, sal_False );
+ m_pImpl->CopyStorageElement( pElement, xDest, aNewName, false );
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
{
@@ -3403,12 +3403,12 @@ void SAL_CALL OStorage::moveElementTo( const OUString& aElementName,
if ( xNameAccess->hasByName( aNewName ) )
throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
- m_pImpl->CopyStorageElement( pElement, xDest, aNewName, sal_False );
+ m_pImpl->CopyStorageElement( pElement, xDest, aNewName, false );
m_pImpl->RemoveElement( pElement );
- m_pImpl->m_bIsModified = sal_True;
- m_pImpl->m_bBroadcastModified = sal_True;
+ m_pImpl->m_bIsModified = true;
+ m_pImpl->m_bBroadcastModified = true;
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
{
@@ -3501,10 +3501,10 @@ uno::Reference< io::XStream > SAL_CALL OStorage::openEncryptedStream(
uno::Reference< io::XStream > xResult;
try
{
- SotElement_Impl *pElement = OpenStreamElement_Impl( aStreamName, nOpenMode, sal_True );
+ SotElement_Impl *pElement = OpenStreamElement_Impl( aStreamName, nOpenMode, true );
OSL_ENSURE( pElement && pElement->m_pStream, "In case element can not be created an exception must be thrown!" );
- xResult = pElement->m_pStream->GetStream( nOpenMode, aEncryptionData, sal_False );
+ xResult = pElement->m_pStream->GetStream( nOpenMode, aEncryptionData, false );
SAL_WARN_IF( !xResult.is(), "package.xstor", "The method must throw exception instead of removing empty result!" );
if ( m_pData->m_bReadOnlyWrap )
@@ -3607,7 +3607,7 @@ uno::Reference< io::XStream > SAL_CALL OStorage::cloneEncryptedStream(
try
{
uno::Reference< io::XStream > xResult;
- m_pImpl->CloneStreamElement( aStreamName, sal_True, aEncryptionData, xResult );
+ m_pImpl->CloneStreamElement( aStreamName, true, aEncryptionData, xResult );
if ( !xResult.is() )
throw uno::RuntimeException( THROW_WHERE, uno::Reference< uno::XInterface >() );
return xResult;
@@ -4084,8 +4084,8 @@ void SAL_CALL OStorage::revert()
try {
m_pImpl->Revert();
- m_pImpl->m_bIsModified = sal_False;
- m_pImpl->m_bBroadcastModified = sal_True;
+ m_pImpl->m_bIsModified = false;
+ m_pImpl->m_bBroadcastModified = true;
}
catch( const io::IOException& rIOException )
{
@@ -4187,13 +4187,13 @@ void SAL_CALL OStorage::setModified( sal_Bool bModified )
if ( m_pData->m_bReadOnlyWrap )
throw beans::PropertyVetoException( THROW_WHERE, uno::Reference< uno::XInterface >() ); // TODO: access denied
- if ( m_pImpl->m_bIsModified != bModified )
+ if ( (m_pImpl->m_bIsModified ? 1 : 0) != bModified )
m_pImpl->m_bIsModified = bModified;
aGuard.clear();
if ( bModified )
{
- m_pImpl->m_bBroadcastModified = sal_True;
+ m_pImpl->m_bBroadcastModified = true;
BroadcastModifiedIfNecessary();
}
}
@@ -4446,7 +4446,7 @@ void SAL_CALL OStorage::dispose()
try
{
- InternalDispose( sal_True );
+ InternalDispose( true );
}
catch( const uno::RuntimeException& rRuntimeException )
{
@@ -4559,7 +4559,7 @@ void SAL_CALL OStorage::removeEncryption()
xPackPropSet->setPropertyValue( STORAGE_ENCRYPTION_KEYS_PROPERTY,
uno::makeAny( uno::Sequence< beans::NamedValue >() ) );
- m_pImpl->m_bHasCommonEncryptionData = sal_False;
+ m_pImpl->m_bHasCommonEncryptionData = false;
m_pImpl->m_aCommonEncryptionData.clear();
}
catch( const uno::RuntimeException& rRException )
@@ -4633,7 +4633,7 @@ void SAL_CALL OStorage::setEncryptionData( const uno::Sequence< beans::NamedValu
xPackPropSet->setPropertyValue( STORAGE_ENCRYPTION_KEYS_PROPERTY,
uno::makeAny( aEncryptionMap.getAsConstNamedValueList() ) );
- m_pImpl->m_bHasCommonEncryptionData = sal_True;
+ m_pImpl->m_bHasCommonEncryptionData = true;
m_pImpl->m_aCommonEncryptionData = aEncryptionMap;
}
catch( const uno::Exception& rException )
@@ -4834,21 +4834,21 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
if ( aPropertyName == "MediaType" )
{
aValue >>= m_pImpl->m_aMediaType;
- m_pImpl->m_bControlMediaType = sal_True;
+ m_pImpl->m_bControlMediaType = true;
- m_pImpl->m_bBroadcastModified = sal_True;
- m_pImpl->m_bIsModified = sal_True;
+ m_pImpl->m_bBroadcastModified = true;
+ m_pImpl->m_bIsModified = true;
}
else if ( aPropertyName == "Version" )
{
aValue >>= m_pImpl->m_aVersion;
- m_pImpl->m_bControlVersion = sal_True;
+ m_pImpl->m_bControlVersion = true;
// this property can be set even for readonly storage
if ( !m_pData->m_bReadOnlyWrap )
{
- m_pImpl->m_bBroadcastModified = sal_True;
- m_pImpl->m_bIsModified = sal_True;
+ m_pImpl->m_bBroadcastModified = true;
+ m_pImpl->m_bIsModified = true;
}
}
else if ( ( m_pData->m_bIsRoot && ( aPropertyName == HAS_ENCRYPTED_ENTRIES_PROPERTY
@@ -4881,8 +4881,8 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
m_pImpl->m_xNewRelInfoStream = xInRelStream;
m_pImpl->m_aRelInfo = uno::Sequence< uno::Sequence< beans::StringPair > >();
m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED_STREAM;
- m_pImpl->m_bBroadcastModified = sal_True;
- m_pImpl->m_bIsModified = sal_True;
+ m_pImpl->m_bBroadcastModified = true;
+ m_pImpl->m_bIsModified = true;
}
else
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
@@ -4893,8 +4893,8 @@ void SAL_CALL OStorage::setPropertyValue( const OUString& aPropertyName, const u
{
m_pImpl->m_xNewRelInfoStream = uno::Reference< io::XInputStream >();
m_pImpl->m_nRelInfoStatus = RELINFO_CHANGED;
- m_pImpl->m_bBroadcastModified = sal_True;
- m_pImpl->m_bIsModified = sal_True;
+ m_pImpl->m_bBroadcastModified = true;
+ m_pImpl->m_bIsModified = true;
}
else
throw lang::IllegalArgumentException( THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
@@ -5414,14 +5414,14 @@ void SAL_CALL OStorage::insertRelationships( const uno::Sequence< uno::Sequence
for ( sal_Int32 nIndSource1 = 0; nIndSource1 < aEntries.getLength(); nIndSource1++ )
{
aResultSeq[nResultInd].realloc( aEntries[nIndSource1].getLength() );
- sal_Bool bHasID = sal_False;
+ bool bHasID = false;
sal_Int32 nResInd2 = 1;
for ( sal_Int32 nIndSource2 = 0; nIndSource2 < aEntries[nIndSource1].getLength(); nIndSource2++ )
if ( aEntries[nIndSource1][nIndSource2].First.equals( aIDTag ) )
{
aResultSeq[nResultInd][0] = aEntries[nIndSource1][nIndSource2];
- bHasID = sal_True;
+ bHasID = true;
}
else if ( nResInd2 < aResultSeq[nResultInd].getLength() )
aResultSeq[nResultInd][nResInd2++] = aEntries[nIndSource1][nIndSource2];
@@ -5514,7 +5514,7 @@ void SAL_CALL OStorage::insertStreamElementDirect(
if ( pElement )
throw container::ElementExistException( THROW_WHERE, uno::Reference< uno::XInterface >() );
- pElement = OpenStreamElement_Impl( aStreamName, embed::ElementModes::READWRITE, sal_False );
+ pElement = OpenStreamElement_Impl( aStreamName, embed::ElementModes::READWRITE, false );
OSL_ENSURE( pElement && pElement->m_pStream, "In case element can not be created an exception must be thrown!" );
pElement->m_pStream->InsertStreamDirectly( xInStream, aProps );
@@ -5614,7 +5614,7 @@ void SAL_CALL OStorage::copyElementDirectlyTo(
// let the element be copied directly
uno::Reference< embed::XStorage > xStorDest( xDest, uno::UNO_QUERY_THROW );
- m_pImpl->CopyStorageElement( pElement, xStorDest, aNewName, sal_True );
+ m_pImpl->CopyStorageElement( pElement, xStorDest, aNewName, true );
}
catch( const embed::InvalidStorageException& rInvalidStorageException )
{
@@ -5955,7 +5955,7 @@ void SAL_CALL OStorage::copyStreamElementData( const OUString& aStreamName, cons
try
{
uno::Reference< io::XStream > xNonconstRef = xTargetStream;
- m_pImpl->CloneStreamElement( aStreamName, sal_False, ::comphelper::SequenceAsHashMap(), xNonconstRef );
+ m_pImpl->CloneStreamElement( aStreamName, false, ::comphelper::SequenceAsHashMap(), xNonconstRef );
SAL_WARN_IF( xNonconstRef != xTargetStream, "package.xstor", "The provided stream reference seems not be filled in correctly!" );
if ( xNonconstRef != xTargetStream )
@@ -6043,11 +6043,11 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openStreamEle
// that must be a direct request for a stream
// the transacted version of the stream should be opened
- SotElement_Impl *pElement = OpenStreamElement_Impl( aStreamPath, nOpenMode, sal_False );
+ SotElement_Impl *pElement = OpenStreamElement_Impl( aStreamPath, nOpenMode, false );
OSL_ENSURE( pElement && pElement->m_pStream, "In case element can not be created an exception must be thrown!" );
xResult = uno::Reference< embed::XExtendedStorageStream >(
- pElement->m_pStream->GetStream( nOpenMode, sal_True ),
+ pElement->m_pStream->GetStream( nOpenMode, true ),
uno::UNO_QUERY_THROW );
}
else
@@ -6153,11 +6153,11 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL OStorage::openEncrypted
// that must be a direct request for a stream
// the transacted version of the stream should be opened
- SotElement_Impl *pElement = OpenStreamElement_Impl( aStreamPath, nOpenMode, sal_True );
+ SotElement_Impl *pElement = OpenStreamElement_Impl( aStreamPath, nOpenMode, true );
OSL_ENSURE( pElement && pElement->m_pStream, "In case element can not be created an exception must be thrown!" );
xResult = uno::Reference< embed::XExtendedStorageStream >(
- pElement->m_pStream->GetStream( nOpenMode, aEncryptionData, sal_True ),
+ pElement->m_pStream->GetStream( nOpenMode, aEncryptionData, true ),
uno::UNO_QUERY_THROW );
}
else
diff --git a/package/source/xstor/xstorage.hxx b/package/source/xstor/xstorage.hxx
index 81b3c13e24ad..298341db10fe 100644
--- a/package/source/xstor/xstorage.hxx
+++ b/package/source/xstor/xstorage.hxx
@@ -77,15 +77,15 @@ struct SotElement_Impl
{
OUString m_aName;
OUString m_aOriginalName;
- sal_Bool m_bIsRemoved;
- sal_Bool m_bIsInserted;
- sal_Bool m_bIsStorage;
+ bool m_bIsRemoved;
+ bool m_bIsInserted;
+ bool m_bIsStorage;
OStorage_Impl* m_pStorage;
OWriteStream_Impl* m_pStream;
public:
- SotElement_Impl( const OUString& rName, sal_Bool bStor, sal_Bool bNew );
+ SotElement_Impl( const OUString& rName, bool bStor, bool bNew );
~SotElement_Impl();
};
@@ -126,13 +126,13 @@ struct OStorage_Impl
OStorageList_Impl m_aReadOnlyWrapList; // only valid if readonly external reference exists
sal_Int32 m_nStorageMode; // open mode ( read/write/trunc/nocreate )
- sal_Bool m_bIsModified; // only modified elements will be sent to the original content
- sal_Bool m_bBroadcastModified; // will be set if notification is required
+ bool m_bIsModified; // only modified elements will be sent to the original content
+ bool m_bBroadcastModified; // will be set if notification is required
- sal_Bool m_bCommited; // sending the streams is coordinated by the root storage of the package
+ bool m_bCommited; // sending the streams is coordinated by the root storage of the package
- sal_Bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts
- sal_Bool m_bListCreated;
+ bool m_bIsRoot; // marks this storage as root storages that manages all commits and reverts
+ bool m_bListCreated;
/// Count of registered modification listeners
oslInterlockedCount m_nModifiedListenerCount;
@@ -154,17 +154,17 @@ struct OStorage_Impl
::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream > m_xInputStream; // ??? may be stored in properties
::com::sun::star::uno::Reference< ::com::sun::star::io::XStream > m_xStream; // ??? may be stored in properties
::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > m_xProperties;
- sal_Bool m_bHasCommonEncryptionData;
+ bool m_bHasCommonEncryptionData;
::comphelper::SequenceAsHashMap m_aCommonEncryptionData;
// must be empty in case of root storage
OStorage_Impl* m_pParent;
- sal_Bool m_bControlMediaType;
+ bool m_bControlMediaType;
OUString m_aMediaType;
- sal_Bool m_bMTFallbackUsed;
+ bool m_bMTFallbackUsed;
- sal_Bool m_bControlVersion;
+ bool m_bControlVersion;
OUString m_aVersion;
SwitchablePersistenceStream* m_pSwitchStream;
@@ -229,22 +229,22 @@ struct OStorage_Impl
::comphelper::SequenceAsHashMap GetCommonRootEncryptionData() throw ( ::com::sun::star::packages::NoEncryptionException );
void CopyToStorage( const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& xDest,
- sal_Bool bDirect );
+ bool bDirect );
void CopyStorageElement( SotElement_Impl* pElement,
::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > xDest,
const OUString& aName,
- sal_Bool bDirect );
+ bool bDirect );
- void SetModified( sal_Bool bModified );
+ void SetModified( bool bModified );
SotElement_Impl* FindElement( const OUString& rName );
- SotElement_Impl* InsertStream( const OUString& aName, sal_Bool bEncr );
+ SotElement_Impl* InsertStream( const OUString& aName, bool bEncr );
SotElement_Impl* InsertRawStream( const OUString& aName, const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream );
OStorage_Impl* CreateNewStorageImpl( sal_Int32 nStorageMode );
SotElement_Impl* InsertStorage( const OUString& aName, sal_Int32 nStorageMode );
- SotElement_Impl* InsertElement( const OUString& aName, sal_Bool bIsStorage );
+ SotElement_Impl* InsertElement( const OUString& aName, bool bIsStorage );
void OpenSubStorage( SotElement_Impl* pElement, sal_Int32 nStorageMode );
void OpenSubStream( SotElement_Impl* pElement );
@@ -257,7 +257,7 @@ struct OStorage_Impl
void CloneStreamElement(
const OUString& aStreamName,
- sal_Bool bPassProvided,
+ bool bPassProvided,
const ::comphelper::SequenceAsHashMap& aEncryptionData,
::com::sun::star::uno::Reference< ::com::sun::star::io::XStream >& xTargetStream )
throw ( ::com::sun::star::embed::InvalidStorageException,
@@ -301,7 +301,7 @@ protected:
void Commit_Impl();
- SotElement_Impl* OpenStreamElement_Impl( const OUString& aStreamName, sal_Int32 nOpenMode, sal_Bool bEncr );
+ SotElement_Impl* OpenStreamElement_Impl( const OUString& aStreamName, sal_Int32 nOpenMode, bool bEncr );
void BroadcastModifiedIfNecessary();
@@ -324,11 +324,11 @@ public:
::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext,
sal_Int32 nStorageType );
- OStorage( OStorage_Impl* pImpl, sal_Bool bReadOnlyWrap );
+ OStorage( OStorage_Impl* pImpl, bool bReadOnlyWrap );
virtual ~OStorage();
- void SAL_CALL InternalDispose( sal_Bool bNotifyImpl );
+ void SAL_CALL InternalDispose( bool bNotifyImpl );
void ChildIsDisposed( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& xChild );
diff --git a/package/source/zipapi/XUnbufferedStream.cxx b/package/source/zipapi/XUnbufferedStream.cxx
index 488e179c4463..1488c3b9d7af 100644
--- a/package/source/zipapi/XUnbufferedStream.cxx
+++ b/package/source/zipapi/XUnbufferedStream.cxx
@@ -45,9 +45,9 @@ XUnbufferedStream::XUnbufferedStream(
Reference < XInputStream > xNewZipStream,
const ::rtl::Reference< EncryptionData >& rData,
sal_Int8 nStreamMode,
- sal_Bool bIsEncrypted,
+ bool bIsEncrypted,
const OUString& aMediaType,
- sal_Bool bRecoveryMode )
+ bool bRecoveryMode )
: maMutexHolder( aMutexHolder.Is() ? aMutexHolder : SotMutexHolderRef( new SotMutexHolder ) )
, mxZipStream ( xNewZipStream )
, mxZipSeek ( xNewZipStream, UNO_QUERY )
@@ -57,7 +57,7 @@ XUnbufferedStream::XUnbufferedStream(
, maInflater ( true )
, mbRawStream ( nStreamMode == UNBUFF_STREAM_RAW || nStreamMode == UNBUFF_STREAM_WRAPPEDRAW )
, mbWrappedRaw ( nStreamMode == UNBUFF_STREAM_WRAPPEDRAW )
-, mbFinished ( sal_False )
+, mbFinished ( false )
, mnHeaderToRead ( 0 )
, mnZipCurrent ( 0 )
, mnZipEnd ( 0 )
@@ -80,8 +80,8 @@ XUnbufferedStream::XUnbufferedStream(
if (mnZipSize < 0)
throw ZipIOException("The stream seems to be broken!", uno::Reference< XInterface >());
- sal_Bool bHaveEncryptData = ( rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0 ) ? sal_True : sal_False;
- sal_Bool bMustDecrypt = ( nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted ) ? sal_True : sal_False;
+ bool bHaveEncryptData = ( rData.is() && rData->m_aSalt.getLength() && rData->m_aInitVector.getLength() && rData->m_nIterationCount != 0 ) ? sal_True : sal_False;
+ bool bMustDecrypt = ( nStreamMode == UNBUFF_STREAM_DATA && bHaveEncryptData && bIsEncrypted ) ? sal_True : sal_False;
if ( bMustDecrypt )
{
@@ -118,15 +118,15 @@ XUnbufferedStream::XUnbufferedStream(
, mxData ( rData )
, mnBlockSize( 1 )
, maInflater ( true )
-, mbRawStream ( sal_False )
-, mbWrappedRaw ( sal_False )
-, mbFinished ( sal_False )
+, mbRawStream ( false )
+, mbWrappedRaw ( false )
+, mbFinished ( false )
, mnHeaderToRead ( 0 )
, mnZipCurrent ( 0 )
, mnZipEnd ( 0 )
, mnZipSize ( 0 )
, mnMyCurrent ( 0 )
-, mbCheckCRC( sal_False )
+, mbCheckCRC( false )
{
// for this scenario maEntry is not set !!!
OSL_ENSURE( mxZipSeek.is(), "The stream must be seekable!\n" );
diff --git a/package/source/zipapi/XUnbufferedStream.hxx b/package/source/zipapi/XUnbufferedStream.hxx
index 06b9cdd4f078..e64728408bd4 100644
--- a/package/source/zipapi/XUnbufferedStream.hxx
+++ b/package/source/zipapi/XUnbufferedStream.hxx
@@ -57,11 +57,11 @@ protected:
sal_Int32 mnBlockSize;
::com::sun::star::uno::Reference< ::com::sun::star::xml::crypto::XCipherContext > m_xCipherContext;
ZipUtils::Inflater maInflater;
- sal_Bool mbRawStream, mbWrappedRaw, mbFinished;
+ bool mbRawStream, mbWrappedRaw, mbFinished;
sal_Int16 mnHeaderToRead;
sal_Int64 mnZipCurrent, mnZipEnd, mnZipSize, mnMyCurrent;
CRC32 maCRC;
- sal_Bool mbCheckCRC;
+ bool mbCheckCRC;
public:
XUnbufferedStream(
@@ -71,9 +71,9 @@ public:
com::sun::star::uno::Reference < com::sun::star::io::XInputStream > xNewZipStream,
const ::rtl::Reference< EncryptionData >& rData,
sal_Int8 nStreamMode,
- sal_Bool bIsEncrypted,
+ bool bIsEncrypted,
const OUString& aMediaType,
- sal_Bool bRecoveryMode );
+ bool bRecoveryMode );
// allows to read package raw stream
XUnbufferedStream(
diff --git a/package/source/zipapi/ZipEnumeration.cxx b/package/source/zipapi/ZipEnumeration.cxx
index 9441c9f0a9df..c5686d6c3b62 100644
--- a/package/source/zipapi/ZipEnumeration.cxx
+++ b/package/source/zipapi/ZipEnumeration.cxx
@@ -29,7 +29,7 @@ ZipEnumeration::ZipEnumeration( EntryHash & rNewEntryHash)
ZipEnumeration::~ZipEnumeration( void )
{
}
-sal_Bool SAL_CALL ZipEnumeration::hasMoreElements()
+bool SAL_CALL ZipEnumeration::hasMoreElements()
{
return (aIterator != rEntryHash.end());
}
diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx
index 15ca03958de9..8444dceadf2b 100644
--- a/package/source/zipapi/ZipFile.cxx
+++ b/package/source/zipapi/ZipFile.cxx
@@ -65,14 +65,14 @@ using ZipUtils::Inflater;
/** This class is used to read entries from a zip file
*/
-ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference < XComponentContext > & rxContext, sal_Bool bInitialise )
+ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference < XComponentContext > & rxContext, bool bInitialise )
throw(IOException, ZipException, RuntimeException)
: aGrabber(xInput)
, aInflater( true )
, xStream(xInput)
, xSeek(xInput, UNO_QUERY)
, m_xContext ( rxContext )
-, bRecoveryMode( sal_False )
+, bRecoveryMode( false )
{
if (bInitialise)
{
@@ -84,7 +84,7 @@ ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference
}
}
-ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference < XComponentContext > & rxContext, sal_Bool bInitialise, sal_Bool bForceRecovery, uno::Reference < XProgressHandler > xProgress )
+ZipFile::ZipFile( uno::Reference < XInputStream > &xInput, const uno::Reference < XComponentContext > & rxContext, bool bInitialise, bool bForceRecovery, uno::Reference < XProgressHandler > xProgress )
throw(IOException, ZipException, RuntimeException)
: aGrabber(xInput)
, aInflater( true )
@@ -290,7 +290,7 @@ void ZipFile::StaticFillHeader( const ::rtl::Reference< EncryptionData >& rData,
pHeader += nMediaTypeLength;
}
-sal_Bool ZipFile::StaticFillData ( ::rtl::Reference< BaseEncryptionData > & rData,
+bool ZipFile::StaticFillData ( ::rtl::Reference< BaseEncryptionData > & rData,
sal_Int32 &rEncAlg,
sal_Int32 &rChecksumAlg,
sal_Int32 &rDerivedKeySize,
@@ -299,7 +299,7 @@ sal_Bool ZipFile::StaticFillData ( ::rtl::Reference< BaseEncryptionData > & rDa
OUString& aMediaType,
const uno::Reference< XInputStream >& rStream )
{
- sal_Bool bOk = sal_False;
+ bool bOk = false;
const sal_Int32 nHeaderSize = n_ConstHeaderSize - 4;
Sequence < sal_Int8 > aBuffer ( nHeaderSize );
if ( nHeaderSize == rStream->readBytes ( aBuffer, nHeaderSize ) )
@@ -368,7 +368,7 @@ sal_Bool ZipFile::StaticFillData ( ::rtl::Reference< BaseEncryptionData > & rDa
{
aMediaType = OUString( (sal_Unicode*)aBuffer.getConstArray(),
nMediaTypeLength / sizeof( sal_Unicode ) );
- bOk = sal_True;
+ bOk = true;
}
}
}
@@ -435,12 +435,12 @@ void CheckSequence( const uno::Sequence< sal_Int8 >& aSequence )
}
#endif
-sal_Bool ZipFile::StaticHasValidPassword( const uno::Reference< uno::XComponentContext >& rxContext, const Sequence< sal_Int8 > &aReadBuffer, const ::rtl::Reference< EncryptionData > &rData )
+bool ZipFile::StaticHasValidPassword( const uno::Reference< uno::XComponentContext >& rxContext, const Sequence< sal_Int8 > &aReadBuffer, const ::rtl::Reference< EncryptionData > &rData )
{
if ( !rData.is() || !rData->m_aKey.getLength() )
- return sal_False;
+ return false;
- sal_Bool bRet = sal_False;
+ bool bRet = false;
uno::Reference< xml::crypto::XCipherContext > xCipher( StaticGetCipher( rxContext, rData, false ), uno::UNO_SET_THROW );
@@ -483,16 +483,16 @@ sal_Bool ZipFile::StaticHasValidPassword( const uno::Reference< uno::XComponentC
// We should probably tell the user that the password they entered was wrong
}
else
- bRet = sal_True;
+ bRet = true;
return bRet;
}
-sal_Bool ZipFile::hasValidPassword ( ZipEntry & rEntry, const ::rtl::Reference< EncryptionData >& rData )
+bool ZipFile::hasValidPassword ( ZipEntry & rEntry, const ::rtl::Reference< EncryptionData >& rData )
{
::osl::MutexGuard aGuard( m_aMutex );
- sal_Bool bRet = sal_False;
+ bool bRet = false;
if ( rData.is() && rData->m_aKey.getLength() )
{
xSeek->seek( rEntry.nOffset );
@@ -517,7 +517,7 @@ uno::Reference< XInputStream > ZipFile::createUnbufferedStream(
ZipEntry & rEntry,
const ::rtl::Reference< EncryptionData > &rData,
sal_Int8 nStreamMode,
- sal_Bool bIsEncrypted,
+ bool bIsEncrypted,
const OUString& aMediaType )
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -532,7 +532,7 @@ ZipEnumeration * SAL_CALL ZipFile::entries( )
uno::Reference< XInputStream > SAL_CALL ZipFile::getInputStream( ZipEntry& rEntry,
const ::rtl::Reference< EncryptionData > &rData,
- sal_Bool bIsEncrypted,
+ bool bIsEncrypted,
SotMutexHolderRef aMutexHolder )
throw(IOException, ZipException, RuntimeException)
{
@@ -544,7 +544,7 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getInputStream( ZipEntry& rEntr
// We want to return a rawStream if we either don't have a key or if the
// key is wrong
- sal_Bool bNeedRawStream = rEntry.nMethod == STORED;
+ bool bNeedRawStream = rEntry.nMethod == STORED;
// if we have a digest, then this file is an encrypted one and we should
// check if we can decrypt it or not
@@ -560,7 +560,7 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getInputStream( ZipEntry& rEntr
uno::Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry,
const ::rtl::Reference< EncryptionData > &rData,
- sal_Bool bIsEncrypted,
+ bool bIsEncrypted,
SotMutexHolderRef aMutexHolder )
throw ( packages::WrongPasswordException,
IOException,
@@ -574,7 +574,7 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry
// An exception must be thrown in case stream is encrypted and
// there is no key or the key is wrong
- sal_Bool bNeedRawStream = sal_False;
+ bool bNeedRawStream = false;
if ( bIsEncrypted )
{
// in case no digest is provided there is no way
@@ -601,7 +601,7 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getDataStream( ZipEntry& rEntry
uno::Reference< XInputStream > SAL_CALL ZipFile::getRawData( ZipEntry& rEntry,
const ::rtl::Reference< EncryptionData >& rData,
- sal_Bool bIsEncrypted,
+ bool bIsEncrypted,
SotMutexHolderRef aMutexHolder )
throw(IOException, ZipException, RuntimeException)
{
@@ -631,10 +631,10 @@ uno::Reference< XInputStream > SAL_CALL ZipFile::getWrappedRawStream(
if ( rEntry.nOffset <= 0 )
readLOC( rEntry );
- return createUnbufferedStream ( aMutexHolder, rEntry, rData, UNBUFF_STREAM_WRAPPEDRAW, sal_True, aMediaType );
+ return createUnbufferedStream ( aMutexHolder, rEntry, rData, UNBUFF_STREAM_WRAPPEDRAW, true, aMediaType );
}
-sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
+bool ZipFile::readLOC( ZipEntry &rEntry )
throw(IOException, ZipException, RuntimeException)
{
::osl::MutexGuard aGuard( m_aMutex );
@@ -661,7 +661,7 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
// FIXME64: need to read 64bit LOC
- sal_Bool bBroken = sal_False;
+ bool bBroken = false;
try
{
@@ -697,14 +697,14 @@ sal_Bool ZipFile::readLOC( ZipEntry &rEntry )
}
catch(...)
{
- bBroken = sal_True;
+ bBroken = true;
}
if ( bBroken && !bRecoveryMode )
throw ZipIOException("The stream seems to be broken!",
uno::Reference< XInterface >() );
- return sal_True;
+ return true;
}
sal_Int32 ZipFile::findEND( )
@@ -996,7 +996,7 @@ sal_Int32 ZipFile::recover()
if ( nStreamOffset == (*aIter).second.nOffset && nCompressedSize > (*aIter).second.nCompressedSize )
{
// only DEFLATED blocks need to be checked
- sal_Bool bAcceptBlock = ( (*aIter).second.nMethod == STORED && nCompressedSize == nSize );
+ bool bAcceptBlock = ( (*aIter).second.nMethod == STORED && nCompressedSize == nSize );
if ( !bAcceptBlock )
{
@@ -1052,7 +1052,7 @@ sal_Int32 ZipFile::recover()
}
}
-sal_Bool ZipFile::checkSizeAndCRC( const ZipEntry& aEntry )
+bool ZipFile::checkSizeAndCRC( const ZipEntry& aEntry )
{
::osl::MutexGuard aGuard( m_aMutex );
diff --git a/package/source/zipapi/ZipOutputStream.cxx b/package/source/zipapi/ZipOutputStream.cxx
index 3fa41e4973b6..137bec9cfdb6 100644
--- a/package/source/zipapi/ZipOutputStream.cxx
+++ b/package/source/zipapi/ZipOutputStream.cxx
@@ -50,8 +50,8 @@ ZipOutputStream::ZipOutputStream( const uno::Reference< uno::XComponentContext >
, nMethod(DEFLATED)
, nLevel(0)
, mnDigested(0)
-, bFinished(sal_False)
-, bEncryptCurrentEntry(sal_False)
+, bFinished(false)
+, bEncryptCurrentEntry(false)
, m_pCurrentStream(NULL)
{
}
@@ -75,7 +75,7 @@ void SAL_CALL ZipOutputStream::setLevel( sal_Int32 nNewLevel )
void SAL_CALL ZipOutputStream::putNextEntry( ZipEntry& rEntry,
ZipPackageStream* pStream,
- sal_Bool bEncrypt)
+ bool bEncrypt)
throw(IOException, RuntimeException)
{
if (pCurrentEntry != NULL)
@@ -95,7 +95,7 @@ void SAL_CALL ZipOutputStream::putNextEntry( ZipEntry& rEntry,
if (bEncrypt)
{
- bEncryptCurrentEntry = sal_True;
+ bEncryptCurrentEntry = true;
m_xCipherContext = ZipFile::StaticGetCipher( m_xContext, pStream->GetEncryptionData(), true );
m_xDigestContext = ZipFile::StaticGetDigestContextForChecksum( m_xContext, pStream->GetEncryptionData() );
@@ -162,7 +162,7 @@ void SAL_CALL ZipOutputStream::closeEntry( )
if (bEncryptCurrentEntry)
{
- bEncryptCurrentEntry = sal_False;
+ bEncryptCurrentEntry = false;
m_xCipherContext.clear();
@@ -236,7 +236,7 @@ void SAL_CALL ZipOutputStream::finish( )
for (sal_Int32 i =0, nEnd = aZipList.size(); i < nEnd; i++)
writeCEN( *aZipList[i] );
writeEND( nOffset, static_cast < sal_Int32 > (aChucker.GetPosition()) - nOffset);
- bFinished = sal_True;
+ bFinished = true;
xStream->flush();
}
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index 68bdd76c64f7..f95afefd3469 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -144,13 +144,13 @@ ZipPackage::ZipPackage ( const uno::Reference < XComponentContext > &xContext )
, m_nStartKeyGenerationID( xml::crypto::DigestID::SHA1 )
, m_nChecksumDigestID( xml::crypto::DigestID::SHA1_1K )
, m_nCommonEncryptionID( xml::crypto::CipherID::BLOWFISH_CFB_8 )
-, m_bHasEncryptedEntries ( sal_False )
-, m_bHasNonEncryptedEntries ( sal_False )
-, m_bInconsistent ( sal_False )
-, m_bForceRecovery ( sal_False )
-, m_bMediaTypeFallbackUsed ( sal_False )
+, m_bHasEncryptedEntries ( false )
+, m_bHasNonEncryptedEntries ( false )
+, m_bInconsistent ( false )
+, m_bForceRecovery ( false )
+, m_bMediaTypeFallbackUsed ( false )
, m_nFormat( embed::StorageFormats::PACKAGE ) // package is the default format
-, m_bAllowRemoveOnInsert( sal_True )
+, m_bAllowRemoveOnInsert( true )
, m_eMode ( e_IMode_None )
, m_xContext( xContext )
, m_pRootFolder( NULL )
@@ -170,7 +170,7 @@ ZipPackage::~ZipPackage( void )
// during m_pRootFolder dieing by refcount.
}
-sal_Bool ZipPackage::isLocalFile() const
+bool ZipPackage::isLocalFile() const
{
OUString aSystemPath;
uno::Reference< XUniversalContentBroker > xUcb(
@@ -190,7 +190,7 @@ void ZipPackage::parseManifest()
{
if ( m_nFormat == embed::StorageFormats::PACKAGE )
{
- sal_Bool bManifestParsed = sal_False;
+ bool bManifestParsed = false;
bool bDifferentStartKeyAlgorithm = false;
const OUString sMeta ("META-INF");
if ( m_xRootFolder->hasByName( sMeta ) )
@@ -279,7 +279,7 @@ void ZipPackage::parseManifest()
{
pStream = reinterpret_cast < ZipPackageStream* > ( xUnoTunnel->getSomething( ZipPackageStream::static_getImplementationId() ));
pStream->SetMediaType ( sMediaType );
- pStream->SetFromManifest( sal_True );
+ pStream->SetFromManifest( true );
if ( pSalt && pVector && pCount && pSize && pDigest && pDigestAlg && pEncryptionAlg )
{
@@ -288,7 +288,7 @@ void ZipPackage::parseManifest()
sal_Int32 nCount = 0, nDigestAlg = 0, nEncryptionAlg = 0;
sal_Int32 nDerivedKeySize = 16, nStartKeyAlg = xml::crypto::DigestID::SHA1;
- pStream->SetToBeEncrypted ( sal_True );
+ pStream->SetToBeEncrypted ( true );
*pSalt >>= aSequence;
pStream->setSalt ( aSequence );
@@ -319,24 +319,24 @@ void ZipPackage::parseManifest()
*pStartKeyAlg >>= nStartKeyAlg;
pStream->SetImportedStartKeyAlgorithm( nStartKeyAlg );
- pStream->SetToBeCompressed ( sal_True );
- pStream->SetToBeEncrypted ( sal_True );
- pStream->SetIsEncrypted ( sal_True );
+ pStream->SetToBeCompressed ( true );
+ pStream->SetToBeEncrypted ( true );
+ pStream->SetIsEncrypted ( true );
if ( !m_bHasEncryptedEntries && pStream->getName() == "content.xml" )
{
- m_bHasEncryptedEntries = sal_True;
+ m_bHasEncryptedEntries = true;
m_nStartKeyGenerationID = nStartKeyAlg;
m_nChecksumDigestID = nDigestAlg;
m_nCommonEncryptionID = nEncryptionAlg;
}
}
else
- m_bHasNonEncryptedEntries = sal_True;
+ m_bHasNonEncryptedEntries = true;
}
}
}
- bManifestParsed = sal_True;
+ bManifestParsed = true;
}
// now hide the manifest.xml file from user
@@ -386,7 +386,7 @@ void ZipPackage::parseManifest()
{
// accept only types that look similar to own mediatypes
m_pRootFolder->SetMediaType( aPackageMediatype );
- m_bMediaTypeFallbackUsed = sal_True;
+ m_bMediaTypeFallbackUsed = true;
}
}
else if ( !m_bForceRecovery )
@@ -406,7 +406,7 @@ void ZipPackage::parseManifest()
m_bInconsistent = m_pRootFolder->LookForUnexpectedODF12Streams( OUString() );
- sal_Bool bODF12AndNewer = ( m_pRootFolder->GetVersion().compareTo( ODFVER_012_TEXT ) >= 0 );
+ bool bODF12AndNewer = ( m_pRootFolder->GetVersion().compareTo( ODFVER_012_TEXT ) >= 0 );
if ( !m_bForceRecovery && bODF12AndNewer )
{
if ( m_bInconsistent )
@@ -545,7 +545,7 @@ void ZipPackage::getZipFileContents()
{
pPkgFolder = new ZipPackageFolder( m_nFormat, m_bAllowRemoveOnInsert );
pPkgFolder->setName( sTemp );
- pPkgFolder->doSetParent( pCurrent, sal_True );
+ pPkgFolder->doSetParent( pCurrent, true );
pCurrent = pPkgFolder;
}
else
@@ -560,10 +560,10 @@ void ZipPackage::getZipFileContents()
nStreamIndex++;
sTemp = rName.copy( nStreamIndex, rName.getLength() - nStreamIndex );
pPkgStream = new ZipPackageStream( *this, m_xContext, m_bAllowRemoveOnInsert );
- pPkgStream->SetPackageMember( sal_True );
+ pPkgStream->SetPackageMember( true );
pPkgStream->setZipEntryOnLoading( rEntry );
pPkgStream->setName( sTemp );
- pPkgStream->doSetParent( pCurrent, sal_True );
+ pPkgStream->doSetParent( pCurrent, true );
}
}
@@ -576,7 +576,7 @@ void ZipPackage::getZipFileContents()
void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
throw( Exception, RuntimeException, std::exception )
{
- sal_Bool bHaveZipFile = sal_True;
+ bool bHaveZipFile = true;
uno::Reference< XProgressHandler > xProgressHandler;
beans::NamedValue aNamedValue;
@@ -602,7 +602,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
OUString aCommand = aParam.getToken( 0, '&', nIndex );
if ( aCommand == "repairpackage" )
{
- m_bForceRecovery = sal_True;
+ m_bForceRecovery = true;
break;
}
else if ( aCommand == "purezip" )
@@ -638,14 +638,14 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
m_xContentStream = xSink->getInputStream();
}
else
- bHaveZipFile = sal_False;
+ bHaveZipFile = false;
}
catch ( com::sun::star::uno::Exception& )
{
// Exception derived from uno::Exception thrown. This probably
// means the file doesn't exist...we'll create it at
// commitChanges time
- bHaveZipFile = sal_False;
+ bHaveZipFile = false;
}
}
else if ( ( aArguments[ind] >>= m_xStream ) )
@@ -667,7 +667,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
// setting this argument to true means Package format
// setting it to false means plain Zip format
- sal_Bool bPackFormat = sal_True;
+ bool bPackFormat = true;
aNamedValue.Value >>= bPackFormat;
if ( !bPackFormat )
m_nFormat = embed::StorageFormats::ZIP;
@@ -732,17 +732,17 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
static_cast < ::cppu::OWeakObject * > ( this ) );
if ( !m_xContentSeek->getLength() )
- bHaveZipFile = sal_False;
+ bHaveZipFile = false;
}
else
- bHaveZipFile = sal_False;
+ bHaveZipFile = false;
}
catch ( com::sun::star::uno::Exception& )
{
// Exception derived from uno::Exception thrown. This probably
// means the file doesn't exist...we'll create it at
// commitChanges time
- bHaveZipFile = sal_False;
+ bHaveZipFile = false;
}
if ( bHaveZipFile )
{
@@ -750,7 +750,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
OUString message;
try
{
- m_pZipFile = new ZipFile ( m_xContentStream, m_xContext, sal_True, m_bForceRecovery, xProgressHandler );
+ m_pZipFile = new ZipFile ( m_xContentStream, m_xContext, true, m_bForceRecovery, xProgressHandler );
getZipFileContents();
}
catch ( IOException & e )
@@ -952,7 +952,7 @@ uno::Reference< XInterface > SAL_CALL ZipPackage::createInstance()
uno::Reference< XInterface > SAL_CALL ZipPackage::createInstanceWithArguments( const uno::Sequence< Any >& aArguments )
throw( Exception, RuntimeException, std::exception )
{
- sal_Bool bArg = sal_False;
+ bool bArg = false;
uno::Reference < XInterface > xRef;
if ( aArguments.getLength() )
aArguments[0] >>= bArg;
@@ -1094,7 +1094,7 @@ void ZipPackage::ConnectTo( const uno::Reference< io::XInputStream >& xInStream
if ( m_pZipFile )
m_pZipFile->setInputStream( m_xContentStream );
else
- m_pZipFile = new ZipFile ( m_xContentStream, m_xContext, sal_False );
+ m_pZipFile = new ZipFile ( m_xContentStream, m_xContext, false );
}
uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
@@ -1104,7 +1104,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
// If a temporary file is created it is returned back by the method.
// If the data written directly, xComponentStream will be switched here
- sal_Bool bUseTemp = sal_True;
+ bool bUseTemp = true;
uno::Reference < io::XInputStream > xResult;
uno::Reference < io::XInputStream > xTempIn;
@@ -1121,7 +1121,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
{
xTempOut = xStr->getOutputStream();
if( xTempOut.is() )
- bUseTemp = sal_False;
+ bUseTemp = false;
}
}
}
@@ -1130,7 +1130,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
// write directly to an empty stream
xTempOut = m_xStream->getOutputStream();
if( xTempOut.is() )
- bUseTemp = sal_False;
+ bUseTemp = false;
}
if( bUseTemp )
@@ -1297,7 +1297,7 @@ uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput()
{
try
{
- sal_Bool bTruncSuccess = sal_False;
+ bool bTruncSuccess = false;
try
{
@@ -1305,7 +1305,7 @@ uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput()
sal_Int64 aSize = 0;
Any aAny = aOriginalContent.setPropertyValue("Size", makeAny( aSize ) );
if( !( aAny >>= aDetect ) )
- bTruncSuccess = sal_True;
+ bTruncSuccess = true;
}
catch( Exception& )
{
@@ -1415,7 +1415,7 @@ void SAL_CALL ZipPackage::commitChanges()
else if ( m_eMode == e_IMode_URL )
{
uno::Reference< XOutputStream > aOrigFileStream;
- sal_Bool bCanBeCorrupted = sal_False;
+ bool bCanBeCorrupted = false;
if( isLocalFile() )
{
@@ -1452,7 +1452,7 @@ void SAL_CALL ZipPackage::commitChanges()
aOrigFileStream = uno::Reference< XOutputStream >();
// the original file can already be corrupted
- bCanBeCorrupted = sal_True;
+ bCanBeCorrupted = true;
}
}
}
@@ -1502,7 +1502,7 @@ void SAL_CALL ZipPackage::commitChanges()
}
// after successful storing it can be set to false
- m_bMediaTypeFallbackUsed = sal_False;
+ m_bMediaTypeFallbackUsed = false;
}
void ZipPackage::DisconnectFromTargetAndThrowException_Impl( const uno::Reference< io::XInputStream >& xTempStream )
diff --git a/package/source/zippackage/ZipPackageBuffer.cxx b/package/source/zippackage/ZipPackageBuffer.cxx
index deff026f0d58..931c045de655 100644
--- a/package/source/zippackage/ZipPackageBuffer.cxx
+++ b/package/source/zippackage/ZipPackageBuffer.cxx
@@ -35,7 +35,7 @@ ZipPackageBuffer::ZipPackageBuffer(sal_Int64 nNewBufferSize )
: m_nBufferSize (nNewBufferSize)
, m_nEnd(0)
, m_nCurrent(0)
-, m_bMustInitBuffer ( sal_True )
+, m_bMustInitBuffer ( true )
{
}
ZipPackageBuffer::~ZipPackageBuffer(void)
@@ -93,12 +93,12 @@ void SAL_CALL ZipPackageBuffer::writeBytes( const Sequence< sal_Int8 >& aData )
m_nBufferSize *=2;
while (nCombined > m_nBufferSize);
m_aBuffer.realloc(static_cast < sal_Int32 > (m_nBufferSize));
- m_bMustInitBuffer = sal_False;
+ m_bMustInitBuffer = false;
}
else if (m_bMustInitBuffer)
{
m_aBuffer.realloc ( static_cast < sal_Int32 > ( m_nBufferSize ) );
- m_bMustInitBuffer = sal_False;
+ m_bMustInitBuffer = false;
}
memcpy( m_aBuffer.getArray() + m_nCurrent, aData.getConstArray(), static_cast < sal_Int32 > (nDataLen));
m_nCurrent+=nDataLen;
diff --git a/package/source/zippackage/ZipPackageEntry.cxx b/package/source/zippackage/ZipPackageEntry.cxx
index 80e4137afc0a..ecdcdf5eaa0c 100644
--- a/package/source/zippackage/ZipPackageEntry.cxx
+++ b/package/source/zippackage/ZipPackageEntry.cxx
@@ -73,7 +73,7 @@ void SAL_CALL ZipPackageEntry::setName( const OUString& aName )
msName = aName;
if ( pParent )
- pParent->doInsertByName ( this, sal_False );
+ pParent->doInsertByName ( this, false );
}
uno::Reference< XInterface > SAL_CALL ZipPackageEntry::getParent( )
throw(RuntimeException, std::exception)
@@ -82,12 +82,12 @@ uno::Reference< XInterface > SAL_CALL ZipPackageEntry::getParent( )
return uno::Reference< XInterface >( static_cast< ::cppu::OWeakObject* >( pParent ), UNO_QUERY );
}
-void ZipPackageEntry::doSetParent ( ZipPackageFolder * pNewParent, sal_Bool bInsert )
+void ZipPackageEntry::doSetParent ( ZipPackageFolder * pNewParent, bool bInsert )
{
// xParent = pParent = pNewParent;
pParent = pNewParent;
if ( bInsert && !msName.isEmpty() && !pNewParent->hasByName ( msName ) )
- pNewParent->doInsertByName ( this, sal_False );
+ pNewParent->doInsertByName ( this, false );
}
void SAL_CALL ZipPackageEntry::setParent( const uno::Reference< XInterface >& xNewParent )
@@ -104,7 +104,7 @@ void SAL_CALL ZipPackageEntry::setParent( const uno::Reference< XInterface >& xN
{
if ( pParent && !msName.isEmpty() && pParent->hasByName ( msName ) && mbAllowRemoveOnInsert )
pParent->removeByName( msName );
- doSetParent ( pNewParent, sal_True );
+ doSetParent ( pNewParent, true );
}
}
//XPropertySet
diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx
index b71d34ae15a2..8c2a53b7f285 100644
--- a/package/source/zippackage/ZipPackageFolder.cxx
+++ b/package/source/zippackage/ZipPackageFolder.cxx
@@ -61,7 +61,7 @@ using namespace ::com::sun::star;
namespace { struct lcl_CachedImplId : public rtl::Static< cppu::OImplementationId, lcl_CachedImplId > {}; }
ZipPackageFolder::ZipPackageFolder ( sal_Int32 nFormat,
- sal_Bool bAllowRemoveOnInsert )
+ bool bAllowRemoveOnInsert )
: m_nFormat( nFormat )
{
this->mbAllowRemoveOnInsert = bAllowRemoveOnInsert;
@@ -81,9 +81,9 @@ ZipPackageFolder::~ZipPackageFolder()
{
}
-sal_Bool ZipPackageFolder::LookForUnexpectedODF12Streams( const OUString& aPath )
+bool ZipPackageFolder::LookForUnexpectedODF12Streams( const OUString& aPath )
{
- sal_Bool bHasUnexpected = sal_False;
+ bool bHasUnexpected = false;
for ( ContentHash::const_iterator aCI = maContents.begin(), aEnd = maContents.end();
!bHasUnexpected && aCI != aEnd;
@@ -97,7 +97,7 @@ sal_Bool ZipPackageFolder::LookForUnexpectedODF12Streams( const OUString& aPath
if ( aPath == "META-INF/" )
{
// META-INF is not allowed to contain subfolders
- bHasUnexpected = sal_True;
+ bHasUnexpected = true;
}
else
{
@@ -113,7 +113,7 @@ sal_Bool ZipPackageFolder::LookForUnexpectedODF12Streams( const OUString& aPath
&& rShortName.indexOf( "signatures" ) == -1 )
{
// a stream from META-INF with unexpected name
- bHasUnexpected = sal_True;
+ bHasUnexpected = true;
}
// streams from META-INF with expected names are allowed not to be registered in manifest.xml
@@ -125,7 +125,7 @@ sal_Bool ZipPackageFolder::LookForUnexpectedODF12Streams( const OUString& aPath
if ( !aPath.isEmpty() || rShortName != "mimetype" )
{
// if it is not "mimetype" from the root it is not a part of the package
- bHasUnexpected = sal_True;
+ bHasUnexpected = true;
}
}
}
@@ -210,7 +210,7 @@ void SAL_CALL ZipPackageFolder::insertByName( const OUString& aName, const uno::
if (pEntry->getName() != aName )
pEntry->setName (aName);
- doInsertByName ( pEntry, sal_True );
+ doInsertByName ( pEntry, true );
}
else
throw IllegalArgumentException(THROW_WHERE, uno::Reference< uno::XInterface >(), 0 );
@@ -346,8 +346,8 @@ bool ZipPackageFolder::saveChild( const OUString &rShortName, const ContentInfo
pTempEntry->sPath = rPath + rShortName;
pTempEntry->nPathLen = (sal_Int16)( OUStringToOString( pTempEntry->sPath, RTL_TEXTENCODING_UTF8 ).getLength() );
- sal_Bool bToBeEncrypted = rInfo.pStream->IsToBeEncrypted() && (rEncryptionKey.getLength() || rInfo.pStream->HasOwnKey());
- sal_Bool bToBeCompressed = bToBeEncrypted ? sal_True : rInfo.pStream->IsToBeCompressed();
+ bool bToBeEncrypted = rInfo.pStream->IsToBeEncrypted() && (rEncryptionKey.getLength() || rInfo.pStream->HasOwnKey());
+ bool bToBeCompressed = bToBeEncrypted ? sal_True : rInfo.pStream->IsToBeCompressed();
aPropSet[PKG_MNFST_MEDIATYPE].Name = sMediaTypeProperty;
aPropSet[PKG_MNFST_MEDIATYPE].Value <<= rInfo.pStream->GetMediaType( );
@@ -358,18 +358,18 @@ bool ZipPackageFolder::saveChild( const OUString &rShortName, const ContentInfo
OSL_ENSURE( rInfo.pStream->GetStreamMode() != PACKAGE_STREAM_NOTSET, "Unacceptable ZipPackageStream mode!" );
- sal_Bool bRawStream = sal_False;
+ bool bRawStream = false;
if ( rInfo.pStream->GetStreamMode() == PACKAGE_STREAM_DETECT )
bRawStream = rInfo.pStream->ParsePackageRawStream();
else if ( rInfo.pStream->GetStreamMode() == PACKAGE_STREAM_RAW )
- bRawStream = sal_True;
+ bRawStream = true;
- sal_Bool bTransportOwnEncrStreamAsRaw = sal_False;
+ bool bTransportOwnEncrStreamAsRaw = false;
// During the storing the original size of the stream can be changed
// TODO/LATER: get rid of this hack
sal_Int64 nOwnStreamOrigSize = bRawStream ? rInfo.pStream->GetMagicalHackSize() : rInfo.pStream->getSize();
- sal_Bool bUseNonSeekableAccess = sal_False;
+ bool bUseNonSeekableAccess = false;
uno::Reference < XInputStream > xStream;
if ( !rInfo.pStream->IsPackageMember() && !bRawStream && !bToBeEncrypted && bToBeCompressed )
{
@@ -431,7 +431,7 @@ bool ZipPackageFolder::saveChild( const OUString &rShortName, const ContentInfo
if ( rInfo.pStream->IsEncrypted() && rInfo.pStream->IsToBeEncrypted() )
{
// Should be handled close to the raw stream handling
- bTransportOwnEncrStreamAsRaw = sal_True;
+ bTransportOwnEncrStreamAsRaw = true;
pTempEntry->nMethod = STORED;
// TODO/LATER: get rid of this situation
@@ -532,7 +532,7 @@ bool ZipPackageFolder::saveChild( const OUString &rShortName, const ContentInfo
if ( bRawStream )
xStream->skipBytes( rInfo.pStream->GetMagicalHackPos() );
- rZipOut.putNextEntry ( *pTempEntry, rInfo.pStream, sal_False );
+ rZipOut.putNextEntry ( *pTempEntry, rInfo.pStream, false );
// the entry is provided to the ZipOutputStream that will delete it
pAutoTempEntry.release();
@@ -630,7 +630,7 @@ bool ZipPackageFolder::saveChild( const OUString &rShortName, const ContentInfo
aPropSet[PKG_MNFST_DERKEYSIZE].Name = sDerivedKeySizeProperty;
aPropSet[PKG_MNFST_DERKEYSIZE].Value <<= xEncData->m_nDerivedKeySize;
- rInfo.pStream->SetIsEncrypted ( sal_True );
+ rInfo.pStream->SetIsEncrypted ( true );
}
}
@@ -639,14 +639,14 @@ bool ZipPackageFolder::saveChild( const OUString &rShortName, const ContentInfo
if ( !rInfo.pStream->IsPackageMember() )
{
rInfo.pStream->CloseOwnStreamIfAny();
- rInfo.pStream->SetPackageMember ( sal_True );
+ rInfo.pStream->SetPackageMember ( true );
}
if ( bRawStream )
{
// the raw stream was integrated and now behaves
// as usual encrypted stream
- rInfo.pStream->SetToBeEncrypted( sal_True );
+ rInfo.pStream->SetToBeEncrypted( true );
}
// Then copy it back afterwards...
@@ -691,7 +691,7 @@ void ZipPackageFolder::saveContents( OUString &rPath, std::vector < uno::Sequenc
try
{
- rZipOut.putNextEntry( *pTempEntry, NULL, sal_False );
+ rZipOut.putNextEntry( *pTempEntry, NULL, false );
rZipOut.rawCloseEntry();
}
catch ( ZipException& )
@@ -807,7 +807,7 @@ uno::Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyNa
throw UnknownPropertyException(THROW_WHERE, uno::Reference< uno::XInterface >() );
}
-void ZipPackageFolder::doInsertByName ( ZipPackageEntry *pEntry, sal_Bool bSetParent )
+void ZipPackageFolder::doInsertByName ( ZipPackageEntry *pEntry, bool bSetParent )
throw(IllegalArgumentException, ElementExistException, WrappedTargetException, uno::RuntimeException)
{
try
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 03b167de8474..90ab0a98a6c5 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -69,13 +69,13 @@ namespace { struct lcl_CachedImplId : public rtl::Static< cppu::OImplementationI
ZipPackageStream::ZipPackageStream ( ZipPackage & rNewPackage,
const uno::Reference< XComponentContext >& xContext,
- sal_Bool bAllowRemoveOnInsert )
+ bool bAllowRemoveOnInsert )
: m_xContext( xContext )
, rZipPackage( rNewPackage )
-, bToBeCompressed ( sal_True )
-, bToBeEncrypted ( sal_False )
-, bHaveOwnKey ( sal_False )
-, bIsEncrypted ( sal_False )
+, bToBeCompressed ( true )
+, bToBeEncrypted ( false )
+, bHaveOwnKey ( false )
+, bIsEncrypted ( false )
, m_nImportedStartKeyAlgorithm( 0 )
, m_nImportedEncryptionAlgorithm( 0 )
, m_nImportedChecksumAlgorithm( 0 )
@@ -83,9 +83,9 @@ ZipPackageStream::ZipPackageStream ( ZipPackage & rNewPackage,
, m_nStreamMode( PACKAGE_STREAM_NOTSET )
, m_nMagicalHackPos( 0 )
, m_nMagicalHackSize( 0 )
-, m_bHasSeekable( sal_False )
-, m_bCompressedIsSetFromOutside( sal_False )
-, m_bFromManifest( sal_False )
+, m_bHasSeekable( false )
+, m_bCompressedIsSetFromOutside( false )
+, m_bFromManifest( false )
, m_bUseWinEncoding( false )
{
OSL_ENSURE( m_xContext.is(), "No factory is provided to ZipPackageStream!\n" );
@@ -124,7 +124,7 @@ void ZipPackageStream::setZipEntryOnLoading( const ZipEntry &rInEntry )
aEntry.nExtraLen = rInEntry.nExtraLen;
if ( aEntry.nMethod == STORED )
- bToBeCompressed = sal_False;
+ bToBeCompressed = false;
}
void ZipPackageStream::CloseOwnStreamIfAny()
@@ -133,7 +133,7 @@ void ZipPackageStream::CloseOwnStreamIfAny()
{
xStream->closeInput();
xStream = uno::Reference< io::XInputStream >();
- m_bHasSeekable = sal_False;
+ m_bHasSeekable = false;
}
}
@@ -151,7 +151,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::GetOwnSeekStream()
throw RuntimeException( THROW_WHERE "The stream must support XSeekable!",
uno::Reference< XInterface >() );
- m_bHasSeekable = sal_True;
+ m_bHasSeekable = true;
}
return xStream;
@@ -257,7 +257,7 @@ sal_Int32 ZipPackageStream::GetStartKeyGenID()
return m_nImportedStartKeyAlgorithm ? m_nImportedStartKeyAlgorithm : rZipPackage.GetStartKeyGenID();
}
-uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( sal_Bool bAddHeaderForEncr )
+uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream( bool bAddHeaderForEncr )
{
if ( m_nStreamMode != PACKAGE_STREAM_DATA || !GetOwnSeekStream().is() || ( bAddHeaderForEncr && !bToBeEncrypted ) )
throw packages::NoEncryptionException(THROW_WHERE, uno::Reference< uno::XInterface >() );
@@ -306,7 +306,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
if ( bToBeEncrypted )
{
xNewPSProps->setPropertyValue(ENCRYPTION_KEY_PROPERTY, makeAny( aKey ) );
- xNewPSProps->setPropertyValue("Encrypted", makeAny( sal_True ) );
+ xNewPSProps->setPropertyValue("Encrypted", makeAny( true ) );
}
// insert a new stream in the package
@@ -364,14 +364,14 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
throw io::IOException(THROW_WHERE, uno::Reference< uno::XInterface >() );
}
-sal_Bool ZipPackageStream::ParsePackageRawStream()
+bool ZipPackageStream::ParsePackageRawStream()
{
OSL_ENSURE( GetOwnSeekStream().is(), "A stream must be provided!\n" );
if ( !GetOwnSeekStream().is() )
- return sal_False;
+ return false;
- sal_Bool bOk = sal_False;
+ bool bOk = false;
::rtl::Reference< BaseEncryptionData > xTempEncrData;
sal_Int32 nMagHackSize = 0;
@@ -411,7 +411,7 @@ sal_Bool ZipPackageStream::ParsePackageRawStream()
m_nMagicalHackSize = nMagHackSize;
sMediaType = aMediaType;
- bOk = sal_True;
+ bOk = true;
}
}
}
@@ -423,18 +423,18 @@ sal_Bool ZipPackageStream::ParsePackageRawStream()
if ( !bOk )
{
// the provided stream is not a raw stream
- return sal_False;
+ return false;
}
m_xBaseEncryptionData = xTempEncrData;
- SetIsEncrypted ( sal_True );
+ SetIsEncrypted ( true );
// it's already compressed and encrypted
- bToBeEncrypted = bToBeCompressed = sal_False;
+ bToBeEncrypted = bToBeCompressed = false;
- return sal_True;
+ return true;
}
-void ZipPackageStream::SetPackageMember( sal_Bool bNewValue )
+void ZipPackageStream::SetPackageMember( bool bNewValue )
{
if ( bNewValue )
{
@@ -453,8 +453,8 @@ void SAL_CALL ZipPackageStream::setInputStream( const uno::Reference< io::XInput
// if seekable access is required the wrapping will be done on demand
xStream = aStream;
m_nImportedEncryptionAlgorithm = 0;
- m_bHasSeekable = sal_False;
- SetPackageMember ( sal_False );
+ m_bHasSeekable = false;
+ SetPackageMember ( false );
aEntry.nTime = -1;
m_nStreamMode = PACKAGE_STREAM_DETECT;
}
@@ -612,7 +612,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getRawStream()
return new WrapStreamForShare( GetOwnSeekStream(), rZipPackage.GetSharedMutexRef() );
}
else if ( m_nStreamMode == PACKAGE_STREAM_DATA && bToBeEncrypted )
- return TryToGetRawFromDataStream( sal_True );
+ return TryToGetRawFromDataStream( true );
}
throw packages::NoEncryptionException(THROW_WHERE, uno::Reference< uno::XInterface >() );
@@ -649,9 +649,9 @@ void SAL_CALL ZipPackageStream::setRawStream( const uno::Reference< io::XInputSt
}
// the raw stream MUST have seekable access
- m_bHasSeekable = sal_True;
+ m_bHasSeekable = true;
- SetPackageMember ( sal_False );
+ SetPackageMember ( false );
aEntry.nTime = -1;
m_nStreamMode = PACKAGE_STREAM_RAW;
}
@@ -680,7 +680,7 @@ uno::Reference< io::XInputStream > SAL_CALL ZipPackageStream::getPlainRawStream(
return GetRawEncrStreamNoHeaderCopy();
}
else if ( m_nStreamMode == PACKAGE_STREAM_DATA )
- return TryToGetRawFromDataStream( sal_False );
+ return TryToGetRawFromDataStream( false );
}
return uno::Reference< io::XInputStream >();
@@ -713,9 +713,9 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
{
if ( sMediaType.indexOf ( "text" ) != -1
|| sMediaType == "application/vnd.sun.star.oleobject" )
- bToBeCompressed = sal_True;
+ bToBeCompressed = true;
else if ( !m_bCompressedIsSetFromOutside )
- bToBeCompressed = sal_False;
+ bToBeCompressed = false;
}
}
else
@@ -736,7 +736,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
if ( rZipPackage.getFormat() != embed::StorageFormats::PACKAGE )
throw beans::PropertyVetoException(THROW_WHERE, uno::Reference< uno::XInterface >() );
- sal_Bool bEnc = sal_False;
+ bool bEnc = false;
if ( aValue >>= bEnc )
{
// In case of new raw stream, the stream must not be encrypted on storing
@@ -788,13 +788,13 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
m_aEncryptionKey = aNewKey;
// In case of new raw stream, the stream must not be encrypted on storing
- bHaveOwnKey = sal_True;
+ bHaveOwnKey = true;
if ( m_nStreamMode != PACKAGE_STREAM_RAW )
- bToBeEncrypted = sal_True;
+ bToBeEncrypted = true;
}
else
{
- bHaveOwnKey = sal_False;
+ bHaveOwnKey = false;
m_aEncryptionKey.realloc( 0 );
}
@@ -821,13 +821,13 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
m_aStorageEncryptionKeys = aKeys;
// In case of new raw stream, the stream must not be encrypted on storing
- bHaveOwnKey = sal_True;
+ bHaveOwnKey = true;
if ( m_nStreamMode != PACKAGE_STREAM_RAW )
- bToBeEncrypted = sal_True;
+ bToBeEncrypted = true;
}
else
{
- bHaveOwnKey = sal_False;
+ bHaveOwnKey = false;
m_aStorageEncryptionKeys.realloc( 0 );
}
@@ -835,7 +835,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
}
else if ( aPropertyName == "Compressed" )
{
- sal_Bool bCompr = sal_False;
+ bool bCompr = false;
if ( aValue >>= bCompr )
{
@@ -846,7 +846,7 @@ void SAL_CALL ZipPackageStream::setPropertyValue( const OUString& aPropertyName,
2 );
bToBeCompressed = bCompr;
- m_bCompressedIsSetFromOutside = sal_True;
+ m_bCompressedIsSetFromOutside = true;
}
else
throw IllegalArgumentException(THROW_WHERE "Wrong type for Compressed property!\n",
@@ -873,7 +873,7 @@ Any SAL_CALL ZipPackageStream::getPropertyValue( const OUString& PropertyName )
}
else if ( PropertyName == "Encrypted" )
{
- aAny <<= ((m_nStreamMode == PACKAGE_STREAM_RAW) ? sal_True : bToBeEncrypted);
+ aAny <<= ((m_nStreamMode == PACKAGE_STREAM_RAW) || bToBeEncrypted);
return aAny;
}
else if ( PropertyName == "WasEncrypted" )
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index 4da9ef1915db..1d49c6829b03 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -46,7 +46,7 @@ OZipFileAccess::OZipFileAccess( const uno::Reference< uno::XComponentContext >&
, m_xContext( rxContext )
, m_pZipFile( NULL )
, m_pListenersContainer( NULL )
-, m_bDisposed( sal_False )
+, m_bDisposed( false )
, m_bOwnContent( false )
{
if ( !rxContext.is() )
@@ -114,17 +114,17 @@ uno::Sequence< OUString > OZipFileAccess::GetPatternsFromString_Impl( const OUSt
return aPattern;
}
-sal_Bool OZipFileAccess::StringGoodForPattern_Impl( const OUString& aString,
+bool OZipFileAccess::StringGoodForPattern_Impl( const OUString& aString,
const uno::Sequence< OUString >& aPattern )
{
sal_Int32 nInd = aPattern.getLength() - 1;
if ( nInd < 0 )
- return sal_False;
+ return false;
if ( nInd == 0 )
{
if ( aPattern[0].isEmpty() )
- return sal_True;
+ return true;
return aString.equals( aPattern[0] );
}
@@ -141,24 +141,24 @@ sal_Bool OZipFileAccess::StringGoodForPattern_Impl( const OUString& aString,
continue;
if ( nEndInd == nBeginInd )
- return sal_False;
+ return false;
// check that search does not use nEndInd position
sal_Int32 nLastInd = aString.lastIndexOf( aPattern[nCurInd], nEndInd - 1 );
if ( nLastInd == -1 )
- return sal_False;
+ return false;
if ( nLastInd < nBeginInd )
- return sal_False;
+ return false;
nEndInd = nLastInd;
}
- return sal_True;
+ return true;
}
- return sal_False;
+ return false;
}
// XInitialization
@@ -223,7 +223,7 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu
m_pZipFile = new ZipFile(
m_xContentStream,
m_xContext,
- sal_True );
+ true );
}
// XNameAccess
@@ -246,7 +246,7 @@ uno::Any SAL_CALL OZipFileAccess::getByName( const OUString& aName )
uno::Reference< io::XInputStream > xEntryStream( m_pZipFile->getDataStream( (*aIter).second,
::rtl::Reference< EncryptionData >(),
- sal_False,
+ false,
m_aMutexHolder ) );
if ( !xEntryStream.is() )
@@ -356,7 +356,7 @@ uno::Reference< io::XInputStream > SAL_CALL OZipFileAccess::getStreamByPattern(
{
uno::Reference< io::XInputStream > xEntryStream( m_pZipFile->getDataStream( (*aIter).second,
::rtl::Reference< EncryptionData >(),
- sal_False,
+ false,
m_aMutexHolder ) );
if ( !xEntryStream.is() )
@@ -397,7 +397,7 @@ void SAL_CALL OZipFileAccess::dispose()
} catch( uno::Exception& )
{}
- m_bDisposed = sal_True;
+ m_bDisposed = true;
}
void SAL_CALL OZipFileAccess::addEventListener( const uno::Reference< lang::XEventListener >& xListener )