test/qa/cppunit/test_xpath.cxx                        |   16 ++++++++--------
 unodevtools/source/skeletonmaker/cppcompskeleton.cxx  |   10 +++++-----
 unodevtools/source/skeletonmaker/cpptypemaker.cxx     |    8 ++++----
 unodevtools/source/skeletonmaker/javacompskeleton.cxx |   12 ++++++------
 unodevtools/source/skeletonmaker/javatypemaker.cxx    |    4 ++--
 5 files changed, 25 insertions(+), 25 deletions(-)

New commits:
commit 35972b1fbe3dd26c2e384d6e65ef77ef90d5d2a3
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Sun Nov 19 13:25:13 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Sun Nov 19 17:29:33 2023 +0100

    Extended loplugin:ostr: test
    
    Change-Id: Ia4dfbd1afcf01028d8292ca656979d7017196244
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159669
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/test/qa/cppunit/test_xpath.cxx b/test/qa/cppunit/test_xpath.cxx
index 599ae8dbcfc1..8d105dd4eae6 100644
--- a/test/qa/cppunit/test_xpath.cxx
+++ b/test/qa/cppunit/test_xpath.cxx
@@ -25,20 +25,20 @@ CPPUNIT_TEST_FIXTURE(TestXPath, test_getXPath)
     xmlDocUniquePtr pTable(xmlParseDoc(s_xml));
     CPPUNIT_ASSERT(pTable);
     // Must get existing element content without errors
-    CPPUNIT_ASSERT_ASSERTION_PASS(assertXPath(pTable, "/xml/item"));
+    CPPUNIT_ASSERT_ASSERTION_PASS(assertXPath(pTable, "/xml/item"_ostr));
     // Must error out when getting non-existing element
-    CPPUNIT_ASSERT_ASSERTION_FAIL(assertXPath(pTable, "/xml/no_item"));
+    CPPUNIT_ASSERT_ASSERTION_FAIL(assertXPath(pTable, "/xml/no_item"_ostr));
     // Must get existing attribute value correctly
-    CPPUNIT_ASSERT_ASSERTION_PASS(getXPath(pTable, "/xml/item", "attrib"));
+    CPPUNIT_ASSERT_ASSERTION_PASS(getXPath(pTable, "/xml/item"_ostr, 
"attrib"_ostr));
     // Must fail when requested non-empty attribute doesn't exist
-    CPPUNIT_ASSERT_ASSERTION_FAIL(getXPath(pTable, "/xml/item", "no_attrib"));
+    CPPUNIT_ASSERT_ASSERTION_FAIL(getXPath(pTable, "/xml/item"_ostr, 
"no_attrib"_ostr));
     // Must properly return attribute content
-    CPPUNIT_ASSERT_EQUAL(OUString("val"), getXPath(pTable, "/xml/item", 
"attrib"));
+    CPPUNIT_ASSERT_EQUAL(OUString("val"), getXPath(pTable, "/xml/item"_ostr, 
"attrib"_ostr));
     // Trying to get position of missing child of a node must fail assertion
-    CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pTable, "/xml/item", 
"absent"));
+    CPPUNIT_ASSERT_ASSERTION_FAIL(getXPathPosition(pTable, "/xml/item"_ostr, 
"absent"));
     // Asserting that an attribute is absent
-    CPPUNIT_ASSERT_ASSERTION_FAIL(assertXPathNoAttribute(pTable, "/xml/item", 
"attrib"));
-    CPPUNIT_ASSERT_ASSERTION_PASS(assertXPathNoAttribute(pTable, "/xml/item", 
"foo"));
+    CPPUNIT_ASSERT_ASSERTION_FAIL(assertXPathNoAttribute(pTable, 
"/xml/item"_ostr, "attrib"_ostr));
+    CPPUNIT_ASSERT_ASSERTION_PASS(assertXPathNoAttribute(pTable, 
"/xml/item"_ostr, "foo"_ostr));
 }
 
 CPPUNIT_PLUGIN_IMPLEMENT();
commit a0d65383417dfe36c09bc4758efb8d5896674ec0
Author:     Stephan Bergmann <sberg...@redhat.com>
AuthorDate: Sun Nov 19 13:24:45 2023 +0100
Commit:     Stephan Bergmann <sberg...@redhat.com>
CommitDate: Sun Nov 19 17:29:19 2023 +0100

    Extended loplugin:ostr: unodevtools
    
    Change-Id: If72d80bd748186b974b37d58aa1469af1ffdb34d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159667
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sberg...@redhat.com>

diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx 
b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index b17c35c90c84..8fbb96c19452 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -679,7 +679,7 @@ static OString generateClassDefinition(std::ostream& o,
     codemaker::GeneratedTypeSet generated;
     for (const auto& rIface : interfaces)
     {
-        printMethods(o, options, manager, rIface, generated, "", "", "    ",
+        printMethods(o, options, manager, rIface, generated, ""_ostr, ""_ostr, 
"    "_ostr,
                      true, propertyhelper);
     }
 
@@ -864,8 +864,8 @@ static void generateMethodBodies(std::ostream& o,
             generateXServiceInfoBodies(o, name, comphelpernamespace);
             generated.add(u2b(rIface));
         } else {
-            printMethods(o, options, manager, rIface, generated, "_",
-                         name, "", true, propertyhelper);
+            printMethods(o, options, manager, rIface, generated, "_"_ostr,
+                         name, ""_ostr, true, propertyhelper);
         }
     }
 }
@@ -971,7 +971,7 @@ void generateSkeleton(ProgramOptions const & options,
     OString compFileName;
     OString tmpFileName;
     std::ostream* pofs = nullptr;
-    bool standardout = getOutputStream(options, ".cxx",
+    bool standardout = getOutputStream(options, ".cxx"_ostr,
                                        &pofs, compFileName, tmpFileName);
 
     try {
@@ -1129,7 +1129,7 @@ void generateCalcAddin(ProgramOptions const & options,
     OString compFileName;
     OString tmpFileName;
     std::ostream* pofs = nullptr;
-    bool standardout = getOutputStream(options, ".cxx",
+    bool standardout = getOutputStream(options, ".cxx"_ostr,
                                        &pofs, compFileName, tmpFileName);
 
     try {
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx 
b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
index 62f86056573f..5e5e165b2fbc 100644
--- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx
@@ -415,7 +415,7 @@ void printMethods(std::ostream & o,
         return;
     }
 
-    static OString sd("_");
+    static OString sd("_"_ostr);
     bool body = !delegate.isEmpty();
     bool defaultbody = delegate == sd;
 
@@ -452,9 +452,9 @@ void printMethods(std::ostream & o,
             generated.add(u2b(name));
 
             // special handling of XLocalizable -> parent of XAddIn
-            if (!generated.contains("com.sun.star.lang.XLocalizable")) {
+            if (!generated.contains("com.sun.star.lang.XLocalizable"_ostr)) {
                 generateXLocalizable(o, classname);
-                generated.add("com.sun.star.lang.XLocalizable");
+                generated.add("com.sun.star.lang.XLocalizable"_ostr);
             }
             return;
         } else if (name == "com.sun.star.lang.XLocalizable") {
@@ -853,7 +853,7 @@ void generateDocumentation(std::ostream & o,
                 codemaker::GeneratedTypeSet generated;
                 printMethods(
                     o, options, manager, nucleus, generated, delegate,
-                    options.implname, "");
+                    options.implname, ""_ostr);
             }
             break;
 
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx 
b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index e5f15a180d51..1de92fac0bc2 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -509,9 +509,9 @@ static void generateMethodBodies(std::ostream& o,
                     generated.add(u2b(type));
 
                     // special handling of XLocalizable -> parent of XAddIn
-                    if (!generated.contains("com.sun.star.lang.XLocalizable")) 
{
+                    if 
(!generated.contains("com.sun.star.lang.XLocalizable"_ostr)) {
                         generateXLocalizableBodies(o);
-                        generated.add("com.sun.star.lang.XLocalizable");
+                        generated.add("com.sun.star.lang.XLocalizable"_ostr);
                     }
                     continue;
                 } else if (type == "com.sun.star.lang.XLocalizable") {
@@ -539,7 +539,7 @@ static void generateMethodBodies(std::ostream& o,
                     continue;
                 }
             }
-            printMethods(o, options, manager, type, generated, "_",
+            printMethods(o, options, manager, type, generated, "_"_ostr,
                          indentation, true, usepropertymixin);
         }
     }
@@ -776,7 +776,7 @@ static void generateClassDefinition(std::ostream& o,
         o << "\n    public " << classname << "( XComponentContext context )\n"
             "    {\n        m_xContext = context;\n";
         if (propertyhelper == "_") {
-            registerProperties(o, properties, "        ");
+            registerProperties(o, properties, "        "_ostr);
         } else {
             if (propertyhelper.getLength() > 1) {
                 o << propcomment
@@ -793,7 +793,7 @@ static void generateClassDefinition(std::ostream& o,
         generateCompFunctions(o, classname);
 
     generateMethodBodies(o, options, manager, interfaces,
-                         "    ", propertyhelper.getLength() > 1);
+                         "    "_ostr, propertyhelper.getLength() > 1);
 
     // end of class definition
     o << "}\n";
@@ -869,7 +869,7 @@ void generateSkeleton(ProgramOptions const & options,
     OString compFileName;
     OString tmpFileName;
     std::ostream* pofs = nullptr;
-    bool standardout = getOutputStream(options, ".java",
+    bool standardout = getOutputStream(options, ".java"_ostr,
                                        &pofs, compFileName, tmpFileName);
 
     try {
diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx 
b/unodevtools/source/skeletonmaker/javatypemaker.cxx
index d576f5a1dd12..803090ab2249 100644
--- a/unodevtools/source/skeletonmaker/javatypemaker.cxx
+++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx
@@ -422,7 +422,7 @@ void printMethods(std::ostream & o,
         }
     }
 
-    static OString sd("_");
+    static OString sd("_"_ostr);
     bool body = !delegate.isEmpty();
     bool defaultbody = delegate == sd;
 
@@ -752,7 +752,7 @@ void generateDocumentation(std::ostream & o,
                 o << "; " << (options.all ? "all" : "direct") << " methods:\n";
                 codemaker::GeneratedTypeSet generated;
                 printMethods(
-                    o, options, manager, nucleus, generated, delegate, "");
+                    o, options, manager, nucleus, generated, delegate, 
""_ostr);
             }
             break;
 

Reply via email to