[Libreoffice-commits] core.git: rsc/source sdext/source sd/source ucb/source

Jelle van der Waa jelle at vdwaa.nl
Mon Jun 24 14:44:44 PDT 2013


 rsc/source/rsc/rsc.cxx                             |    4 ++--
 sd/source/filter/ppt/pptinanimations.cxx           |    2 +-
 sdext/source/pdfimport/tree/drawtreevisiting.cxx   |    6 +++---
 sdext/source/pdfimport/tree/writertreevisiting.cxx |   10 +++++-----
 sdext/source/pdfimport/wrapper/wrapper.cxx         |    2 +-
 ucb/source/ucp/ftp/ftpurl.cxx                      |    2 +-
 6 files changed, 13 insertions(+), 13 deletions(-)

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

    fdo#43460 sd,rsc,ucb,sdext: use isEmpty()
    
    Change-Id: I7a7a77c26b74078f7fc160fbaa1c8d4e912b844e
    Reviewed-on: https://gerrit.libreoffice.org/4442
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    Tested-by: Michael Stahl <mstahl at redhat.com>

diff --git a/rsc/source/rsc/rsc.cxx b/rsc/source/rsc/rsc.cxx
index 0ef48b6..aa7a54a 100644
--- a/rsc/source/rsc/rsc.cxx
+++ b/rsc/source/rsc/rsc.cxx
@@ -155,7 +155,7 @@ RscCmdLine::RscCmdLine( int argc, char ** argv, RscError * pEH )
             { // define include path
                 nCommands |= INCLUDE_FLAG;
                 OStringBuffer aBuffer(aPath);
-                if (aBuffer.getLength())
+                if (!aBuffer.isEmpty())
                     aBuffer.append(SAL_PATHSEPARATOR);
                 aBuffer.append((*ppStr) + 2);
                 aPath = aBuffer.makeStringAndClear();
@@ -636,7 +636,7 @@ ERRTYPE RscCompiler::Link()
             do
             {
                 OString aToken = aSearchPath.getToken( 0, cSearchDelim, nIndex );
-                if (aSysSearchPath.getLength())
+                if (!aSysSearchPath.isEmpty())
                     aSysSearchPath.append(cSearchDelim);
                 aSysSearchPath.append(aToken);
                 aSysSearchPath.append(cAccessDelim);
diff --git a/sd/source/filter/ppt/pptinanimations.cxx b/sd/source/filter/ppt/pptinanimations.cxx
index 75b426d..a59b7cb 100644
--- a/sd/source/filter/ppt/pptinanimations.cxx
+++ b/sd/source/filter/ppt/pptinanimations.cxx
@@ -2555,7 +2555,7 @@ bool AnimationImporter::importAttributeNamesContainer( const Atom* pAtom, OUStri
                 OUString aName;
                 if( aAny >>= aName )
                 {
-                    if( aNames.getLength() )
+                    if( !aNames.isEmpty() )
                         aNames.append( (sal_Unicode)';' );
 
                     aNames.append( aName );
diff --git a/sdext/source/pdfimport/tree/drawtreevisiting.cxx b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
index 5144015..e4f1d66 100644
--- a/sdext/source/pdfimport/tree/drawtreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/drawtreevisiting.cxx
@@ -91,7 +91,7 @@ void DrawXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element* >:
 
 void DrawXmlEmitter::visit( TextElement& elem, const std::list< Element* >::const_iterator&   )
 {
-    if( ! elem.Text.getLength() )
+    if( elem.Text.isEmpty() )
         return;
 
     OUString strSpace(32);
@@ -229,14 +229,14 @@ void DrawXmlEmitter::fillFrameProps( DrawElement&       rElem,
         }
         if( fRotate != 0.0 )
         {
-            if( aBuf.getLength() > 0 )
+            if( !aBuf.isEmpty() )
                 aBuf.append( sal_Unicode(' ') );
             aBuf.appendAscii( "rotate( " );
             aBuf.append( -fRotate );
             aBuf.appendAscii( " )" );
 
         }
-        if( aBuf.getLength() > 0 )
+        if( !aBuf.isEmpty() )
             aBuf.append( sal_Unicode(' ') );
         aBuf.appendAscii( "translate( " );
         aBuf.append( convertPixelToUnitString( rel_x ) );
diff --git a/sdext/source/pdfimport/tree/writertreevisiting.cxx b/sdext/source/pdfimport/tree/writertreevisiting.cxx
index dcb863e..b36a39b 100644
--- a/sdext/source/pdfimport/tree/writertreevisiting.cxx
+++ b/sdext/source/pdfimport/tree/writertreevisiting.cxx
@@ -58,7 +58,7 @@ void WriterXmlEmitter::visit( HyperlinkElement& elem, const std::list< Element*
 
 void WriterXmlEmitter::visit( TextElement& elem, const std::list< Element* >::const_iterator&   )
 {
-    if( ! elem.Text.getLength() )
+    if( elem.Text.isEmpty() )
         return;
 
     PropertyMap aProps;
@@ -169,7 +169,7 @@ void WriterXmlEmitter::fillFrameProps( DrawElement&       rElem,
         }
         if( fRotate != 0.0 )
         {
-            if( aBuf.getLength() > 0 )
+            if( !aBuf.isEmpty() )
                 aBuf.append( sal_Unicode(' ') );
             aBuf.appendAscii( "rotate( " );
             aBuf.append( -fRotate );
@@ -178,7 +178,7 @@ void WriterXmlEmitter::fillFrameProps( DrawElement&       rElem,
         }
         if( ! rElem.isCharacter )
         {
-            if( aBuf.getLength() > 0 )
+            if( !aBuf.isEmpty() )
                 aBuf.append( sal_Unicode(' ') );
             aBuf.appendAscii( "translate( " );
             aBuf.append( convertPixelToUnitString( rel_x ) );
@@ -750,9 +750,9 @@ void WriterXmlOptimizer::optimizeTextElements(Element& rParent)
                 if( !bRotatedFrame
                     && ! rCurGC.isRotatedOrSkewed()
                     && ! rNextGC.isRotatedOrSkewed()
-                    && pNext->Text.getLength() > 0
+                    && ! pNext->Text.isEmpty()
                     && pNext->Text[0] != sal_Unicode(' ')
-                    && pCur->Text.getLength() >  0
+                    && ! pCur->Text.isEmpty()
                     && pCur->Text[pCur->Text.getLength() - 1] != sal_Unicode(' ')
                     )
                 {
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index d091d6b..2adae20 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -1122,7 +1122,7 @@ bool xpdf_ImportFromFile( const OUString&                             rURL,
             // embedded fonts and bitmaps
             Parser aParser(rSink,pErr,xContext);
             OStringBuffer line;
-            while( osl_File_E_None == readLine(pOut, line) && line.getLength() )
+            while( osl_File_E_None == readLine(pOut, line) && !line.isEmpty() )
                 aParser.parseLine(line.makeStringAndClear());
         }
     }
diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index 6da2bf4..bf2c523 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -278,7 +278,7 @@ OUString FTPURL::ident(bool withslash,bool internal) const
         else
             bff.append(sal_Unicode('/')).append(m_aPathSegmentVec[i]);
     if(withslash)
-        if(bff.getLength() && bff[bff.getLength()-1] != sal_Unicode('/'))
+        if(!bff.isEmpty() && bff[bff.getLength()-1] != sal_Unicode('/'))
             bff.append(sal_Unicode('/'));
 
     bff.append(m_aType);


More information about the Libreoffice-commits mailing list