summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-01-28 20:29:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-01-29 09:25:12 +0100
commit1250aecd71fabde4dba990bfceb61bbe8e06b8ea (patch)
tree3c42ffdf68b7e81aba29228631a8cd34e2f11830 /xmloff
parent4f3987e0b1a995431478769c898b5ef151745254 (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 'xmloff')
-rw-r--r--xmloff/source/core/DomExport.cxx4
-rw-r--r--xmloff/source/style/xmlnumfe.cxx8
-rw-r--r--xmloff/source/style/xmlnumfi.cxx6
-rw-r--r--xmloff/source/text/XMLTextListAutoStylePool.cxx4
4 files changed, 11 insertions, 11 deletions
diff --git a/xmloff/source/core/DomExport.cxx b/xmloff/source/core/DomExport.cxx
index e6362d7678ce..9d26d68b1cee 100644
--- a/xmloff/source/core/DomExport.cxx
+++ b/xmloff/source/core/DomExport.cxx
@@ -128,7 +128,7 @@ class DomExport: public DomVisitor
void pushNamespace();
void addNamespace( const OUString& sPrefix, const OUString& sURI );
OUString qualifiedName( const OUString& sPrefix, const OUString& sURI,
- const OUString& sLocalName );
+ std::u16string_view sLocalName );
OUString qualifiedName( const Reference<XElement>& );
OUString qualifiedName( const Reference<XAttr>& );
void addAttribute( const Reference<XAttr>& );
@@ -181,7 +181,7 @@ void DomExport::addNamespace( const OUString& sPrefix, const OUString& sURI )
OUString DomExport::qualifiedName( const OUString& sPrefix,
const OUString& sURI,
- const OUString& sLocalName )
+ std::u16string_view sLocalName )
{
OUStringBuffer sBuffer;
if( !sPrefix.isEmpty() && !sURI.isEmpty() )
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 9be8b434df31..b961eb2620f5 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -273,7 +273,7 @@ SvXMLNumFmtExport::~SvXMLNumFmtExport()
// helper methods
-static OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, bool bDefPart, const OUString& rPrefix )
+static OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, bool bDefPart, std::u16string_view rPrefix )
{
OUStringBuffer aFmtName(10);
aFmtName.append( rPrefix );
@@ -313,7 +313,7 @@ void SvXMLNumFmtExport::AddLanguageAttr_Impl( LanguageType nLang )
// methods to write individual elements within a format
-void SvXMLNumFmtExport::AddToTextElement_Impl( const OUString& rString )
+void SvXMLNumFmtExport::AddToTextElement_Impl( std::u16string_view rString )
{
// append to sTextContent, write element in FinishTextElement_Impl
// to avoid several text elements following each other
@@ -899,7 +899,7 @@ bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString,
// text before currency symbol
if ( nPos > 0 )
{
- AddToTextElement_Impl( rString.copy( 0, nPos ) );
+ AddToTextElement_Impl( rString.subView( 0, nPos ) );
}
// currency symbol (empty string -> default)
WriteCurrencyElement_Impl( "", "" );
@@ -908,7 +908,7 @@ bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString,
// text after currency symbol
if ( nCont < nLength )
{
- AddToTextElement_Impl( rString.copy( nCont, nLength-nCont ) );
+ AddToTextElement_Impl( rString.subView( nCont, nLength-nCont ) );
}
}
else
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 652ff02b6a2b..b33715726b92 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -1064,9 +1064,9 @@ void SvXMLNumFmtElementContext::endFastElement(sal_Int32 )
rParent.AddNumber( aNumInfo ); // simple number
if ( aNumInfo.bExpSign )
- rParent.AddToCode( "E+" );
+ rParent.AddToCode( u"E+" );
else
- rParent.AddToCode( "E" );
+ rParent.AddToCode( u"E" );
for (sal_Int32 i=0; i<aNumInfo.nExpDigits; i++)
{
rParent.AddToCode( '0' );
@@ -1621,7 +1621,7 @@ void SvXMLNumFormatContext::AddToCode( sal_Unicode c )
bHasExtraText = true;
}
-void SvXMLNumFormatContext::AddToCode( const OUString& rString )
+void SvXMLNumFormatContext::AddToCode( std::u16string_view rString )
{
aFormatCode.append( rString );
bHasExtraText = true;
diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx
index 2779e41d6ba9..d2744cb18a38 100644
--- a/xmloff/source/text/XMLTextListAutoStylePool.cxx
+++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx
@@ -54,7 +54,7 @@ public:
sal_uInt32 nPos,
const Reference < XIndexReplace > & rNumRules,
XMLTextListAutoStylePoolNames_Impl& rNames,
- const OUString& rPrefix,
+ std::u16string_view rPrefix,
sal_uInt32& rName );
explicit XMLTextListAutoStylePoolEntry_Impl(
@@ -90,7 +90,7 @@ XMLTextListAutoStylePoolEntry_Impl::XMLTextListAutoStylePoolEntry_Impl(
sal_uInt32 nP,
const Reference < XIndexReplace > & rNumRules,
XMLTextListAutoStylePoolNames_Impl& rNames,
- const OUString& rPrefix,
+ std::u16string_view rPrefix,
sal_uInt32& rName ) :
xNumRules( rNumRules ),
nPos( nP ),