From ca7d0835008b2333eaebe88030f94b5e072d0eb6 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Tue, 22 Dec 2020 20:01:28 +0100 Subject: 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 --- xmloff/source/style/xmlstyle.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'xmloff') 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 #include +#include #include 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)) -- cgit