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

Jelle van der Waa jelle at vdwaa.nl
Mon Jun 17 12:55:36 PDT 2013


 oox/source/core/contexthandler2.cxx      |    2 +-
 oox/source/drawingml/lineproperties.cxx  |    2 +-
 oox/source/export/drawingml.cxx          |    2 +-
 oox/source/export/vmlexport.cxx          |   10 +++++-----
 oox/source/helper/storagebase.cxx        |    2 +-
 oox/source/ppt/commonbehaviorcontext.cxx |    2 +-
 6 files changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 50e6713e40cd239f7e568f00ad7adf44bda3453f
Author: Jelle van der Waa <jelle at vdwaa.nl>
Date:   Mon Jun 17 20:30:22 2013 +0200

    fdo#43460 oox: use isEmpty()
    
    Change-Id: If291a72d87001932c605755d628cecc088d50275
    Reviewed-on: https://gerrit.libreoffice.org/4324
    Reviewed-by: Noel Power <noel.power at suse.com>
    Tested-by: Noel Power <noel.power at suse.com>

diff --git a/oox/source/core/contexthandler2.cxx b/oox/source/core/contexthandler2.cxx
index 560965a..735d339 100644
--- a/oox/source/core/contexthandler2.cxx
+++ b/oox/source/core/contexthandler2.cxx
@@ -167,7 +167,7 @@ void ContextHandler2Helper::processCollectedChars()
 {
     OSL_ENSURE( !mxContextStack->empty(), "ContextHandler2Helper::processCollectedChars - no context info" );
     ElementInfo& rInfo = mxContextStack->back();
-    if( rInfo.maChars.getLength() > 0 )
+    if( !rInfo.maChars.isEmpty() )
     {
         OUString aChars = rInfo.maChars.makeStringAndClear();
         if( mbEnableTrimSpace && rInfo.mbTrimSpaces )
diff --git a/oox/source/drawingml/lineproperties.cxx b/oox/source/drawingml/lineproperties.cxx
index 09432ab..dce0ad7 100644
--- a/oox/source/drawingml/lineproperties.cxx
+++ b/oox/source/drawingml/lineproperties.cxx
@@ -203,7 +203,7 @@ void lclPushMarkerProperties( ShapePropertyMap& rPropMap,
         break;
     }
 
-    if( aBuffer.getLength() > 0 )
+    if( !aBuffer.isEmpty() )
     {
         sal_Int32 nLength = lclGetArrowSize( rArrowProps.moArrowLength.get( XML_med ) );
         sal_Int32 nWidth  = lclGetArrowSize( rArrowProps.moArrowWidth.get( XML_med ) );
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx
index 8cbeead..6b4f80e 100644
--- a/oox/source/export/drawingml.cxx
+++ b/oox/source/export/drawingml.cxx
@@ -780,7 +780,7 @@ void DrawingML::WriteRunProperties( Reference< XPropertySet > rRun, sal_Bool bIs
             usLanguageBuffer.append( eLocale.Country );
         }
 
-        if( usLanguageBuffer.getLength() )
+        if( !usLanguageBuffer.isEmpty() )
             usLanguage = usLanguageBuffer.makeStringAndClear();
     }
 
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index a6f8af0..5381d2f 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -86,7 +86,7 @@ void VMLExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
         m_nShapeType = ESCHER_ShpInst_Nil;
         m_pShapeAttrList = m_pSerializer->createAttrList();
 
-        if ( m_pShapeStyle->getLength() )
+        if ( !m_pShapeStyle->isEmpty() )
             m_pShapeStyle->makeStringAndClear();
 
         m_pShapeStyle->ensureCapacity( 200 );
@@ -132,7 +132,7 @@ sal_uInt32 VMLExport::EnterGroup( const OUString& rShapeName, const Rectangle* p
     if ( pRect )
         AddRectangleDimensions( aStyle, *pRect );
 
-    if ( aStyle.getLength() )
+    if ( !aStyle.isEmpty() )
         pAttrList->add( XML_style, aStyle.makeStringAndClear() );
 
     // coordorigin/coordsize
@@ -499,7 +499,7 @@ void VMLExport::Commit( EscherPropertyContainer& rProps, const Rectangle& rRect
                             }
                         }
 
-                        if ( aPath.getLength() )
+                        if ( !aPath.isEmpty() )
                             m_pShapeAttrList->add( XML_path, aPath.getStr() );
                     }
 #if OSL_DEBUG_LEVEL > 0
@@ -796,7 +796,7 @@ OString VMLExport::ShapeIdString( sal_uInt32 nId )
 void VMLExport::AddLineDimensions( const Rectangle& rRectangle )
 {
     // style
-    if ( m_pShapeStyle->getLength() )
+    if ( !m_pShapeStyle->isEmpty() )
         m_pShapeStyle->append( ";" );
 
     m_pShapeStyle->append( "position:absolute" );
@@ -840,7 +840,7 @@ void VMLExport::AddLineDimensions( const Rectangle& rRectangle )
 
 void VMLExport::AddRectangleDimensions( OStringBuffer& rBuffer, const Rectangle& rRectangle )
 {
-    if ( rBuffer.getLength() )
+    if ( !rBuffer.isEmpty() )
         rBuffer.append( ";" );
 
     rBuffer.append( "position:absolute;" );
diff --git a/oox/source/helper/storagebase.cxx b/oox/source/helper/storagebase.cxx
index 7f4674f..9088dae 100644
--- a/oox/source/helper/storagebase.cxx
+++ b/oox/source/helper/storagebase.cxx
@@ -119,7 +119,7 @@ const OUString& StorageBase::getName() const
 OUString StorageBase::getPath() const
 {
     OUStringBuffer aBuffer( maParentPath );
-    if( aBuffer.getLength() > 0 )
+    if( !aBuffer.isEmpty() )
         aBuffer.append( sal_Unicode( '/' ) );
     aBuffer.append( maStorageName );
     return aBuffer.makeStringAndClear();
diff --git a/oox/source/ppt/commonbehaviorcontext.cxx b/oox/source/ppt/commonbehaviorcontext.cxx
index ffaeef5..dd19dee 100644
--- a/oox/source/ppt/commonbehaviorcontext.cxx
+++ b/oox/source/ppt/commonbehaviorcontext.cxx
@@ -69,7 +69,7 @@ namespace oox { namespace ppt {
                 std::list< Attribute >::const_iterator iter;
                 for(iter = maAttributes.begin(); iter != maAttributes.end(); ++iter)
                 {
-                    if( sAttributes.getLength() )
+                    if( !sAttributes.isEmpty() )
                     {
                         sAttributes.appendAscii( ";" );
                     }


More information about the Libreoffice-commits mailing list