[PATCH] fdo#43460 connectivity, extensions, filter, idl, idlc: use isEmp...

Jelle van der Waa (via Code Review) gerrit at gerrit.libreoffice.org
Mon Jun 17 11:32:48 PDT 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/4325

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/25/4325/1

fdo#43460 connectivity,extensions,filter,idl,idlc: use isEmpty()

Change-Id: I78ba286be5aa4d731f734e5eb16adb77c686aad9
---
M connectivity/source/commontools/filtermanager.cxx
M connectivity/source/drivers/postgresql/pq_tools.cxx
M extensions/source/plugin/unx/unxmgr.cxx
M filter/source/graphicfilter/idxf/dxfgrprd.cxx
M idl/source/objects/object.cxx
M idl/source/objects/slot.cxx
M idlc/source/idlcproduce.cxx
M idlc/source/options.cxx
8 files changed, 8 insertions(+), 8 deletions(-)



diff --git a/connectivity/source/commontools/filtermanager.cxx b/connectivity/source/commontools/filtermanager.cxx
index 7719a69..7d074df 100644
--- a/connectivity/source/commontools/filtermanager.cxx
+++ b/connectivity/source/commontools/filtermanager.cxx
@@ -109,7 +109,7 @@
     //--------------------------------------------------------------------
     void FilterManager::appendFilterComponent( OUStringBuffer& io_appendTo, const OUString& i_component ) const
     {
-        if ( io_appendTo.getLength() > 0 )
+        if ( !io_appendTo.isEmpty() )
         {
             io_appendTo.insert( 0, sal_Unicode( '(' ) );
             io_appendTo.insert( 1, sal_Unicode( ' ' ) );
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx b/connectivity/source/drivers/postgresql/pq_tools.cxx
index f4125a1..11e0c30 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -767,7 +767,7 @@
             }
             if( brackets == 0 )
             {
-                if( current.getLength() > 0 || doubleQuotedValue )
+                if( !current.isEmpty() || doubleQuotedValue )
                     elements.push_back( makeAny( current.makeStringAndClear() ) );
             }
             else
diff --git a/extensions/source/plugin/unx/unxmgr.cxx b/extensions/source/plugin/unx/unxmgr.cxx
index 26a4d10..6da7fe5 100644
--- a/extensions/source/plugin/unx/unxmgr.cxx
+++ b/extensions/source/plugin/unx/unxmgr.cxx
@@ -116,7 +116,7 @@
         }
         pclose( pResult );
 
-        if( aMIME.getLength() > 0 )
+        if( !aMIME.isEmpty() )
         {
             OString aLine = aMIME.makeStringAndClear();
 
diff --git a/filter/source/graphicfilter/idxf/dxfgrprd.cxx b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
index e6a741d..895f88b 100644
--- a/filter/source/graphicfilter/idxf/dxfgrprd.cxx
+++ b/filter/source/graphicfilter/idxf/dxfgrprd.cxx
@@ -68,7 +68,7 @@
         }
     }
 
-    if( !bEnd && !rIStm.GetError() && aBuf.getLength() )
+    if( !bEnd && !rIStm.GetError() && !aBuf.isEmpty() )
         bEnd = sal_True;
 
     nOldFilePos += aBuf.getLength();
diff --git a/idl/source/objects/object.cxx b/idl/source/objects/object.cxx
index 226788e..b926b26 100644
--- a/idl/source/objects/object.cxx
+++ b/idl/source/objects/object.cxx
@@ -505,7 +505,7 @@
         SvClassElement * pEle = aClassList[n];
         SvMetaClass * pCl = pEle->GetClass();
         OStringBuffer rPre(rPrefix);
-        if( rPre.getLength() && pEle->GetPrefix().getLength() )
+        if( !rPre.isEmpty() && !pEle->GetPrefix().isEmpty() )
             rPre.append('.');
         rPre.append(pEle->GetPrefix());
 
diff --git a/idl/source/objects/slot.cxx b/idl/source/objects/slot.cxx
index 5cb3233..e77bd54 100644
--- a/idl/source/objects/slot.cxx
+++ b/idl/source/objects/slot.cxx
@@ -790,7 +790,7 @@
         aDel = ", ";
     }
 
-    if( aOut.getLength() )
+    if( !aOut.isEmpty() )
     {
         WriteTab( rOutStm, nTab );
         rOutStm << aOut.getStr() << endl;
diff --git a/idlc/source/idlcproduce.cxx b/idlc/source/idlcproduce.cxx
index 93dc8ba..5eaacbe 100644
--- a/idlc/source/idlcproduce.cxx
+++ b/idlc/source/idlcproduce.cxx
@@ -67,7 +67,7 @@
     {
         buffer.append(sysPathName.getToken(0, SEPARATOR, nIndex));
 
-        if ( buffer.getLength() > 0 && nIndex != -1 )
+        if ( !buffer.isEmpty() && nIndex != -1 )
         {
 #if defined(SAL_UNX)
             if (mkdir((char*)buffer.getStr(), 0777) == -1)
diff --git a/idlc/source/options.cxx b/idlc/source/options.cxx
index 375e145..095a971 100644
--- a/idlc/source/options.cxx
+++ b/idlc/source/options.cxx
@@ -222,7 +222,7 @@
           sal_Int32 k = 0;
           do
           {
-            if (buffer.getLength() > 0)
+            if (!buffer.isEmpty())
               buffer.append(' ');
 //          buffer.append("-I\"");
             buffer.append(param.getToken(0, ';', k));

-- 
To view, visit https://gerrit.libreoffice.org/4325
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I78ba286be5aa4d731f734e5eb16adb77c686aad9
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Jelle van der Waa <jelle at vdwaa.nl>



More information about the LibreOffice mailing list