[Libreoffice-commits] core.git: svl/source

Jelle van der Waa jelle at vdwaa.nl
Mon Jun 24 06:16:35 PDT 2013


 svl/source/misc/urihelper.cxx   |    2 +-
 svl/source/numbers/zforlist.cxx |    6 +++---
 svl/source/numbers/zformat.cxx  |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 97f71c5f8be85f47d7978259a2d82708412043fd
Author: Jelle van der Waa <jelle at vdwaa.nl>
Date:   Sat Jun 22 12:51:51 2013 +0200

    fdo#43460 svl: use isEmpty()
    
    Change-Id: I441842c7514a27baea8ce5c0e7381dcf81892d6a
    Reviewed-on: https://gerrit.libreoffice.org/4441
    Reviewed-by: David Tardon <dtardon at redhat.com>
    Tested-by: David Tardon <dtardon at redhat.com>

diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index 6642cd1..61b3a02 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -235,7 +235,7 @@ OUString normalize(
             if (preCount != i) {
                 if (preCount == i - 1) {
                     buf.append(static_cast< sal_Unicode >('/'));
-                } else if (preCount - 1 == i && buf.getLength() > 0
+                } else if (preCount - 1 == i && !buf.isEmpty()
                            && buf[buf.getLength() - 1] == '/')
                 {
                     buf.setLength(buf.getLength() - 1);
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 99c3da2..abfe9c9 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -997,7 +997,7 @@ sal_uInt32 SvNumberFormatter::ImpGenerateCL( LanguageType eLnge, bool bNoAdditio
                             aDupes.append( ") ");
                         }
                     }
-                    if ( aDupes.getLength() > 0 )
+                    if ( !aDupes.isEmpty() )
                     {
                         OUStringBuffer aMsg(aDupes.getLength() + xSeq[j].formatKey.getLength() + 100);
                         aMsg.append("XML locale data FormatElement formatindex dupe: ");
@@ -2158,7 +2158,7 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
                     break;
                 }
             }
-            if (aMsg.getLength())
+            if (!aMsg.isEmpty())
             {
                 aMsg.insert(0, "SvNumberFormatter::ImpAdjustFormatCodeDefault: ");
                 aMsg.append("\nXML locale data FormatElement formatindex: ");
@@ -2174,7 +2174,7 @@ sal_Int32 SvNumberFormatter::ImpAdjustFormatCodeDefault(
             aMsg.append("no medium type default  ");
         if ( nLong != -1 && nLongDef == -1 )
             aMsg.append("no long type default  ");
-        if (aMsg.getLength())
+        if (!aMsg.isEmpty())
         {
             aMsg.insert(0, "SvNumberFormatter::ImpAdjustFormatCodeDefault: ");
             aMsg.append("\nXML locale data FormatElement group of: ");
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index 4ffa3ce..720ea87 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1356,7 +1356,7 @@ OUString SvNumberformat::LocaleType::generateCode() const
     {
         sal_uInt8 n = static_cast<sal_uInt8>((n16 & 0xF000) >> 12);
         // Omit leading zeros for consistency.
-        if (n || aBuf.getLength() || i == 3)
+        if (n || !aBuf.isEmpty() || i == 3)
         {
             aBuf.append(toUniChar(n));
         }
@@ -4306,7 +4306,7 @@ bool SvNumberformat::ImpGetNumberOutput(double fNumber,
             }
             sStr.remove( nPoint, 1 ); //  Remove .
         }
-        if (bSign && (sStr.getLength() == 0 ||
+        if (bSign && (sStr.isEmpty() ||
                       comphelper::string::getTokenCount(sStr.toString(), '0') == sStr.getLength()+1))   // Only 00000
         {
             bSign = false;              // Not -0.00


More information about the Libreoffice-commits mailing list