summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-10-24 12:01:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-10-24 17:16:52 +0200
commitd40b0b46ae229cb3b5b375b0e86b4bc19d48e839 (patch)
tree2f81307fe83a56c43b89af1f8d20d5559b3af037
parentda09cf2cb875d17d06c081c744e7a25f4715f8b0 (diff)
ofz#3747 Invalid-bool-value
Change-Id: I168fc71471dc9aeb4cd5149aaab765e65f7d5a82 Reviewed-on: https://gerrit.libreoffice.org/43756 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--vcl/source/gdi/wall.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx
index 54afa1eb20e2..11861f784ab6 100644
--- a/vcl/source/gdi/wall.cxx
+++ b/vcl/source/gdi/wall.cxx
@@ -57,7 +57,6 @@ ImplWallpaper::~ImplWallpaper()
SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
{
VersionCompat aCompat( rIStm, StreamMode::READ );
- sal_uInt16 nTmp16;
rImplWallpaper.mpRect.reset();
rImplWallpaper.mpGradient.reset();
@@ -65,12 +64,14 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
// version 1
ReadColor( rIStm, rImplWallpaper.maColor );
- rIStm.ReadUInt16( nTmp16 ); rImplWallpaper.meStyle = (WallpaperStyle) nTmp16;
+ sal_uInt16 nTmp16(0);
+ rIStm.ReadUInt16(nTmp16);
+ rImplWallpaper.meStyle = static_cast<WallpaperStyle>(nTmp16);
// version 2
if( aCompat.GetVersion() >= 2 )
{
- bool bRect, bGrad, bBmp, bDummy;
+ bool bRect(false), bGrad(false), bBmp(false), bDummy;
rIStm.ReadCharAsBool( bRect ).ReadCharAsBool( bGrad ).ReadCharAsBool( bBmp ).ReadCharAsBool( bDummy ).ReadCharAsBool( bDummy ).ReadCharAsBool( bDummy );