summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2021-12-26 10:03:40 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2021-12-26 20:36:26 +0100
commita23a7eea5cfcdc50d09be248828cb1e6293e5ebb (patch)
treee415782b558350673175f80836d022c4882c9a7d /xmloff
parentcc517c687de7205487936d40b64481107656f239 (diff)
Avoid OUStringBuffer::toString where possible
Change-Id: I99abbe97a48b2077e28d6221fb70036e5e412657 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127479 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/draw/ximpcustomshape.cxx2
-rw-r--r--xmloff/source/style/xmlnumfi.cxx5
2 files changed, 3 insertions, 4 deletions
diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx
index cf794da63df6..c8dbf70ba143 100644
--- a/xmloff/source/draw/ximpcustomshape.cxx
+++ b/xmloff/source/draw/ximpcustomshape.cxx
@@ -935,7 +935,7 @@ void XMLEnhancedCustomShapeContext::startFastElement(
rDepth.Value <<= fDepth;
}
}
- if ( rValue.matchIgnoreAsciiCase( aUnitStr.toString(), nIndex ) )
+ if ( rValue.matchIgnoreAsciiCase( aUnitStr, nIndex ) )
nIndex += aUnitStr.getLength();
// skipping white spaces
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 87f653873904..e4083d3517ba 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -546,8 +546,7 @@ static void lcl_EnquoteIfNecessary( OUStringBuffer& rContent, const SvXMLNumForm
// the percent character in percentage styles must be left out of quoting
// (one occurrence is enough even if there are several percent characters in the string)
- OUString aString( rContent.toString() );
- sal_Int32 nPos = aString.indexOf( '%' );
+ sal_Int32 nPos = rContent.indexOf( '%' );
if ( nPos >= 0 )
{
if ( nPos + 1 < nLength )
@@ -861,7 +860,7 @@ void SvXMLNumFmtElementContext::endFastElement(sal_Int32 )
{
case SvXMLStyleTokens::Text:
if ( rParent.HasLongDoW() &&
- aContent.toString() == rParent.GetLocaleData().getLongDateDayOfWeekSep() )
+ std::u16string_view(aContent) == rParent.GetLocaleData().getLongDateDayOfWeekSep() )
{
// skip separator constant after long day of week
// (NF_KEY_NNNN contains the separator)