summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-03-08 12:28:30 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-03-08 13:37:24 +0100
commita6bcb8c35e926a5d8965636f3561fec91880c7f7 (patch)
tree59feb1e228c45b8b5c857cc29420cb868f391ffc /oox
parentae510e67cdc644c541ffa26b2f91bba71a9856d2 (diff)
loplugin:constantparam in linguistic..sfx2
Change-Id: I0e8c506df0beb0b05d9c32723876b11b6577280a Reviewed-on: https://gerrit.libreoffice.org/50938 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/drawingml.cxx4
-rw-r--r--oox/source/helper/binaryinputstream.cxx6
2 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index f462fa13d32a..0a41a7ddfd4a 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -1086,7 +1086,7 @@ void DrawingML::WriteImageBrightnessContrastTransparence(uno::Reference<beans::X
}
}
-OUString DrawingML::WriteBlip( const Reference< XPropertySet >& rXPropSet, const OUString& rURL, bool bRelPathToMedia, const Graphic *pGraphic )
+OUString DrawingML::WriteBlip( const Reference< XPropertySet >& rXPropSet, const OUString& rURL, bool bRelPathToMedia )
{
OUString sRelId;
BitmapChecksum nChecksum = 0;
@@ -1101,7 +1101,7 @@ OUString DrawingML::WriteBlip( const Reference< XPropertySet >& rXPropSet, const
}
if (sRelId.isEmpty())
{
- sRelId = pGraphic ? WriteImage( *pGraphic, bRelPathToMedia ) : WriteImage( rURL, bRelPathToMedia );
+ sRelId = WriteImage( rURL, bRelPathToMedia );
if (!rURL.isEmpty() && mpTextExport)
mpTextExport->CacheRelId(nChecksum, sRelId);
}
diff --git a/oox/source/helper/binaryinputstream.cxx b/oox/source/helper/binaryinputstream.cxx
index 6eb5a6ed75c5..bc060027e7cf 100644
--- a/oox/source/helper/binaryinputstream.cxx
+++ b/oox/source/helper/binaryinputstream.cxx
@@ -74,7 +74,7 @@ OUString BinaryInputStream::readCharArrayUC( sal_Int32 nChars, rtl_TextEncoding
return OStringToOUString( readCharArray( nChars ), eTextEnc );
}
-OUString BinaryInputStream::readUnicodeArray( sal_Int32 nChars, bool bAllowNulChars )
+OUString BinaryInputStream::readUnicodeArray( sal_Int32 nChars )
{
if( nChars <= 0 )
return OUString();
@@ -85,8 +85,8 @@ OUString BinaryInputStream::readUnicodeArray( sal_Int32 nChars, bool bAllowNulCh
return OUString();
aBuffer.resize( static_cast< size_t >( nCharsRead ) );
- if( !bAllowNulChars )
- ::std::replace( aBuffer.begin(), aBuffer.begin() + nCharsRead, '\0', '?' );
+ // don't allow nul chars
+ ::std::replace( aBuffer.begin(), aBuffer.begin() + nCharsRead, '\0', '?' );
OUStringBuffer aStringBuffer;
aStringBuffer.ensureCapacity( nCharsRead );