summaryrefslogtreecommitdiff
path: root/sot
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-04-17 15:03:59 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-04-17 15:20:46 +0200
commit9b77b33a2dbdbb3e44a51742f0bcb7dcdea4db52 (patch)
tree034193223be813d28dd23f4ada2a58acbdf5fce4 /sot
parent12685fe6b8c28ceeaacf590503c9c30ef64af3e9 (diff)
loplugin:implicitboolconversion clean-up
Change-Id: I10d50f76dff5d5e456b28393c48b4de21201779b
Diffstat (limited to 'sot')
-rw-r--r--sot/source/sdstor/stgelem.cxx20
-rw-r--r--sot/source/sdstor/stgelem.hxx4
2 files changed, 13 insertions, 11 deletions
diff --git a/sot/source/sdstor/stgelem.cxx b/sot/source/sdstor/stgelem.cxx
index cd6c072a9fac..8e2f9bd86e98 100644
--- a/sot/source/sdstor/stgelem.cxx
+++ b/sot/source/sdstor/stgelem.cxx
@@ -74,7 +74,7 @@ StgHeader::StgHeader()
, nByteOrder( 0 )
, nPageSize( 0 )
, nDataPageSize( 0 )
-, bDirty( 0 )
+, bDirty( sal_uInt8(false) )
, nFATSize( 0 )
, nTOCstrm( 0 )
, nReserved( 0 )
@@ -98,7 +98,7 @@ void StgHeader::Init()
nByteOrder = 0xFFFE;
nPageSize = 9; // 512 bytes
nDataPageSize = 6; // 64 bytes
- bDirty = 0;
+ bDirty = sal_uInt8(false);
memset( cReserved, 0, sizeof( cReserved ) );
nFATSize = 0;
nTOCstrm = 0;
@@ -175,7 +175,7 @@ bool StgHeader::Store( StgIo& rIo )
.WriteInt32( nMaster ); // 48 # of additional master blocks
for( short i = 0; i < cFATPagesInHeader; i++ )
r.WriteInt32( nMasterFAT[ i ] );
- bDirty = !rIo.Good();
+ bDirty = sal_uInt8(!rIo.Good());
return !bDirty;
}
@@ -221,39 +221,39 @@ void StgHeader::SetFATPage( short n, sal_Int32 nb )
if( n >= 0 && n < cFATPagesInHeader )
{
if( nMasterFAT[ n ] != nb )
- bDirty = sal_True, nMasterFAT[ n ] = nb;
+ bDirty = sal_uInt8(true), nMasterFAT[ n ] = nb;
}
}
void StgHeader::SetTOCStart( sal_Int32 n )
{
- if( n != nTOCstrm ) bDirty = sal_True, nTOCstrm = n;
+ if( n != nTOCstrm ) bDirty = sal_uInt8(true), nTOCstrm = n;
}
void StgHeader::SetDataFATStart( sal_Int32 n )
{
- if( n != nDataFAT ) bDirty = sal_True, nDataFAT = n;
+ if( n != nDataFAT ) bDirty = sal_uInt8(true), nDataFAT = n;
}
void StgHeader::SetDataFATSize( sal_Int32 n )
{
- if( n != nDataFATSize ) bDirty = sal_True, nDataFATSize = n;
+ if( n != nDataFATSize ) bDirty = sal_uInt8(true), nDataFATSize = n;
}
void StgHeader::SetFATSize( sal_Int32 n )
{
- if( n != nFATSize ) bDirty = sal_True, nFATSize = n;
+ if( n != nFATSize ) bDirty = sal_uInt8(true), nFATSize = n;
}
void StgHeader::SetFATChain( sal_Int32 n )
{
if( n != nMasterChain )
- bDirty = sal_True, nMasterChain = n;
+ bDirty = sal_uInt8(true), nMasterChain = n;
}
void StgHeader::SetMasters( sal_Int32 n )
{
- if( n != nMaster ) bDirty = sal_True, nMaster = n;
+ if( n != nMaster ) bDirty = sal_uInt8(true), nMaster = n;
}
///////////////////////////// class StgEntry
diff --git a/sot/source/sdstor/stgelem.hxx b/sot/source/sdstor/stgelem.hxx
index 7afe2201318b..385ee9b25348 100644
--- a/sot/source/sdstor/stgelem.hxx
+++ b/sot/source/sdstor/stgelem.hxx
@@ -41,7 +41,9 @@ class StgHeader
sal_uInt16 nByteOrder; // 1C Unicode byte order indicator
sal_Int16 nPageSize; // 1E 1 << nPageSize = block size
sal_Int16 nDataPageSize; // 20 1 << this size == data block size
- sal_uInt8 bDirty; // 22 internal dirty flag
+ sal_uInt8 bDirty; // 22 internal dirty flag (should be
+ // bool, but probably required to
+ // be exactly one byte)
sal_uInt8 cReserved[ 9 ]; // 23
sal_Int32 nFATSize; // 2C total number of FAT pages
sal_Int32 nTOCstrm; // 30 starting page for the TOC stream