summaryrefslogtreecommitdiff
path: root/unodevtools/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-12-16 17:31:18 +0100
committerStephan Bergmann <sbergman@redhat.com>2014-12-16 17:31:18 +0100
commit102ae9f11a57a90330234e66250719b727c06d1e (patch)
tree16d7302493893ef17b142d1ecb91b818ebef53db /unodevtools/source
parenta11c68174b464317d34409a4171427843680b9c9 (diff)
unodevtools: Use appropriate OUString functions on string constants
Change-Id: I70a86543c0269cbaeefc9cbe1da30c2ad7e48333
Diffstat (limited to 'unodevtools/source')
-rw-r--r--unodevtools/source/skeletonmaker/cppcompskeleton.cxx8
-rw-r--r--unodevtools/source/skeletonmaker/javacompskeleton.cxx24
-rw-r--r--unodevtools/source/skeletonmaker/skeletoncommon.cxx4
3 files changed, 18 insertions, 18 deletions
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index d8441c7fbbcb..947340c2bff2 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -51,7 +51,7 @@ void generateIncludes(std::ostream & o,
}
if (propertyhelper.getLength() > 1) {
- if (propertyhelper.equals("_"))
+ if (propertyhelper == "_")
o << "#include \"cppuhelper/rpopshlp.hxx\"\n";
else
o << "#include \"cppuhelper/propertysetmixin.hxx\"\n";
@@ -882,7 +882,7 @@ void generateMethodBodies(std::ostream& o,
std::set< OUString >::const_iterator iter = interfaces.begin();
codemaker::GeneratedTypeSet generated;
while (iter != interfaces.end()) {
- if ( (*iter).equals("com.sun.star.lang.XServiceInfo") ) {
+ if ( *iter == "com.sun.star.lang.XServiceInfo" ) {
generateXServiceInfoBodies(o, name, comphelpernamespace);
generated.add(u2b(*iter));
} else {
@@ -930,7 +930,7 @@ void generateQueryInterface(std::ostream& o,
} else {
o << "::queryInterface(type));\n";
o << " return a.hasValue() ? a\n : (";
- if (propertyhelper.equals("_")) {
+ if (propertyhelper == "_") {
o << "::cppu::OPropertySetHelper::queryInterface(type));\n";
} else {
o << "::cppu::PropertySetMixin<\n ";
@@ -1109,7 +1109,7 @@ void generateCalcAddin(ProgramOptions const & options,
// get the one and only add-in service for later use
std::set< OUString >::const_iterator iter2 = services.begin();
sAddinService = *iter2;
- if (sAddinService.equals("com.sun.star.sheet.AddIn")) {
+ if (sAddinService == "com.sun.star.sheet.AddIn") {
sAddinService = *(++iter2);
}
diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
index 8edb92ca6f0d..4ba2e99e391b 100644
--- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx
@@ -52,14 +52,14 @@ void generateImports(std::ostream & o, ProgramOptions const & options,
o << "import com.sun.star.registry.XRegistryKey;\n";
}
- if (!propertyhelper.equals("_")) {
+ if (propertyhelper != "_") {
if (supportxcomponent)
o << "import com.sun.star.lib.uno.helper.ComponentBase;\n";
else
o << "import com.sun.star.lib.uno.helper.WeakBase;\n";
}
if (!propertyhelper.isEmpty()) {
- if (propertyhelper.equals("_")) {
+ if (propertyhelper == "_") {
o << "import com.sun.star.lib.uno.helper.PropertySet;\n";
o << "import com.sun.star.beans.PropertyAttribute;\n";
} else {
@@ -503,18 +503,18 @@ void generateMethodBodies(std::ostream& o,
while (iter != interfaces.end()) {
OUString type(*iter);
++iter;
- if (type.equals("com.sun.star.lang.XServiceInfo")) {
+ if (type == "com.sun.star.lang.XServiceInfo") {
generateXServiceInfoBodies(o);
generated.add(u2b(type));
} else {
if (options.componenttype == 2) {
- if (type.equals("com.sun.star.lang.XServiceName")) {
+ if (type == "com.sun.star.lang.XServiceName") {
o << " // com.sun.star.lang.XServiceName:\n"
" public String getServiceName() {\n"
" return sADDIN_SERVICENAME;\n }\n";
generated.add(u2b(type));
continue;
- } else if (type.equals("com.sun.star.sheet.XAddIn")) {
+ } else if (type == "com.sun.star.sheet.XAddIn") {
generateXAddInBodies(o, options);
generated.add(u2b(type));
@@ -524,26 +524,26 @@ void generateMethodBodies(std::ostream& o,
generated.add("com.sun.star.lang.XLocalizable");
}
continue;
- } else if (type.equals("com.sun.star.lang.XLocalizable")) {
+ } else if (type == "com.sun.star.lang.XLocalizable") {
generateXLocalizableBodies(o);
generated.add(u2b(type));
continue;
- } else if (type.equals("com.sun.star.sheet.XCompatibilityNames")) {
+ } else if (type == "com.sun.star.sheet.XCompatibilityNames") {
generateXCompatibilityNamesBodies(o);
generated.add(u2b(type));
continue;
}
}
if (options.componenttype == 3) {
- if (type.equals("com.sun.star.lang.XInitialization")) {
+ if (type == "com.sun.star.lang.XInitialization") {
generateXInitializationBodies(o);
generated.add(u2b(type));
continue;
- } else if (type.equals("com.sun.star.frame.XDispatch")) {
+ } else if (type == "com.sun.star.frame.XDispatch") {
generateXDispatchBodies(o, options);
generated.add(u2b(type));
continue;
- } else if (type.equals("com.sun.star.frame.XDispatchProvider")) {
+ } else if (type == "com.sun.star.frame.XDispatchProvider") {
generateXDispatchProviderBodies(o, options);
generated.add(u2b(type));
continue;
@@ -712,7 +712,7 @@ void generateClassDefinition(std::ostream& o,
o << "\n\npublic final class " << classname << " extends ";
if (!interfaces.empty()) {
- if (propertyhelper.equals("_")) {
+ if (propertyhelper == "_") {
o << "PropertySet\n";
} else {
if (supportxcomponent)
@@ -791,7 +791,7 @@ void generateClassDefinition(std::ostream& o,
} else {
o << "\n public " << classname << "( XComponentContext context )\n"
" {\n m_xContext = context;\n";
- if (propertyhelper.equals("_")) {
+ if (propertyhelper == "_") {
registerProperties(o, properties, " ");
} else {
if (propertyhelper.getLength() > 1) {
diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
index 2d1ead59be6a..3569638d3b2a 100644
--- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx
+++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx
@@ -279,7 +279,7 @@ void checkDefaultInterfaces(
interfaces.insert("com.sun.star.lang.XServiceInfo");
}
- if ( propertyhelper.equals("_") ) {
+ if ( propertyhelper == "_" ) {
interfaces.erase("com.sun.star.beans.XPropertySet");
interfaces.erase("com.sun.star.beans.XFastPropertySet");
interfaces.erase("com.sun.star.beans.XPropertyAccess");
@@ -406,7 +406,7 @@ bool checkXComponentSupport(rtl::Reference< TypeManager > const & manager,
std::set< OUString >::const_iterator iter = interfaces.begin();
while ( iter != interfaces.end() ) {
- if ( (*iter).equals("com.sun.star.lang.XComponent") ) {
+ if ( *iter == "com.sun.star.lang.XComponent" ) {
interfaces.erase("com.sun.star.lang.XComponent");
return true;
}