Kaydet (Commit) efe9bf61 authored tarafından Luboš Luňák's avatar Luboš Luňák

sal_Bool to bool

Change-Id: I7d05020b6e07268349fb269bd58ce11aeddf6631
üst 108a9563
This diff is collapsed.
...@@ -43,46 +43,46 @@ class StgDirEntry : public StgAvlNode ...@@ -43,46 +43,46 @@ class StgDirEntry : public StgAvlNode
StgTmpStrm* pCurStrm; // temp stream after commit StgTmpStrm* pCurStrm; // temp stream after commit
sal_Int32 nEntry; // entry # in TOC stream (temp) sal_Int32 nEntry; // entry # in TOC stream (temp)
sal_Int32 nPos; // current position sal_Int32 nPos; // current position
sal_Bool bDirty; // dirty directory entry bool bDirty; // dirty directory entry
sal_Bool bCreated; // newly created entry bool bCreated; // newly created entry
sal_Bool bRemoved; // removed per Invalidate() bool bRemoved; // removed per Invalidate()
sal_Bool bRenamed; // renamed bool bRenamed; // renamed
void InitMembers(); // ctor helper void InitMembers(); // ctor helper
virtual short Compare( const StgAvlNode* ) const; virtual short Compare( const StgAvlNode* ) const;
sal_Bool StoreStream( StgIo& ); // store the stream bool StoreStream( StgIo& ); // store the stream
sal_Bool StoreStreams( StgIo& ); // store all streams bool StoreStreams( StgIo& ); // store all streams
void RevertAll(); // revert the whole tree void RevertAll(); // revert the whole tree
sal_Bool Strm2Tmp(); // copy stgstream to temp file bool Strm2Tmp(); // copy stgstream to temp file
sal_Bool Tmp2Strm(); // copy temp file to stgstream bool Tmp2Strm(); // copy temp file to stgstream
public: public:
StgEntry aEntry; // entry data StgEntry aEntry; // entry data
sal_Int32 nRefCnt; // reference count sal_Int32 nRefCnt; // reference count
StreamMode nMode; // open mode StreamMode nMode; // open mode
sal_Bool bTemp; // sal_True: delete on dir flush bool bTemp; // true: delete on dir flush
sal_Bool bDirect; // sal_True: direct mode bool bDirect; // true: direct mode
sal_Bool bZombie; // sal_True: Removed From StgIo bool bZombie; // true: Removed From StgIo
sal_Bool bInvalid; // sal_True: invalid entry bool bInvalid; // true: invalid entry
StgDirEntry( const void* pBuffer, sal_uInt32 nBufferLen, sal_Bool * pbOk ); StgDirEntry( const void* pBuffer, sal_uInt32 nBufferLen, bool * pbOk );
StgDirEntry( const StgEntry& ); StgDirEntry( const StgEntry& );
~StgDirEntry(); ~StgDirEntry();
void Invalidate( sal_Bool=sal_False ); // invalidate all open entries void Invalidate( bool=false ); // invalidate all open entries
void Enum( sal_Int32& ); // enumerate entries for iteration void Enum( sal_Int32& ); // enumerate entries for iteration
void DelTemp( sal_Bool ); // delete temporary entries void DelTemp( bool ); // delete temporary entries
sal_Bool Store( StgDirStrm& ); // save entry into dir strm bool Store( StgDirStrm& ); // save entry into dir strm
sal_Bool IsContained( StgDirEntry* ); // check if subentry bool IsContained( StgDirEntry* ); // check if subentry
void SetDirty() { bDirty = sal_True; } void SetDirty() { bDirty = true; }
sal_Bool IsDirty(); bool IsDirty();
void ClearDirty(); void ClearDirty();
sal_Bool Commit(); bool Commit();
sal_Bool Revert(); bool Revert();
void OpenStream( StgIo&, sal_Bool=sal_False ); // set up an approbiate stream void OpenStream( StgIo&, bool=false ); // set up an approbiate stream
void Close(); void Close();
sal_Int32 GetSize(); sal_Int32 GetSize();
sal_Bool SetSize( sal_Int32 ); bool SetSize( sal_Int32 );
sal_Int32 Seek( sal_Int32 ); sal_Int32 Seek( sal_Int32 );
sal_Int32 Tell() { return nPos; } sal_Int32 Tell() { return nPos; }
sal_Int32 Read( void*, sal_Int32 ); sal_Int32 Read( void*, sal_Int32 );
...@@ -99,15 +99,15 @@ class StgDirStrm : public StgDataStrm ...@@ -99,15 +99,15 @@ class StgDirStrm : public StgDataStrm
public: public:
StgDirStrm( StgIo& ); StgDirStrm( StgIo& );
~StgDirStrm(); ~StgDirStrm();
virtual sal_Bool SetSize( sal_Int32 ); // change the size virtual bool SetSize( sal_Int32 ); // change the size
sal_Bool Store(); bool Store();
void* GetEntry( sal_Int32 n, sal_Bool=sal_False );// get an entry void* GetEntry( sal_Int32 n, bool=false );// get an entry
StgDirEntry* GetRoot() { return pRoot; } StgDirEntry* GetRoot() { return pRoot; }
StgDirEntry* Find( StgDirEntry&, const String& ); StgDirEntry* Find( StgDirEntry&, const String& );
StgDirEntry* Create( StgDirEntry&, const String&, StgEntryType ); StgDirEntry* Create( StgDirEntry&, const String&, StgEntryType );
sal_Bool Remove( StgDirEntry&, const String& ); bool Remove( StgDirEntry&, const String& );
sal_Bool Rename( StgDirEntry&, const String&, const String& ); bool Rename( StgDirEntry&, const String&, const String& );
sal_Bool Move( StgDirEntry&, StgDirEntry&, const String& ); bool Move( StgDirEntry&, StgDirEntry&, const String& );
}; };
class StgIterator : public StgAvlIterator class StgIterator : public StgAvlIterator
......
This diff is collapsed.
...@@ -30,7 +30,7 @@ class StgPage; ...@@ -30,7 +30,7 @@ class StgPage;
class StgDirEntry; class StgDirEntry;
// The FAT class performs FAT operations on an underlying storage stream. // The FAT class performs FAT operations on an underlying storage stream.
// This stream is either the physical FAT stream (bPhys == sal_True ) or a normal // This stream is either the physical FAT stream (bPhys == true ) or a normal
// storage stream, which then holds the FAT for small data allocations. // storage stream, which then holds the FAT for small data allocations.
class StgFAT class StgFAT
...@@ -41,16 +41,16 @@ class StgFAT ...@@ -41,16 +41,16 @@ class StgFAT
short nEntries; // FAT entries per page short nEntries; // FAT entries per page
short nOffset; // current offset within page short nOffset; // current offset within page
sal_Int32 nLimit; // search limit recommendation sal_Int32 nLimit; // search limit recommendation
sal_Bool bPhys; // sal_True: physical FAT bool bPhys; // true: physical FAT
rtl::Reference< StgPage > GetPhysPage( sal_Int32 nPage ); rtl::Reference< StgPage > GetPhysPage( sal_Int32 nPage );
sal_Bool MakeChain( sal_Int32 nStart, sal_Int32 nPages ); bool MakeChain( sal_Int32 nStart, sal_Int32 nPages );
sal_Bool InitNew( sal_Int32 nPage1 ); bool InitNew( sal_Int32 nPage1 );
public: public:
StgFAT( StgStrm& rStrm, sal_Bool bMark ); StgFAT( StgStrm& rStrm, bool bMark );
sal_Int32 FindBlock( sal_Int32& nPages ); sal_Int32 FindBlock( sal_Int32& nPages );
sal_Int32 GetNextPage( sal_Int32 nPg ); sal_Int32 GetNextPage( sal_Int32 nPg );
sal_Int32 AllocPages( sal_Int32 nStart, sal_Int32 nPages ); sal_Int32 AllocPages( sal_Int32 nStart, sal_Int32 nPages );
sal_Bool FreePages( sal_Int32 nStart, sal_Bool bAll ); bool FreePages( sal_Int32 nStart, bool bAll );
sal_Int32 GetMaxPage() { return nMaxPage; } sal_Int32 GetMaxPage() { return nMaxPage; }
void SetLimit( sal_Int32 n ) { nLimit = n; } void SetLimit( sal_Int32 n ) { nLimit = n; }
}; };
...@@ -72,7 +72,7 @@ protected: ...@@ -72,7 +72,7 @@ protected:
short nPageSize; // logical page size short nPageSize; // logical page size
std::vector<sal_Int32> m_aPagesCache; std::vector<sal_Int32> m_aPagesCache;
void scanBuildPageChainCache(sal_Int32 *pOptionalCalcSize = NULL); void scanBuildPageChainCache(sal_Int32 *pOptionalCalcSize = NULL);
sal_Bool Copy( sal_Int32 nFrom, sal_Int32 nBytes ); bool Copy( sal_Int32 nFrom, sal_Int32 nBytes );
StgStrm( StgIo& ); StgStrm( StgIo& );
public: public:
virtual ~StgStrm(); virtual ~StgStrm();
...@@ -85,12 +85,12 @@ public: ...@@ -85,12 +85,12 @@ public:
sal_Int32 GetPages() const; sal_Int32 GetPages() const;
short GetOffset() const { return nOffset;} short GetOffset() const { return nOffset;}
void SetEntry( StgDirEntry& ); void SetEntry( StgDirEntry& );
virtual sal_Bool SetSize( sal_Int32 ); virtual bool SetSize( sal_Int32 );
virtual sal_Bool Pos2Page( sal_Int32 nBytePos ); virtual bool Pos2Page( sal_Int32 nBytePos );
virtual sal_Int32 Read( void*, sal_Int32 ) { return 0; } virtual sal_Int32 Read( void*, sal_Int32 ) { return 0; }
virtual sal_Int32 Write( const void*, sal_Int32 ) { return 0; } virtual sal_Int32 Write( const void*, sal_Int32 ) { return 0; }
virtual rtl::Reference< StgPage > GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce = sal_False ); virtual rtl::Reference< StgPage > GetPhysPage( sal_Int32 nBytePos, bool bForce = false );
virtual sal_Bool IsSmallStrm() const { return sal_False; } virtual bool IsSmallStrm() const { return false; }
}; };
// The FAT stream class provides physical access to the master FAT. // The FAT stream class provides physical access to the master FAT.
...@@ -98,15 +98,15 @@ public: ...@@ -98,15 +98,15 @@ public:
// FAT allocator. // FAT allocator.
class StgFATStrm : public StgStrm { // the master FAT stream class StgFATStrm : public StgStrm { // the master FAT stream
virtual sal_Bool Pos2Page( sal_Int32 nBytePos ); virtual bool Pos2Page( sal_Int32 nBytePos );
sal_Bool SetPage( short, sal_Int32 ); bool SetPage( short, sal_Int32 );
public: public:
StgFATStrm( StgIo& ); StgFATStrm( StgIo& );
virtual ~StgFATStrm() {} virtual ~StgFATStrm() {}
using StgStrm::GetPage; using StgStrm::GetPage;
sal_Int32 GetPage( short, sal_Bool, sal_uInt16 *pnMasterAlloc = 0); sal_Int32 GetPage( short, bool, sal_uInt16 *pnMasterAlloc = 0);
virtual sal_Bool SetSize( sal_Int32 ); virtual bool SetSize( sal_Int32 );
virtual rtl::Reference< StgPage > GetPhysPage( sal_Int32 nBytePos, sal_Bool bForce = sal_False ); virtual rtl::Reference< StgPage > GetPhysPage( sal_Int32 nBytePos, bool bForce = false );
}; };
// The stream has a size increment which normally is 1, but which can be // The stream has a size increment which normally is 1, but which can be
...@@ -119,9 +119,9 @@ class StgDataStrm : public StgStrm // a physical data stream ...@@ -119,9 +119,9 @@ class StgDataStrm : public StgStrm // a physical data stream
public: public:
StgDataStrm( StgIo&, sal_Int32 nBgn, sal_Int32 nLen=-1 ); StgDataStrm( StgIo&, sal_Int32 nBgn, sal_Int32 nLen=-1 );
StgDataStrm( StgIo&, StgDirEntry& ); StgDataStrm( StgIo&, StgDirEntry& );
void* GetPtr( sal_Int32 nPos, sal_Bool bForce, sal_Bool bDirty ); void* GetPtr( sal_Int32 nPos, bool bForce, bool bDirty );
void SetIncrement( short n ) { nIncr = n ; } void SetIncrement( short n ) { nIncr = n ; }
virtual sal_Bool SetSize( sal_Int32 ); virtual bool SetSize( sal_Int32 );
virtual sal_Int32 Read( void*, sal_Int32 ); virtual sal_Int32 Read( void*, sal_Int32 );
virtual sal_Int32 Write( const void*, sal_Int32 ); virtual sal_Int32 Write( const void*, sal_Int32 );
}; };
...@@ -140,7 +140,7 @@ public: ...@@ -140,7 +140,7 @@ public:
StgSmallStrm( StgIo&, StgDirEntry& ); StgSmallStrm( StgIo&, StgDirEntry& );
virtual sal_Int32 Read( void*, sal_Int32 ); virtual sal_Int32 Read( void*, sal_Int32 );
virtual sal_Int32 Write( const void*, sal_Int32 ); virtual sal_Int32 Write( const void*, sal_Int32 );
virtual sal_Bool IsSmallStrm() const { return sal_True; } virtual bool IsSmallStrm() const { return true; }
}; };
class StgTmpStrm : public SvMemoryStream class StgTmpStrm : public SvMemoryStream
...@@ -156,7 +156,7 @@ class StgTmpStrm : public SvMemoryStream ...@@ -156,7 +156,7 @@ class StgTmpStrm : public SvMemoryStream
public: public:
StgTmpStrm( sal_uLong=16 ); StgTmpStrm( sal_uLong=16 );
~StgTmpStrm(); ~StgTmpStrm();
sal_Bool Copy( StgTmpStrm& ); bool Copy( StgTmpStrm& );
void SetSize( sal_uLong ); void SetSize( sal_uLong );
sal_uLong GetSize() const; sal_uLong GetSize() const;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment