comphelper/source/container/embeddedobjectcontainer.cxx           |    2 -
 comphelper/source/misc/backupfilehelper.cxx                       |    8 ++--
 comphelper/source/misc/numberedcollection.cxx                     |    2 -
 comphelper/source/officeinstdir/officeinstallationdirectories.cxx |    4 +-
 comphelper/source/xml/ofopxmlhelper.cxx                           |   20 
+++++-----
 5 files changed, 18 insertions(+), 18 deletions(-)

New commits:
commit 7cd27b446193e5973ef73d207d0c6dfe5f0ddea9
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Thu Oct 19 10:30:06 2023 +0200
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Thu Oct 19 13:22:15 2023 +0200

    Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: comphelper
    
    Change-Id: I2a422f921739adf81131082d57ab7601dfb46d8e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158147
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/comphelper/source/container/embeddedobjectcontainer.cxx 
b/comphelper/source/container/embeddedobjectcontainer.cxx
index 094597fe6d06..9a971b41b3f6 100644
--- a/comphelper/source/container/embeddedobjectcontainer.cxx
+++ b/comphelper/source/container/embeddedobjectcontainer.cxx
@@ -913,7 +913,7 @@ bool EmbeddedObjectContainer::RemoveEmbeddedObject( const 
uno::Reference < embed
                     //             the media type will be provided with object 
insertion
                     OUString aOrigStorMediaType;
                     uno::Reference< beans::XPropertySet > xStorProps( 
pImpl->mxStorage, uno::UNO_QUERY_THROW );
-                    static constexpr OUStringLiteral 
s_sMediaType(u"MediaType");
+                    static constexpr OUString s_sMediaType(u"MediaType"_ustr);
                     xStorProps->getPropertyValue( s_sMediaType ) >>= 
aOrigStorMediaType;
 
                     SAL_WARN_IF( aOrigStorMediaType.isEmpty(), 
"comphelper.container", "No valuable media type in the storage!" );
diff --git a/comphelper/source/misc/backupfilehelper.cxx 
b/comphelper/source/misc/backupfilehelper.cxx
index 9cd61f6f4c14..87e1035aa015 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -354,7 +354,7 @@ namespace
 
     typedef std::vector< ExtensionInfoEntry > ExtensionInfoEntryVector;
 
-    constexpr OUStringLiteral gaRegPath { 
u"/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend/backenddb.xml"
 };
+    constexpr OUString gaRegPath { 
u"/registry/com.sun.star.comp.deployment.bundle.PackageRegistryBackend/backenddb.xml"_ustr
 };
 
     class ExtensionInfo
     {
@@ -661,8 +661,8 @@ namespace
             const ExtensionInfoEntryVector& rToBeEnabled,
             const ExtensionInfoEntryVector& rToBeDisabled)
         {
-            static constexpr OUStringLiteral 
aRegPathFront(u"/uno_packages/cache/registry/com.sun.star.comp.deployment.");
-            static constexpr OUStringLiteral 
aRegPathBack(u".PackageRegistryBackend/backenddb.xml");
+            static constexpr OUString 
aRegPathFront(u"/uno_packages/cache/registry/com.sun.star.comp.deployment."_ustr);
+            static constexpr OUString 
aRegPathBack(u".PackageRegistryBackend/backenddb.xml"_ustr);
             // first appearance to check
             {
                 const OUString 
aUnoPackagReg(OUString::Concat(rUserConfigWorkURL) + aRegPathFront + "bundle" + 
aRegPathBack);
@@ -1467,7 +1467,7 @@ namespace comphelper
             // points to registrymodifications.xcu
             OUString conf("${CONFIGURATION_LAYERS}");
             rtl::Bootstrap::expandMacros(conf);
-            static constexpr OUStringLiteral aTokenUser(u"user:");
+            static constexpr OUString aTokenUser(u"user:"_ustr);
             sal_Int32 nStart(conf.indexOf(aTokenUser));
 
             if (-1 != nStart)
diff --git a/comphelper/source/misc/numberedcollection.cxx 
b/comphelper/source/misc/numberedcollection.cxx
index 80d33776c420..9dec18e66a06 100644
--- a/comphelper/source/misc/numberedcollection.cxx
+++ b/comphelper/source/misc/numberedcollection.cxx
@@ -24,7 +24,7 @@
 
 namespace comphelper{
 
-constexpr OUStringLiteral ERRMSG_INVALID_COMPONENT_PARAM = u"NULL as component 
reference not allowed.";
+constexpr OUString ERRMSG_INVALID_COMPONENT_PARAM = u"NULL as component 
reference not allowed."_ustr;
 
 
 NumberedCollection::NumberedCollection()
diff --git a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx 
b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
index 582bdc125f78..010655964dcc 100644
--- a/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
+++ b/comphelper/source/officeinstdir/officeinstallationdirectories.cxx
@@ -75,8 +75,8 @@ static bool makeCanonicalFileURL( OUString & rURL )
 
 namespace comphelper {
 
-constexpr OUStringLiteral g_aOfficeBrandDirMacro(u"$(brandbaseurl)");
-constexpr OUStringLiteral g_aUserDirMacro(u"$(userdataurl)");
+constexpr OUString g_aOfficeBrandDirMacro(u"$(brandbaseurl)"_ustr);
+constexpr OUString g_aUserDirMacro(u"$(userdataurl)"_ustr);
 
 OfficeInstallationDirectories::OfficeInstallationDirectories(
         uno::Reference< uno::XComponentContext > xCtx )
diff --git a/comphelper/source/xml/ofopxmlhelper.cxx 
b/comphelper/source/xml/ofopxmlhelper.cxx
index a2797ef3a49b..a672bf57a6fb 100644
--- a/comphelper/source/xml/ofopxmlhelper.cxx
+++ b/comphelper/source/xml/ofopxmlhelper.cxx
@@ -193,11 +193,11 @@ void WriteContentSequence(
 
     xWriter->setOutputStream( xOutStream );
 
-    static constexpr OUStringLiteral aTypesElement(u"Types");
-    static constexpr OUStringLiteral aDefaultElement(u"Default");
-    static constexpr OUStringLiteral aOverrideElement(u"Override");
-    static constexpr OUStringLiteral aContentTypeAttr(u"ContentType");
-    static constexpr OUStringLiteral aWhiteSpace(u" ");
+    static constexpr OUString aTypesElement(u"Types"_ustr);
+    static constexpr OUString aDefaultElement(u"Default"_ustr);
+    static constexpr OUString aOverrideElement(u"Override"_ustr);
+    static constexpr OUString aContentTypeAttr(u"ContentType"_ustr);
+    static constexpr OUString aWhiteSpace(u" "_ustr);
 
     // write the namespace
     rtl::Reference<AttributeList> pRootAttrList = new AttributeList;
@@ -262,10 +262,10 @@ uno::Sequence< uno::Sequence< beans::StringPair > > 
ReadSequence_Impl(
 // Relations info related strings
 constexpr OUStringLiteral g_aRelListElement(u"Relationships");
 constexpr OUStringLiteral g_aRelElement( u"Relationship" );
-constexpr OUStringLiteral g_aIDAttr( u"Id" );
-constexpr OUStringLiteral g_aTypeAttr( u"Type" );
-constexpr OUStringLiteral g_aTargetModeAttr( u"TargetMode" );
-constexpr OUStringLiteral g_aTargetAttr( u"Target" );
+constexpr OUString g_aIDAttr( u"Id"_ustr );
+constexpr OUString g_aTypeAttr( u"Type"_ustr );
+constexpr OUString g_aTargetModeAttr( u"TargetMode"_ustr );
+constexpr OUString g_aTargetAttr( u"Target"_ustr );
 
 // ContentType related strings
 constexpr OUStringLiteral g_aTypesElement( u"Types" );
@@ -273,7 +273,7 @@ constexpr OUStringLiteral g_aDefaultElement( u"Default" );
 constexpr OUStringLiteral g_aOverrideElement( u"Override" );
 constexpr OUStringLiteral g_aExtensionAttr( u"Extension" );
 constexpr OUStringLiteral g_aPartNameAttr( u"PartName" );
-constexpr OUStringLiteral g_aContentTypeAttr( u"ContentType" );
+constexpr OUString g_aContentTypeAttr( u"ContentType"_ustr );
 
 OFOPXMLHelper_Impl::OFOPXMLHelper_Impl( sal_uInt16 nFormat )
 : m_nFormat( nFormat )

Reply via email to