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>
This commit is contained in:
Stephan Bergmann
2023-11-19 13:24:45 +01:00
parent db9104a366
commit a0d6538341
4 changed files with 17 additions and 17 deletions

View File

@@ -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 {

View File

@@ -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;

View File

@@ -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 {

View File

@@ -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;