summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
authorJelle van der Waa <jelle@vdwaa.nl>2013-06-22 12:51:51 +0200
committerDavid Tardon <dtardon@redhat.com>2013-06-24 13:16:15 +0000
commit97f71c5f8be85f47d7978259a2d82708412043fd (patch)
tree45cd5f6af26da386e78e9108f43b0181db173e7a /svl
parentddddfe8d6ffa05c467bddb3480e43d7043a3d3c9 (diff)
fdo#43460 svl: use isEmpty()
Change-Id: I441842c7514a27baea8ce5c0e7381dcf81892d6a Reviewed-on: https://gerrit.libreoffice.org/4441 Reviewed-by: David Tardon <dtardon@redhat.com> Tested-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'svl')
-rw-r--r--svl/source/misc/urihelper.cxx2
-rw-r--r--svl/source/numbers/zforlist.cxx6
-rw-r--r--svl/source/numbers/zformat.cxx4
3 files changed, 6 insertions, 6 deletions
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index 6642cd148443..61b3a0288e85 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 99c3da2596bd..abfe9c94684c 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 4ffa3ce3d7f8..720ea8727953 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