[PATCH] fdo#43460 forms: use isEmpty()

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


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/4323

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/23/4323/1

fdo#43460 forms: use isEmpty()

Change-Id: If51c22cb28646e7af3785cb086fb4a48af0f7d68
---
M forms/source/xforms/model_ui.cxx
M forms/source/xforms/submission/serialization_urlencoded.cxx
M forms/source/xforms/submission/submission_get.cxx
3 files changed, 3 insertions(+), 3 deletions(-)



diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx
index 7e28623..4dec45b 100644
--- a/forms/source/xforms/model_ui.cxx
+++ b/forms/source/xforms/model_ui.cxx
@@ -219,7 +219,7 @@
          xCurrent = xCurrent->getParentNode() )
     {
         // insert a '/' for every step except the first
-        if( aBuffer.getLength() > 0 )
+        if( !aBuffer.isEmpty() )
             aBuffer.insert( 0, sal_Unicode('/') );
 
         switch( xCurrent->getNodeType() )
diff --git a/forms/source/xforms/submission/serialization_urlencoded.cxx b/forms/source/xforms/submission/serialization_urlencoded.cxx
index 0cc80e2..3c85741 100644
--- a/forms/source/xforms/submission/serialization_urlencoded.cxx
+++ b/forms/source/xforms/submission/serialization_urlencoded.cxx
@@ -134,7 +134,7 @@
         }
 
         // found anything?
-        if (aValue.getLength() > 0)
+        if (!aValue.isEmpty())
         {
             OUString aUnencValue = aValue.makeStringAndClear();
             OStringBuffer aEncodedBuffer;
diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx
index 62efea1..4698241 100644
--- a/forms/source/xforms/submission/submission_get.cxx
+++ b/forms/source/xforms/submission/submission_get.cxx
@@ -80,7 +80,7 @@
         Sequence< sal_Int8 > aByteBuffer(size);
         while ((n = aInStream->readSomeBytes(aByteBuffer, size-1)) != 0)
             aQueryString.append((sal_Char*)aByteBuffer.getArray(), n);
-        if (aQueryString.getLength() > 0 && m_aURLObj.GetProtocol() != INET_PROT_FILE)
+        if (!aQueryString.isEmpty() && m_aURLObj.GetProtocol() != INET_PROT_FILE)
         {
             aUTF8QueryURL.append('?');
             aUTF8QueryURL.append(aQueryString.makeStringAndClear());

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

Gerrit-MessageType: newchange
Gerrit-Change-Id: If51c22cb28646e7af3785cb086fb4a48af0f7d68
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