summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2023-11-19 13:24:45 +0100
committerStephan Bergmann <sbergman@redhat.com>2023-11-19 17:29:19 +0100
commita0d65383417dfe36c09bc4758efb8d5896674ec0 (patch)
treee3d78805feba23fc550953d2d46befd5cd8fb4bd
parentdb9104a366a57cc66f87467af8a329772d3f3b52 (diff)
Extended loplugin:ostr: unodevtools
Change-Id: If72d80bd748186b974b37d58aa1469af1ffdb34d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159667 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r--unodevtools/source/skeletonmaker/cppcompskeleton.cxx10
-rw-r--r--unodevtools/source/skeletonmaker/cpptypemaker.cxx8
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx12
-rw-r--r--unodevtools/source/skeletonmaker/javatypemaker.cxx4
4 files changed, 17 insertions, 17 deletions
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;