summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-04-29 11:06:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-05-01 08:30:18 +0200
commit5200a73627d13e2997f81b53f61e143e77e328ee (patch)
treef95c8346d061ecd0ad33d574895d18e169662785 /sfx2
parentb90d3d316dd9c720c83180b31f6bbd7003fead78 (diff)
use more string_view in various
found by examining uses of OUString::copy() for likely places Change-Id: I6ff20e7b273ad6005410b82719183c1122f8c018 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133617 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/classificationhelper.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/view/classificationhelper.cxx b/sfx2/source/view/classificationhelper.cxx
index 457872bf9da2..12679c3b1cf6 100644
--- a/sfx2/source/view/classificationhelper.cxx
+++ b/sfx2/source/view/classificationhelper.cxx
@@ -385,10 +385,10 @@ void SfxClassificationHelper::Impl::parsePolicy()
OUString aExtension(".xml");
if (aPath.endsWith(aExtension) && m_bUseLocalized)
{
- OUString aBase = aPath.copy(0, aPath.getLength() - aExtension.getLength());
+ std::u16string_view aBase = aPath.subView(0, aPath.getLength() - aExtension.getLength());
const LanguageTag& rLanguageTag = Application::GetSettings().GetLanguageTag();
// Expected format is "<original path>_xx-XX.xml".
- OUString aLocalized = aBase + "_" + rLanguageTag.getBcp47() + aExtension;
+ OUString aLocalized = OUString::Concat(aBase) + "_" + rLanguageTag.getBcp47() + aExtension;
if (FStatHelper::IsDocument(aLocalized))
aPath = aLocalized;
}