diff options
author | Noel Grandin <noelgrandin@gmail.com> | 2022-07-21 18:49:47 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-07-22 11:14:37 +0200 |
commit | e7903c01b112665a300350b7e86c2bf65f81b8a7 (patch) | |
tree | fe95ebf0f8e5ff232b1bc453129c2efa23905ca1 /oox/source | |
parent | e7cc97d1e95fae3271fddafaa7a13bdf7c62b6ee (diff) |
elide some makeStringAndClear() calls
Change-Id: I3b80d0f5b6d39c071242bc6ccc1e4333886c835d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137309
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 2 | ||||
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 10 | ||||
-rw-r--r-- | oox/source/export/drawingml.cxx | 3 |
3 files changed, 7 insertions, 8 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index e8e1a138984b..d415a739fe3e 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -610,7 +610,7 @@ writeElement( const FSHelperPtr& pDoc, sal_Int32 nXmlElement, const Sequence< OU ::comphelper::intersperse(aItems.begin(), aItems.end(), ::comphelper::OUStringBufferAppender(sRep), OUString(" ")); - writeElement( pDoc, nXmlElement, sRep.makeStringAndClear() ); + writeElement( pDoc, nXmlElement, sRep ); } static void diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 61d603228b42..9633352d85c6 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -523,7 +523,7 @@ void StringHelper::appendIndex( OUStringBuffer& rStr, sal_Int64 nIdx ) { OUStringBuffer aToken; appendDec( aToken, nIdx ); - rStr.append( '[' ).append( aToken.makeStringAndClear() ).append( ']' ); + rStr.append( '[' ).append( aToken ).append( ']' ); } std::u16string_view StringHelper::getToken( std::u16string_view rData, sal_Int32& rnPos, sal_Unicode cSep ) @@ -575,7 +575,7 @@ OUString lclTrimQuotedStringList( const OUString& rStr ) } while( (nPos < nLen) && (rStr[ nPos ] != OOX_DUMP_CFG_QUOTE) ); // add token, seek to list separator, ignore text following closing quote - aBuffer.append( aToken.makeStringAndClear() ); + aBuffer.append( aToken ); nPos = lclIndexOf( rStr, OOX_DUMP_CFG_LISTSEP, nPos ); if( nPos < nLen ) aBuffer.append( OOX_DUMP_LF ); @@ -1100,7 +1100,7 @@ OUString FlagsList::implGetName( const Config& /*rCfg*/, sal_Int64 nKey ) const aUnknown.append( OOX_DUMP_ITEMSEP ); StringHelper::appendShortHex( aUnknown, nKey ); StringHelper::enclose( aUnknown, '(', ')' ); - StringHelper::appendToken( aName, aUnknown.makeStringAndClear() ); + StringHelper::appendToken( aName, aUnknown ); } return aName.makeStringAndClear(); } @@ -1203,14 +1203,14 @@ OUString CombiList::implGetName( const Config& rCfg, sal_Int64 nKey ) const case DATATYPE_DOUBLE: StringHelper::appendValue( aValue, static_cast< double >( nSValue ), rItemFmt.meFmtType ); break; default:; } - StringHelper::appendToken( aItem, aValue.makeStringAndClear(), OOX_DUMP_ITEMSEP ); + StringHelper::appendToken( aItem, aValue, OOX_DUMP_ITEMSEP ); if( !rItemFmt.maListName.isEmpty() ) { OUString aValueName = rCfg.getName( rItemFmt.maListName, static_cast< sal_Int64 >( nUValue ) ); StringHelper::appendToken( aItem, aValueName, OOX_DUMP_ITEMSEP ); } StringHelper::enclose( aItem, '(', ')' ); - StringHelper::appendToken( aName, aItem.makeStringAndClear() ); + StringHelper::appendToken( aName, aItem ); setFlag( nFound, nMask ); } } diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index df9b039640d4..d889f475c556 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -5644,8 +5644,7 @@ OString DrawingML::WriteWdpPicture( const OUString& rFileId, const Sequence< sal oox::getRelationship(Relationship::HDPHOTO), OUStringBuffer() .appendAscii( GetRelationCompPrefix() ) - .append( sFileName ) - .makeStringAndClear() ); + .append( sFileName ) ); maWdpCache[rFileId] = sId; return OUStringToOString( sId, RTL_TEXTENCODING_UTF8 ); |