[Libreoffice-commits] core.git: 2 commits - filter/source vcl/source
Caolán McNamara
caolanm at redhat.com
Fri Jan 27 10:36:16 UTC 2017
filter/source/graphicfilter/ieps/ieps.cxx | 22 +++++++++++-----------
vcl/source/gdi/impgraph.cxx | 18 +++++++++---------
2 files changed, 20 insertions(+), 20 deletions(-)
New commits:
commit cf06348d9d4be8b8460d202cebf0d995fd4f6abf
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 27 10:34:35 2017 +0000
make this a little more readable
Change-Id: I83b6b0bd636b639ce0892f22f216410ce79dee03
diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 2a8f900..63ef80d 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -69,14 +69,14 @@ static sal_uInt8* ImplSearchEntry( sal_uInt8* pSource, sal_uInt8 const * pDest,
// SecurityCount is the buffersize of the buffer in which we will parse for a number
-static long ImplGetNumber( sal_uInt8 **pBuf, sal_uInt32& nSecurityCount )
+static long ImplGetNumber(sal_uInt8* &rBuf, sal_uInt32& nSecurityCount)
{
bool bValid = true;
bool bNegative = false;
long nRetValue = 0;
- while ( ( --nSecurityCount ) && ( ( **pBuf == ' ' ) || ( **pBuf == 0x9 ) ) )
- (*pBuf)++;
- sal_uInt8 nByte = **pBuf;
+ while ( ( --nSecurityCount ) && ( ( *rBuf == ' ' ) || ( *rBuf == 0x9 ) ) )
+ rBuf++;
+ sal_uInt8 nByte = *rBuf;
while ( nSecurityCount && ( nByte != ' ' ) && ( nByte != 0x9 ) && ( nByte != 0xd ) && ( nByte != 0xa ) )
{
switch ( nByte )
@@ -99,7 +99,7 @@ static long ImplGetNumber( sal_uInt8 **pBuf, sal_uInt32& nSecurityCount )
break;
}
nSecurityCount--;
- nByte = *(++(*pBuf));
+ nByte = *(++rBuf);
}
if ( bNegative )
nRetValue = -nRetValue;
@@ -511,7 +511,7 @@ void MakePreview(sal_uInt8* pBuf, sal_uInt32 nBytesRead,
{
pDest += 16;
sal_uInt32 nCount = 4;
- long nNumber = ImplGetNumber( &pDest, nCount );
+ long nNumber = ImplGetNumber(pDest, nCount);
if ( nCount && ( (sal_uInt32)nNumber < 10 ) )
{
aString += " LanguageLevel:" + OUString::number( nNumber );
@@ -612,10 +612,10 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
if ( pDest )
{
pDest += 15;
- long nWidth = ImplGetNumber( &pDest, nSecurityCount );
- long nHeight = ImplGetNumber( &pDest, nSecurityCount );
- long nBitDepth = ImplGetNumber( &pDest, nSecurityCount );
- long nScanLines = ImplGetNumber( &pDest, nSecurityCount );
+ long nWidth = ImplGetNumber(pDest, nSecurityCount);
+ long nHeight = ImplGetNumber(pDest, nSecurityCount);
+ long nBitDepth = ImplGetNumber(pDest, nSecurityCount);
+ long nScanLines = ImplGetNumber(pDest, nSecurityCount);
pDest = ImplSearchEntry( pDest, reinterpret_cast<sal_uInt8 const *>("%"), 16, 1 ); // go to the first Scanline
if ( nSecurityCount && pDest && nWidth && nHeight && ( ( nBitDepth == 1 ) || ( nBitDepth == 8 ) ) && nScanLines )
{
@@ -717,7 +717,7 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
pDest += 14;
for ( int i = 0; ( i < 4 ) && nSecurityCount; i++ )
{
- nNumb[ i ] = ImplGetNumber( &pDest, nSecurityCount );
+ nNumb[ i ] = ImplGetNumber(pDest, nSecurityCount);
}
if ( nSecurityCount)
{
commit 5ff2ae5d727d8e596ead075b46d9203d9acd5d25
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri Jan 27 09:35:23 2017 +0000
reformat member initialization
Change-Id: I6c86da271d01d63ad426d3ac99068a6ad9663705
diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx
index 1a330c3..8cc7478 100644
--- a/vcl/source/gdi/impgraph.cxx
+++ b/vcl/source/gdi/impgraph.cxx
@@ -106,15 +106,15 @@ ImpGraphic::ImpGraphic() :
{
}
-ImpGraphic::ImpGraphic( const ImpGraphic& rImpGraphic ) :
- maMetaFile ( rImpGraphic.maMetaFile ),
- maEx ( rImpGraphic.maEx ),
- mpSwapFile ( rImpGraphic.mpSwapFile ),
- meType ( rImpGraphic.meType ),
- mnSizeBytes ( rImpGraphic.mnSizeBytes ),
- mbSwapOut ( rImpGraphic.mbSwapOut ),
- mbSwapUnderway ( false ),
- mbDummyContext ( rImpGraphic.mbDummyContext )
+ImpGraphic::ImpGraphic(const ImpGraphic& rImpGraphic)
+ : maMetaFile(rImpGraphic.maMetaFile)
+ , maEx(rImpGraphic.maEx)
+ , mpSwapFile(rImpGraphic.mpSwapFile)
+ , meType(rImpGraphic.meType)
+ , mnSizeBytes(rImpGraphic.mnSizeBytes)
+ , mbSwapOut(rImpGraphic.mbSwapOut)
+ , mbSwapUnderway(false)
+ , mbDummyContext(rImpGraphic.mbDummyContext)
{
if( rImpGraphic.mpGfxLink )
mpGfxLink = o3tl::make_unique<GfxLink>( *rImpGraphic.mpGfxLink );
More information about the Libreoffice-commits
mailing list