summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-12-22 20:01:28 +0100
committerStephan Bergmann <sbergman@redhat.com>2020-12-23 07:34:10 +0100
commitca7d0835008b2333eaebe88030f94b5e072d0eb6 (patch)
tree0f976a8641349417f478cf89c641b1b78bb6760d /xmloff
parentbbf65fd839a757b0f446c1cffb7938f82a6a1e67 (diff)
Fix dubious OUStringLiteral with automatic storage duration
Change-Id: I0c80ce6efbbc950ce975e55663a5643ea8fb37f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108215 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/style/xmlstyle.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index ced74c90aab5..9453e1963729 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -51,6 +51,7 @@
#include <memory>
#include <set>
+#include <string_view>
#include <vector>
using namespace ::com::sun::star;
@@ -598,7 +599,7 @@ Reference < XAutoStyleFamily > SvXMLStylesContext::GetAutoStyles( XmlStyleFamily
xAutoStyles = mxParaAutoStyles;
else
{
- OUStringLiteral sName = bPara ? OUStringLiteral( u"ParagraphStyles" ): OUStringLiteral( u"CharacterStyles" );
+ OUString sName(bPara ? std::u16string_view( u"ParagraphStyles" ): std::u16string_view( u"CharacterStyles" ));
Reference< XAutoStylesSupplier > xAutoStylesSupp( GetImport().GetModel(), UNO_QUERY );
Reference< XAutoStyles > xAutoStyleFamilies = xAutoStylesSupp->getAutoStyles();
if (xAutoStyleFamilies->hasByName(sName))