[Libreoffice-commits] .: 2 commits - xmloff/source

Olivier Hallot ohallot at kemper.freedesktop.org
Fri Jan 27 13:14:51 PST 2012


 xmloff/source/text/txtimppr.cxx                   |    2 
 xmloff/source/text/txtlists.cxx                   |   21 ++---
 xmloff/source/text/txtparae.cxx                   |   80 +++++++++++-----------
 xmloff/source/text/txtparai.cxx                   |   39 +++++-----
 xmloff/source/text/txtprhdl.cxx                   |   10 +-
 xmloff/source/text/txtstyli.cxx                   |   14 +--
 xmloff/source/text/txtvfldi.cxx                   |    4 -
 xmloff/source/transform/ChartOASISTContext.cxx    |    2 
 xmloff/source/transform/ChartOOoTContext.cxx      |    2 
 xmloff/source/transform/ControlOOoTContext.cxx    |    4 -
 xmloff/source/transform/DocumentTContext.cxx      |    2 
 xmloff/source/transform/EventOASISTContext.cxx    |    4 -
 xmloff/source/transform/EventOOoTContext.cxx      |    2 
 xmloff/source/transform/FormPropOOoTContext.cxx   |    2 
 xmloff/source/transform/FrameOASISTContext.cxx    |    8 +-
 xmloff/source/transform/OOo2Oasis.cxx             |    6 -
 xmloff/source/transform/RenameElemTContext.cxx    |    2 
 xmloff/source/transform/StyleOASISTContext.cxx    |    8 +-
 xmloff/source/transform/StyleOOoTContext.cxx      |    8 +-
 xmloff/source/transform/TransformerBase.cxx       |   12 +--
 xmloff/source/xforms/SchemaRestrictionContext.cxx |    4 -
 xmloff/source/xforms/XFormsBindContext.cxx        |    2 
 xmloff/source/xforms/xformsexport.cxx             |   12 +--
 23 files changed, 125 insertions(+), 125 deletions(-)

New commits:
commit 260054594c91af05f2825d512801200797d10075
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Fri Jan 27 16:46:15 2012 -0200

    Fix for fdo43460 Part LIII getLength() to isEmpty()
    
    Part LIII
    Modules
    xmloff (part 6)

diff --git a/xmloff/source/transform/ChartOASISTContext.cxx b/xmloff/source/transform/ChartOASISTContext.cxx
index ed8934d..e354738 100644
--- a/xmloff/source/transform/ChartOASISTContext.cxx
+++ b/xmloff/source/transform/ChartOASISTContext.cxx
@@ -130,7 +130,7 @@ void XMLChartOASISTransformerContext::StartElement(
         }
     }
 
-    if( aAddInName.getLength() > 0 )
+    if( !aAddInName.isEmpty() )
     {
         OUString aAttrQName( GetTransformer().GetNamespaceMap().GetQNameByKey(
                                 XML_NAMESPACE_CHART,
diff --git a/xmloff/source/transform/ChartOOoTContext.cxx b/xmloff/source/transform/ChartOOoTContext.cxx
index 7ec387c..d405f0c 100644
--- a/xmloff/source/transform/ChartOOoTContext.cxx
+++ b/xmloff/source/transform/ChartOOoTContext.cxx
@@ -135,7 +135,7 @@ void XMLChartOOoTransformerContext::StartElement(
         }
     }
 
-    if( nClassName != -1 && aAddInName.getLength() > 0 )
+    if( nClassName != -1 && !aAddInName.isEmpty() )
     {
         GetTransformer().AddNamespacePrefix( aAddInName, XML_NAMESPACE_OOO );
         pMutableAttrList->SetValueByIndex( nClassName, aAddInName );
diff --git a/xmloff/source/transform/ControlOOoTContext.cxx b/xmloff/source/transform/ControlOOoTContext.cxx
index bbbefa8..941b9d2 100644
--- a/xmloff/source/transform/ControlOOoTContext.cxx
+++ b/xmloff/source/transform/ControlOOoTContext.cxx
@@ -68,7 +68,7 @@ XMLTransformerContext *XMLControlOOoTransformerContext::CreateChildContext(
 {
     XMLTransformerContext *pContext = 0;
 
-    if( !m_aElemQName.getLength() )
+    if( m_aElemQName.isEmpty() )
     {
         pContext = new XMLIgnoreTransformerContext( GetTransformer(),
                                                     rQName,
@@ -99,7 +99,7 @@ void XMLControlOOoTransformerContext::EndElement()
 void XMLControlOOoTransformerContext::Characters( const OUString& rChars )
 {
     // ignore
-    if( m_aElemQName.getLength() )
+    if( !m_aElemQName.isEmpty() )
         XMLTransformerContext::Characters( rChars );
 }
 
diff --git a/xmloff/source/transform/DocumentTContext.cxx b/xmloff/source/transform/DocumentTContext.cxx
index 1d923a6..4c38e84 100644
--- a/xmloff/source/transform/DocumentTContext.cxx
+++ b/xmloff/source/transform/DocumentTContext.cxx
@@ -129,7 +129,7 @@ void XMLDocumentTransformerContext::StartElement( const Reference< XAttributeLis
             }
         }
 
-        if( aClass.getLength() )
+        if( !aClass.isEmpty() )
         {
             if( !pMutableAttrList )
             {
diff --git a/xmloff/source/transform/EventOASISTContext.cxx b/xmloff/source/transform/EventOASISTContext.cxx
index a042d0b..cf8eeda 100644
--- a/xmloff/source/transform/EventOASISTContext.cxx
+++ b/xmloff/source/transform/EventOASISTContext.cxx
@@ -386,10 +386,10 @@ void XMLEventOASISTransformerContext::StartElement(
                         aLocation= rDoc;
                         aAttrValue = rAttrValue.copy( rDoc.getLength()+1 );
                     }
-                    if( aAttrValue.getLength() )
+                    if( !aAttrValue.isEmpty() )
                         pMutableAttrList->SetValueByIndex( i,
                     aAttrValue );
-                    if( aLocation.getLength() )
+                    if( !aLocation.isEmpty() )
                     {
                         OUString aAttrQName( GetTransformer().GetNamespaceMap().
                         GetQNameByKey( XML_NAMESPACE_SCRIPT,
diff --git a/xmloff/source/transform/EventOOoTContext.cxx b/xmloff/source/transform/EventOOoTContext.cxx
index 1e63de3..7fb6eb2 100644
--- a/xmloff/source/transform/EventOOoTContext.cxx
+++ b/xmloff/source/transform/EventOOoTContext.cxx
@@ -216,7 +216,7 @@ void XMLEventOOoTransformerContext::StartElement(
         }
     }
 
-    if( nMacroName != -1 && aLocation.getLength() > 0 )
+    if( nMacroName != -1 && !aLocation.isEmpty() )
     {
         if( !IsXMLToken( aLocation, XML_APPLICATION ) )
             aLocation = GetXMLToken( XML_DOCUMENT );
diff --git a/xmloff/source/transform/FormPropOOoTContext.cxx b/xmloff/source/transform/FormPropOOoTContext.cxx
index 9344162..d2c9142 100644
--- a/xmloff/source/transform/FormPropOOoTContext.cxx
+++ b/xmloff/source/transform/FormPropOOoTContext.cxx
@@ -264,7 +264,7 @@ void XMLFormPropOOoTransformerContext::StartElement(
         }
     }
 
-    if( aValueType.getLength() )
+    if( !aValueType.isEmpty() )
     {
         if( IsXMLToken( aValueType, XML_STRING ) )
             m_eValueToken = XML_STRING_VALUE;
diff --git a/xmloff/source/transform/FrameOASISTContext.cxx b/xmloff/source/transform/FrameOASISTContext.cxx
index 1b96da7..6d9d1d9 100644
--- a/xmloff/source/transform/FrameOASISTContext.cxx
+++ b/xmloff/source/transform/FrameOASISTContext.cxx
@@ -63,14 +63,14 @@ sal_Bool XMLFrameOASISTransformerContext::IsLinkedEmbeddedObject(
             IsXMLToken( aLocalName, XML_HREF ) )
         {
             OUString sHRef( rAttrList->getValueByIndex( i ) );
-            if (sHRef.getLength() == 0)
+            if (sHRef.isEmpty())
             {
                 // When the href is empty then the object is not linked but
                 // a placeholder.
                 return sal_False;
             }
             GetTransformer().ConvertURIToOOo( sHRef, sal_True );
-            return !(sHRef.getLength() && '#'==sHRef[0]);
+            return !(!sHRef.isEmpty() && '#'==sHRef[0]);
         }
     }
 
@@ -144,7 +144,7 @@ XMLTransformerContext *XMLFrameOASISTransformerContext::CreateChildContext(
             switch( (*aIter).second.m_nActionType )
             {
             case XML_ETACTION_COPY:
-                if( !m_aElemQName.getLength() &&
+                if( m_aElemQName.isEmpty() &&
                     !IsLinkedEmbeddedObject( rLocalName, rAttrList ) )
                 {
                     pContext = new XMLIgnoreTransformerContext( GetTransformer(),
@@ -192,7 +192,7 @@ void XMLFrameOASISTransformerContext::EndElement()
 void XMLFrameOASISTransformerContext::Characters( const OUString& rChars )
 {
     // ignore
-    if( m_aElemQName.getLength() && !m_bIgnoreElement )
+    if( !m_aElemQName.isEmpty() && !m_bIgnoreElement )
         XMLTransformerContext::Characters( rChars );
 }
 
diff --git a/xmloff/source/transform/OOo2Oasis.cxx b/xmloff/source/transform/OOo2Oasis.cxx
index 264b062..35824f8 100644
--- a/xmloff/source/transform/OOo2Oasis.cxx
+++ b/xmloff/source/transform/OOo2Oasis.cxx
@@ -1287,7 +1287,7 @@ void XMLBodyTransformerContext_Impl::StartElement(
         new XMLMutableAttributeList( rAttrList );
     Reference< XAttributeList > xAttrList = pMutableAttrList;
     OUString aClass( GetTransformer().GetClass() );
-    if( !aClass.getLength() )
+    if( aClass.isEmpty() )
     {
         aClass = GetXMLToken( XML_TEXT );
     }
@@ -1383,7 +1383,7 @@ void XMLTabStopOOoTContext_Impl::StartElement(
                                                               aNewAttrQName );
                 }
                 if( IsXMLToken( aLocalName, XML_LEADER_CHAR ) &&
-                     rAttrValue.getLength() > 0 &&
+                     !rAttrValue.isEmpty() &&
                     rAttrValue[0] != ' ' )
                 {
                     OUString aNewAttrQName(
@@ -1980,7 +1980,7 @@ void SAL_CALL OOo2OasisTransformer::Initialize(
     OSL_ENSURE( !GetDocHandler().is(), "duplication initialization" );
 
     Reference< XDocumentHandler > xDocHandler;
-    if( m_aSubServiceName.getLength() )
+    if( !m_aSubServiceName.isEmpty() )
     {
         Reference< XMultiServiceFactory > xFactory =
             comphelper::getProcessServiceFactory();
diff --git a/xmloff/source/transform/RenameElemTContext.cxx b/xmloff/source/transform/RenameElemTContext.cxx
index ef9e5b9..9eeaaf9 100644
--- a/xmloff/source/transform/RenameElemTContext.cxx
+++ b/xmloff/source/transform/RenameElemTContext.cxx
@@ -74,7 +74,7 @@ void XMLRenameElemTransformerContext::StartElement(
         const Reference< XAttributeList >& rAttrList )
 {
     Reference< XAttributeList > xAttrList( rAttrList );
-    if( m_aAttrQName.getLength() )
+    if( !m_aAttrQName.isEmpty() )
     {
         XMLMutableAttributeList *pMutableAttrList =
             new XMLMutableAttributeList( xAttrList );
diff --git a/xmloff/source/transform/StyleOASISTContext.cxx b/xmloff/source/transform/StyleOASISTContext.cxx
index 3c7636f..0a0bce3 100644
--- a/xmloff/source/transform/StyleOASISTContext.cxx
+++ b/xmloff/source/transform/StyleOASISTContext.cxx
@@ -319,7 +319,7 @@ void XMLPropertiesTContext_Impl::StartElement(
                     eLineThrough = GetTransformer().GetToken( rAttrValue );
                     break;
                 case XML_OPTACTION_LINETHROUGH_TEXT:
-                    if( rAttrValue.getLength() )
+                    if( !rAttrValue.isEmpty() )
                         cLineThroughChar = rAttrValue[0];
                     break;
                 case XML_OPTACTION_INTERPOLATION:
@@ -513,7 +513,7 @@ void XMLPropertiesTContext_Impl::StartElement(
                         OUString aToken;
                         while( aTokenEnum.getNextToken( aToken ) )
                         {
-                            if ( aNewAttrValue.getLength() > 0 )
+                            if ( !aNewAttrValue.isEmpty() )
                             {
                                 aNewAttrValue += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " ));
                             }
@@ -606,13 +606,13 @@ void XMLPropertiesTContext_Impl::StartElement(
         }
 
         // #i25616#
-        if(aOpacityValueRemember.getLength() || aImageOpacityValueRemember.getLength())
+        if(!aOpacityValueRemember.isEmpty() || !aImageOpacityValueRemember.isEmpty())
         {
             pAttrList->AddAttribute(
                     GetTransformer().GetNamespaceMap().GetQNameByKey(
                         XML_NAMESPACE_DRAW,
                         GetXMLToken( XML_TRANSPARENCY ) ),
-                    aImageOpacityValueRemember.getLength()
+                    !aImageOpacityValueRemember.isEmpty()
                     ? aImageOpacityValueRemember : aOpacityValueRemember );
         }
     }
diff --git a/xmloff/source/transform/StyleOOoTContext.cxx b/xmloff/source/transform/StyleOOoTContext.cxx
index 4f1d8d8..4b80b3c 100644
--- a/xmloff/source/transform/StyleOOoTContext.cxx
+++ b/xmloff/source/transform/StyleOOoTContext.cxx
@@ -926,7 +926,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
                 OUString aToken;
                 while( aTokenEnum.getNextToken( aToken ) )
                 {
-                    if ( aStyleMirrorAttrValue.getLength() > 0 )
+                    if ( !aStyleMirrorAttrValue.isEmpty() )
                     {
                         aStyleMirrorAttrValue += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( " " ));
                     }
@@ -999,7 +999,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
                         aDrawMirrorAttrValue);
     }
 
-    if( bMoveProtect || bSizeProtect || aProtectAttrValue.getLength() )
+    if( bMoveProtect || bSizeProtect || !aProtectAttrValue.isEmpty() )
     {
         if( (bMoveProtect ||bSizeProtect) && IsXMLToken( aProtectAttrValue, XML_NONE ) )
             aProtectAttrValue = OUString();
@@ -1007,7 +1007,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
         const OUString& rPosition = GetXMLToken( XML_POSITION );
         if( bMoveProtect && -1 == aProtectAttrValue.indexOf( rPosition ) )
         {
-            if( aProtectAttrValue.getLength() )
+            if( !aProtectAttrValue.isEmpty() )
                 aProtectAttrValue += OUString::valueOf( sal_Unicode( ' ' ) );
             aProtectAttrValue += rPosition;
         }
@@ -1015,7 +1015,7 @@ void XMLPropertiesOOoTContext_Impl::StartElement(
         const OUString& rSize = GetXMLToken( XML_SIZE );
         if( bSizeProtect && -1 == aProtectAttrValue.indexOf( rSize ) )
         {
-            if( aProtectAttrValue.getLength() )
+            if( !aProtectAttrValue.isEmpty() )
                 aProtectAttrValue += OUString::valueOf( sal_Unicode( ' ' ) );
             aProtectAttrValue += rSize;
         }
diff --git a/xmloff/source/transform/TransformerBase.cxx b/xmloff/source/transform/TransformerBase.cxx
index cc85973..e3a3304 100644
--- a/xmloff/source/transform/TransformerBase.cxx
+++ b/xmloff/source/transform/TransformerBase.cxx
@@ -279,7 +279,7 @@ void SAL_CALL XMLTransformerBase::startElement( const OUString& rName,
                 nKey = m_pNamespaceMap->Add( aPrefix, rAttrValue );
 
             const OUString& rRepName = m_pReplaceNamespaceMap->GetNameByKey( nKey );
-            if( rRepName.getLength() )
+            if( !rRepName.isEmpty() )
             {
                 if( !pMutableAttrList )
                 {
@@ -473,7 +473,7 @@ void SAL_CALL XMLTransformerBase::initialize( const Sequence< Any >& aArguments
             aAny = m_xPropSet->getPropertyValue(sPropName);
             aAny >>= sName;
         }
-        if( sName.getLength() )
+        if( !sName.isEmpty() )
         {
             m_aExtPathPrefix = OUString( RTL_CONSTASCII_USTRINGPARAM("../" ) );
 
@@ -481,7 +481,7 @@ void SAL_CALL XMLTransformerBase::initialize( const Sequence< Any >& aArguments
             // additional '../'. If the rel path contains an ':', then it is
             // an absolute URI (or invalid URI, because zip files don't
             // permit ':'), and it will be ignored.
-            if( sRelPath.getLength() )
+            if( !sRelPath.isEmpty() )
             {
                 sal_Int32 nColPos = sRelPath.indexOf( ':' );
                 OSL_ENSURE( -1 == nColPos,
@@ -1293,7 +1293,7 @@ sal_Bool XMLTransformerBase::ConvertURIToOASIS( ::rtl::OUString& rURI,
                                         sal_Bool bSupportPackage ) const
 {
     sal_Bool bRet = sal_False;
-    if( m_aExtPathPrefix.getLength() && rURI.getLength() )
+    if( !m_aExtPathPrefix.isEmpty() && !rURI.isEmpty() )
     {
         sal_Bool bRel = sal_False;
         switch( rURI[0] )
@@ -1363,7 +1363,7 @@ sal_Bool XMLTransformerBase::ConvertURIToOOo( ::rtl::OUString& rURI,
                                         sal_Bool bSupportPackage ) const
 {
     sal_Bool bRet = sal_False;
-    if( rURI.getLength() )
+    if( !rURI.isEmpty() )
     {
         sal_Bool bPackage = sal_False;
         switch( rURI[0] )
@@ -1441,7 +1441,7 @@ sal_Bool XMLTransformerBase::RenameAttributeValue(
 // static
 bool XMLTransformerBase::ConvertRNGDateTimeToISO( ::rtl::OUString& rDateTime )
 {
-    if( rDateTime.getLength() > 0 &&
+    if( !rDateTime.isEmpty() &&
         rDateTime.indexOf( sal_Unicode('.')) != -1 )
     {
         rDateTime = rDateTime.replace( sal_Unicode('.'), sal_Unicode(','));
diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx
index 16104dc..b8c6027 100644
--- a/xmloff/source/xforms/SchemaRestrictionContext.cxx
+++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx
@@ -117,7 +117,7 @@ void SchemaRestrictionContext::CreateDataType()
     if( mxDataType.is() )
         return;
 
-    DBG_ASSERT( msBaseName.getLength() > 0, "no base name?" );
+    DBG_ASSERT( !msBaseName.isEmpty(), "no base name?" );
     DBG_ASSERT( mxRepository.is(), "no repository?" );
 
     try
@@ -364,7 +364,7 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild(
     // finally, set the property
     CreateDataType();
     if( mxDataType.is()
-        && sPropertyName.getLength() > 0
+        && !sPropertyName.isEmpty()
         && pConvert != NULL
         && mxDataType->getPropertySetInfo()->hasPropertyByName(sPropertyName) )
     {
diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx
index 94aef8b..1102cc4 100644
--- a/xmloff/source/xforms/XFormsBindContext.cxx
+++ b/xmloff/source/xforms/XFormsBindContext.cxx
@@ -171,7 +171,7 @@ void lcl_fillNamespaceContainer(
         const OUString& sNamespace = aMap.GetNameByKey( nKeyIter );
 
         // as a hack, we will ignore our own 'default' namespaces
-        DBG_ASSERT( sPrefix.getLength() > 0, "no prefix?" );
+        DBG_ASSERT( !sPrefix.isEmpty(), "no prefix?" );
         if( sPrefix.getStr()[0] != sal_Unicode( '_' )  &&
             nKeyIter >= XML_OLD_NAMESPACE_META_IDX )
         {
diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx
index 39f2b9b..e0ce8ce 100644
--- a/xmloff/source/xforms/xformsexport.cxx
+++ b/xmloff/source/xforms/xformsexport.cxx
@@ -254,10 +254,10 @@ void exportXFormsInstance( SvXMLExport& rExport,
             rAny >>= xDoc;
     }
 
-    if( sId.getLength() > 0 )
+    if( !sId.isEmpty() )
         rExport.AddAttribute( XML_NAMESPACE_NONE, XML_ID, sId );
 
-    if( sURL.getLength() > 0 )
+    if( !sURL.isEmpty() )
         rExport.AddAttribute( XML_NAMESPACE_NONE, XML_SRC, sURL );
 
     SvXMLElementExport aElem( rExport, XML_NAMESPACE_XFORMS, XML_INSTANCE,
@@ -295,7 +295,7 @@ void exportXFormsBinding( SvXMLExport& rExport,
     {
         OUString sName;
         xBinding->getPropertyValue( OUSTRING("BindingID") ) >>= sName;
-        if( sName.getLength() == 0 )
+        if( sName.isEmpty() )
         {
             // if we don't have a name yet, generate one on the fly
             OUStringBuffer aBuffer;
@@ -343,7 +343,7 @@ void exportXFormsBinding( SvXMLExport& rExport,
         }
 
         // now that we have the proper type name, write out the attribute
-        if( sTypeName.getLength() > 0 )
+        if( !sTypeName.isEmpty() )
         {
             rExport.AddAttribute( XML_NAMESPACE_NONE, XML_TYPE,
                                   sTypeName );
@@ -471,7 +471,7 @@ void lcl_exportDataTypeFacets( SvXMLExport& rExport,
             OUString sValue = (*pCurrent->aConverter)(
                 rPropertySet->getPropertyValue( sName ) );
 
-            if( sValue.getLength() > 0 )
+            if( !sValue.isEmpty() )
             {
                 rExport.AddAttribute( XML_NAMESPACE_NONE, XML_VALUE, sValue );
                 SvXMLElementExport aFacet(
@@ -632,7 +632,7 @@ void lcl_export( const Reference<XPropertySet>& rPropertySet,
                        OUString::createFromAscii( pCurrent->pPropertyName ) );
         OUString sValue = (*pCurrent->aConverter)( aAny );
 
-        if( sValue.getLength() > 0 )
+        if( !sValue.isEmpty() )
             rExport.AddAttribute(
                 pCurrent->nNamespace,
                 static_cast<XMLTokenEnum>( pCurrent->nToken ),
commit 983de9808159036bd5de008d895ba6e5566c99f6
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Fri Jan 27 15:39:50 2012 -0200

    Fix for fdo43460 Part LII getLength() to isEmpty()
    
    Part LII
    Modules
    xmloff (part 5)

diff --git a/xmloff/source/text/txtimppr.cxx b/xmloff/source/text/txtimppr.cxx
index 84b7a6b..8c6d0aa 100644
--- a/xmloff/source/text/txtimppr.cxx
+++ b/xmloff/source/text/txtimppr.cxx
@@ -173,7 +173,7 @@ void XMLTextImportPropertyMapper::FontFinished(
     {
         OUString sName;
         pFontFamilyNameState->maValue >>= sName;
-        if( !sName.getLength() )
+        if( sName.isEmpty() )
             pFontFamilyNameState->mnIndex = -1;
     }
     if( !pFontFamilyNameState || pFontFamilyNameState->mnIndex == -1 )
diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx
index b615933..0d41429 100644
--- a/xmloff/source/text/txtlists.cxx
+++ b/xmloff/source/text/txtlists.cxx
@@ -167,7 +167,7 @@ void XMLTextListsHelper::KeepListAsProcessed( ::rtl::OUString sListId,
     msListStyleOfLastProcessedList = sListStyleName;
 
     // Inconsistent behavior regarding lists (#i92811#)
-    if ( sListStyleDefaultListId.getLength() != 0 )
+    if ( !sListStyleDefaultListId.isEmpty())
     {
         if ( mpMapListIdToListStyleDefaultListId == 0 )
         {
@@ -264,14 +264,14 @@ const ::rtl::OUString& XMLTextListsHelper::GetListStyleOfLastProcessedList() con
 ::rtl::OUString XMLTextListsHelper::GetListIdForListBlock( XMLTextListBlockContext& rListBlock )
 {
     ::rtl::OUString sListBlockListId( rListBlock.GetContinueListId() );
-    if ( sListBlockListId.getLength() == 0 )
+    if ( sListBlockListId.isEmpty() )
     {
         sListBlockListId = rListBlock.GetListId();
     }
 
     if ( mpMapListIdToListStyleDefaultListId != 0 )
     {
-        if ( sListBlockListId.getLength() != 0 )
+        if ( !sListBlockListId.isEmpty() )
         {
             const ::rtl::OUString sListStyleName =
                                 GetListStyleOfProcessedList( sListBlockListId );
@@ -350,14 +350,14 @@ XMLTextListsHelper::GetNumberedParagraphListId(
     const sal_uInt16 i_Level,
     const ::rtl::OUString i_StyleName)
 {
-    if (!i_StyleName.getLength()) {
+    if (i_StyleName.isEmpty()) {
         OSL_FAIL("invalid numbered-paragraph: no style-name");
     }
-    if (i_StyleName.getLength()
+    if (!i_StyleName.isEmpty()
         && (i_Level < mLastNumberedParagraphs.size())
         && (mLastNumberedParagraphs[i_Level].first == i_StyleName) )
     {
-        OSL_ENSURE(mLastNumberedParagraphs[i_Level].second.getLength(),
+        OSL_ENSURE(!mLastNumberedParagraphs[i_Level].second.isEmpty(),
             "internal error: numbered-paragraph style-name but no list-id?");
         return mLastNumberedParagraphs[i_Level].second;
     } else {
@@ -384,8 +384,8 @@ XMLTextListsHelper::EnsureNumberedParagraph(
     const ::rtl::OUString i_ListId,
     sal_Int16 & io_rLevel, const ::rtl::OUString i_StyleName)
 {
-    OSL_ENSURE(i_ListId.getLength(), "inavlid ListId");
-    OSL_ENSURE(io_rLevel >= 0, "inavlid Level");
+    OSL_ENSURE(!i_ListId.isEmpty(), "invalid ListId");
+    OSL_ENSURE(io_rLevel >= 0, "invalid Level");
     NumParaList_t & rNPList( mNPLists[i_ListId] );
     const ::rtl::OUString none; // default
     if ( rNPList.empty() && (0 != io_rLevel)) {
@@ -396,7 +396,7 @@ XMLTextListsHelper::EnsureNumberedParagraph(
     }
     // create num rule first because this might clamp the level...
     uno::Reference<container::XIndexReplace> xNumRules;
-    if ((0 == io_rLevel) || rNPList.empty() || i_StyleName.getLength()) {
+    if ((0 == io_rLevel) || rNPList.empty() || !i_StyleName.isEmpty()) {
         // no parent to inherit from, or explicit style given => new numrules!
         // index of parent: level - 1, but maybe that does not exist
         const size_t parent( std::min(static_cast<size_t>(io_rLevel),
@@ -449,8 +449,7 @@ XMLTextListsHelper::MakeNumRule(
     static ::rtl::OUString s_NumberingRules(
         RTL_CONSTASCII_USTRINGPARAM("NumberingRules"));
     uno::Reference<container::XIndexReplace> xNumRules(i_rNumRule);
-    if ( i_StyleName.getLength() &&
-         i_StyleName != i_ParentStyleName )
+    if ( !i_StyleName.isEmpty() && i_StyleName != i_ParentStyleName )
     {
         const ::rtl::OUString sDisplayStyleName(
             i_rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_LIST,
diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
index ca23ab0..5dab1cb 100644
--- a/xmloff/source/text/txtparae.cxx
+++ b/xmloff/source/text/txtparae.cxx
@@ -526,7 +526,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
                     OUString sName;
                     if( xNamed.is() )
                         sName = xNamed->getName();
-                    sal_Bool bAdd = !sName.getLength();
+                    sal_Bool bAdd = sName.isEmpty();
                     if( !bAdd )
                     {
                         Reference < XPropertySet > xNumPropSet( xNumRule,
@@ -598,7 +598,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
         if( (xPropStates.size() - nIgnoreProps) > 0 )
         {
             GetAutoStylePool().Add( nFamily, sParent, xPropStates, bDontSeek );
-            if( sCondParent.getLength() && sParent != sCondParent )
+            if( !sCondParent.isEmpty() && sParent != sCondParent )
                 GetAutoStylePool().Add( nFamily, sCondParent, xPropStates );
         }
     }
@@ -643,7 +643,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
             OUString sName;
             if( xNamed.is() )
                 sName = xNamed->getName();
-            sal_Bool bAdd = !sName.getLength();
+            sal_Bool bAdd = sName.isEmpty();
             if( !bAdd )
             {
                 Reference < XPropertySet > xNumPropSet( xNumRule,
@@ -696,7 +696,7 @@ void XMLTextParagraphExport::Add( sal_uInt16 nFamily,
         if( find_if( xPropStates.begin(), xPropStates.end(), lcl_validPropState ) != xPropStates.end() )
         {
             GetAutoStylePool().Add( nFamily, sParent, xPropStates );
-            if( sCondParent.getLength() && sParent != sCondParent )
+            if( !sCondParent.isEmpty() && sParent != sCondParent )
                 GetAutoStylePool().Add( nFamily, sCondParent, xPropStates );
         }
     }
@@ -774,7 +774,7 @@ OUString XMLTextParagraphExport::FindTextStyleAndHyperlink(
         case CTF_CHAR_STYLE_NAME:
             i->maValue >>= sName;
             i->mnIndex = -1;
-            rbHasCharStyle = sName.getLength() > 0;
+            rbHasCharStyle = !sName.isEmpty();
             if( nIgnoreProps )
                 aSecondDel = i;
             else
@@ -814,7 +814,7 @@ OUString XMLTextParagraphExport::FindTextStyleAndHyperlink(
         }
         OUString sParent; // AutoStyles should not have parents!
         sName = GetAutoStylePool().Find( XML_STYLE_FAMILY_TEXT_TEXT, sParent, xPropStates );
-        DBG_ASSERT( sName.getLength(), "AutoStyle could not be found" );
+        DBG_ASSERT( !sName.isEmpty(), "AutoStyle could not be found" );
         rbHasAutoStyle = sal_True;
     }
 
@@ -909,7 +909,7 @@ void XMLTextParagraphExport::exportListChange(
                     {
                         if ( bExportODF &&
                              eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 &&
-                             sListId.getLength() > 0 )
+                             !sListId.isEmpty() )
                         {
                             /* Property text:id at element <text:list> has to be
                                replaced by property xml:id (#i92221#)
@@ -928,7 +928,7 @@ void XMLTextParagraphExport::exportListChange(
                                         mpTextListsHelper->GenerateNewListId() );
                         if ( bExportODF &&
                              eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 &&
-                             sListId.getLength() > 0 )
+                             !sListId.isEmpty() )
                         {
                             /* Property text:id at element <text:list> has to be
                                replaced by property xml:id (#i92221#)
@@ -959,7 +959,7 @@ void XMLTextParagraphExport::exportListChange(
                         {
                             if ( bExportODF &&
                                  eODFDefaultVersion >= SvtSaveOptions::ODFVER_012 &&
-                                 sListId.getLength() > 0 )
+                                 !sListId.isEmpty() )
                             {
                                 GetExport().AddAttribute( XML_NAMESPACE_TEXT,
                                                           XML_CONTINUE_LIST,
@@ -1066,7 +1066,7 @@ void XMLTextParagraphExport::exportListChange(
                 // export of <text:number> element for last opened <text:list-item>, if requested
                 if ( GetExport().exportTextNumberElement() &&
                      eLName == XML_LIST_ITEM && nListLevelsToBeOpened == 1 && // last iteration --> last opened <text:list-item>
-                     rNextInfo.ListLabelString().getLength() > 0 )
+                     !rNextInfo.ListLabelString().isEmpty() )
                 {
                     const ::rtl::OUString aTextNumberElem =
                             OUString( GetExport().GetNamespaceMap().GetQNameByKey(
@@ -1142,7 +1142,7 @@ void XMLTextParagraphExport::exportListChange(
 
         // export of <text:number> element for <text:list-item>, if requested
         if ( GetExport().exportTextNumberElement() &&
-             rNextInfo.ListLabelString().getLength() > 0 )
+             !rNextInfo.ListLabelString().isEmpty() )
         {
             const ::rtl::OUString aTextNumberElem =
                     OUString( GetExport().GetNamespaceMap().GetQNameByKey(
@@ -1616,7 +1616,7 @@ bool XMLTextParagraphExport::collectTextAutoStylesOptimized( sal_Bool bIsProgres
                 OUString sName;
                 if( xNamed.is() )
                     sName = xNamed->getName();
-                sal_Bool bAdd = !sName.getLength();
+                sal_Bool bAdd = sName.isEmpty();
                 if( !bAdd )
                 {
                     Reference < XPropertySet > xNumPropSet( xNumRule,
@@ -1959,7 +1959,7 @@ void XMLTextParagraphExport::exportParagraph(
             if( xRef.is() )
             {
                 const OUString& rIdentifier = GetExport().getInterfaceToIdentifierMapper().getIdentifier( xRef );
-                if( rIdentifier.getLength() )
+                if( !rIdentifier.isEmpty() )
                 {
                     // FIXME: this is just temporary until EditEngine
                     // paragraphs implement XMetadatable.
@@ -1976,7 +1976,7 @@ void XMLTextParagraphExport::exportParagraph(
 
             OUString sAutoStyle( sStyle );
             sAutoStyle = Find( XML_STYLE_FAMILY_TEXT_PARAGRAPH, xPropSet, sStyle );
-            if( sAutoStyle.getLength() )
+            if( !sAutoStyle.isEmpty() )
                 GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
                               GetExport().EncodeStyleName( sAutoStyle ) );
 
@@ -1993,7 +1993,7 @@ void XMLTextParagraphExport::exportParagraph(
                 {
                     sCondStyle = Find( XML_STYLE_FAMILY_TEXT_PARAGRAPH, xPropSet,
                                           sCondStyle );
-                    if( sCondStyle.getLength() )
+                    if( !sCondStyle.isEmpty() )
                         GetExport().AddAttribute( XML_NAMESPACE_TEXT,
                                                   XML_COND_STYLE_NAME,
                               GetExport().EncodeStyleName( sCondStyle ) );
@@ -2477,7 +2477,7 @@ sal_Int32 XMLTextParagraphExport::addTextFrameAttributes(
         if( xNamed.is() )
         {
             OUString sName( xNamed->getName() );
-            if( sName.getLength() )
+            if( !sName.isEmpty() )
                 GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_NAME,
                                           xNamed->getName() );
         }
@@ -2733,11 +2733,11 @@ void XMLTextParagraphExport::exportAnyTextFrame(
                                             *pRangePropSet ), bHasAutoStyle,
                 *pRangePropSet, sCharStyleNames );
 
-            if( sStyle.getLength() )
+            if( !sStyle.isEmpty() )
                 GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
                                   GetExport().EncodeStyleName( sStyle ) );
             {
-                SvXMLElementExport aElem( GetExport(), sStyle.getLength() > 0,
+                SvXMLElementExport aElem( GetExport(), !sStyle.isEmpty(),
                     XML_NAMESPACE_TEXT, XML_SPAN, sal_False, sal_False );
                 {
                     SvXMLElementExport aElement( GetExport(),
@@ -2789,7 +2789,7 @@ void XMLTextParagraphExport::_exportTextFrame(
     OUString sAutoStyle( sStyle );
     OUString aMinHeightValue;
     sAutoStyle = Find( XML_STYLE_FAMILY_TEXT_FRAME, rPropSet, sStyle );
-    if( sAutoStyle.getLength() )
+    if( !sAutoStyle.isEmpty() )
         GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE_NAME,
                               GetExport().EncodeStyleName( sAutoStyle ) );
     addTextFrameAttributes( rPropSet, sal_False, &aMinHeightValue );
@@ -2797,7 +2797,7 @@ void XMLTextParagraphExport::_exportTextFrame(
     SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_DRAW,
                               XML_FRAME, sal_False, sal_True );
 
-    if( aMinHeightValue.getLength() )
+    if( !aMinHeightValue.isEmpty() )
         GetExport().AddAttribute( XML_NAMESPACE_FO, XML_MIN_HEIGHT,
                                   aMinHeightValue );
 
@@ -2805,7 +2805,7 @@ void XMLTextParagraphExport::_exportTextFrame(
     if( rPropSetInfo->hasPropertyByName( sChainNextName ) )
     {
         OUString sNext;
-        if( (rPropSet->getPropertyValue( sChainNextName ) >>= sNext) && sNext.getLength() > 0 )
+        if( (rPropSet->getPropertyValue( sChainNextName ) >>= sNext) && !sNext.isEmpty() )
             GetExport().AddAttribute( XML_NAMESPACE_DRAW,
                                       XML_CHAIN_NEXT_NAME,
                                       sNext );
@@ -2970,7 +2970,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
 
     OUString sAutoStyle( sStyle );
     sAutoStyle = Find( XML_STYLE_FAMILY_TEXT_FRAME, rPropSet, sStyle );
-    if( sAutoStyle.getLength() )
+    if( !sAutoStyle.isEmpty() )
         GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_STYLE_NAME,
                                   GetExport().EncodeStyleName( sAutoStyle ) );
     addTextFrameAttributes( rPropSet, sal_False );
@@ -3000,7 +3000,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
     setTextEmbeddedGraphicURL( rPropSet, sURL );
 
     // If there still is no url, then then graphic is empty
-    if( sURL.getLength() )
+    if( !sURL.isEmpty() )
     {
         GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_HREF, sURL );
         GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
@@ -3012,7 +3012,7 @@ void XMLTextParagraphExport::_exportTextGraphic(
     // draw:filter-name
     OUString sGrfFilter;
     rPropSet->getPropertyValue( sGraphicFilter ) >>= sGrfFilter;
-    if( sGrfFilter.getLength() )
+    if( !sGrfFilter.isEmpty() )
         GetExport().AddAttribute( XML_NAMESPACE_DRAW, XML_FILTER_NAME,
                                   sGrfFilter );
 
@@ -3072,7 +3072,7 @@ void XMLTextParagraphExport::exportTitleAndDescription(
     {
         OUString sObjTitle;
         rPropSet->getPropertyValue( sTitle ) >>= sObjTitle;
-        if( sObjTitle.getLength() )
+        if( !sObjTitle.isEmpty() )
         {
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_SVG,
                                       XML_TITLE, sal_True, sal_False );
@@ -3085,7 +3085,7 @@ void XMLTextParagraphExport::exportTitleAndDescription(
     {
         OUString sObjDesc;
         rPropSet->getPropertyValue( sDescription ) >>= sObjDesc;
-        if( sObjDesc.getLength() )
+        if( !sObjDesc.isEmpty() )
         {
             SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_SVG,
                                       XML_DESC, sal_True, sal_False );
@@ -3115,7 +3115,7 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
     {
         rPropSet->getPropertyValue( sHyperLinkURL ) >>= sHRef;
 
-        if( sHRef.getLength() > 0 )
+        if( !sHRef.isEmpty() )
             bExport = sal_True;
     }
 
@@ -3124,7 +3124,7 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
                     rPropState->getPropertyState( sHyperLinkName ) ) )
     {
         rPropSet->getPropertyValue( sHyperLinkName ) >>= sName;
-        if( sName.getLength() > 0 )
+        if( !sName.isEmpty() )
             bExport = sal_True;
     }
 
@@ -3133,7 +3133,7 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
                     rPropState->getPropertyState( sHyperLinkTarget ) ) )
     {
         rPropSet->getPropertyValue( sHyperLinkTarget ) >>= sTargetFrame;
-        if( sTargetFrame.getLength() )
+        if( !sTargetFrame.isEmpty() )
             bExport = sal_True;
     }
 
@@ -3151,7 +3151,7 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
             rPropState->getPropertyState( sUnvisitedCharStyleName ) ) )
     {
         rPropSet->getPropertyValue( sUnvisitedCharStyleName ) >>= sUStyleName;
-        if( sUStyleName.getLength() )
+        if( !sUStyleName.isEmpty() )
             bExport = sal_True;
     }
 
@@ -3160,7 +3160,7 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
             rPropState->getPropertyState( sVisitedCharStyleName ) ) )
     {
         rPropSet->getPropertyValue( sVisitedCharStyleName ) >>= sVStyleName;
-        if( sVStyleName.getLength() )
+        if( !sVStyleName.isEmpty() )
             bExport = sal_True;
     }
 
@@ -3169,10 +3169,10 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
         GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE );
         GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, GetExport().GetRelativeReference( sHRef ) );
 
-        if( sName.getLength() > 0 )
+        if( !sName.isEmpty() )
             GetExport().AddAttribute( XML_NAMESPACE_OFFICE, XML_NAME, sName );
 
-        if( sTargetFrame.getLength() )
+        if( !sTargetFrame.isEmpty() )
         {
             GetExport().AddAttribute( XML_NAMESPACE_OFFICE,
                                       XML_TARGET_FRAME_NAME, sTargetFrame );
@@ -3186,11 +3186,11 @@ sal_Bool XMLTextParagraphExport::addHyperlinkAttributes(
             GetExport().AddAttribute( XML_NAMESPACE_OFFICE,
                                       XML_SERVER_MAP, XML_TRUE );
 
-        if( sUStyleName.getLength() )
+        if( !sUStyleName.isEmpty() )
             GetExport().AddAttribute( XML_NAMESPACE_TEXT,
               XML_STYLE_NAME, GetExport().EncodeStyleName( sUStyleName ) );
 
-        if( sVStyleName.getLength() )
+        if( !sVStyleName.isEmpty() )
             GetExport().AddAttribute( XML_NAMESPACE_TEXT,
               XML_VISITED_STYLE_NAME, GetExport().EncodeStyleName( sVStyleName ) );
     }
@@ -3246,12 +3246,12 @@ void XMLTextParagraphExport::exportTextRange(
                 xPropSet, sCharStyleNames );
 
             OUString aText(rTextRange->getString());
-            if( sStyle.getLength() )
+            if( !sStyle.isEmpty() )
                 GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
                           GetExport().EncodeStyleName( sStyle ) );
             {
                 // in a block to make sure it is destroyed before the text:a element
-                SvXMLElementExport aElement( GetExport(), sStyle.getLength() > 0,
+                SvXMLElementExport aElement( GetExport(), !sStyle.isEmpty(),
                                           XML_NAMESPACE_TEXT, XML_SPAN, sal_False,
                                           sal_False );
                 exportText( aText, rPrevCharIsSpace );
@@ -3414,7 +3414,7 @@ void XMLTextParagraphExport::exportTextDeclarations()
             sIndexAutoMarkFileURL))
         {
             xPropertySet->getPropertyValue(sIndexAutoMarkFileURL) >>= sUrl;
-            if (sUrl.getLength() > 0)
+            if (!sUrl.isEmpty())
             {
                 GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF,
                                           GetExport().GetRelativeReference(sUrl) );
@@ -3542,7 +3542,7 @@ void XMLTextParagraphExport::exportRuby(
             OUString sEmpty;
             OUString sStyleName(Find( XML_STYLE_FAMILY_TEXT_RUBY, rPropSet,
                                         sEmpty ));
-            DBG_ASSERT(sStyleName.getLength() > 0, "I can't find the style!");
+            DBG_ASSERT(!sStyleName.isEmpty(), "I can't find the style!");
             GetExport().AddAttribute(XML_NAMESPACE_TEXT,
                                      XML_STYLE_NAME, sStyleName);
 
@@ -3568,7 +3568,7 @@ void XMLTextParagraphExport::exportRuby(
 
             // write the ruby text (with char style)
             {
-                if (sOpenRubyCharStyle.getLength() > 0)
+                if (!sOpenRubyCharStyle.isEmpty())
                     GetExport().AddAttribute(
                         XML_NAMESPACE_TEXT, XML_STYLE_NAME,
                         GetExport().EncodeStyleName( sOpenRubyCharStyle) );
diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
index 409016e..721e03b 100644
--- a/xmloff/source/text/txtparai.cxx
+++ b/xmloff/source/text/txtparai.cxx
@@ -418,7 +418,7 @@ XMLImpHyperlinkContext_Impl::XMLImpHyperlinkContext_Impl(
         }
     }
 
-    if( sShow.getLength() && !pHint->GetTargetFrameName().getLength() )
+    if( !sShow.isEmpty() && pHint->GetTargetFrameName().isEmpty() )
     {
         if( IsXMLToken( sShow, XML_NEW ) )
             pHint->SetTargetFrameName(
@@ -910,7 +910,7 @@ void XMLMetaImportContext::InsertMeta(
 {
     OSL_ENSURE(!m_bHaveAbout == !m_sProperty.getLength(),
         "XMLMetaImportContext::InsertMeta: invalid RDFa?");
-    if (m_XmlId.getLength() || (m_bHaveAbout && m_sProperty.getLength()))
+    if (!m_XmlId.isEmpty() || (m_bHaveAbout && !m_sProperty.isEmpty()))
     {
         // insert mark
         const uno::Reference<rdf::XMetadatable> xMeta(
@@ -989,7 +989,7 @@ void XMLMetaFieldImportContext::ProcessAttribute(sal_uInt16 const i_nPrefix,
 void XMLMetaFieldImportContext::InsertMeta(
     const Reference<XTextRange> & i_xInsertionRange)
 {
-    if (m_XmlId.getLength()) // valid?
+    if (!m_XmlId.isEmpty()) // valid?
     {
         // insert mark
         const Reference<XPropertySet> xPropertySet(
@@ -1003,7 +1003,7 @@ void XMLMetaFieldImportContext::InsertMeta(
         OSL_ENSURE(xPropertySet.is(), "cannot insert MetaField?");
         if (!xPropertySet.is()) return;
 
-        if (m_DataStyleName.getLength())
+        if (!m_DataStyleName.isEmpty())
         {
             sal_Bool isDefaultLanguage(sal_True);
 
@@ -1144,7 +1144,7 @@ void XMLIndexMarkImportContext_Impl::StartElement(
             if (CreateMark(xMark, sService))
             {
                 ProcessAttributes(xAttrList, xMark);
-                if (sID.getLength() > 0)
+                if (!sID.isEmpty())
                 {
                     // process only if we find an ID
                     XMLHint_Impl* pHint =
@@ -1165,7 +1165,7 @@ void XMLIndexMarkImportContext_Impl::StartElement(
 
             // call process attributes with empty XPropertySet:
             ProcessAttributes(xAttrList, xMark);
-            if (sID.getLength() > 0)
+            if (!sID.isEmpty())
             {
                 // if we have an ID, find the hint and set the end position
                 sal_uInt16 nCount = rHints.Count();
@@ -1596,7 +1596,7 @@ XMLImpSpanContext_Impl::XMLImpSpanContext_Impl(
             aStyleName = xAttrList->getValueByIndex( i );
     }
 
-    if( aStyleName.getLength() )
+    if( !aStyleName.isEmpty() )
     {
         pHint = new XMLStyleHint_Impl( aStyleName,
                   GetImport().GetTextImport()->GetCursorAsRange()->getStart() );
@@ -1993,9 +1993,9 @@ XMLParaContext::XMLParaContext(
         }
     }
 
-    if( aCondStyleName.getLength() )
+    if( !aCondStyleName.isEmpty() )
         sStyleName = aCondStyleName;
-    else if( sClassNames.getLength() )
+    else if( !sClassNames.isEmpty() )
     {
         sal_Int32 nDummy = 0;
         sStyleName = sClassNames.getToken( 0, ' ', nDummy );
@@ -2015,7 +2015,7 @@ XMLParaContext::~XMLParaContext()
     // paragraph and register it with the given identifier
     // FIXME: this is just temporary, and should be removed when
     // EditEngine paragraphs implement XMetadatable!
-    if (m_sXmlId.getLength())
+    if (!m_sXmlId.isEmpty())
     {
         Reference < XTextCursor > xIdCursor( xTxtImport->GetText()->createTextCursorByRange( xStart ) );
         if( xIdCursor.is() )
@@ -2038,7 +2038,7 @@ XMLParaContext::~XMLParaContext()
     xAttrCursor->gotoRange( xEnd, sal_True );
 
     // xml:id for RDF metadata
-    if (m_sXmlId.getLength() || m_bHaveAbout || m_sProperty.getLength())
+    if (!m_sXmlId.isEmpty() || m_bHaveAbout || !m_sProperty.isEmpty())
     {
         try {
             const uno::Reference<container::XEnumerationAccess> xEA
@@ -2064,7 +2064,7 @@ XMLParaContext::~XMLParaContext()
     }
 
     OUString const sCellParaStyleName(xTxtImport->GetCellParaStyleDefault());
-    if( sCellParaStyleName.getLength() > 0 )
+    if( !sCellParaStyleName.isEmpty() )
     {
         /* Suppress handling of outline and list attributes,
            because of side effects of method <SetStyleAndAttrs(..)> (#i80724#)
@@ -2077,7 +2077,7 @@ XMLParaContext::~XMLParaContext()
     }
 
     // #103445# for headings without style name, find the proper style
-    if( bHeading && (sStyleName.getLength() == 0) )
+    if( bHeading && sStyleName.isEmpty() )
         xTxtImport->FindOutlineStyleName( sStyleName, nOutlineLevel );
 
     // set style and hard attributes at the previous paragraph
@@ -2143,7 +2143,7 @@ XMLParaContext::~XMLParaContext()
                 {
                     const OUString& rStyleName =
                             ((XMLStyleHint_Impl *)pHint)->GetStyleName();
-                    if( rStyleName.getLength() )
+                    if( !rStyleName.isEmpty() )
                         xTxtImport->SetStyleAndAttrs( GetImport(),
                                                       xAttrCursor, rStyleName,
                                                       sal_False );
@@ -2153,7 +2153,7 @@ XMLParaContext::~XMLParaContext()
                 {
                     const OUString& rRefName =
                             ((XMLReferenceHint_Impl *)pHint)->GetRefName();
-                    if( rRefName.getLength() )
+                    if( !rRefName.isEmpty() )
                     {
                         if( !pHint->GetEnd().is() )
                             pHint->SetEnd(xEnd);
@@ -2378,14 +2378,15 @@ XMLNumberedParaContext::XMLNumberedParaContext(
 
     XMLTextListsHelper& rTextListsHelper(
         i_rImport.GetTextImport()->GetTextListHelper() );
-    if (!m_ListId.getLength()) {
+    if (m_ListId.isEmpty())
+      {
         OSL_ENSURE( ! i_rImport.GetODFVersion().equalsAsciiL(
                         RTL_CONSTASCII_STRINGPARAM("1.2") ),
             "invalid numbered-paragraph: no list-id (1.2)");
         m_ListId = rTextListsHelper.GetNumberedParagraphListId(m_Level,
             StyleName);
-        OSL_ENSURE(m_ListId.getLength(), "numbered-paragraph: no ListId");
-        if (!m_ListId.getLength()) {
+        OSL_ENSURE(!m_ListId.isEmpty(), "numbered-paragraph: no ListId");
+        if (m_ListId.isEmpty()) {
             return;
         }
     }
@@ -2403,7 +2404,7 @@ XMLNumberedParaContext::~XMLNumberedParaContext()
 
 void XMLNumberedParaContext::EndElement()
 {
-    if (m_ListId.getLength()) {
+    if (!m_ListId.isEmpty()) {
         GetImport().GetTextImport()->PopListContext();
     }
 }
diff --git a/xmloff/source/text/txtprhdl.cxx b/xmloff/source/text/txtprhdl.cxx
index 939536f..240afef 100644
--- a/xmloff/source/text/txtprhdl.cxx
+++ b/xmloff/source/text/txtprhdl.cxx
@@ -584,7 +584,7 @@ sal_Bool XMLFrameProtectPropHdl_Impl::exportXML(
 {
     if( *(sal_Bool *)rValue.getValue() )
     {
-        if( !rStrExpValue.getLength() ||
+        if( rStrExpValue.isEmpty() ||
             IsXMLToken( rStrExpValue, XML_NONE ) )
         {
                rStrExpValue = sVal;
@@ -599,7 +599,7 @@ sal_Bool XMLFrameProtectPropHdl_Impl::exportXML(
             rStrExpValue = aOut.makeStringAndClear();
         }
     }
-    else if( !rStrExpValue.getLength() )
+    else if( rStrExpValue.isEmpty() )
     {
            rStrExpValue = GetXMLToken( XML_NONE );
     }
@@ -842,7 +842,7 @@ sal_Bool XMLGrfMirrorPropHdl_Impl::exportXML(
 {
     if( *(sal_Bool *)rValue.getValue() )
     {
-        if( !rStrExpValue.getLength() ||
+        if( rStrExpValue.isEmpty() ||
             IsXMLToken( rStrExpValue, XML_NONE ) )
         {
                rStrExpValue = sVal;
@@ -867,7 +867,7 @@ sal_Bool XMLGrfMirrorPropHdl_Impl::exportXML(
             rStrExpValue = aOut.makeStringAndClear();
         }
     }
-    else if( !rStrExpValue.getLength() )
+    else if( rStrExpValue.isEmpty() )
     {
            rStrExpValue = GetXMLToken( XML_NONE );
     }
@@ -1015,7 +1015,7 @@ sal_Bool XMLTextCombineCharPropHdl_Impl::importXML(
            Any& rValue,
         const SvXMLUnitConverter& ) const
 {
-    if( rStrImpValue.getLength() )
+    if( !rStrImpValue.isEmpty() )
         rValue <<= rStrImpValue.copy( 0, 1 );
     else
         rValue <<= rStrImpValue;
diff --git a/xmloff/source/text/txtstyli.cxx b/xmloff/source/text/txtstyli.cxx
index 18255c3..61be666 100644
--- a/xmloff/source/text/txtstyli.cxx
+++ b/xmloff/source/text/txtstyli.cxx
@@ -231,7 +231,7 @@ void XMLTextStyleContext::CreateAndInsert( sal_Bool bOverwrite )
 
     sal_uInt16 nCategory = ParagraphStyleCategory::TEXT;
     if(  XML_STYLE_FAMILY_TEXT_PARAGRAPH == GetFamily() &&
-         sCategoryVal.getLength() && xStyle->isUserDefined() &&
+         !sCategoryVal.isEmpty() && xStyle->isUserDefined() &&
          xPropSetInfo->hasPropertyByName( sCategory ) &&
           SvXMLUnitConverter::convertEnum( nCategory, sCategoryVal, aCategoryMap ) )
     {
@@ -283,7 +283,7 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite )
     // Consider set empty list style (#i69523#)
     if ( !( mbListStyleSet ||
             nOutlineLevel >= 0 ||
-            sDropCapTextStyleName.getLength() ||
+            !sDropCapTextStyleName.isEmpty() ||
             bHasMasterPageName ) ||
          !xStyle.is() ||
          !( bOverwrite || IsNew() ) )
@@ -335,7 +335,7 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite )
 
         if ( bApplyListStyle )
         {
-            if ( !sListStyleName.getLength() )
+            if ( sListStyleName.isEmpty() )
             {
                 Any aAny;
                 aAny <<= sListStyleName /* empty string */;
@@ -363,7 +363,7 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite )
         }
     }
 
-    if( sDropCapTextStyleName.getLength() )
+    if( !sDropCapTextStyleName.isEmpty() )
     {
         // change list style name to display name
         OUString sDisplayDropCapTextStyleName(
@@ -390,7 +390,7 @@ void XMLTextStyleContext::Finish( sal_Bool bOverwrite )
         // The families cointaner must exist
         const Reference < XNameContainer >& rPageStyles =
             GetImport().GetTextImport()->GetPageStyles();
-        if( ( !sDisplayName.getLength() ||
+        if( ( sDisplayName.isEmpty() ||
               (rPageStyles.is() &&
                rPageStyles->hasByName( sDisplayName )) ) &&
             xPropSetInfo->hasPropertyByName( sPageDescName ) )
@@ -445,7 +445,7 @@ void XMLTextStyleContext::FillPropertySet(
             ( GetFamily() == XML_STYLE_FAMILY_TEXT_TEXT || GetFamily() == XML_STYLE_FAMILY_TEXT_PARAGRAPH ) )
         {
             bAutomatic = true;
-            if( GetAutoName().getLength() )
+            if( !GetAutoName().isEmpty() )
             {
                 OUString sAutoProp = ( GetFamily() == XML_STYLE_FAMILY_TEXT_TEXT ) ?
                     OUString( RTL_CONSTASCII_USTRINGPARAM("CharAutoStyleName") ):
@@ -526,7 +526,7 @@ void XMLTextStyleContext::FillPropertySet(
                 // if necessary.
                 OUString sFontName;
                 rAny >>= sFontName;
-                if ( sFontName.getLength() > 0 )
+                if ( !sFontName.isEmpty() )
                 {
                     OUString sStarBats( RTL_CONSTASCII_USTRINGPARAM("StarBats" ) );
                     OUString sStarMath( RTL_CONSTASCII_USTRINGPARAM("StarMath" ) );
diff --git a/xmloff/source/text/txtvfldi.cxx b/xmloff/source/text/txtvfldi.cxx
index 9b2c4e8..6ab8937 100644
--- a/xmloff/source/text/txtvfldi.cxx
+++ b/xmloff/source/text/txtvfldi.cxx
@@ -330,11 +330,11 @@ void XMLSetVarFieldImportContext::EndElement()
     //                        call field or master depending on variable
     //                        PrepareMaster() in addition to PrepareField()
 
-    DBG_ASSERT(GetServiceName().getLength()>0, "no service name for element!");
+    DBG_ASSERT(!GetServiceName().isEmpty(), "no service name for element!");
 
     if (bValid)
     {
-        DBG_ASSERT(GetName().getLength()>0, "variable name needed!");
+        DBG_ASSERT(!GetName().isEmpty(), "variable name needed!");
 
         // find field master
         Reference<XPropertySet> xMaster;


More information about the Libreoffice-commits mailing list