Author: hdu
Date: Wed Feb 12 10:41:04 2014
New Revision: 1567593

URL: http://svn.apache.org/r1567593
Log:
#i123862# use O*String's isEmpty() method to check for emptiness in the 
codemaker module

Patch-by: [email protected]
Review-by: [email protected]

Modified:
    openoffice/trunk/main/codemaker/source/bonobowrappermaker/corbamaker.cxx
    openoffice/trunk/main/codemaker/source/bonobowrappermaker/corbatype.cxx
    openoffice/trunk/main/codemaker/source/codemaker/global.cxx
    openoffice/trunk/main/codemaker/source/codemaker/unotype.cxx
    openoffice/trunk/main/codemaker/source/cppumaker/cppumaker.cxx
    openoffice/trunk/main/codemaker/source/cppumaker/cpputype.cxx
    openoffice/trunk/main/codemaker/source/cppumaker/includes.cxx
    openoffice/trunk/main/codemaker/source/cunomaker/cunomaker.cxx
    openoffice/trunk/main/codemaker/source/cunomaker/cunotype.cxx
    openoffice/trunk/main/codemaker/source/idlmaker/idlmaker.cxx
    openoffice/trunk/main/codemaker/source/idlmaker/idltype.cxx
    openoffice/trunk/main/codemaker/source/javamaker/classfile.cxx
    openoffice/trunk/main/codemaker/source/javamaker/javamaker.cxx
    openoffice/trunk/main/codemaker/source/javamaker/javatype.cxx

Modified: 
openoffice/trunk/main/codemaker/source/bonobowrappermaker/corbamaker.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/bonobowrappermaker/corbamaker.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/bonobowrappermaker/corbamaker.cxx 
(original)
+++ openoffice/trunk/main/codemaker/source/bonobowrappermaker/corbamaker.cxx 
Wed Feb 12 10:41:04 2014
@@ -167,7 +167,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
                                        } else
                                        {
                                                tmpName = typeName.copy(0, 
typeName.lastIndexOf('.')).replace('.', '/');
-                                               if (tmpName.getLength() == 0) 
+                                               if ( tmpName.isEmpty() )
                                                        tmpName = "/";
                                                else
                                                        tmpName.replace('.', 
'/');

Modified: 
openoffice/trunk/main/codemaker/source/bonobowrappermaker/corbatype.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/bonobowrappermaker/corbatype.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/bonobowrappermaker/corbatype.cxx 
(original)
+++ openoffice/trunk/main/codemaker/source/bonobowrappermaker/corbatype.cxx Wed 
Feb 12 10:41:04 2014
@@ -104,7 +104,7 @@ sal_Bool CorbaType::dumpDependedTypes(Co
                if ((index = typeName.lastIndexOf(']')) > 0)
                        typeName = typeName.copy(index + 1);
                
-               if (getUnoBaseType(typeName).getLength() == 0)
+               if ( getUnoBaseType(typeName).isEmpty() )
                {
                        if (!produceType(typeName,
                                m_typeMgr,
@@ -302,7 +302,7 @@ void CorbaType::dumpInclude(FileStream& 
                                        realTypeName = "";      
                                }
                        }
-                       while (realTypeName.getLength() > 0);
+                       while ( !realTypeName.isEmpty() );
 
                        o << "}; // namespace bonobobridge\n";
                }
@@ -341,8 +341,8 @@ void CorbaType::dumpDepIncludes(FileStre
                                bSequenceDumped = sal_True;
                        }
                        
-                       if (getUnoBaseType(relType).getLength() == 0 &&
-                               m_typeName != relType)
+                       if ( getUnoBaseType(relType).isEmpty() &&
+                                m_typeName != relType)
                        {
                                if (m_typeMgr.getTypeClass(relType) == 
RT_TYPE_INTERFACE
                                        && sPrefix.equals("HDL"))
@@ -377,7 +377,7 @@ void CorbaType::dumpNameSpace(FileStream
 {
        OString typeName(type);
        sal_Bool bOneLine = sal_True; 
-       if (typeName.getLength() == 0)
+       if ( typeName.isEmpty() )
        {
                typeName = m_typeName;
                bOneLine = sal_False;
@@ -448,7 +448,7 @@ sal_uInt32 CorbaType::checkInheritedMemb
 
        sal_uInt32 count = 0;
        OString superType(pReader->getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
                if ( aSuperReader.isValid() )
@@ -486,10 +486,10 @@ sal_uInt32 CorbaType::getInheritedMember
 
 OString        CorbaType::getTypeClass(const OString& type, sal_Bool bCStyle)
 {
-       OString         typeName = (type.getLength() > 0 ? type : m_typeName);
+       OString         typeName = ( !type.isEmpty() ? type : m_typeName);
        RTTypeClass     rtTypeClass = RT_TYPE_INVALID;
 
-       if (type.getLength() > 0)
+       if ( !type.isEmpty() )
        {
                typeName = type;
                rtTypeClass = m_typeMgr.getTypeClass(typeName);
@@ -599,7 +599,7 @@ OString CorbaType::printUnoType(const OS
        case RT_TYPE_INVALID:
        {
                OString tmp(getUnoBaseType(relType));
-               if (tmp.getLength() > 0)
+               if ( !tmp.isEmpty() )
                {
                        ret.append(getUnoBaseType(relType));
                } else
@@ -674,7 +674,7 @@ OString CorbaType::printCorbaType(const 
        case RT_TYPE_INVALID:
        {
                OString tmp(getUnoBaseType(relType));
-               if (tmp.getLength() > 0)
+               if ( !tmp.isEmpty() )
                        ret.append(getCorbaBaseType(relType));
                else
                        throw CannotDumpException("Unknown type '" + relType + 
"', incomplete type library. ("+type+")");
@@ -749,7 +749,7 @@ sal_Bool CorbaType::isPassedAsPointer(co
 sal_Bool CorbaType::isDerivedFromUnknown(const ::rtl::OString& typeName)
 {
        sal_Bool ret = sal_True;
-       if (typeName.getLength() == 0)
+       if ( typeName.isEmpty() )
                ret = sal_False;
        else if (typeName.equals("Bonobo/NullInterface"))
                ret = sal_False;
@@ -839,7 +839,7 @@ OString CorbaType::printCorbaParameter(c
        case RT_TYPE_INVALID:
        {
                OString tmp(getUnoBaseType(relType));
-               if (tmp.getLength() > 0)
+               if ( !tmp.isEmpty() )
                {
                        ret.append(getCorbaBaseType(relType));
                } else
@@ -1824,7 +1824,7 @@ void InterfaceType::dumpFunctions(FileSt
 
        initBuffer.insert(0, OString("&bonobobridge_") + 
printCorbaType(m_typeName, sal_False, sal_False) + OString("_epv"));
 
-       while(superName.getLength() != 0)
+       while( !superName.isEmpty() )
        {
                if (superName.equals("Bonobo/NullInterface"))
                {
@@ -1996,7 +1996,7 @@ sal_uInt32 InterfaceType::checkInherited
 
        sal_uInt32 count = 0;
        OString superType(pReader->getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
                if (aSuperReader.isValid())
@@ -2162,7 +2162,7 @@ void StructureType::dumpFunctions(FileSt
        }
        else
        {
-               if (superType.getLength() > 0)
+               if ( !superType.isEmpty() )
                {
                        o << "  ret = bonobobridge::cpp_convert_b2u((";
                        dumpUnoType(o, superType, sal_False, sal_False);
@@ -2210,7 +2210,7 @@ void StructureType::dumpFunctions(FileSt
                o << "  // fix me: union !!!!\n  ret = sal_False;\n";
        else
        {
-               if (superType.getLength() > 0)
+               if ( !superType.isEmpty() )
                {
                        o << "  ret = bonobobridge::cpp_convert_u2b((";
                        dumpCorbaType(o, superType, sal_False, sal_False);
@@ -2268,7 +2268,7 @@ sal_Bool StructureType::dumpSuperMember(
 {
        sal_Bool hasMember = sal_False;
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
                
@@ -2359,7 +2359,7 @@ void ExceptionType::dumpFunctions(FileSt
        sal_Int32    cIndex;
        OString      corbaFieldName;
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                o << "  ret = bonobobridge::cpp_convert_b2u((";
                dumpUnoType(o, superType, sal_False, sal_False);
@@ -2404,7 +2404,7 @@ void ExceptionType::dumpFunctions(FileSt
        dumpCorbaType(o, m_typeName, sal_False, sal_False);
        o << "*) pOut;\n\n";
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                o << "  ret = bonobobridge::cpp_convert_u2b((";
                dumpCorbaType(o, superType, sal_False, sal_False);
@@ -2463,7 +2463,7 @@ sal_Bool ExceptionType::dumpSuperMember(
 {
        sal_Bool hasMember = sal_False;
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
                

Modified: openoffice/trunk/main/codemaker/source/codemaker/global.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/codemaker/global.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/codemaker/global.cxx (original)
+++ openoffice/trunk/main/codemaker/source/codemaker/global.cxx Wed Feb 12 
10:41:04 2014
@@ -113,7 +113,7 @@ OString createFileNameFromType( const OS
                nameBuffer.append("/", 1);
 
        OString tmpStr(type);
-       if (prefix.getLength() > 0)
+       if ( !prefix.isEmpty() )
        {
                tmpStr = type.replaceAt(type.lastIndexOf('/')+1, 0, prefix);
        }
@@ -295,7 +295,7 @@ FileStream::FileStream()
 FileStream::FileStream(const OString& name, FileAccessMode mode)
        : m_file(NULL)
 {
-    if ( name.getLength() > 0 )
+    if ( !name.isEmpty() )
     {
         OUString sUrl(convertToFileUrl(name));
 #ifdef SAL_UNX        
@@ -335,7 +335,7 @@ void FileStream::createTempFile(const OS
     OUString sTmpPath;
     OUString sTmpName;
 
-    if (sPath.getLength() > 0)
+    if ( !sPath.isEmpty() )
         sTmp = sPath;
 
     sTmpPath = convertToFileUrl(sTmp);
@@ -361,7 +361,7 @@ void FileStream::createTempFile(const OS
 
 void FileStream::open(const OString& name, FileAccessMode mode)
 {
-       if ( name.getLength() > 0 )
+       if ( !name.isEmpty() )
        {
         oslFileError ret =  osl_File_E_None;
         if ((ret = osl_openFile(convertToFileUrl(name).pData, &m_file, 
checkAccessMode(mode))) == osl_File_E_None)

Modified: openoffice/trunk/main/codemaker/source/codemaker/unotype.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/codemaker/unotype.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/codemaker/unotype.cxx (original)
+++ openoffice/trunk/main/codemaker/source/codemaker/unotype.cxx Wed Feb 12 
10:41:04 2014
@@ -53,7 +53,7 @@ codemaker::UnoType::Sort codemaker::UnoT
 }
 
 bool codemaker::UnoType::isSequenceType(rtl::OString const & type) {
-    return type.getLength() > 0 && type[0] == '[';
+    return ( !type.isEmpty() && type[0] == '[' );
 }
 
 rtl::OString codemaker::UnoType::decompose(

Modified: openoffice/trunk/main/codemaker/source/cppumaker/cppumaker.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/cppumaker/cppumaker.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/cppumaker/cppumaker.cxx (original)
+++ openoffice/trunk/main/codemaker/source/cppumaker/cppumaker.cxx Wed Feb 12 
10:41:04 2014
@@ -198,7 +198,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
                                        } else
                                        {
                                                tmpName = typeName.copy(0, 
typeName.lastIndexOf('.')).replace('.', '/');
-                                               if (tmpName.getLength() == 0) 
+                                               if ( tmpName.isEmpty() )
                                                        tmpName = "/";
                                                else
                                                        tmpName.replace('.', 
'/');

Modified: openoffice/trunk/main/codemaker/source/cppumaker/cpputype.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/cppumaker/cpputype.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/cppumaker/cpputype.cxx (original)
+++ openoffice/trunk/main/codemaker/source/cppumaker/cpputype.cxx Wed Feb 12 
10:41:04 2014
@@ -243,7 +243,7 @@ sal_Bool CppuType::dumpFile(CppuOptions*
     }
     
     OString sFileName = createFileNameFromType(sOutPath, sName, sExtension);
-    if (sFileName.getLength() == 0)
+    if ( sFileName.isEmpty() )
         return sal_False;
 
        sal_Bool bFileExists = fileExists( sFileName );
@@ -492,7 +492,7 @@ void CppuType::dumpNormalGetCppuType(Fil
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
     sal_Bool bIsBaseException = sal_False;
-    if (superType.getLength() > 0)
+    if ( !superType.isEmpty() )
     {
         if ( superType.equals("com/sun/star/uno/Exception") )
         {
@@ -552,7 +552,7 @@ void CppuType::dumpNormalGetCppuType(Fil
 
     o << indent() << "typelib_static_compound_type_init( &the_type, "
       << getTypeClass(m_typeName, sal_True) << ", \"" << 
m_typeName.replace('/', '.') << "\", ";
-    if ( superType.getLength() > 0 || bIsBaseException )
+    if ( !superType.isEmpty() || bIsBaseException )
     {
         if ( bIsBaseException )
         {
@@ -606,7 +606,7 @@ void CppuType::dumpComprehensiveGetCppuT
         superType = rtl::OUStringToOString(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
-    if (superType.getLength() > 0) {
+    if ( !superType.isEmpty() ) {
         o << indent()
           << "const ::com::sun::star::uno::Type& rSuperType = ::cppu::UnoType< 
";
         dumpType(o, superType, false, false, false, true);
@@ -660,7 +660,7 @@ void CppuType::dumpComprehensiveGetCppuT
     o << indent() << "&pTD,\n" << indent() << "(typelib_TypeClass)"
       << getTypeClass() << ", sTypeName.pData,\n";
 
-    if (superType.getLength() > 0) {
+    if ( !superType.isEmpty() ) {
         o << indent() << "rSuperType.getTypeLibType(),\n";
     } else {
         o << indent() << "0,\n";
@@ -755,7 +755,7 @@ sal_uInt32 CppuType::checkInheritedMembe
         superType = rtl::OUStringToOString(
             pReader->getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                typereg::Reader 
aSuperReader(m_typeMgr.getTypeReader(superType));
                if ( aSuperReader.isValid() )
@@ -795,10 +795,10 @@ sal_uInt32 CppuType::getInheritedMemberC
 
 OString        CppuType::getTypeClass(const OString& type, sal_Bool bCStyle)
 {
-       OString         typeName = (type.getLength() > 0 ? type : m_typeName);
+       OString         typeName = (!type.isEmpty() ? type : m_typeName);
        RTTypeClass     rtTypeClass = RT_TYPE_INVALID;
 
-       if (type.getLength() > 0)
+       if ( !type.isEmpty() )
        {
                typeName = type;
                rtTypeClass = m_typeMgr.getTypeClass(typeName);
@@ -905,7 +905,7 @@ void CppuType::dumpType(FileStream& o, c
                case RT_TYPE_INVALID:
                        {
                                OString tmp(translateSimpleUnoType(relType, 
cppuUnoType));
-                               if (tmp.getLength() > 0)
+                               if ( !tmp.isEmpty() )
                                {
                                        o << tmp;
                                } else
@@ -2374,9 +2374,9 @@ sal_Bool StructureType::dumpDeclaration(
     if (m_reader.getSuperTypeCount() != 0) {
         base = rtl::OUStringToOString(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
-        OSL_ASSERT(base.getLength() > 0); //TODO
+        OSL_ASSERT( !base.isEmpty() ); //TODO
     }
-    if (base.getLength() > 0) {
+    if ( !base.isEmpty() ) {
         o << ": public " << scopedCppName(base);
     }
     o << " {\n";
@@ -2426,7 +2426,7 @@ sal_Bool StructureType::dumpDeclaration(
             o << " "
                 << rtl::OUStringToOString(
                     m_reader.getFieldName(i), RTL_TEXTENCODING_UTF8);
-            if (i == 0 && base.getLength() > 0 && type != "double"
+            if (i == 0 && !base.isEmpty() && type != "double"
                 && type != "hyper" && type != "unsigned hyper")
             {
                 OSL_ASSERT(!parameterized);
@@ -2473,7 +2473,7 @@ sal_Bool StructureType::dumpHxxFile(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
        sal_Bool first = sal_True;
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                o << indent() << ": " << scopedCppName(superType) << "()\n";
                first = sal_False;
@@ -2549,7 +2549,7 @@ sal_Bool StructureType::dumpHxxFile(
 
                inc();
         first = sal_True;
-               if (superType.getLength() > 0)
+               if ( !superType.isEmpty() )
                {
                        o << indent() << ": " << scopedCppName(superType) << 
"(";
                        dumpSuperMember(o, superType, sal_False);
@@ -2927,7 +2927,7 @@ sal_Bool StructureType::dumpSuperMember(
 {
        sal_Bool hasMember = sal_False;
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                typereg::Reader 
aSuperReader(m_typeMgr.getTypeReader(superType));
                
@@ -3127,7 +3127,7 @@ sal_Bool ExceptionType::dumpDeclaration(
         superType = rtl::OUStringToOString(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                                        o << " : public " << 
scopedCppName(superType);
                
        o << "\n{\npublic:\n";
@@ -3191,7 +3191,7 @@ sal_Bool ExceptionType::dumpDeclaration(
                o << indent();
                dumpType(o, fieldType); 
                o << " " << fieldName;
-        if (i == 0 && superType.getLength() &&
+        if (i == 0 && !superType.isEmpty() &&
             !fieldType.equals("double") && !fieldType.equals("hyper") && 
!fieldType.equals("unsigned hyper"))
         {
             o << " CPPU_GCC3_ALIGN( " << scopedCppName(superType) << " )";
@@ -3230,7 +3230,7 @@ sal_Bool ExceptionType::dumpHxxFile(
             m_reader.getSuperTypeName(0), RTL_TEXTENCODING_UTF8);
     }
        sal_Bool first = sal_True;
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                o << indent() << ": " << scopedCppName(superType) << "()\n";
                first = sal_False;
@@ -3306,7 +3306,7 @@ sal_Bool ExceptionType::dumpHxxFile(
 
                inc();
         first = sal_True;
-               if (superType.getLength() > 0)
+               if ( !superType.isEmpty() )
                {
                        o << indent() << ": " << scopedCppName(superType) << 
"(";
                        dumpSuperMember(o, superType, sal_False);
@@ -3351,7 +3351,7 @@ sal_Bool ExceptionType::dumpHxxFile(
     o << indent() << m_name << "::" << m_name << "(" << m_name
       << " const & the_other)";
     first = true;
-    if (superType.getLength() > 0) {
+    if ( !superType.isEmpty() ) {
         o << ": " << scopedCppName(superType) << "(the_other)";
         first = false;
     }
@@ -3370,7 +3370,7 @@ sal_Bool ExceptionType::dumpHxxFile(
     o << indent()
       << ("//TODO: Just like its implicitly-defined counterpart, this function"
           " definition is not exception-safe\n");
-    if (superType.getLength() > 0) {
+    if ( !superType.isEmpty() ) {
         o << indent() << scopedCppName(superType)
           << "::operator =(the_other);\n";
     }
@@ -3399,7 +3399,7 @@ sal_Bool ExceptionType::dumpSuperMember(
 {
        sal_Bool hasMember = sal_False;
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                typereg::Reader 
aSuperReader(m_typeMgr.getTypeReader(superType));
                
@@ -4094,7 +4094,7 @@ void ServiceType::addSpecialDependencies
 }
 
 bool ServiceType::isDefaultConstructor(sal_uInt16 ctorIndex) const {
-    return m_reader.getMethodName(ctorIndex).getLength() == 0;
+    return m_reader.getMethodName(ctorIndex).isEmpty();
 }
 
 bool ServiceType::hasRestParameter(sal_uInt16 ctorIndex) const {

Modified: openoffice/trunk/main/codemaker/source/cppumaker/includes.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/cppumaker/includes.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/cppumaker/includes.cxx (original)
+++ openoffice/trunk/main/codemaker/source/cppumaker/includes.cxx Wed Feb 12 
10:41:04 2014
@@ -265,7 +265,7 @@ void Includes::dumpInclude(
 {
     static char const * extension[2] = { "hdl", "hpp" };
     out << "#include \"" << registryType;
-    if (suffix.getLength() > 0) {
+    if ( !suffix.isEmpty() ) {
         out << "/" << suffix;
     }
     out << "." << extension[hpp] << "\"\n";

Modified: openoffice/trunk/main/codemaker/source/cunomaker/cunomaker.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/cunomaker/cunomaker.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/cunomaker/cunomaker.cxx (original)
+++ openoffice/trunk/main/codemaker/source/cunomaker/cunomaker.cxx Wed Feb 12 
10:41:04 2014
@@ -136,7 +136,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
                                        } else
                                        {
                                                tmpName = typeName.copy(0, 
typeName.lastIndexOf('.')).replace('.', '/');
-                                               if (tmpName.getLength() == 0) 
+                                               if ( tmpName.isEmpty() )
                                                        tmpName = "/";
                                                else
                                                        tmpName.replace('.', 
'/');

Modified: openoffice/trunk/main/codemaker/source/cunomaker/cunotype.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/cunomaker/cunotype.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/cunomaker/cunotype.cxx (original)
+++ openoffice/trunk/main/codemaker/source/cunomaker/cunotype.cxx Wed Feb 12 
10:41:04 2014
@@ -233,7 +233,7 @@ sal_Bool CunoType::dumpDependedTypes(Cun
                if ((index = typeName.lastIndexOf(']')) > 0)
                        typeName = typeName.copy(index + 1);
 
-               if (getBaseType(typeName).getLength() == 0)
+               if ( getBaseType(typeName).isEmpty() )
                {
                        if (!produceType(typeName,
                                                         m_typeMgr,
@@ -393,7 +393,7 @@ void CunoType::dumpDepIncludes(FileStrea
                                  << ">\n#endif\n";
                        }
 
-                       if (getBaseType(relType).getLength() == 0 &&
+                       if (getBaseType(relType).isEmpty() &&
                                m_typeName != relType)
                        {
                                if (m_typeMgr.getTypeClass(relType) == 
RT_TYPE_INTERFACE
@@ -582,7 +582,7 @@ void CunoType::dumpGetCunoType(FileStrea
 
                OString superType(m_reader.getSuperTypeName());
                sal_Bool bIsBaseException = sal_False;
-               if (superType.getLength() > 0)
+               if ( !superType.isEmpty() )
                {
                        if ( superType.equals("com/sun/star/uno/Exception") )
                        {
@@ -642,7 +642,7 @@ void CunoType::dumpGetCunoType(FileStrea
 
                o << indent() << "typelib_static_compound_type_init( &s_pType_" 
<< typeName << ", "
                  << getTypeClass(m_typeName, sal_True) << ", \"" << 
m_typeName.replace('/', '.') << "\", ";
-               if ( superType.getLength() > 0 || bIsBaseException )
+               if ( !superType.isEmpty() || bIsBaseException )
                {
                        if ( bIsBaseException )
                        {
@@ -703,7 +703,7 @@ void CunoType::dumpCGetCunoType(FileStre
          << indent() << "typelib_TypeDescription * pTD = 0;\n";
 
        OString superType(m_reader.getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                o << indent() << "typelib_TypeDescriptionReference * pSuperType 
= 0;\n";
 
        sal_uInt32              count = getMemberCount();
@@ -728,7 +728,7 @@ void CunoType::dumpCGetCunoType(FileStre
 
        o << indent() << "rtl_uString_newFromAscii( &pTypeName, \"" << 
m_typeName.replace('/', '.') << "\" );\n";
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                o << indent() << 
"typelib_typedescriptionreference_newByAsciiName(&pSuperType, 
typelib_TypeClass_INTERFACE, \""
                  << superType.replace('/', '.') << "\" );\n";
@@ -766,7 +766,7 @@ void CunoType::dumpCGetCunoType(FileStre
                o << indent() << "&pTD,\n" << indent()
                  << getTypeClass(OString(), sal_True) << ", pTypeName,\n";
 
-               if (superType.getLength() > 0)
+               if ( !superType.isEmpty() )
                        o << indent() << "pSuperType,\n";
                else
                        o << indent() << "0,\n";
@@ -868,7 +868,7 @@ sal_uInt32 CunoType::checkInheritedMembe
 
        sal_uInt32 count = 0;
        OString superType(pReader->getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
                if ( aSuperReader.isValid() )
@@ -911,7 +911,7 @@ void CunoType::dumpInheritedMembers(File
        TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
 
        OString baseType(aSuperReader.getSuperTypeName());
-       if (baseType.getLength() > 0)
+       if ( !baseType.isEmpty() )
        {
                dumpInheritedMembers(o, baseType);
        }
@@ -938,10 +938,10 @@ void CunoType::dumpInheritedMembers(File
 
 OString        CunoType::getTypeClass(const OString& type, sal_Bool bCStyle)
 {
-       OString         typeName = (type.getLength() > 0 ? type : m_typeName);
+       OString         typeName = ( !type.isEmpty() ? type : m_typeName );
        RTTypeClass     rtTypeClass = RT_TYPE_INVALID;
 
-       if (type.getLength() > 0)
+       if ( !type.isEmpty() )
        {
                typeName = type;
                rtTypeClass = m_typeMgr.getTypeClass(typeName);
@@ -1059,7 +1059,7 @@ void CunoType::dumpType(FileStream& o, c
                case RT_TYPE_INVALID:
                        {
                                OString tmp(getBaseType(relType));
-                               if (tmp.getLength() > 0)
+                               if ( !tmp.isEmpty() )
                                {
                                        o << tmp.getStr();
                                        if ( bParam && !bPointer && 
relType.equals("any") )
@@ -1389,7 +1389,7 @@ OString   CunoType::checkRealBaseType(cons
 
        if ( bResolveTypeOnly )
        {
-               if ( completePrefix.getLength() > 0 )
+               if ( !completePrefix.isEmpty() )
                {
                        baseType = bSeqType ? (completePrefix + baseType) : ( 
baseType + completePrefix);
                }
@@ -1575,7 +1575,7 @@ void InterfaceType::dumpInheritedFunctio
        TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
 
        OString baseType(aSuperReader.getSuperTypeName());
-       if (baseType.getLength() > 0)
+       if ( !baseType.isEmpty() )
        {
                dumpInheritedFunctions(o, baseType);
        }
@@ -1591,7 +1591,7 @@ sal_Bool InterfaceType::dumpDeclaration(
        inc();
 
        OString superType(m_reader.getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                dumpInheritedFunctions(o, superType);
 /*
        if (getNestedTypeNames().getLength() > 0)
@@ -1915,7 +1915,7 @@ void InterfaceType::dumpGetCunoType(File
                inc();
                OString superType(m_reader.getSuperTypeName());
                sal_Bool bWithBase = sal_False;
-               if (superType.getLength() > 0 && 
!superType.equals("com/sun/star/uno/XInterface"))
+               if ( !superType.isEmpty() && 
!superType.equals("com/sun/star/uno/XInterface"))
                {
                        bWithBase = sal_True;
                        o << indent() << "typelib_TypeDescriptionReference * 
pSuperType = 0;\n"
@@ -1975,7 +1975,7 @@ void InterfaceType::dumpCGetCunoType(Fil
        OString superType(m_reader.getSuperTypeName());
        sal_uInt32 count = getMemberCount();
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                o << indent() << "typelib_TypeDescriptionReference * pSuperType 
= 0;\n";
 
        if (count)
@@ -1996,7 +1996,7 @@ void InterfaceType::dumpCGetCunoType(Fil
 
        o << indent() << "rtl_uString_newFromAscii( &pTypeName, \"" << 
m_typeName.replace('/', '.') << "\" );\n";
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                o << indent() << 
"typelib_typedescriptionreference_newByAsciiName(&pSuperType, 
typelib_TypeClass_INTERFACE, \""
                  << superType.replace('/', '.') << "\" );\n";
@@ -2021,7 +2021,7 @@ void InterfaceType::dumpCGetCunoType(Fil
                        uik.m_Data1, uik.m_Data2, uik.m_Data3, uik.m_Data4, 
uik.m_Data5);
        o << buffer;
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                o << indent() << "pSuperType,\n";
        else
                o << indent() << "0,\n";
@@ -2046,7 +2046,7 @@ void InterfaceType::dumpCGetCunoType(Fil
        }
        o << indent() << "typelib_typedescription_release( 
(typelib_TypeDescription*)pTD );\n";
 
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                o << indent() << "typelib_typedescription_release( pSuperType 
);\n\n";
        else
                o << "\n";
@@ -2207,7 +2207,7 @@ sal_uInt32 InterfaceType::checkInherited
 
        sal_uInt32 count = 0;
        OString superType(pReader->getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
                if (aSuperReader.isValid())
@@ -2877,7 +2877,7 @@ sal_Bool StructureType::dumpDeclaration(
        inc();
 
        OString superType(m_reader.getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                o << indent() << superType.replace('/', '_').getStr() << " 
_Base;\n";
                //dumpInheritedMembers(o, superType);
 
@@ -2987,7 +2987,7 @@ sal_Bool ExceptionType::dumpDeclaration(
        inc();
 
        OString superType(m_reader.getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                o << indent() << superType.replace('/', '_').getStr() << " 
_Base;\n";
                //dumpInheritedMembers(o, superType);
 

Modified: openoffice/trunk/main/codemaker/source/idlmaker/idlmaker.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/idlmaker/idlmaker.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/idlmaker/idlmaker.cxx (original)
+++ openoffice/trunk/main/codemaker/source/idlmaker/idlmaker.cxx Wed Feb 12 
10:41:04 2014
@@ -136,7 +136,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
                                        } else
                                        {
                                                tmpName = typeName.copy(0, 
typeName.lastIndexOf('.')).replace('.', '/');
-                                               if (tmpName.getLength() == 0) 
+                                               if ( tmpName.isEmpty() )
                                                        tmpName = "/";
                                                else
                                                        tmpName.replace('.', 
'/');

Modified: openoffice/trunk/main/codemaker/source/idlmaker/idltype.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/idlmaker/idltype.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/idlmaker/idltype.cxx (original)
+++ openoffice/trunk/main/codemaker/source/idlmaker/idltype.cxx Wed Feb 12 
10:41:04 2014
@@ -127,7 +127,7 @@ sal_Bool IdlType::dumpDependedTypes(IdlO
                if ((index = typeName.lastIndexOf(']')) > 0)
                        typeName = typeName.copy(index + 1);
 
-               if (getBaseType(typeName).getLength() == 0)
+               if ( getBaseType(typeName).isEmpty() )
                {
                        if (!produceType(typeName,
                                                         m_typeMgr,
@@ -234,7 +234,7 @@ void IdlType::dumpDepIncludes(FileStream
 
                OString defPrefix("IDL");
 
-               if (getBaseType(relType).getLength() == 0 &&
+               if ( getBaseType(relType).isEmpty() &&
                        m_typeName != relType)
                {
                        if (m_typeMgr.getTypeClass(relType) == 
RT_TYPE_INTERFACE)
@@ -285,7 +285,7 @@ void IdlType::dumpNameSpace(FileStream& 
 {
        OString typeName(type);
        sal_Bool bOneLine = sal_True;
-       if (typeName.getLength() == 0)
+       if ( typeName.isEmpty() )
        {
                typeName = m_typeName;
                bOneLine = sal_False;
@@ -356,7 +356,7 @@ sal_uInt32 IdlType::checkInheritedMember
 
        sal_uInt32 count = 0;
        OString superType(pReader->getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
                if ( aSuperReader.isValid() )
@@ -418,7 +418,7 @@ void IdlType::dumpType(FileStream& o, co
                case RT_TYPE_INVALID:
                        {
                                OString tmp(getBaseType(relType));
-                               if (tmp.getLength() > 0)
+                               if ( !tmp.isEmpty() )
                                {
                                        tmp = tmp.replace( ' ', '_' );
                                        o << tmp;
@@ -776,12 +776,12 @@ sal_Bool InterfaceType::dumpHFile(FileSt
 
        // write documentation
        OString aDoc = m_reader.getDoku();
-       if( aDoc.getLength() )
+       if( !aDoc.isEmpty() )
                o << "/**\n" << aDoc << "\n*/";
        o << "\ninterface " << m_name;
 
        OString superType(m_reader.getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                o << " : " << scopedName(m_typeName, superType);
 
        o << "\n{\n";
@@ -828,7 +828,7 @@ void InterfaceType::dumpAttributes(FileS
 
                // write documentation
                OString aDoc = m_reader.getFieldDoku(i);
-               if( aDoc.getLength() )
+               if( !aDoc.isEmpty() )
                        o << "/**\n" << aDoc << "\n*/\n";
 
                if (access == RT_ACCESS_READONLY)
@@ -869,7 +869,7 @@ void InterfaceType::dumpMethods(FileStre
 
                // write documentation
                OString aDoc = m_reader.getMethodDoku(i);
-               if( aDoc.getLength() )
+               if( !aDoc.isEmpty() )
                        o << "/**\n" << aDoc << "\n*/\n";
 
                o << indent();
@@ -979,7 +979,7 @@ sal_uInt32 InterfaceType::checkInherited
 
        sal_uInt32 count = 0;
        OString superType(pReader->getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
                if (aSuperReader.isValid())
@@ -1258,7 +1258,7 @@ sal_Bool StructureType::dumpHFile(FileSt
 
        // write documentation
        OString aDoc = m_reader.getDoku();
-       if( aDoc.getLength() )
+       if( !aDoc.isEmpty() )
                o << "/**\n" << aDoc << "\n*/";
 
        o << "\nstruct " << m_name;
@@ -1266,7 +1266,7 @@ sal_Bool StructureType::dumpHFile(FileSt
        inc();
 
        OString superType(m_reader.getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                dumpSuperMember(o, superType);
 
        sal_uInt32              fieldCount = m_reader.getFieldCount();
@@ -1287,7 +1287,7 @@ sal_Bool StructureType::dumpHFile(FileSt
 
                // write documentation
                OString aDoc = m_reader.getFieldDoku(i);
-               if( aDoc.getLength() )
+               if( !aDoc.isEmpty() )
                        o << "/**\n" << aDoc << "\n*/";
 
                o << indent();
@@ -1307,7 +1307,7 @@ sal_Bool StructureType::dumpHFile(FileSt
 
 void StructureType::dumpSuperMember(FileStream& o, const OString& superType)
 {
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
 
@@ -1331,7 +1331,7 @@ void StructureType::dumpSuperMember(File
 
                                // write documentation
                                OString aDoc = aSuperReader.getFieldDoku(i);
-                               if( aDoc.getLength() )
+                               if( !aDoc.isEmpty() )
                                        o << "/**\n" << aDoc << "\n*/";
 
                                o << indent();
@@ -1374,7 +1374,7 @@ sal_Bool ExceptionType::dumpHFile(FileSt
 
        // write documentation
        OString aDoc = m_reader.getDoku();
-       if( aDoc.getLength() )
+       if( !aDoc.isEmpty() )
                o << "/**\n" << aDoc << "\n*/";
 
        o << "\nexception " << m_name;
@@ -1385,7 +1385,7 @@ sal_Bool ExceptionType::dumpHFile(FileSt
        o << indent() << "/*extra member to hold a derived exception */\n";
        o << indent() << "any _derivedException;\n";
        OString superType(m_reader.getSuperTypeName());
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
                dumpSuperMember(o, superType);
 
        sal_uInt32              fieldCount = m_reader.getFieldCount();
@@ -1406,7 +1406,7 @@ sal_Bool ExceptionType::dumpHFile(FileSt
 
                // write documentation
                OString aDoc = m_reader.getFieldDoku(i);
-               if( aDoc.getLength() )
+               if( !aDoc.isEmpty() )
                        o << "/**\n" << aDoc << "\n*/";
 
                o << indent();
@@ -1427,7 +1427,7 @@ sal_Bool ExceptionType::dumpHFile(FileSt
 
 void ExceptionType::dumpSuperMember(FileStream& o, const OString& superType)
 {
-       if (superType.getLength() > 0)
+       if ( !superType.isEmpty() )
        {
                TypeReader aSuperReader(m_typeMgr.getTypeReader(superType));
 
@@ -1451,7 +1451,7 @@ void ExceptionType::dumpSuperMember(File
 
                                // write documentation
                                OString aDoc = aSuperReader.getFieldDoku(i);
-                               if( aDoc.getLength() )
+                               if( !aDoc.isEmpty() )
                                        o << "/**\n" << aDoc << "\n*/";
 
                                o << indent();
@@ -1492,7 +1492,7 @@ sal_Bool EnumType::dumpHFile(FileStream&
 
        // write documentation
        OString aDoc = m_reader.getDoku();
-       if( aDoc.getLength() )
+       if( !aDoc.isEmpty() )
                o << "/**\n" << aDoc << "\n*/";
 
        o << "\nenum " << m_name << "\n{\n";

Modified: openoffice/trunk/main/codemaker/source/javamaker/classfile.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/javamaker/classfile.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/javamaker/classfile.cxx (original)
+++ openoffice/trunk/main/codemaker/source/javamaker/classfile.cxx Wed Feb 12 
10:41:04 2014
@@ -492,7 +492,7 @@ ClassFile::ClassFile(
 {
     m_thisClass = addClassInfo(thisClass);
     m_superClass = addClassInfo(superClass);
-    if (signature.getLength() != 0) {
+    if ( !signature.isEmpty() ) {
         ++m_attributesCount;
         appendU2(
             m_attributes,
@@ -605,7 +605,7 @@ void ClassFile::addField(
     appendU2(
         m_fields,
         ((constantValueIndex == 0 ? 0 : 1)
-         + (signature.getLength() == 0 ? 0 : 1)));
+         + (signature.isEmpty() ? 0 : 1)));
     if (constantValueIndex != 0) {
         appendU2(
             m_fields,
@@ -644,7 +644,7 @@ void ClassFile::addMethod(
     appendU2(
         m_methods,
         ((code == 0 ? 0 : 1) + (exceptions.empty() ? 0 : 1)
-         + (signature.getLength() == 0 ? 0 : 1)));
+         + (signature.isEmpty() ? 0 : 1)));
     if (code != 0) {
         std::vector< unsigned char >::size_type codeSize = code->m_code.size();
         std::vector< unsigned char >::size_type exceptionTableSize
@@ -891,7 +891,7 @@ sal_uInt16 ClassFile::addNameAndTypeInfo
 void ClassFile::appendSignatureAttribute(
     std::vector< unsigned char > & stream, rtl::OString const & signature)
 {
-    if (signature.getLength() != 0) {
+    if ( !signature.isEmpty() ) {
         appendU2(
             stream,
             
addUtf8Info(rtl::OString(RTL_CONSTASCII_STRINGPARAM("Signature"))));

Modified: openoffice/trunk/main/codemaker/source/javamaker/javamaker.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/javamaker/javamaker.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/javamaker/javamaker.cxx (original)
+++ openoffice/trunk/main/codemaker/source/javamaker/javamaker.cxx Wed Feb 12 
10:41:04 2014
@@ -191,7 +191,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv)
                                        } else
                                        {
                                                tmpName = typeName.copy(0, 
typeName.lastIndexOf('.')).replace('.', '/');
-                                               if (tmpName.getLength() == 0) 
+                                               if ( tmpName.isEmpty() )
                                                        tmpName = "/";
                                                else
                                                        tmpName.replace('.', 
'/');

Modified: openoffice/trunk/main/codemaker/source/javamaker/javatype.cxx
URL: 
http://svn.apache.org/viewvc/openoffice/trunk/main/codemaker/source/javamaker/javatype.cxx?rev=1567593&r1=1567592&r2=1567593&view=diff
==============================================================================
--- openoffice/trunk/main/codemaker/source/javamaker/javatype.cxx (original)
+++ openoffice/trunk/main/codemaker/source/javamaker/javatype.cxx Wed Feb 12 
10:41:04 2014
@@ -874,7 +874,7 @@ void handleEnumType(
         RTConstValue fieldValue(reader.getFieldValue(i));
         if (fieldValue.m_type != RT_TYPE_INT32
             || reader.getFieldFlags(i) != RT_ACCESS_CONST
-            || reader.getFieldTypeName(i).getLength() != 0)
+            || !reader.getFieldTypeName(i).isEmpty())
         {
             throw CannotDumpException(
                 rtl::OString(
@@ -2868,7 +2868,7 @@ void handleService(
         for (sal_uInt16 i = 0; i < methods; ++i) {
             rtl::OString name(codemaker::convertString(
                                   reader.getMethodName(i)));
-            bool defaultCtor = name.getLength() == 0;
+            bool defaultCtor = name.isEmpty();
             if (reader.getMethodFlags(i) != RT_MODE_TWOWAY
                 || (!reader.getMethodReturnTypeName(i).equalsAsciiL(
                         RTL_CONSTASCII_STRINGPARAM("void")))


Reply via email to