diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-01-28 20:29:16 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-29 09:25:12 +0100 |
commit | 1250aecd71fabde4dba990bfceb61bbe8e06b8ea (patch) | |
tree | 3c42ffdf68b7e81aba29228631a8cd34e2f11830 /oox | |
parent | 4f3987e0b1a995431478769c898b5ef151745254 (diff) |
loplugin:stringviewparam extend to new..
O[U]StringBuffer methods
Change-Id: I0ffbc33d54ae7c98b5652434f3370ee4f819f6f4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110090
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/contexthandler2.cxx | 2 | ||||
-rw-r--r-- | oox/source/dump/dumperbase.cxx | 12 | ||||
-rw-r--r-- | oox/source/ole/vbamodule.cxx | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/oox/source/core/contexthandler2.cxx b/oox/source/core/contexthandler2.cxx index a63a9b6ba1a5..b7924cc9fa4a 100644 --- a/oox/source/core/contexthandler2.cxx +++ b/oox/source/core/contexthandler2.cxx @@ -102,7 +102,7 @@ void ContextHandler2Helper::implStartElement( sal_Int32 nElement, const Referenc onStartElement( aAttribs ); } -void ContextHandler2Helper::implCharacters( const OUString& rChars ) +void ContextHandler2Helper::implCharacters( std::u16string_view rChars ) { // #i76091# collect characters until new element starts or this element ends if( !mxContextStack->empty() ) diff --git a/oox/source/dump/dumperbase.cxx b/oox/source/dump/dumperbase.cxx index 06d277855c76..c3b26de7a067 100644 --- a/oox/source/dump/dumperbase.cxx +++ b/oox/source/dump/dumperbase.cxx @@ -511,9 +511,9 @@ void StringHelper::appendEncString( OUStringBuffer& rStr, const OUString& rData, // token list ----------------------------------------------------------------- -void StringHelper::appendToken( OUStringBuffer& rStr, const OUString& rToken, sal_Unicode cSep ) +void StringHelper::appendToken( OUStringBuffer& rStr, std::u16string_view rToken, sal_Unicode cSep ) { - if( (rStr.getLength() > 0) && (!rToken.isEmpty()) ) + if( (rStr.getLength() > 0) && (!rToken.empty()) ) rStr.append( cSep ); rStr.append( rToken ); } @@ -1061,7 +1061,7 @@ OUString FlagsList::implGetName( const Config& /*rCfg*/, sal_Int64 nKey ) const bool bFlag = getFlag( nKey, nMask ); if( bOnOff ) { - StringHelper::appendToken( aName, rFlagName.copy( 1 ) ); + StringHelper::appendToken( aName, rFlagName.subView( 1 ) ); aName.appendAscii( bFlag ? ":on" : ":off" ); } else @@ -1073,14 +1073,14 @@ OUString FlagsList::implGetName( const Config& /*rCfg*/, sal_Int64 nKey ) const if( !bNegated ) StringHelper::appendToken( aName, rFlagName ); else if( nBothSep > 0 ) - StringHelper::appendToken( aName, rFlagName.copy( nBothSep + 1 ) ); + StringHelper::appendToken( aName, rFlagName.subView( nBothSep + 1 ) ); } else if( bNegated ) { if( nBothSep > 0 ) - StringHelper::appendToken( aName, rFlagName.copy( 1, nBothSep - 1 ) ); + StringHelper::appendToken( aName, rFlagName.subView( 1, nBothSep - 1 ) ); else - StringHelper::appendToken( aName, rFlagName.copy( 1 ) ); + StringHelper::appendToken( aName, rFlagName.subView( 1 ) ); } } } diff --git a/oox/source/ole/vbamodule.cxx b/oox/source/ole/vbamodule.cxx index 7e913124730b..47c676cdc086 100644 --- a/oox/source/ole/vbamodule.cxx +++ b/oox/source/ole/vbamodule.cxx @@ -136,7 +136,7 @@ void VbaModule::createAndImportModule( StorageBase& rVbaStrg, void VbaModule::createEmptyModule( const Reference< container::XNameContainer >& rxBasicLib, const Reference< container::XNameAccess >& rxDocObjectNA ) const { - createModule( OUString(), rxBasicLib, rxDocObjectNA ); + createModule( u"", rxBasicLib, rxDocObjectNA ); } OUString VbaModule::readSourceCode( StorageBase& rVbaStrg ) const @@ -252,7 +252,7 @@ OUString VbaModule::readSourceCode( StorageBase& rVbaStrg ) const return aSourceCode.makeStringAndClear(); } -void VbaModule::createModule( const OUString& rVBASourceCode, +void VbaModule::createModule( std::u16string_view rVBASourceCode, const Reference< container::XNameContainer >& rxBasicLib, const Reference< container::XNameAccess >& rxDocObjectNA ) const { |