diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2020-12-28 17:56:40 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2020-12-29 16:42:33 +0100 |
commit | 042033f1e6da22616cb76c8d950c20c9efecbad5 (patch) | |
tree | 26b3f1f42d067506f44550b410f3fb9640616a5b /codemaker | |
parent | ccfd8e9d09f9ac0a0ea92d0f378391006faaf934 (diff) |
loplugin:stringviewparam: operator +
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'codemaker')
-rw-r--r-- | codemaker/source/codemaker/typemanager.cxx | 2 | ||||
-rw-r--r-- | codemaker/source/commoncpp/commoncpp.cxx | 4 | ||||
-rw-r--r-- | codemaker/source/commonjava/commonjava.cxx | 4 | ||||
-rw-r--r-- | codemaker/source/cppumaker/cpputype.cxx | 54 | ||||
-rw-r--r-- | codemaker/source/cppumaker/dependencies.cxx | 6 | ||||
-rw-r--r-- | codemaker/source/cppumaker/dependencies.hxx | 3 | ||||
-rw-r--r-- | codemaker/source/javamaker/javatype.cxx | 57 |
7 files changed, 66 insertions, 64 deletions
diff --git a/codemaker/source/codemaker/typemanager.cxx b/codemaker/source/codemaker/typemanager.cxx index 12a00495ee56..194840ca9d5b 100644 --- a/codemaker/source/codemaker/typemanager.cxx +++ b/codemaker/source/codemaker/typemanager.cxx @@ -158,7 +158,7 @@ codemaker::UnoType::Sort TypeManager::getSort( } codemaker::UnoType::Sort TypeManager::decompose( - OUString const & name, bool resolveTypedefs, OUString * nucleus, + std::u16string_view name, bool resolveTypedefs, OUString * nucleus, sal_Int32 * rank, std::vector< OUString > * arguments, rtl::Reference< unoidl::Entity > * entity) const { diff --git a/codemaker/source/commoncpp/commoncpp.cxx b/codemaker/source/commoncpp/commoncpp.cxx index efe0dd0b48bf..c7dc2bdeb26c 100644 --- a/codemaker/source/commoncpp/commoncpp.cxx +++ b/codemaker/source/commoncpp/commoncpp.cxx @@ -87,7 +87,7 @@ OString translateUnoToCppType( } OString translateUnoToCppIdentifier( - OString const & unoIdentifier, OString const & prefix, + OString const & unoIdentifier, std::string_view prefix, IdentifierTranslationMode transmode, OString const * forbidden) { if (// Keywords: @@ -287,7 +287,7 @@ OString translateUnoToCppIdentifier( || unoIdentifier == "NDEBUG" || (forbidden != nullptr && unoIdentifier == *forbidden) ) { - return prefix + "_" + unoIdentifier; + return OString::Concat(prefix) + "_" + unoIdentifier; } else { return unoIdentifier; } diff --git a/codemaker/source/commonjava/commonjava.cxx b/codemaker/source/commonjava/commonjava.cxx index d33969676ee6..0d01bee54048 100644 --- a/codemaker/source/commonjava/commonjava.cxx +++ b/codemaker/source/commonjava/commonjava.cxx @@ -71,7 +71,7 @@ OString translateUnoToJavaType( } OString translateUnoToJavaIdentifier( - OString const & identifier, OString const & prefix) + OString const & identifier, std::string_view prefix) { if (identifier == "abstract" || identifier == "assert" // since Java 1.4 @@ -124,7 +124,7 @@ OString translateUnoToJavaIdentifier( || identifier == "volatile" || identifier == "while") { - return prefix + "_" + identifier; + return OString::Concat(prefix) + "_" + identifier; } else { return identifier; } diff --git a/codemaker/source/cppumaker/cpputype.cxx b/codemaker/source/cppumaker/cpputype.cxx index c98d8d76e214..1ab587040b82 100644 --- a/codemaker/source/cppumaker/cpputype.cxx +++ b/codemaker/source/cppumaker/cpputype.cxx @@ -165,7 +165,7 @@ public: void dump(CppuOptions const & options); void dumpFile( - std::u16string_view uri, OUString const & name, bool hpp, + std::u16string_view uri, std::u16string_view name, bool hpp, CppuOptions const & options); void dumpDependedTypes( @@ -178,7 +178,7 @@ public: virtual void dumpHppFile(FileStream& o, codemaker::cppumaker::Includes & includes) = 0; - OUString dumpHeaderDefine(FileStream& o, OUString const & extension) const; + OUString dumpHeaderDefine(FileStream& o, std::u16string_view extension) const; void dumpGetCppuType(FileStream & out); @@ -193,14 +193,14 @@ public: } void dumpType( - FileStream & out, OUString const & name, bool isConst = false, + FileStream & out, std::u16string_view name, bool isConst = false, bool isRef = false, bool native = false, bool cppuUnoType = false) const; OUString getTypeClass(OUString const & name, bool cStyle = false); void dumpCppuGetType( - FileStream & out, OUString const & name, OUString const * ownName = nullptr) const; + FileStream & out, std::u16string_view name, OUString const * ownName = nullptr) const; sal_uInt32 getInheritedMemberCount(); @@ -253,7 +253,7 @@ protected: void addDefaultHxxIncludes(codemaker::cppumaker::Includes & includes) const; void dumpInitializer( - FileStream & out, bool parameterized, OUString const & name) const; + FileStream & out, bool parameterized, std::u16string_view name) const; void dumpHFileContent( FileStream & out, codemaker::cppumaker::Includes & includes); @@ -413,14 +413,14 @@ void CppuType::dump(CppuOptions const & options) } void CppuType::dumpFile( - std::u16string_view uri, OUString const & name, bool hpp, + std::u16string_view uri, std::u16string_view name, bool hpp, CppuOptions const & options) { OUString fileUri( b2u(createFileNameFromType( u2b(uri), u2b(name), hpp ? ".hpp" : ".hdl"))); if (fileUri.isEmpty()) { - throw CannotDumpException("empty target URI for entity " + name); + throw CannotDumpException(OUString::Concat("empty target URI for entity ") + name); } bool exists = fileExists(u2b(fileUri)); if (exists && options.isValid("-G")) { @@ -468,7 +468,7 @@ void CppuType::dumpDependedTypes( } OUString CppuType::dumpHeaderDefine( - FileStream & out, OUString const & extension) const + FileStream & out, std::u16string_view extension) const { OUString def( "INCLUDED_" + name_.replace('.', '_').toAsciiUpperCase() + "_" @@ -500,7 +500,7 @@ const } void CppuType::dumpInitializer( - FileStream & out, bool parameterized, OUString const & name) const + FileStream & out, bool parameterized, std::u16string_view name) const { out << "("; if (!parameterized) { @@ -541,7 +541,7 @@ void CppuType::dumpInitializer( break; default: throw CannotDumpException( - "unexpected entity \"" + name + OUString::Concat("unexpected entity \"") + name + "\" in call to CppuType::dumpInitializer"); } } @@ -553,7 +553,7 @@ void CppuType::dumpHFileContent( FileStream & out, codemaker::cppumaker::Includes & includes) { addDefaultHIncludes(includes); - dumpHeaderDefine(out, "HDL"); + dumpHeaderDefine(out, u"HDL"); out << "\n"; includes.dump(out, nullptr, false); // 'exceptions = false' would be wrong for services/singletons, but @@ -746,7 +746,7 @@ OUString CppuType::getTypeClass(OUString const & name, bool cStyle) } void CppuType::dumpType( - FileStream & out, OUString const & name, bool isConst, bool isRef, + FileStream & out, std::u16string_view name, bool isConst, bool isRef, bool native, bool cppuUnoType) const { sal_Int32 k; @@ -838,7 +838,7 @@ void CppuType::dumpType( break; default: throw CannotDumpException( - "unexpected entity \"" + name + "\" in call to CppuType::dumpType"); + OUString::Concat("unexpected entity \"") + name + "\" in call to CppuType::dumpType"); } for (sal_Int32 i = 0; i != k; ++i) { out << " >"; @@ -849,7 +849,7 @@ void CppuType::dumpType( } void CppuType::dumpCppuGetType( - FileStream & out, OUString const & name, OUString const * ownName) const + FileStream & out, std::u16string_view name, OUString const * ownName) const { //TODO: What are these calls good for? OUString nucleus; @@ -890,7 +890,7 @@ void CppuType::dumpCppuGetType( for (;;) std::abort(); // this cannot happen default: throw CannotDumpException( - "unexpected entity \"" + name + OUString::Concat("unexpected entity \"") + name + "\" in call to CppuType::dumpCppuGetType"); } } @@ -1182,7 +1182,7 @@ void InterfaceType::dumpDeclaration(FileStream & out) void InterfaceType::dumpHppFile( FileStream & out, codemaker::cppumaker::Includes & includes) { - OUString headerDefine(dumpHeaderDefine(out, "HPP")); + OUString headerDefine(dumpHeaderDefine(out, u"HPP")); out << "\n"; addDefaultHxxIncludes(includes); includes.dump(out, &name_, !(m_cppuTypeLeak || m_cppuTypeDynamic)); @@ -1376,7 +1376,7 @@ void InterfaceType::dumpComprehensiveGetCppuType(FileStream & out) std::set< OUString > seen; // Type for RuntimeException is always needed: seen.insert("com.sun.star.uno.RuntimeException"); - dumpCppuGetType(out, "com.sun.star.uno.RuntimeException"); + dumpCppuGetType(out, u"com.sun.star.uno.RuntimeException"); dumpAttributesCppuDecl(out, &seen); dumpMethodsCppuDecl(out, &seen); if (count != 0) { @@ -1651,7 +1651,7 @@ private: void ConstantGroup::dumpHdlFile( FileStream & out, codemaker::cppumaker::Includes & includes) { - OUString headerDefine(dumpHeaderDefine(out, "HDL")); + OUString headerDefine(dumpHeaderDefine(out, u"HDL")); out << "\n"; addDefaultHIncludes(includes); includes.dump(out, nullptr, true); @@ -1671,7 +1671,7 @@ void ConstantGroup::dumpHdlFile( void ConstantGroup::dumpHppFile( FileStream & out, codemaker::cppumaker::Includes &) { - OUString headerDefine(dumpHeaderDefine(out, "HPP")); + OUString headerDefine(dumpHeaderDefine(out, u"HPP")); out << "\n"; codemaker::cppumaker::Includes::dumpInclude(out, u2b(name_), false); out << "\n#endif // "<< headerDefine << "\n"; @@ -1867,7 +1867,7 @@ void PlainStructType::dumpDeclaration(FileStream & out) void PlainStructType::dumpHppFile( FileStream & out, codemaker::cppumaker::Includes & includes) { - OUString headerDefine(dumpHeaderDefine(out, "HPP")); + OUString headerDefine(dumpHeaderDefine(out, u"HPP")); out << "\n"; includes.dump(out, &name_, true); out << "\n"; @@ -2259,7 +2259,7 @@ void PolyStructType::dumpDeclaration(FileStream & out) void PolyStructType::dumpHppFile( FileStream & out, codemaker::cppumaker::Includes & includes) { - OUString headerDefine(dumpHeaderDefine(out, "HPP")); + OUString headerDefine(dumpHeaderDefine(out, u"HPP")); out << "\n"; includes.dump(out, &name_, true); out << "\n"; @@ -2811,7 +2811,7 @@ void ExceptionType::addComprehensiveGetCppuTypeIncludes( void ExceptionType::dumpHppFile( FileStream & out, codemaker::cppumaker::Includes & includes) { - OUString headerDefine(dumpHeaderDefine(out, "HPP")); + OUString headerDefine(dumpHeaderDefine(out, u"HPP")); out << "\n"; addDefaultHxxIncludes(includes); includes.dump(out, &name_, true); @@ -3321,7 +3321,7 @@ void EnumType::dumpDeclaration(FileStream& o) void EnumType::dumpHppFile( FileStream& o, codemaker::cppumaker::Includes & includes) { - OUString headerDefine(dumpHeaderDefine(o, "HPP")); + OUString headerDefine(dumpHeaderDefine(o, u"HPP")); o << "\n"; addDefaultHxxIncludes(includes); @@ -3455,7 +3455,7 @@ private: void Typedef::dumpHdlFile( FileStream& o, codemaker::cppumaker::Includes & includes) { - OUString headerDefine(dumpHeaderDefine(o, "HDL")); + OUString headerDefine(dumpHeaderDefine(o, u"HDL")); o << "\n"; addDefaultHIncludes(includes); @@ -3485,7 +3485,7 @@ void Typedef::dumpDeclaration(FileStream& o) void Typedef::dumpHppFile( FileStream& o, codemaker::cppumaker::Includes & includes) { - OUString headerDefine(dumpHeaderDefine(o, "HPP")); + OUString headerDefine(dumpHeaderDefine(o, u"HPP")); o << "\n"; addDefaultHxxIncludes(includes); @@ -3607,7 +3607,7 @@ void ServiceType::dumpHppFile( OString cppName( codemaker::cpp::translateUnoToCppIdentifier( u2b(id_), "service", isGlobal())); - OUString headerDefine(dumpHeaderDefine(o, "HPP")); + OUString headerDefine(dumpHeaderDefine(o, u"HPP")); o << "\n"; includes.dump(o, nullptr, true); if (!entity_->getConstructors().empty()) { @@ -3903,7 +3903,7 @@ void SingletonType::dumpHppFile( u2b(id_), "singleton", isGlobal())); OString baseName(u2b(entity_->getBase())); OString scopedBaseName(codemaker::cpp::scopedCppName(baseName)); - OUString headerDefine(dumpHeaderDefine(o, "HPP")); + OUString headerDefine(dumpHeaderDefine(o, u"HPP")); o << "\n"; //TODO: Decide whether the types added to includes should rather be added to // m_dependencies (and thus be generated during dumpDependedTypes): diff --git a/codemaker/source/cppumaker/dependencies.cxx b/codemaker/source/cppumaker/dependencies.cxx index eb257c6966af..1af6b9d46061 100644 --- a/codemaker/source/cppumaker/dependencies.cxx +++ b/codemaker/source/cppumaker/dependencies.cxx @@ -102,7 +102,7 @@ Dependencies::Dependencies( if (!(ent2->getDirectAttributes().empty() && ent2->getDirectMethods().empty())) { - insert("com.sun.star.uno.RuntimeException", KIND_EXCEPTION); + insert(u"com.sun.star.uno.RuntimeException", KIND_EXCEPTION); } for (const unoidl::InterfaceTypeEntity::Attribute& attr : ent2->getDirectAttributes()) { @@ -212,7 +212,7 @@ Dependencies::Dependencies( Dependencies::~Dependencies() {} -void Dependencies::insert(OUString const & name, Kind kind) { +void Dependencies::insert(std::u16string_view name, Kind kind) { sal_Int32 k; std::vector< OString > args; OUString n(b2u(UnoType::decompose(u2b(name), &k, &args))); @@ -286,7 +286,7 @@ void Dependencies::insert(OUString const & name, Kind kind) { } default: throw CannotDumpException( - "unexpected type \"" + name + OUString::Concat("unexpected type \"") + name + "\" in call to codemaker::cppumaker::Dependencies::Dependencies"); } } diff --git a/codemaker/source/cppumaker/dependencies.hxx b/codemaker/source/cppumaker/dependencies.hxx index 9d805f382aae..0071397aa0ef 100644 --- a/codemaker/source/cppumaker/dependencies.hxx +++ b/codemaker/source/cppumaker/dependencies.hxx @@ -22,6 +22,7 @@ #include <sal/config.h> #include <map> +#include <string_view> #include <rtl/ref.hxx> @@ -100,7 +101,7 @@ public: bool hasSequenceDependency() const { return m_sequenceDependency; } private: - void insert(OUString const & name, Kind kind); + void insert(std::u16string_view name, Kind kind); rtl::Reference< TypeManager > m_manager; Map m_map; diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx index e29c5d5b6a13..25406d07234c 100644 --- a/codemaker/source/javamaker/javatype.cxx +++ b/codemaker/source/javamaker/javatype.cxx @@ -25,6 +25,7 @@ #include <map> #include <memory> #include <set> +#include <string_view> #include <utility> #include <vector> @@ -107,7 +108,7 @@ bool isSpecialType(SpecialType special) { } OString translateUnoidlEntityNameToJavaFullyQualifiedName( - OUString const & name, OString const & prefix) + OUString const & name, std::string_view prefix) { assert(!name.startsWith("[]")); assert(name.indexOf('<') == -1); @@ -126,7 +127,7 @@ struct PolymorphicUnoType { }; SpecialType translateUnoTypeToDescriptor( - rtl::Reference< TypeManager > const & manager, OUString const & type, + rtl::Reference< TypeManager > const & manager, std::u16string_view type, bool array, bool classType, std::set<OUString> * dependencies, OStringBuffer * descriptor, OStringBuffer * signature, bool * needsSignature, PolymorphicUnoType * polymorphicUnoType); @@ -272,7 +273,7 @@ SpecialType translateUnoTypeToDescriptor( } SpecialType translateUnoTypeToDescriptor( - rtl::Reference< TypeManager > const & manager, OUString const & type, + rtl::Reference< TypeManager > const & manager, std::u16string_view type, bool array, bool classType, std::set<OUString> * dependencies, OStringBuffer * descriptor, OStringBuffer * signature, bool * needsSignature, PolymorphicUnoType * polymorphicUnoType) @@ -290,7 +291,7 @@ SpecialType translateUnoTypeToDescriptor( SpecialType getFieldDescriptor( rtl::Reference< TypeManager > const & manager, std::set<OUString> * dependencies, - OUString const & type, OString * descriptor, OString * signature, + std::u16string_view type, OString * descriptor, OString * signature, PolymorphicUnoType * polymorphicUnoType) { assert(descriptor != nullptr); @@ -315,12 +316,12 @@ class MethodDescriptor { public: MethodDescriptor( rtl::Reference< TypeManager > const & manager, - std::set<OUString> * dependencies, OUString const & returnType, + std::set<OUString> * dependencies, std::u16string_view returnType, SpecialType * specialReturnType, PolymorphicUnoType * polymorphicUnoType); SpecialType addParameter( - OUString const & type, bool array, bool dependency, + std::u16string_view type, bool array, bool dependency, PolymorphicUnoType * polymorphicUnoType); void addTypeParameter(OUString const & name); @@ -341,7 +342,7 @@ private: MethodDescriptor::MethodDescriptor( rtl::Reference< TypeManager > const & manager, std::set<OUString> * dependencies, - OUString const & returnType, SpecialType * specialReturnType, + std::u16string_view returnType, SpecialType * specialReturnType, PolymorphicUnoType * polymorphicUnoType): m_manager(manager), m_dependencies(dependencies), m_needsSignature(false) { @@ -363,7 +364,7 @@ MethodDescriptor::MethodDescriptor( } SpecialType MethodDescriptor::addParameter( - OUString const & type, bool array, bool dependency, + std::u16string_view type, bool array, bool dependency, PolymorphicUnoType * polymorphicUnoType) { return translateUnoTypeToDescriptor( @@ -845,7 +846,7 @@ void addField( sal_uInt16 addFieldInit( rtl::Reference< TypeManager > const & manager, OString const & className, - OUString const & fieldName, bool typeParameter, OUString const & fieldType, + OUString const & fieldName, bool typeParameter, std::u16string_view fieldType, std::set<OUString> * dependencies, ClassFile::Code * code) { assert(manager.is()); @@ -931,7 +932,7 @@ sal_uInt16 addFieldInit( for (;;) std::abort(); // this cannot happen default: throw CannotDumpException( - "unexpected entity \"" + fieldType + OUString::Concat("unexpected entity \"") + fieldType + "\" in call to addFieldInit"); } } @@ -965,7 +966,7 @@ sal_uInt16 addFieldInit( sal_uInt16 addLoadLocal( rtl::Reference< TypeManager > const & manager, ClassFile::Code * code, - sal_uInt16 * index, bool typeParameter, OUString const & type, bool any, + sal_uInt16 * index, bool typeParameter, std::u16string_view type, bool any, std::set<OUString> * dependencies) { assert(manager.is()); @@ -1234,7 +1235,7 @@ sal_uInt16 addLoadLocal( for (;;) std::abort(); // this cannot happen default: throw CannotDumpException( - "unexpected entity \"" + type + OUString::Concat("unexpected entity \"") + type + "\" in call to addLoadLocal"); } } else { @@ -1272,7 +1273,7 @@ sal_uInt16 addLoadLocal( for (;;) std::abort(); // this cannot happen default: throw CannotDumpException( - "unexpected entity \"" + type + OUString::Concat("unexpected entity \"") + type + "\" in call to addLoadLocal"); } } @@ -1404,7 +1405,7 @@ void handlePlainStructType( cf->addMethod( ClassFile::ACC_PUBLIC, "<init>", "()V", code.get(), std::vector< OString >(), ""); - MethodDescriptor desc(manager, dependencies, "void", nullptr, nullptr); + MethodDescriptor desc(manager, dependencies, u"void", nullptr, nullptr); code = cf->newCode(); code->loadLocalReference(0); sal_uInt16 index2 = 1; @@ -1495,7 +1496,7 @@ void handlePolyStructType( cf->addMethod( ClassFile::ACC_PUBLIC, "<init>", "()V", code.get(), std::vector< OString >(), ""); - MethodDescriptor desc(manager, dependencies, "void", nullptr, nullptr); + MethodDescriptor desc(manager, dependencies, u"void", nullptr, nullptr); code = cf->newCode(); code->loadLocalReference(0); sal_uInt16 index2 = 1; @@ -1611,7 +1612,7 @@ void handleExceptionType( stack, addFieldInit( manager, className, "Context", false, - "com.sun.star.uno.XInterface", dependencies, code.get())); + u"com.sun.star.uno.XInterface", dependencies, code.get())); } for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i( entity->getDirectMembers().begin()); @@ -1643,7 +1644,7 @@ void handleExceptionType( stack, addFieldInit( manager, className, "Context", false, - "com.sun.star.uno.XInterface", dependencies, code.get())); + u"com.sun.star.uno.XInterface", dependencies, code.get())); } for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i( entity->getDirectMembers().begin()); @@ -1681,7 +1682,7 @@ void handleExceptionType( stack, addFieldInit( manager, className, "Context", false, - "com.sun.star.uno.XInterface", dependencies, code.get())); + u"com.sun.star.uno.XInterface", dependencies, code.get())); } for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i( entity->getDirectMembers().begin()); @@ -1712,7 +1713,7 @@ void handleExceptionType( stack, addFieldInit( manager, className, "Context", false, - "com.sun.star.uno.XInterface", dependencies, code.get())); + u"com.sun.star.uno.XInterface", dependencies, code.get())); } for (std::vector< unoidl::ExceptionTypeEntity::Member >::const_iterator i( entity->getDirectMembers().begin()); @@ -1734,12 +1735,12 @@ void handleExceptionType( // create (String Message, Object Context, T1 m1, ..., Tn mn) constructor - MethodDescriptor desc1(manager, dependencies, "void", nullptr, nullptr); + MethodDescriptor desc1(manager, dependencies, u"void", nullptr, nullptr); code = cf->newCode(); code->loadLocalReference(0); sal_uInt16 index2 = 1; code->loadLocalReference(index2++); - desc1.addParameter("string", false, true, nullptr); + desc1.addParameter(u"string", false, true, nullptr); if (!(baseException || baseRuntimeException)) { addExceptionBaseArguments( manager, dependencies, &desc1, code.get(), entity->getDirectBase(), @@ -1774,13 +1775,13 @@ void handleExceptionType( std::vector< OString >(), desc1.getSignature()); // create (Throwable Cause, String Message, Object Context, T1 m1, ..., Tn mn) constructor - MethodDescriptor desc2(manager, dependencies, "void", nullptr, nullptr); + MethodDescriptor desc2(manager, dependencies, u"void", nullptr, nullptr); code = cf->newCode(); code->loadLocalReference(0); sal_uInt16 index3 = 3; // Note that we hack in the java.lang.Throwable parameter further down, // because MethodDescriptor does not know how to handle it. - desc2.addParameter("string", false, true, nullptr); + desc2.addParameter(u"string", false, true, nullptr); if (baseException || baseRuntimeException) { code->loadLocalReference(2); code->loadLocalReference(1); @@ -1888,7 +1889,7 @@ void handleInterfaceType( "get" + attrName, gdesc.getDescriptor(), nullptr, exc, gdesc.getSignature()); if (!attr.readOnly) { - MethodDescriptor sdesc(manager, dependencies, "void", nullptr, nullptr); + MethodDescriptor sdesc(manager, dependencies, u"void", nullptr, nullptr); sdesc.addParameter(attr.type, false, true, nullptr); std::vector< OString > exc2; createExceptionsAttribute( @@ -2079,7 +2080,7 @@ void addExceptionHandlers( void addConstructor( rtl::Reference< TypeManager > const & manager, - OString const & realJavaBaseName, OString const & unoName, + std::string_view realJavaBaseName, OString const & unoName, OString const & className, unoidl::SingleInterfaceBasedServiceEntity::Constructor const & constructor, OUString const & returnType, std::set<OUString> * dependencies, @@ -2088,7 +2089,7 @@ void addConstructor( assert(dependencies != nullptr); assert(classFile != nullptr); MethodDescriptor desc(manager, dependencies, returnType, nullptr, nullptr); - desc.addParameter("com.sun.star.uno.XComponentContext", false, false, nullptr); + desc.addParameter(u"com.sun.star.uno.XComponentContext", false, false, nullptr); std::unique_ptr< ClassFile::Code > code(classFile->newCode()); code->loadLocalReference(0); // stack: context @@ -2123,7 +2124,7 @@ void addConstructor( if (constructor.parameters.size() == 1 && constructor.parameters[0].rest) { - desc.addParameter("any", true, true, nullptr); + desc.addParameter(u"any", true, true, nullptr); code->loadLocalReference(localIndex++); // stack: factory serviceName args stack = 4; @@ -2345,7 +2346,7 @@ void handleSingleton( | ClassFile::ACC_SUPER), className, "java/lang/Object", "")); MethodDescriptor desc(manager, dependencies, entity->getBase(), nullptr, nullptr); - desc.addParameter("com.sun.star.uno.XComponentContext", false, false, nullptr); + desc.addParameter(u"com.sun.star.uno.XComponentContext", false, false, nullptr); std::unique_ptr< ClassFile::Code > code(cf->newCode()); code->loadLocalReference(0); // stack: context |