summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-31 08:50:15 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-31 12:58:31 +0100
commit693d40fed862614e05fbad167f7f09005683d6da (patch)
treea908faedb0c82264de7051a30cfded2c9e6e3289 /oox
parentc0cf07d3da5245e594f8f1ad11479e85bd15b88f (diff)
loplugin:constantparam in oox,registry,reportdesign
Change-Id: I914fa6c6ef2f660eb6b8570c9c5f86cef477be80 Reviewed-on: https://gerrit.libreoffice.org/44093 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/ole/axbinaryreader.cxx2
-rw-r--r--oox/source/ole/axbinarywriter.cxx6
-rw-r--r--oox/source/ole/axcontrol.cxx8
-rw-r--r--oox/source/ole/olehelper.cxx13
4 files changed, 13 insertions, 16 deletions
diff --git a/oox/source/ole/axbinaryreader.cxx b/oox/source/ole/axbinaryreader.cxx
index 9c9cb5db7c17..5a1ae682df11 100644
--- a/oox/source/ole/axbinaryreader.cxx
+++ b/oox/source/ole/axbinaryreader.cxx
@@ -168,7 +168,7 @@ bool AxBinaryPropertyReader::FontProperty::readProperty( AxAlignedInputStream& r
bool AxBinaryPropertyReader::PictureProperty::readProperty( AxAlignedInputStream& rInStrm )
{
- return OleHelper::importStdPic( mrPicData, rInStrm, true );
+ return OleHelper::importStdPic( mrPicData, rInStrm );
}
AxBinaryPropertyReader::AxBinaryPropertyReader( BinaryInputStream& rInStrm, bool b64BitPropFlags ) :
diff --git a/oox/source/ole/axbinarywriter.cxx b/oox/source/ole/axbinarywriter.cxx
index 0feeb9dc71c8..a0e4b83f23ce 100644
--- a/oox/source/ole/axbinarywriter.cxx
+++ b/oox/source/ole/axbinarywriter.cxx
@@ -86,10 +86,10 @@ void AxAlignedOutputStream::align( size_t nSize )
namespace {
-void lclWriteString( AxAlignedOutputStream& rOutStrm, OUString const & rValue, sal_uInt32 nSize, bool bArrayString )
+void lclWriteString( AxAlignedOutputStream& rOutStrm, OUString const & rValue, sal_uInt32 nSize )
{
bool bCompressed = getFlag( nSize, AX_STRING_COMPRESSED );
- rOutStrm.writeCompressedUnicodeArray( rValue, bCompressed || bArrayString );
+ rOutStrm.writeCompressedUnicodeArray( rValue, bCompressed );
}
} // namespace
@@ -106,7 +106,7 @@ bool AxBinaryPropertyWriter::PairProperty::writeProperty( AxAlignedOutputStream&
bool AxBinaryPropertyWriter::StringProperty::writeProperty( AxAlignedOutputStream& rOutStrm )
{
- lclWriteString( rOutStrm, mrValue, mnSize, false );
+ lclWriteString( rOutStrm, mrValue, mnSize );
return true;
}
diff --git a/oox/source/ole/axcontrol.cxx b/oox/source/ole/axcontrol.cxx
index 326931b674fe..7ab805691c82 100644
--- a/oox/source/ole/axcontrol.cxx
+++ b/oox/source/ole/axcontrol.cxx
@@ -743,7 +743,7 @@ bool ComCtlModelBase::importComplexPart( BinaryInputStream& rInStrm )
sal_uInt32 nContFlags = rInStrm.readuInt32();
bool bReadOk =
(!getFlag( nContFlags, COMCTL_COMPLEX_FONT ) || OleHelper::importStdFont( maFontData, rInStrm, true )) &&
- (!getFlag( nContFlags, COMCTL_COMPLEX_MOUSEICON ) || OleHelper::importStdPic( maMouseIcon, rInStrm, true ));
+ (!getFlag( nContFlags, COMCTL_COMPLEX_MOUSEICON ) || OleHelper::importStdPic( maMouseIcon, rInStrm ));
return bReadOk && !rInStrm.isEof();
}
return false;
@@ -978,7 +978,7 @@ void AxCommandButtonModel::importPictureData( sal_Int32 nPropId, BinaryInputStre
{
switch( nPropId )
{
- case XML_Picture: OleHelper::importStdPic( maPictureData, rInStrm, true ); break;
+ case XML_Picture: OleHelper::importStdPic( maPictureData, rInStrm ); break;
default: AxFontDataModel::importPictureData( nPropId, rInStrm );
}
}
@@ -1242,7 +1242,7 @@ void AxImageModel::importPictureData( sal_Int32 nPropId, BinaryInputStream& rInS
{
switch( nPropId )
{
- case XML_Picture: OleHelper::importStdPic( maPictureData, rInStrm, true ); break;
+ case XML_Picture: OleHelper::importStdPic( maPictureData, rInStrm ); break;
default: AxControlModelBase::importPictureData( nPropId, rInStrm );
}
}
@@ -1426,7 +1426,7 @@ void AxMorphDataModelBase::importPictureData( sal_Int32 nPropId, BinaryInputStre
{
switch( nPropId )
{
- case XML_Picture: OleHelper::importStdPic( maPictureData, rInStrm, true ); break;
+ case XML_Picture: OleHelper::importStdPic( maPictureData, rInStrm ); break;
default: AxFontDataModel::importPictureData( nPropId, rInStrm );
}
}
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index d1090c6421aa..27703ef6c537 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -300,15 +300,12 @@ bool OleHelper::importStdFont( StdFontInfo& orFontInfo, BinaryInputStream& rInSt
return !rInStrm.isEof() && (nVersion <= 1);
}
-bool OleHelper::importStdPic( StreamDataSequence& orGraphicData, BinaryInputStream& rInStrm, bool bWithGuid )
+bool OleHelper::importStdPic( StreamDataSequence& orGraphicData, BinaryInputStream& rInStrm )
{
- if( bWithGuid )
- {
- bool bIsStdPic = importGuid( rInStrm ) == OLE_GUID_STDPIC;
- OSL_ENSURE( bIsStdPic, "OleHelper::importStdPic - unexpected header GUID, expected StdPic" );
- if( !bIsStdPic )
- return false;
- }
+ bool bIsStdPic = importGuid( rInStrm ) == OLE_GUID_STDPIC;
+ OSL_ENSURE( bIsStdPic, "OleHelper::importStdPic - unexpected header GUID, expected StdPic" );
+ if( !bIsStdPic )
+ return false;
sal_uInt32 nStdPicId;
sal_Int32 nBytes;