return early
Change-Id: Ia8504fdbc952b1e116bdca135a063d4d98be92be Reviewed-on: https://gerrit.libreoffice.org/33531 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -280,25 +280,21 @@ ReadState XPMReader::ReadXPM( Graphic& rGraphic )
|
|||||||
|
|
||||||
// ImplGetColor returns various colour values,
|
// ImplGetColor returns various colour values,
|
||||||
// returns TRUE if various colours could be assigned
|
// returns TRUE if various colours could be assigned
|
||||||
|
|
||||||
bool XPMReader::ImplGetColor( sal_uLong nNumb )
|
bool XPMReader::ImplGetColor( sal_uLong nNumb )
|
||||||
{
|
{
|
||||||
sal_uInt8* pString = mpStringBuf;
|
sal_uInt8* pString = mpStringBuf;
|
||||||
sal_uInt8* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) );
|
if (!ImplGetString())
|
||||||
bool bStatus = ImplGetString();
|
return false;
|
||||||
|
|
||||||
if ( bStatus )
|
sal_uInt8* pPtr = ( mpColMap + nNumb * ( 4 + mnCpp ) );
|
||||||
{
|
for (sal_uLong i = 0; i < mnCpp; ++i)
|
||||||
for ( sal_uLong i = 0; i < mnCpp; i++ )
|
*pPtr++ = *pString++;
|
||||||
*pPtr++ = *pString++;
|
bool bStatus = ImplGetColSub(pPtr);
|
||||||
bStatus = ImplGetColSub ( pPtr );
|
|
||||||
}
|
|
||||||
return bStatus;
|
return bStatus;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ImpGetScanLine reads the string mpBufSize and writes the pixel in the
|
// ImpGetScanLine reads the string mpBufSize and writes the pixel in the
|
||||||
// Bitmap. Parameter nY is the horizontal position.
|
// Bitmap. Parameter nY is the horizontal position.
|
||||||
|
|
||||||
bool XPMReader::ImplGetScanLine( sal_uLong nY )
|
bool XPMReader::ImplGetScanLine( sal_uLong nY )
|
||||||
{
|
{
|
||||||
bool bStatus = ImplGetString();
|
bool bStatus = ImplGetString();
|
||||||
|
Reference in New Issue
Block a user