writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx |    2 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx          |   10 ++++----
 writerfilter/source/dmapper/FormControlHelper.cxx          |    2 -
 writerfilter/source/dmapper/TextEffectsHandler.cxx         |    2 -
 writerfilter/source/ooxml/OOXMLDocumentImpl.cxx            |    6 ++--
 writerfilter/source/ooxml/OOXMLStreamImpl.cxx              |   16 ++++++-------
 6 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit de087da9242a5d24fcc97b42e216e5375bca3f1b
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Oct 19 10:30:41 2023 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Sat Oct 21 00:00:47 2023 +0200

    Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: writerfilter
    
    Change-Id: I6d566f7d7d2ef3d7d5efdd3cc94f129c6b4dbbb3
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158292
    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 97a19ef8da68..10311ef8176e 100644
--- a/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/qa/cppunittests/dmapper/DomainMapper_Impl.cxx
@@ -74,7 +74,7 @@ CPPUNIT_TEST_FIXTURE(Test, testNumberingRestartStyleParent)
                                                                   
uno::UNO_QUERY);
     uno::Reference<container::XEnumeration> xParaEnum = 
xParaEnumAccess->createEnumeration();
     uno::Reference<beans::XPropertySet> xPara;
-    static constexpr OUStringLiteral aProp(u"ListLabelString");
+    static constexpr OUString aProp(u"ListLabelString"_ustr);
     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/writerfilter/source/dmapper/DomainMapper_Impl.cxx 
b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index fd27e92510d5..24071c73d1ea 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -799,7 +799,7 @@ void DomainMapper_Impl::RemoveLastParagraph( )
             return;
 
         uno::Reference<beans::XPropertySet> xDocProps(GetTextDocument(), 
uno::UNO_QUERY_THROW);
-        static constexpr OUStringLiteral RecordChanges(u"RecordChanges");
+        static constexpr OUString RecordChanges(u"RecordChanges"_ustr);
 
         comphelper::ScopeGuard redlineRestore(
             [xDocProps, aPreviousValue = 
xDocProps->getPropertyValue(RecordChanges)]()
@@ -4713,7 +4713,7 @@ static sal_Int16 lcl_ParseNumberingType( 
std::u16string_view rCommand )
     //  The command looks like: " PAGE \* Arabic "
     // tdf#132185: but may as well be "PAGE \* Arabic"
     OUString sNumber;
-    constexpr OUStringLiteral rSeparator(u"\\* ");
+    constexpr OUString rSeparator(u"\\* "_ustr);
     if (size_t nStartIndex = rCommand.find(rSeparator); nStartIndex != 
std::u16string_view::npos)
     {
         sal_Int32 nStartIndex2 = nStartIndex + rSeparator.getLength();
@@ -6299,9 +6299,9 @@ static uno::Sequence< beans::PropertyValues > 
lcl_createTOXLevelHyperlinks( bool
     std::vector<css::beans::PropertyValues> aNewLevel;
     aNewLevel.reserve(aLevel.getLength() + 5); // at most 5 added items
 
-    static constexpr OUStringLiteral tokType(u"TokenType");
-    static constexpr OUStringLiteral tokHStart(u"TokenHyperlinkStart");
-    static constexpr OUStringLiteral tokHEnd(u"TokenHyperlinkEnd");
+    static constexpr OUString tokType(u"TokenType"_ustr);
+    static constexpr OUString tokHStart(u"TokenHyperlinkStart"_ustr);
+    static constexpr OUString tokHEnd(u"TokenHyperlinkEnd"_ustr);
     static constexpr OUStringLiteral tokPNum(u"TokenPageNumber");
     static constexpr OUStringLiteral tokENum(u"TokenEntryNumber");
 
diff --git a/writerfilter/source/dmapper/FormControlHelper.cxx 
b/writerfilter/source/dmapper/FormControlHelper.cxx
index 751b96db385b..40f5d703815e 100644
--- a/writerfilter/source/dmapper/FormControlHelper.cxx
+++ b/writerfilter/source/dmapper/FormControlHelper.cxx
@@ -92,7 +92,7 @@ uno::Reference<form::XForm> const & 
FormControlHelper::FormControlHelper_Impl::g
         if (xFormsSupplier.is())
         {
             uno::Reference<container::XNameContainer> 
xFormsNamedContainer(xFormsSupplier->getForms());
-            static constexpr OUStringLiteral sDOCXForm = u"DOCX-Standard";
+            static constexpr OUString sDOCXForm = u"DOCX-Standard"_ustr;
 
             OUString sFormName(sDOCXForm);
             sal_uInt16 nUnique = 0;
diff --git a/writerfilter/source/dmapper/TextEffectsHandler.cxx 
b/writerfilter/source/dmapper/TextEffectsHandler.cxx
index 2a3deb5d0e87..35d7efbbfee2 100644
--- a/writerfilter/source/dmapper/TextEffectsHandler.cxx
+++ b/writerfilter/source/dmapper/TextEffectsHandler.cxx
@@ -71,7 +71,7 @@ OUString lclGetNameForElementId(sal_uInt32 aId)
     return aIdMap[aId];
 }
 
-constexpr OUStringLiteral constAttributesSequenceName = u"attributes";
+constexpr OUString constAttributesSequenceName = u"attributes"_ustr;
 
 }
 
diff --git a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx 
b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
index 26d8100f7e2b..1d1fee55a809 100644
--- a/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLDocumentImpl.cxx
@@ -619,11 +619,11 @@ const char sStylesTypeStrict[] = 
"http://purl.oclc.org/ooxml/officeDocument/rela
 const char sFonttableTypeStrict[] = 
"http://purl.oclc.org/ooxml/officeDocument/relationships/fontTable";;
 const char sWebSettingsStrict[] = 
"http://purl.oclc.org/ooxml/officeDocument/relationships/webSettings";;
 
-constexpr OUStringLiteral sId = u"Id";
+constexpr OUString sId = u"Id"_ustr;
 constexpr OUStringLiteral sType = u"Type";
-constexpr OUStringLiteral sTarget = u"Target";
+constexpr OUString sTarget = u"Target"_ustr;
 constexpr OUStringLiteral sTargetMode = u"TargetMode";
-constexpr OUStringLiteral sContentType = u"_contentType";
+constexpr OUString sContentType = u"_contentType"_ustr;
 constexpr OUStringLiteral sRelDom = u"_relDom";
 constexpr OUStringLiteral sSettingsContentType = 
u"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml";
 constexpr OUStringLiteral sStylesContentType = 
u"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml";
diff --git a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx 
b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
index 0db3eee44304..aa2567ad53b2 100644
--- a/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
+++ b/writerfilter/source/ooxml/OOXMLStreamImpl.cxx
@@ -136,17 +136,17 @@ bool OOXMLStreamImpl::lcl_getTarget(const 
uno::Reference<embed::XRelationshipAcc
     static constexpr OUStringLiteral sEndnotesType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/endnotes";;
     static constexpr OUStringLiteral sCommentsType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/comments";;
     static constexpr OUStringLiteral sThemeType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme";;
-    static constexpr OUStringLiteral sCustomType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml";;
+    static constexpr OUString sCustomType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXml"_ustr;
     static constexpr OUStringLiteral sCustomPropsType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/customXmlProps";;
     static constexpr OUStringLiteral sGlossaryType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/glossaryDocument";;
     static constexpr OUStringLiteral sWebSettings = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/webSettings";;
     static constexpr OUStringLiteral sSettingsType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/settings";;
-    static constexpr OUStringLiteral sChartType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart";;
-    static constexpr OUStringLiteral sEmbeddingsType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package";;
-    static constexpr OUStringLiteral sFooterType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer";;
-    static constexpr OUStringLiteral sHeaderType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header";;
+    static constexpr OUString sChartType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart"_ustr;
+    static constexpr OUString sEmbeddingsType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/package"_ustr;
+    static constexpr OUString sFooterType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/footer"_ustr;
+    static constexpr OUString sHeaderType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/header"_ustr;
     static constexpr OUStringLiteral sOleObjectType = 
u"http://schemas.openxmlformats.org/officeDocument/2006/relationships/oleObject";;
-    static constexpr OUStringLiteral sCommentsExtendedType = 
u"http://schemas.microsoft.com/office/2011/relationships/commentsExtended";;
+    static constexpr OUString sCommentsExtendedType = 
u"http://schemas.microsoft.com/office/2011/relationships/commentsExtended"_ustr;
     // OOXML strict
     static constexpr OUStringLiteral sDocumentTypeStrict = 
u"http://purl.oclc.org/ooxml/officeDocument/relationships/officeDocument";;
     static constexpr OUStringLiteral sStylesTypeStrict = 
u"http://purl.oclc.org/ooxml/officeDocument/relationships/styles";;
@@ -166,8 +166,8 @@ bool OOXMLStreamImpl::lcl_getTarget(const 
uno::Reference<embed::XRelationshipAcc
     static constexpr OUStringLiteral sFootersTypeStrict = 
u"http://purl.oclc.org/ooxml/officeDocument/relationships/footer";;
     static constexpr OUStringLiteral sHeaderTypeStrict = 
u"http://purl.oclc.org/ooxml/officeDocument/relationships/header";;
     static constexpr OUStringLiteral sOleObjectTypeStrict = 
u"http://purl.oclc.org/ooxml/officeDocument/relationships/oleObject";;
-    static constexpr OUStringLiteral sVBAProjectType = 
u"http://schemas.microsoft.com/office/2006/relationships/vbaProject";;
-    static constexpr OUStringLiteral sVBADataType = 
u"http://schemas.microsoft.com/office/2006/relationships/wordVbaData";;
+    static constexpr OUString sVBAProjectType = 
u"http://schemas.microsoft.com/office/2006/relationships/vbaProject"_ustr;
+    static constexpr OUString sVBADataType = 
u"http://schemas.microsoft.com/office/2006/relationships/wordVbaData"_ustr;
 
     OUString sStreamType;
     OUString sStreamTypeStrict;

Reply via email to