From a6bcb8c35e926a5d8965636f3561fec91880c7f7 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 8 Mar 2018 12:28:30 +0200 Subject: loplugin:constantparam in linguistic..sfx2 Change-Id: I0e8c506df0beb0b05d9c32723876b11b6577280a Reviewed-on: https://gerrit.libreoffice.org/50938 Tested-by: Jenkins Reviewed-by: Noel Grandin --- oox/source/export/drawingml.cxx | 4 ++-- oox/source/helper/binaryinputstream.cxx | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'oox') 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& 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 ); -- cgit