diff options
author | Noel <noel.grandin@collabora.co.uk> | 2021-01-28 11:01:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-28 11:11:28 +0100 |
commit | 1da69081732c8a429840edaaf10cfb789ea68df8 (patch) | |
tree | f343c9559e9dfb0263f7e33fe4306f81ec60e3fa /xmloff | |
parent | b3737c638671ab39c5e6aaeaf5426d102392cc0a (diff) |
add string_view variants of methods to O[U]StringBuffer
and update the stringview loplugin to detect cases where we can
use these new methods.
Change-Id: I998efe02e35c8efcb3abfb4d7186165bbe6dfb2c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110046
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/meta/xmlmetai.cxx | 2 | ||||
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/xmloff/source/meta/xmlmetai.cxx b/xmloff/source/meta/xmlmetai.cxx index 14721440bf9b..6e2a485ca828 100644 --- a/xmloff/source/meta/xmlmetai.cxx +++ b/xmloff/source/meta/xmlmetai.cxx @@ -244,7 +244,7 @@ void SvXMLMetaDocumentContext::setBuildId(OUString const& i_rBuildId, const uno: if ( nEnd != -1 ) { OUStringBuffer sBuffer( - i_rBuildId.copy( nBegin+1, nEnd-nBegin-1 ) ); + i_rBuildId.subView( nBegin+1, nEnd-nBegin-1 ) ); const OUString sBuildCompare( "$Build-" ); nBegin = i_rBuildId.indexOf( sBuildCompare, nEnd ); diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 1e54872ada83..652ff02b6a2b 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1832,9 +1832,9 @@ void SvXMLNumFormatContext::AddCurrency( const OUString& rContent, LanguageType // remove both quotes from aFormatCode OUString aOld = aFormatCode.makeStringAndClear(); if ( nFirst > 0 ) - aFormatCode.append( aOld.copy( 0, nFirst ) ); + aFormatCode.append( aOld.subView( 0, nFirst ) ); if ( nLength > nFirst + 2 ) - aFormatCode.append( aOld.copy( nFirst + 1, nLength - nFirst - 2 ) ); + aFormatCode.append( aOld.subView( nFirst + 1, nLength - nFirst - 2 ) ); } } } |