summaryrefslogtreecommitdiff
path: root/codemaker
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2024-04-26 13:59:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2024-04-26 19:44:07 +0200
commit59ad8d6d15c893e8873f4afb55a24ab3e58fa2c1 (patch)
treeaa43c239a8b91a6eef900264d2650cbe3d6505c6 /codemaker
parentfe0d8555150949bb8729c656af62917ffc48bbf8 (diff)
loplugin:ostr in codemaker,unoidl
Change-Id: I75f5531023f31da029491ce4a078005eebbfe59e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166738 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins
Diffstat (limited to 'codemaker')
-rw-r--r--codemaker/source/codemaker/codemaker.cxx2
-rw-r--r--codemaker/source/codemaker/typemanager.cxx2
-rw-r--r--codemaker/source/cppumaker/cppumaker.cxx8
-rw-r--r--codemaker/source/cppumaker/cpputype.cxx114
-rw-r--r--codemaker/source/javamaker/classfile.cxx20
-rw-r--r--codemaker/source/javamaker/javamaker.cxx2
-rw-r--r--codemaker/source/javamaker/javatype.cxx48
7 files changed, 98 insertions, 98 deletions
diff --git a/codemaker/source/codemaker/codemaker.cxx b/codemaker/source/codemaker/codemaker.cxx
index cb797533e2b9..df93ed2f5662 100644
--- a/codemaker/source/codemaker/codemaker.cxx
+++ b/codemaker/source/codemaker/codemaker.cxx
@@ -36,7 +36,7 @@ OString convertString(OUString const & string) {
| RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR)))
{
throw CannotDumpException(
- "Failure converting string from UTF-16 to UTF-8");
+ u"Failure converting string from UTF-16 to UTF-8"_ustr);
}
return s;
}
diff --git a/codemaker/source/codemaker/typemanager.cxx b/codemaker/source/codemaker/typemanager.cxx
index 194840ca9d5b..48588e2c4200 100644
--- a/codemaker/source/codemaker/typemanager.cxx
+++ b/codemaker/source/codemaker/typemanager.cxx
@@ -62,7 +62,7 @@ codemaker::UnoType::Sort TypeManager::getSort(
{
if (name.isEmpty()) {
if (cursor != nullptr) {
- *cursor = manager_->createCursor("");
+ *cursor = manager_->createCursor(u""_ustr);
}
return codemaker::UnoType::Sort::Module;
}
diff --git a/codemaker/source/cppumaker/cppumaker.cxx b/codemaker/source/cppumaker/cppumaker.cxx
index 5e666456c301..3fe5c8855712 100644
--- a/codemaker/source/cppumaker/cppumaker.cxx
+++ b/codemaker/source/cppumaker/cppumaker.cxx
@@ -70,7 +70,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
}
}
} else {
- produce("", typeMgr, generated, options);
+ produce(u""_ustr, typeMgr, generated, options);
}
if (!options.isValid("-nD"_ostr)) {
// C++ header files generated for the following UNO types are
@@ -78,12 +78,12 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
// Reference.hxx, Type.h), so it seems best to always generate those
// C++ header files:
produce(
- "com.sun.star.uno.RuntimeException", typeMgr, generated,
+ u"com.sun.star.uno.RuntimeException"_ustr, typeMgr, generated,
options);
produce(
- "com.sun.star.uno.TypeClass", typeMgr, generated, options);
+ u"com.sun.star.uno.TypeClass"_ustr, typeMgr, generated, options);
produce(
- "com.sun.star.uno.XInterface", typeMgr, generated, options);
+ u"com.sun.star.uno.XInterface"_ustr, typeMgr, generated, options);
}
} catch (CannotDumpException & e) {
std::cerr << "ERROR: " << e.getMessage() << '\n';
diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx
index b2ba3413402c..8d67cdc94e11 100644
--- a/codemaker/source/cppumaker/cpputype.cxx
+++ b/codemaker/source/cppumaker/cpputype.cxx
@@ -419,7 +419,7 @@ void CppuType::dump(CppuOptions const & options)
m_cppuTypeDynamic = false;
}
dumpFiles(
- options.isValid("-O"_ostr) ? b2u(options.getOption("-O"_ostr)) : "", options);
+ options.isValid("-O"_ostr) ? b2u(options.getOption("-O"_ostr)) : u""_ustr, options);
}
void CppuType::dumpFile(
@@ -670,86 +670,86 @@ OUString CppuType::getTypeClass(OUString const & name, bool cStyle)
switch (m_typeMgr->getSort(name, &ent)) {
case codemaker::UnoType::Sort::Void:
return cStyle
- ? OUString("typelib_TypeClass_VOID")
- : OUString("::css::uno::TypeClass_VOID");
+ ? u"typelib_TypeClass_VOID"_ustr
+ : u"::css::uno::TypeClass_VOID"_ustr;
case codemaker::UnoType::Sort::Boolean:
return cStyle
- ? OUString("typelib_TypeClass_BOOLEAN")
- : OUString("::css::uno::TypeClass_BOOLEAN");
+ ? u"typelib_TypeClass_BOOLEAN"_ustr
+ : u"::css::uno::TypeClass_BOOLEAN"_ustr;
case codemaker::UnoType::Sort::Byte:
return cStyle
- ? OUString("typelib_TypeClass_BYTE")
- : OUString("::css::uno::TypeClass_BYTE");
+ ? u"typelib_TypeClass_BYTE"_ustr
+ : u"::css::uno::TypeClass_BYTE"_ustr;
case codemaker::UnoType::Sort::Short:
return cStyle
- ? OUString("typelib_TypeClass_SHORT")
- : OUString("::css::uno::TypeClass_SHORT");
+ ? u"typelib_TypeClass_SHORT"_ustr
+ : u"::css::uno::TypeClass_SHORT"_ustr;
case codemaker::UnoType::Sort::UnsignedShort:
return cStyle
- ? OUString("typelib_TypeClass_UNSIGNED_SHORT")
- : OUString("::css::uno::TypeClass_UNSIGNED_SHORT");
+ ? u"typelib_TypeClass_UNSIGNED_SHORT"_ustr
+ : u"::css::uno::TypeClass_UNSIGNED_SHORT"_ustr;
case codemaker::UnoType::Sort::Long:
return cStyle
- ? OUString("typelib_TypeClass_LONG")
- : OUString("::css::uno::TypeClass_LONG");
+ ? u"typelib_TypeClass_LONG"_ustr
+ : u"::css::uno::TypeClass_LONG"_ustr;
case codemaker::UnoType::Sort::UnsignedLong:
return cStyle
- ? OUString("typelib_TypeClass_UNSIGNED_LONG")
- : OUString("::css::uno::TypeClass_UNSIGNED_LONG");
+ ? u"typelib_TypeClass_UNSIGNED_LONG"_ustr
+ : u"::css::uno::TypeClass_UNSIGNED_LONG"_ustr;
case codemaker::UnoType::Sort::Hyper:
return cStyle
- ? OUString("typelib_TypeClass_HYPER")
- : OUString("::css::uno::TypeClass_HYPER");
+ ? u"typelib_TypeClass_HYPER"_ustr
+ : u"::css::uno::TypeClass_HYPER"_ustr;
case codemaker::UnoType::Sort::UnsignedHyper:
return cStyle
- ? OUString("typelib_TypeClass_UNSIGNED_HYPER")
- : OUString("::css::uno::TypeClass_UNSIGNED_HYPER");
+ ? u"typelib_TypeClass_UNSIGNED_HYPER"_ustr
+ : u"::css::uno::TypeClass_UNSIGNED_HYPER"_ustr;
case codemaker::UnoType::Sort::Float:
return cStyle
- ? OUString("typelib_TypeClass_FLOAT")
- : OUString("::css::uno::TypeClass_FLOAT");
+ ? u"typelib_TypeClass_FLOAT"_ustr
+ : u"::css::uno::TypeClass_FLOAT"_ustr;
case codemaker::UnoType::Sort::Double:
return cStyle
- ? OUString("typelib_TypeClass_DOUBLE")
- : OUString("::css::uno::TypeClass_DOUBLE");
+ ? u"typelib_TypeClass_DOUBLE"_ustr
+ : u"::css::uno::TypeClass_DOUBLE"_ustr;
case codemaker::UnoType::Sort::Char:
return cStyle
- ? OUString("typelib_TypeClass_CHAR")
- : OUString("::css::uno::TypeClass_CHAR");
+ ? u"typelib_TypeClass_CHAR"_ustr
+ : u"::css::uno::TypeClass_CHAR"_ustr;
case codemaker::UnoType::Sort::String:
return cStyle
- ? OUString("typelib_TypeClass_STRING")
- : OUString("::css::uno::TypeClass_STRING");
+ ? u"typelib_TypeClass_STRING"_ustr
+ : u"::css::uno::TypeClass_STRING"_ustr;
case codemaker::UnoType::Sort::Type:
return cStyle
- ? OUString("typelib_TypeClass_TYPE")
- : OUString("::css::uno::TypeClass_TYPE");
+ ? u"typelib_TypeClass_TYPE"_ustr
+ : u"::css::uno::TypeClass_TYPE"_ustr;
case codemaker::UnoType::Sort::Any:
return cStyle
- ? OUString("typelib_TypeClass_ANY")
- : OUString("::css::uno::TypeClass_ANY");
+ ? u"typelib_TypeClass_ANY"_ustr
+ : u"::css::uno::TypeClass_ANY"_ustr;
case codemaker::UnoType::Sort::Sequence:
return cStyle
- ? OUString("typelib_TypeClass_SEQUENCE")
- : OUString("::css::uno::TypeClass_SEQUENCE");
+ ? u"typelib_TypeClass_SEQUENCE"_ustr
+ : u"::css::uno::TypeClass_SEQUENCE"_ustr;
case codemaker::UnoType::Sort::Enum:
return cStyle
- ? OUString("typelib_TypeClass_ENUM")
- : OUString("::css::uno::TypeClass_ENUM");
+ ? u"typelib_TypeClass_ENUM"_ustr
+ : u"::css::uno::TypeClass_ENUM"_ustr;
case codemaker::UnoType::Sort::PlainStruct:
case codemaker::UnoType::Sort::PolymorphicStructTemplate:
case codemaker::UnoType::Sort::InstantiatedPolymorphicStruct:
return cStyle
- ? OUString("typelib_TypeClass_STRUCT")
- : OUString("::css::uno::TypeClass_STRUCT");
+ ? u"typelib_TypeClass_STRUCT"_ustr
+ : u"::css::uno::TypeClass_STRUCT"_ustr;
case codemaker::UnoType::Sort::Exception:
return cStyle
- ? OUString("typelib_TypeClass_EXCEPTION")
- : OUString("::css::uno::TypeClass_EXCEPTION");
+ ? u"typelib_TypeClass_EXCEPTION"_ustr
+ : u"::css::uno::TypeClass_EXCEPTION"_ustr;
case codemaker::UnoType::Sort::Interface:
return cStyle
- ? OUString("typelib_TypeClass_INTERFACE")
- : OUString("::css::uno::TypeClass_INTERFACE");
+ ? u"typelib_TypeClass_INTERFACE"_ustr
+ : u"::css::uno::TypeClass_INTERFACE"_ustr;
case codemaker::UnoType::Sort::Typedef:
return getTypeClass(dynamic_cast<unoidl::TypedefEntity&>(*ent).getType(), cStyle);
default:
@@ -1397,7 +1397,7 @@ void InterfaceType::dumpComprehensiveGetCppuType(FileStream & out)
<< indent() << "bInitStarted = true;\n";
std::set< OUString > seen;
// Type for RuntimeException is always needed:
- seen.insert("com.sun.star.uno.RuntimeException");
+ seen.insert(u"com.sun.star.uno.RuntimeException"_ustr);
dumpCppuGetType(out, u"com.sun.star.uno.RuntimeException");
dumpAttributesCppuDecl(out, &seen);
dumpMethodsCppuDecl(out, &seen);
@@ -2818,21 +2818,21 @@ void ExceptionType::dumpHdlFile(
{
if (name_ == "com.sun.star.uno.Exception")
{
- includes.addCustom("#if defined(LIBO_INTERNAL_ONLY)");
- includes.addCustom("#if __has_include(<version>)");
- includes.addCustom("#include <version>");
- includes.addCustom("#endif");
- includes.addCustom("#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907");
- includes.addCustom("#include <source_location>");
- includes.addCustom("#define LIBO_USE_SOURCE_LOCATION std");
- includes.addCustom("#elif __has_include(<experimental/source_location>)");
- includes.addCustom("#include <experimental/source_location>");
- includes.addCustom("#define LIBO_USE_SOURCE_LOCATION std::experimental");
- includes.addCustom("#endif");
- includes.addCustom("#endif");
- includes.addCustom("#if defined LIBO_USE_SOURCE_LOCATION");
- includes.addCustom("#include <o3tl/runtimetooustring.hxx>");
- includes.addCustom("#endif");
+ includes.addCustom(u"#if defined(LIBO_INTERNAL_ONLY)"_ustr);
+ includes.addCustom(u"#if __has_include(<version>)"_ustr);
+ includes.addCustom(u"#include <version>"_ustr);
+ includes.addCustom(u"#endif"_ustr);
+ includes.addCustom(u"#if defined(__cpp_lib_source_location) && __cpp_lib_source_location >= 201907"_ustr);
+ includes.addCustom(u"#include <source_location>"_ustr);
+ includes.addCustom(u"#define LIBO_USE_SOURCE_LOCATION std"_ustr);
+ includes.addCustom(u"#elif __has_include(<experimental/source_location>)"_ustr);
+ includes.addCustom(u"#include <experimental/source_location>"_ustr);
+ includes.addCustom(u"#define LIBO_USE_SOURCE_LOCATION std::experimental"_ustr);
+ includes.addCustom(u"#endif"_ustr);
+ includes.addCustom(u"#endif"_ustr);
+ includes.addCustom(u"#if defined LIBO_USE_SOURCE_LOCATION"_ustr);
+ includes.addCustom(u"#include <o3tl/runtimetooustring.hxx>"_ustr);
+ includes.addCustom(u"#endif"_ustr);
}
dumpHFileContent(out, includes);
}
diff --git a/codemaker/source/javamaker/classfile.cxx b/codemaker/source/javamaker/classfile.cxx
index 880191045d89..fd32497508c6 100644
--- a/codemaker/source/javamaker/classfile.cxx
+++ b/codemaker/source/javamaker/classfile.cxx
@@ -73,7 +73,7 @@ void appendStream(
void write(FileStream & file, void const * buffer, sal_uInt64 size) {
if (!file.write(buffer, size))
- throw CannotDumpException("Error writing file");
+ throw CannotDumpException(u"Error writing file"_ustr);
}
void writeU2(FileStream & file, sal_uInt16 data) {
@@ -234,7 +234,7 @@ void ClassFile::Code::instrLookupswitch(
// <match--offset pairs...>:
std::vector< std::pair< sal_Int32, Code * > >::size_type size = blocks.size();
if (size > SAL_MAX_INT32) {
- throw CannotDumpException("Lookup-switch too large for Java class file format");
+ throw CannotDumpException(u"Lookup-switch too large for Java class file format"_ustr);
}
Position pos1 = m_code.size();
appendU1(m_code, 0xAB);
@@ -408,7 +408,7 @@ void ClassFile::Code::addException(
{
OSL_ASSERT(start < end && end <= m_code.size() && handler <= m_code.size());
if (m_exceptionTableLength == SAL_MAX_UINT16) {
- throw CannotDumpException("Too many exception handlers for Java class file format");
+ throw CannotDumpException(u"Too many exception handlers for Java class file format"_ustr);
}
++m_exceptionTableLength;
appendU2(m_exceptionTable, static_cast< sal_uInt16 >(start));
@@ -549,7 +549,7 @@ sal_uInt16 ClassFile::addDoubleInfo(double value) {
void ClassFile::addInterface(OString const & interface) {
if (m_interfacesCount == SAL_MAX_UINT16) {
- throw CannotDumpException("Too many interfaces for Java class file format");
+ throw CannotDumpException(u"Too many interfaces for Java class file format"_ustr);
}
++m_interfacesCount;
appendU2(m_interfaces, addClassInfo(interface));
@@ -561,7 +561,7 @@ void ClassFile::addField(
OString const & signature)
{
if (m_fieldsCount == SAL_MAX_UINT16) {
- throw CannotDumpException("Too many fields for Java class file format");
+ throw CannotDumpException(u"Too many fields for Java class file format"_ustr);
}
++m_fieldsCount;
appendU2(m_fields, static_cast< sal_uInt16 >(accessFlags));
@@ -586,7 +586,7 @@ void ClassFile::addMethod(
OString const & signature)
{
if (m_methodsCount == SAL_MAX_UINT16) {
- throw CannotDumpException("Too many methods for Java class file format");
+ throw CannotDumpException(u"Too many methods for Java class file format"_ustr);
}
++m_methodsCount;
appendU2(m_methods, static_cast< sal_uInt16 >(accessFlags));
@@ -594,7 +594,7 @@ void ClassFile::addMethod(
appendU2(m_methods, addUtf8Info(descriptor));
std::vector< OString >::size_type excs = exceptions.size();
if (excs > SAL_MAX_UINT16) {
- throw CannotDumpException("Too many exception specifications for Java class file format");
+ throw CannotDumpException(u"Too many exception specifications for Java class file format"_ustr);
}
appendU2(
m_methods,
@@ -609,7 +609,7 @@ void ClassFile::addMethod(
> (SAL_MAX_UINT32 - (2 + 2 + 4 + 2 + 2)
- static_cast< sal_uInt32 >(codeSize))))
{
- throw CannotDumpException("Code block is too big for Java class file format");
+ throw CannotDumpException(u"Code block is too big for Java class file format"_ustr);
}
appendU2(m_methods, addUtf8Info("Code"_ostr));
appendU4(
@@ -660,7 +660,7 @@ void ClassFile::write(FileStream & file) const {
sal_uInt16 ClassFile::nextConstantPoolIndex(sal_uInt16 width) {
OSL_ASSERT(width == 1 || width == 2);
if (m_constantPoolCount > SAL_MAX_UINT16 - width) {
- throw CannotDumpException("Too many constant pool items for Java class file format");
+ throw CannotDumpException(u"Too many constant pool items for Java class file format"_ustr);
}
sal_uInt16 index = m_constantPoolCount;
m_constantPoolCount = m_constantPoolCount + width;
@@ -673,7 +673,7 @@ sal_uInt16 ClassFile::addUtf8Info(OString const & value) {
return i->second;
}
if (value.getLength() > SAL_MAX_UINT16) {
- throw CannotDumpException("UTF-8 string too long for Java class file format");
+ throw CannotDumpException(u"UTF-8 string too long for Java class file format"_ustr);
}
sal_uInt16 index = nextConstantPoolIndex(1);
appendU1(m_constantPool, 1);
diff --git a/codemaker/source/javamaker/javamaker.cxx b/codemaker/source/javamaker/javamaker.cxx
index 177069d5b1ea..4c15f4c1e78b 100644
--- a/codemaker/source/javamaker/javamaker.cxx
+++ b/codemaker/source/javamaker/javamaker.cxx
@@ -70,7 +70,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
}
}
} else {
- produce("", typeMgr, generated, options);
+ produce(u""_ustr, typeMgr, generated, options);
}
}
catch (CannotDumpException & e) {
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index 6ac84ff75e02..974a8f31be6b 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -153,7 +153,7 @@ SpecialType translateUnoTypeToDescriptor(
!= codemaker::UnoType::Sort::InstantiatedPolymorphicStruct));
if (rank > 0xFF - (array ? 1 : 0)) {
throw CannotDumpException(
- "Too many array dimensions for Java class file format");
+ u"Too many array dimensions for Java class file format"_ustr);
}
if (array) {
++rank;
@@ -592,7 +592,7 @@ void TypeInfo::generatePolymorphicUnoTypeCode(
"com/sun/star/uno/TypeClass"_ostr, "SEQUENCE"_ostr,
"Lcom/sun/star/uno/TypeClass;"_ostr);
}
- dependencies->insert("com.sun.star.uno.TypeClass");
+ dependencies->insert(u"com.sun.star.uno.TypeClass"_ustr);
code.instrInvokespecial(
"com/sun/star/uno/Type"_ostr, "<init>"_ostr,
"(Ljava/lang/String;Lcom/sun/star/uno/TypeClass;)V"_ostr);
@@ -648,7 +648,7 @@ void addTypeInfo(
std::vector< TypeInfo >::size_type typeInfos = typeInfo.size();
if (typeInfos > SAL_MAX_INT32) {
throw CannotDumpException(
- "UNOTYPEINFO array too big for Java class file format");
+ u"UNOTYPEINFO array too big for Java class file format"_ustr);
}
if (typeInfos == 0)
return;
@@ -677,7 +677,7 @@ void addTypeInfo(
code->instrReturn();
if (stack > SAL_MAX_UINT16 - 4) {
throw CannotDumpException(
- "Stack too big for Java class file format");
+ u"Stack too big for Java class file format"_ustr);
}
code->setMaxStackAndLocals(static_cast< sal_uInt16 >(stack + 4), 0);
classFile->addMethod(
@@ -1194,7 +1194,7 @@ sal_uInt16 addLoadLocal(
code->instrGetstatic(
"com/sun/star/uno/TypeClass"_ostr, "STRUCT"_ostr,
"Lcom/sun/star/uno/TypeClass;"_ostr);
- dependencies->insert("com.sun.star.uno.TypeClass");
+ dependencies->insert(u"com.sun.star.uno.TypeClass"_ustr);
code->instrInvokespecial(
"com/sun/star/uno/Type"_ostr, "<init>"_ostr,
"(Ljava/lang/String;Lcom/sun/star/uno/TypeClass;)V"_ostr);
@@ -1219,7 +1219,7 @@ sal_uInt16 addLoadLocal(
code->instrGetstatic(
"com/sun/star/uno/TypeClass"_ostr, "INTERFACE"_ostr,
"Lcom/sun/star/uno/TypeClass;"_ostr);
- dependencies->insert("com.sun.star.uno.TypeClass");
+ dependencies->insert(u"com.sun.star.uno.TypeClass"_ustr);
code->instrInvokespecial(
"com/sun/star/uno/Type"_ostr, "<init>"_ostr,
"(Ljava/lang/String;Lcom/sun/star/uno/TypeClass;)V"_ostr);
@@ -1305,7 +1305,7 @@ sal_uInt16 addLoadLocal(
}
if (*index > SAL_MAX_UINT16 - size) {
throw CannotDumpException(
- "Too many local variables for Java class file format");
+ u"Too many local variables for Java class file format"_ustr);
}
*index = *index + size;
return stack;
@@ -1455,7 +1455,7 @@ void handlePolyStructType(
sig.append(codemaker::convertString(param) + ":Ljava/lang/Object;");
if (!typeParameters.emplace(param, index++).second)
{
- throw CannotDumpException("Bad type information"); //TODO
+ throw CannotDumpException(u"Bad type information"_ustr); //TODO
}
}
sig.append(">Ljava/lang/Object;");
@@ -1473,7 +1473,7 @@ void handlePolyStructType(
std::map< OUString, sal_Int32 >::iterator it(
typeParameters.find(member.type));
if (it == typeParameters.end()) {
- throw CannotDumpException("Bad type information"); //TODO
+ throw CannotDumpException(u"Bad type information"_ustr); //TODO
}
typeParameterIndex = it->second;
} else {
@@ -1593,7 +1593,7 @@ void handleExceptionType(
if (baseRuntimeException) {
addField(
manager, dependencies, cf.get(), &typeInfo, -1,
- "com.sun.star.uno.XInterface", "Context", index++);
+ u"com.sun.star.uno.XInterface"_ustr, u"Context"_ustr, index++);
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
entity->getDirectMembers().begin());
@@ -1615,7 +1615,7 @@ void handleExceptionType(
stack = std::max(
stack,
addFieldInit(
- manager, className, "Context", false,
+ manager, className, u"Context"_ustr, false,
u"com.sun.star.uno.XInterface", dependencies, code.get()));
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
@@ -1647,7 +1647,7 @@ void handleExceptionType(
stack = std::max(
stack,
addFieldInit(
- manager, className, "Context", false,
+ manager, className, u"Context"_ustr, false,
u"com.sun.star.uno.XInterface", dependencies, code.get()));
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
@@ -1685,7 +1685,7 @@ void handleExceptionType(
stack = std::max(
stack,
addFieldInit(
- manager, className, "Context", false,
+ manager, className, u"Context"_ustr, false,
u"com.sun.star.uno.XInterface", dependencies, code.get()));
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
@@ -1716,7 +1716,7 @@ void handleExceptionType(
stack = std::max(
stack,
addFieldInit(
- manager, className, "Context", false,
+ manager, className, u"Context"_ustr, false,
u"com.sun.star.uno.XInterface", dependencies, code.get()));
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
@@ -1757,7 +1757,7 @@ void handleExceptionType(
maxSize,
addDirectArgument(
manager, dependencies, &desc1, code.get(), &index2, className,
- "Context"_ostr, false, "com.sun.star.uno.XInterface"));
+ "Context"_ostr, false, u"com.sun.star.uno.XInterface"_ustr));
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
entity->getDirectMembers().begin());
@@ -1804,7 +1804,7 @@ void handleExceptionType(
maxSize2,
addDirectArgument(
manager, dependencies, &desc2, code.get(), &index3, className,
- "Context"_ostr, false, "com.sun.star.uno.XInterface"));
+ "Context"_ostr, false, u"com.sun.star.uno.XInterface"_ustr));
}
for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i(
entity->getDirectMembers().begin());
@@ -2220,7 +2220,7 @@ void addConstructor(
&tree.getRoot(), tryStart, tryEnd, pos2, code.get());
code->addException(
tryStart, tryEnd, pos1, "com/sun/star/uno/Exception"_ostr);
- dependencies->insert("com.sun.star.uno.Exception");
+ dependencies->insert(u"com.sun.star.uno.Exception"_ustr);
stack = std::max< sal_uInt16 >(stack, 4);
}
code->setMaxStackAndLocals(stack, localIndex);
@@ -2254,10 +2254,10 @@ void handleService(
OString realJavaBaseName(
codemaker::convertString(entity->getBase()));
dependencies->insert(entity->getBase());
- dependencies->insert("com.sun.star.lang.XMultiComponentFactory");
- dependencies->insert("com.sun.star.uno.DeploymentException");
- dependencies->insert("com.sun.star.uno.TypeClass");
- dependencies->insert("com.sun.star.uno.XComponentContext");
+ dependencies->insert(u"com.sun.star.lang.XMultiComponentFactory"_ustr);
+ dependencies->insert(u"com.sun.star.uno.DeploymentException"_ustr);
+ dependencies->insert(u"com.sun.star.uno.TypeClass"_ustr);
+ dependencies->insert(u"com.sun.star.uno.XComponentContext"_ustr);
for (const unoidl::SingleInterfaceBasedServiceEntity::Constructor& cons :
entity->getConstructors())
{
@@ -2340,9 +2340,9 @@ void handleSingleton(
OString unoName(codemaker::convertString(name));
OString className(
translateUnoidlEntityNameToJavaFullyQualifiedName(name, "singleton"));
- dependencies->insert("com.sun.star.uno.DeploymentException");
- dependencies->insert("com.sun.star.uno.TypeClass");
- dependencies->insert("com.sun.star.uno.XComponentContext");
+ dependencies->insert(u"com.sun.star.uno.DeploymentException"_ustr);
+ dependencies->insert(u"com.sun.star.uno.TypeClass"_ustr);
+ dependencies->insert(u"com.sun.star.uno.XComponentContext"_ustr);
std::unique_ptr< ClassFile > cf(
new ClassFile(
static_cast< ClassFile::AccessFlags >(