[Libreoffice-commits] core.git: vcl/source
Caolán McNamara
caolanm at redhat.com
Wed Jan 25 12:45:57 UTC 2017
vcl/source/filter/ixpm/xpmread.cxx | 16 ++++++----------
1 file changed, 6 insertions(+), 10 deletions(-)
New commits:
commit 39ced315aa6c49ea233e774a6a834df4823a1ed9
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Jan 25 11:24:36 2017 +0000
return early
Change-Id: Ia8504fdbc952b1e116bdca135a063d4d98be92be
Reviewed-on: https://gerrit.libreoffice.org/33531
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/vcl/source/filter/ixpm/xpmread.cxx b/vcl/source/filter/ixpm/xpmread.cxx
index 6dc924f..dd31d97 100644
--- a/vcl/source/filter/ixpm/xpmread.cxx
+++ b/vcl/source/filter/ixpm/xpmread.cxx
@@ -280,25 +280,21 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
// ImplGetColor returns various colour values,
// returns TRUE if various colours could be assigned
-
bool XPMReader::ImplGetColor( sal_uLong nNumb )
{
sal_uInt8* pString = mpStringBuf;
- sal_uInt8* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) );
- bool bStatus = ImplGetString();
+ if (!ImplGetString())
+ return false;
- if ( bStatus )
- {
- for ( sal_uLong i = 0; i < mnCpp; i++ )
- *pPtr++ = *pString++;
- bStatus = ImplGetColSub ( pPtr );
- }
+ sal_uInt8* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) );
+ for (sal_uLong i = 0; i < mnCpp; ++i)
+ *pPtr++ = *pString++;
+ bool bStatus = ImplGetColSub(pPtr);
return bStatus;
}
// ImpGetScanLine reads the string mpBufSize and writes the pixel in the
// Bitmap. Parameter nY is the horizontal position.
-
bool XPMReader::ImplGetScanLine( sal_uLong nY )
{
bool bStatus = ImplGetString();
More information about the Libreoffice-commits
mailing list