diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-02-20 19:51:04 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-02-20 19:51:43 +0100 |
commit | 9c9e4b1942b2bb7bb80d0317f40488a4cf1f9b9a (patch) | |
tree | f4bc483482c92573c53d86e7cd53b033e0c87253 /svl | |
parent | Don't attempt to actually do double code removals (diff) | |
download | core-9c9e4b1942b2bb7bb80d0317f40488a4cf1f9b9a.tar.gz core-9c9e4b1942b2bb7bb80d0317f40488a4cf1f9b9a.zip |
Add SvStream::ReadCharAsBool
Change-Id: I9dc0525e04de5ae79205872b779dcd0115a9cc14
Diffstat (limited to 'svl')
-rw-r--r-- | svl/source/items/cenumitm.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/ctypeitm.cxx | 4 | ||||
-rw-r--r-- | svl/source/items/visitem.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 10 |
4 files changed, 11 insertions, 11 deletions
diff --git a/svl/source/items/cenumitm.cxx b/svl/source/items/cenumitm.cxx index 74a631430b78..bf13761371b4 100644 --- a/svl/source/items/cenumitm.cxx +++ b/svl/source/items/cenumitm.cxx @@ -169,8 +169,8 @@ TYPEINIT1_AUTOFACTORY(SfxBoolItem, SfxPoolItem); SfxBoolItem::SfxBoolItem(sal_uInt16 const nWhich, SvStream & rStream) : SfxPoolItem(nWhich) { - unsigned char tmp = 0; - rStream.ReadUChar( tmp ); + bool tmp = false; + rStream.ReadCharAsBool( tmp ); m_bValue = tmp; } diff --git a/svl/source/items/ctypeitm.cxx b/svl/source/items/ctypeitm.cxx index d2299ae61ce5..16a8bf8760fb 100644 --- a/svl/source/items/ctypeitm.cxx +++ b/svl/source/items/ctypeitm.cxx @@ -71,8 +71,8 @@ SfxPoolItem* CntContentTypeItem::Create( SvStream& rStream, rStream.ReadUInt32( nMagic ); if (nMagic == CNTSTRINGITEM_STREAM_MAGIC) { - unsigned char bEncrypted = sal_False; - rStream.ReadUChar( bEncrypted ); + bool bEncrypted = false; + rStream.ReadCharAsBool( bEncrypted ); DBG_ASSERT(!bEncrypted, "CntContentTypeItem::Create() reads encrypted data"); } diff --git a/svl/source/items/visitem.cxx b/svl/source/items/visitem.cxx index dbd8ec5c37cf..8adc76228ca2 100644 --- a/svl/source/items/visitem.cxx +++ b/svl/source/items/visitem.cxx @@ -33,8 +33,8 @@ SfxVisibilityItem::SfxVisibilityItem(sal_uInt16 which, SvStream & rStream): SfxPoolItem(which) { DBG_CTOR(SfxVisibilityItem, 0); - unsigned char bValue = 0; - rStream.ReadUChar( bValue ); + bool bValue = false; + rStream.ReadCharAsBool( bValue ); m_nValue.bVisible = bValue; } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 73072a3cb283..6bf72257087c 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -184,8 +184,8 @@ void ImpSvNumberformatInfo::Load(SvStream& rStream, sal_uInt16 nAnz) sStrArray[i] = SvNumberformat::LoadString( rStream ); rStream.ReadInt16( nTypeArray[i] ); } - unsigned char bStreamThousand; - rStream.ReadInt16( eScannedType ).ReadUChar( bStreamThousand ).ReadUInt16( nThousand ) + bool bStreamThousand; + rStream.ReadInt16( eScannedType ).ReadCharAsBool( bStreamThousand ).ReadUInt16( nThousand ) .ReadUInt16( nCntPre ).ReadUInt16( nCntPost ).ReadUInt16( nCntExp ); bThousand = bStreamThousand; } @@ -1702,9 +1702,9 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream, rHdr.StartEntry(); sal_uInt16 nOp1, nOp2; sFormatstring = SvNumberformat::LoadString( rStream ); - unsigned char bStreamStandard, bStreamUsed; + bool bStreamStandard, bStreamUsed; rStream.ReadInt16( eType ).ReadDouble( fLimit1 ).ReadDouble( fLimit2 ) - .ReadUInt16( nOp1 ).ReadUInt16( nOp2 ).ReadUChar( bStreamStandard ).ReadUChar( bStreamUsed ); + .ReadUInt16( nOp1 ).ReadUInt16( nOp2 ).ReadCharAsBool( bStreamStandard ).ReadCharAsBool( bStreamUsed ); bStandard = bStreamStandard; bIsUsed = bStreamUsed; NfHackConversion eHackConversion = NF_CONVERT_NONE; @@ -1795,7 +1795,7 @@ NfHackConversion SvNumberformat::Load( SvStream& rStream, } break; case nNewStandardFlagVersionId : - rStream.ReadUChar( bStreamStandard ); // the real standard flag + rStream.ReadCharAsBool( bStreamStandard ); // the real standard flag bStandard = bStreamStandard; break; default: |