diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-19 11:51:58 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-19 22:07:58 -0200 |
commit | 55b6485978bbfe17c1355909a5e27d8c846a4ee8 (patch) | |
tree | 2581d37bd207a65aa062bcff7576a93f99cbafe0 /unodevtools | |
parent | 688551303ee5b918841b64ac85f06ab12989b7fc (diff) |
Fix for fdo43460 Part XLI getLength() to isEmpty()
Part XLI
Modules
ucbhelper, unodevtools
Diffstat (limited to 'unodevtools')
6 files changed, 21 insertions, 21 deletions
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx index 97ba560658cd..57b46137a70c 100644 --- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx @@ -572,7 +572,7 @@ void generateAddinConstructorAndHelper(std::ostream& o, "throw (css::uno::RuntimeException)\n{\n" " ::rtl::OUString ret;\n try {\n " "::rtl::OUStringBuffer buf(funcName);\n" - " if (paramName.getLength() > 0) {\n" + " if (!paramName.isEmpty()) {\n" " buf.appendAscii(\"/Parameters/\");\n" " buf.append(paramName);\n }\n\n" " css::uno::Reference< css::beans::XPropertySet > xPropSet(\n" @@ -924,14 +924,14 @@ void generateQueryInterface(std::ostream& o, OString const & classname, OString const & propertyhelper) { - if (propertyhelper.getLength() == 0) + if (propertyhelper.isEmpty()) return; o << "css::uno::Any " << classname << "::queryInterface(css::uno::Type const & type) throw (" "css::uno::RuntimeException)\n{\n "; - if (propertyhelper.getLength() >= 1) + if (!propertyhelper.isEmpty()) o << "return "; else o << "css::uno::Any a("; @@ -949,7 +949,7 @@ void generateQueryInterface(std::ostream& o, o << ">"; } - if (propertyhelper.getLength() >= 1) { + if (!propertyhelper.isEmpty()) { o << "::queryInterface(type);\n"; } else { o << "::queryInterface(type));\n"; @@ -1160,7 +1160,7 @@ void generateCalcAddin(ProgramOptions const & options, OString propertyhelper = checkPropertyHelper( options, manager, services, interfaces, attributes, propinterfaces); - if (propertyhelper.getLength() > 0) + if (!propertyhelper.isEmpty()) std::cerr << "WARNING: interfaces specifying calc add-in functions " "shouldn't support attributes!\n"; diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx index a9d21d7c7dac..d68196dee62e 100644 --- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx +++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx @@ -394,7 +394,7 @@ void printMethods(std::ostream & o, } static OString sd(RTL_CONSTASCII_STRINGPARAM("_")); - bool body = ((delegate.getLength() > 0) ? true : false); + bool body = !delegate.isEmpty(); bool defaultbody = ((delegate.equals(sd)) ? true : false); if (body && propertyhelper.getLength() > 1) { @@ -496,7 +496,7 @@ void printMethods(std::ostream & o, printType(o, options, manager, codemaker::convertString(reader.getFieldTypeName(i)), 1); o << " SAL_CALL "; - if (classname.getLength() > 0) + if (!classname.isEmpty()) o << classname; o << "get" @@ -513,7 +513,7 @@ void printMethods(std::ostream & o, } if (body) { if (defaultbody) { - if (propertyhelper.getLength() > 0) { + if (!propertyhelper.isEmpty()) { o << "\n{\n osl::MutexGuard g(m_aMutex);\n return m_" << codemaker::convertString(reader.getFieldName(i)).getStr() << ";\n}\n\n"; @@ -547,7 +547,7 @@ void printMethods(std::ostream & o, o << "virtual "; o << "void SAL_CALL "; - if (classname.getLength() > 0) + if (!classname.isEmpty()) o << classname; o << "set" @@ -567,7 +567,7 @@ void printMethods(std::ostream & o, } if (body) { if (defaultbody) { - if (propertyhelper.getLength() > 0) { + if (!propertyhelper.isEmpty()) { printSetPropertyMixinBody(o, reader, i, method); } else { if (options.componenttype == 1) { @@ -599,7 +599,7 @@ void printMethods(std::ostream & o, codemaker::convertString( reader.getMethodReturnTypeName(method)), 1); o << " SAL_CALL "; - if (classname.getLength() > 0) + if (!classname.isEmpty()) o << classname; const OString methodName(codemaker::convertString(reader.getMethodName(method))); @@ -662,7 +662,7 @@ void printConstructionMethods(std::ostream & o, options, manager, codemaker::convertString(reader.getSuperTypeName(0)), 1); o << ' '; - if (reader.getMethodName(i).getLength() == 0) { + if (reader.getMethodName(i).isEmpty()) { o << "create"; } else { o << (codemaker::cpp::translateUnoToCppIdentifier( @@ -701,7 +701,7 @@ void printServiceMembers(std::ostream & o, } } - if (delegate.getLength() == 0) { + if (delegate.isEmpty()) { o << "\n// properties of service \""<< type.getStr() << "\"\n"; for (sal_uInt16 i = 0; i < reader.getFieldCount(); ++i) { OString fieldName( @@ -755,7 +755,7 @@ void generateDocumentation(std::ostream & o, &arguments); bool comment=true; - if (delegate.getLength() > 0) { + if (!delegate.isEmpty()) { if (typeClass != RT_TYPE_INTERFACE && typeClass != RT_TYPE_SERVICE ) { diff --git a/unodevtools/source/skeletonmaker/javacompskeleton.cxx b/unodevtools/source/skeletonmaker/javacompskeleton.cxx index 1b71276af7d4..5b5a86c021d4 100644 --- a/unodevtools/source/skeletonmaker/javacompskeleton.cxx +++ b/unodevtools/source/skeletonmaker/javacompskeleton.cxx @@ -66,7 +66,7 @@ void generateImports(std::ostream & o, ProgramOptions const & options, else o << "import com.sun.star.lib.uno.helper.WeakBase;\n"; } - if (propertyhelper.getLength() > 0) { + if (!propertyhelper.isEmpty()) { if (propertyhelper.equals("_")) { o << "import com.sun.star.lib.uno.helper.PropertySet;\n"; o << "import com.sun.star.beans.PropertyAttribute;\n"; @@ -938,7 +938,7 @@ void generateSkeleton(ProgramOptions const & options, checkDefaultInterfaces(interfaces, services, propertyhelper); if (options.componenttype == 2) { - if (propertyhelper.getLength() > 0) + if (!propertyhelper.isEmpty()) std::cerr << "WARNING: interfaces specifying calc add-in functions " "shouldn't support attributes!\n"; } diff --git a/unodevtools/source/skeletonmaker/javatypemaker.cxx b/unodevtools/source/skeletonmaker/javatypemaker.cxx index ae224078c184..6a192aecfda5 100644 --- a/unodevtools/source/skeletonmaker/javatypemaker.cxx +++ b/unodevtools/source/skeletonmaker/javatypemaker.cxx @@ -387,7 +387,7 @@ void printMethods(std::ostream & o, } static OString sd(RTL_CONSTASCII_STRINGPARAM("_")); - bool body = ((delegate.getLength() > 0) ? true : false); + bool body = !delegate.isEmpty(); bool defaultbody = ((delegate.equals(sd)) ? true : false); generated.add(type); @@ -577,7 +577,7 @@ void printConstructionMethods(std::ostream & o, options, manager, codemaker::convertString(reader.getSuperTypeName(0)), false); o << ' '; - if ( reader.getMethodName(i).getLength() == 0 ) { + if ( reader.getMethodName(i).isEmpty() ) { o << "create"; } else { o << (codemaker::java::translateUnoToJavaIdentifier( @@ -668,7 +668,7 @@ void generateDocumentation(std::ostream & o, &arguments); bool comment=true; - if ( delegate.getLength() > 0 ) { + if ( !delegate.isEmpty() ) { if ( typeClass != RT_TYPE_INTERFACE && typeClass != RT_TYPE_SERVICE ) return; diff --git a/unodevtools/source/skeletonmaker/skeletoncommon.cxx b/unodevtools/source/skeletonmaker/skeletoncommon.cxx index aecb39ab233c..a4c76519d735 100644 --- a/unodevtools/source/skeletonmaker/skeletoncommon.cxx +++ b/unodevtools/source/skeletonmaker/skeletoncommon.cxx @@ -248,7 +248,7 @@ void checkType(TypeManager const & manager, // constructor because in this case XInitialization is not called. if ( reader.getMethodCount() > 1 || ( reader.getMethodCount() == 1 && - reader.getMethodName(0).getLength() > 0 ) ) + !reader.getMethodName(0).isEmpty() ) ) { OString s("com.sun.star.lang.XInitialization"); if ( interfaceTypes.find(s) == interfaceTypes.end() ) diff --git a/unodevtools/source/unodevtools/typeblob.cxx b/unodevtools/source/unodevtools/typeblob.cxx index 9123bf13fff0..b5135586891b 100644 --- a/unodevtools/source/unodevtools/typeblob.cxx +++ b/unodevtools/source/unodevtools/typeblob.cxx @@ -283,7 +283,7 @@ RTFieldAccess checkPropertyFlags(short flags) { void* getTypeBlob(Reference< XHierarchicalNameAccess > xTDmgr, const OString& typeName, sal_uInt32* blobsize) { - if ( typeName.getLength() == 0 ) + if ( typeName.isEmpty() ) return NULL; OUString uTypeName(OStringToOUString(typeName, RTL_TEXTENCODING_UTF8) |