writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx |    2 +-
 xmloff/source/style/xmlstyle.cxx                           |    3 ++-
 2 files changed, 3 insertions(+), 2 deletions(-)

New commits:
commit ca7d0835008b2333eaebe88030f94b5e072d0eb6
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Tue Dec 22 20:01:28 2020 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Wed Dec 23 07:34:10 2020 +0100

    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 <sberg...@redhat.com>

diff --git a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
index 77bd616f37d6..355b61898cf8 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
@@ -90,7 +90,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNumberingRestartStyleParent)
                                                                   
uno::UNO_QUERY);
     uno::Reference<container::XEnumeration> xParaEnum = 
xParaEnumAccess->createEnumeration();
     uno::Reference<beans::XPropertySet> xPara;
-    OUStringLiteral aProp(u"ListLabelString");
+    static OUStringLiteral aProp(u"ListLabelString");
     xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(OUString("A."), 
xPara->getPropertyValue(aProp).get<OUString>());
     xPara.set(xParaEnum->nextElement(), uno::UNO_QUERY);
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))
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to