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

Olivier Hallot ohallot at kemper.freedesktop.org
Thu Jan 26 13:25:04 PST 2012


 xmloff/source/style/escphdl.cxx                                 |    4 
 xmloff/source/style/impastp4.cxx                                |    2 
 xmloff/source/style/lspachdl.cxx                                |    6 -
 xmloff/source/style/numehelp.cxx                                |   12 +-
 xmloff/source/style/prstylei.cxx                                |   14 +-
 xmloff/source/style/styleexp.cxx                                |   18 +--
 xmloff/source/style/xmlaustp.cxx                                |    2 
 xmloff/source/style/xmlexppr.cxx                                |    6 -
 xmloff/source/style/xmlimppr.cxx                                |    2 
 xmloff/source/style/xmlnume.cxx                                 |   24 ++--
 xmloff/source/style/xmlnumfe.cxx                                |   18 +--
 xmloff/source/style/xmlnumfi.cxx                                |   18 +--
 xmloff/source/style/xmlnumi.cxx                                 |   36 +++---
 xmloff/source/style/xmlstyle.cxx                                |    2 
 xmloff/source/style/xmltabi.cxx                                 |    4 
 xmloff/source/table/XMLTableExport.cxx                          |   14 +-
 xmloff/source/table/XMLTableImport.cxx                          |   10 -
 xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx    |    8 -
 xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx        |    5 
 xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx |    5 
 xmloff/source/text/XMLIndexMarkExport.cxx                       |    4 
 xmloff/source/text/XMLIndexTOCContext.cxx                       |    2 
 xmloff/source/text/XMLIndexTabStopEntryContext.cxx              |    2 
 xmloff/source/text/XMLIndexUserSourceContext.cxx                |    2 
 xmloff/source/text/XMLLineNumberingExport.cxx                   |    4 
 xmloff/source/text/XMLPropertyBackpatcher.cxx                   |    2 
 xmloff/source/text/XMLRedlineExport.cxx                         |    8 -
 xmloff/source/text/XMLSectionExport.cxx                         |   34 +++---
 xmloff/source/text/XMLSectionFootnoteConfigExport.cxx           |    4 
 xmloff/source/text/XMLSectionImportContext.cxx                  |    2 
 xmloff/source/text/XMLSectionSourceImportContext.cxx            |    4 
 xmloff/source/text/XMLTextFrameContext.cxx                      |   45 ++++----
 xmloff/source/text/XMLTextFrameHyperlinkContext.cxx             |    2 
 xmloff/source/text/XMLTextListBlockContext.cxx                  |   14 +-
 xmloff/source/text/XMLTextListItemContext.cxx                   |    2 
 xmloff/source/text/XMLTextMarkImportContext.cxx                 |    8 -
 xmloff/source/text/XMLTextMasterPageContext.cxx                 |    8 -
 xmloff/source/text/XMLTextNumRuleInfo.cxx                       |    7 -
 xmloff/source/text/txtdrope.cxx                                 |    4 
 xmloff/source/text/txtexppr.cxx                                 |    9 -
 xmloff/source/text/txtflde.cxx                                  |   32 +++---
 xmloff/source/text/txtfldi.cxx                                  |    8 -
 xmloff/source/text/txtftne.cxx                                  |   10 -
 xmloff/source/text/txtimp.cxx                                   |   52 ++++------
 44 files changed, 235 insertions(+), 244 deletions(-)

New commits:
commit 596469d4183ff451833348cb4454ad0d02e0138f
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Thu Jan 26 17:05:51 2012 -0200

    Fix for fdo43460 Part LI getLength() to isEmpty()
    
    Part LI
    Modules
    xmloff (part 4)

diff --git a/xmloff/source/table/XMLTableExport.cxx b/xmloff/source/table/XMLTableExport.cxx
index 1a0934a..992a7c4 100644
--- a/xmloff/source/table/XMLTableExport.cxx
+++ b/xmloff/source/table/XMLTableExport.cxx
@@ -287,7 +287,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
                 else
                     sStyleName = sParentStyleName;
 
-                if( sStyleName.getLength() )
+                if( !sStyleName.isEmpty() )
                 {
                     Reference< XInterface > xKey( xCellSet, UNO_QUERY );
                     pTableInfo->maCellStyleMap[xKey] = sStyleName;
@@ -295,7 +295,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
 
                 // create auto style for text
                 Reference< XText > xText(xCellSet, UNO_QUERY);
-                if(xText.is() && xText->getString().getLength())
+                if(xText.is() && !xText->getString().isEmpty())
                     GetExport().GetTextParagraphExport()->collectTextAutoStyles( xText );
 
                 aStringStatistic.add( sStyleName );
@@ -354,11 +354,11 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
             {
                 Reference< XInterface > xKey( xCellRange, UNO_QUERY );
                 const OUString sStyleName( pTableInfo->maRowStyleMap[xKey] );
-                if( sStyleName.getLength() )
+                if( !sStyleName.isEmpty() )
                     mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName );
 
                 sDefaultCellStyle = pTableInfo->maDefaultRowCellStyles[rowIndex];
-                if( sDefaultCellStyle.getLength() )
+                if( !sDefaultCellStyle.isEmpty() )
                     mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_DEFAULT_CELL_STYLE_NAME, sDefaultCellStyle );
             }
 
@@ -401,7 +401,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
             {
                 Reference< XInterface > xKey( xColumnProperties, UNO_QUERY );
                 const OUString sStyleName( pTableInfo->maColumnStyleMap[xKey] );
-                if( sStyleName.getLength() )
+                if( !sStyleName.isEmpty() )
                     mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName );
             }
 
@@ -430,7 +430,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
             // table:style-name
             Reference< XInterface > xKey( xCell, UNO_QUERY );
             const OUString sStyleName( pTableInfo->maCellStyleMap[xKey] );
-            if( sStyleName.getLength() && (sStyleName != rDefaultCellStyle) )
+            if( !sStyleName.isEmpty() && (sStyleName != rDefaultCellStyle) )
                 mrExport.AddAttribute(XML_NAMESPACE_TABLE, XML_STYLE_NAME, sStyleName );
         }
 
@@ -475,7 +475,7 @@ static bool has_states( const std::vector< XMLPropertyState >& xPropStates )
  void XMLTableExport::ImpExportText( const Reference< XCell >& xCell )
  {
     Reference< XText > xText( xCell, UNO_QUERY );
-    if( xText.is() && xText->getString().getLength())
+    if( xText.is() && !xText->getString().isEmpty())
         mrExport.GetTextParagraphExport()->exportText( xText );
  }
 
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index c84520c..399d214 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -410,7 +410,7 @@ void XMLTableImportContext::InitColumns()
         {
             boost::shared_ptr< ColumnInfo > xInfo( maColumnInfos[nCol] );
 
-            if( pAutoStyles && xInfo->msStyleName.getLength() )
+            if( pAutoStyles && !xInfo->msStyleName.isEmpty() )
             {
                 const XMLPropStyleContext* pStyle =
                     dynamic_cast< const XMLPropStyleContext* >(
@@ -492,7 +492,7 @@ SvXMLImportContext * XMLTableImportContext::ImportRow( sal_uInt16 nPrefix, const
             }
         }
 
-        if( sStyleName.getLength() )
+        if( !sStyleName.isEmpty() )
         {
             SvXMLStylesContext * pAutoStyles = GetImport().GetShapeImport()->GetAutoStylesContext();
             if( pAutoStyles )
@@ -608,7 +608,7 @@ OUString XMLTableImportContext::GetDefaultCellStyleName() const
     OUString sStyleName( msDefaultCellStyleName );
 
     // if there is still no style name, try default style name from column
-    if( (sStyleName.getLength() == 0) && (mnCurrentColumn < sal::static_int_cast<sal_Int32>(maColumnInfos.size())) )
+    if( (sStyleName.isEmpty()) && (mnCurrentColumn < sal::static_int_cast<sal_Int32>(maColumnInfos.size())) )
         sStyleName = maColumnInfos[mnCurrentColumn]->msDefaultCellStyleName;
 
     return sStyleName;
@@ -666,10 +666,10 @@ XMLCellImportContext::XMLCellImportContext( SvXMLImport& rImport, const Referenc
     }
 
     // if there is no style name at the cell, try default style name from row
-    if( sStyleName.getLength() == 0 )
+    if( sStyleName.isEmpty() )
         sStyleName = sDefaultCellStyleName;
 
-    if( sStyleName.getLength() )
+    if( !sStyleName.isEmpty() )
     {
         SvXMLStylesContext * pAutoStyles = GetImport().GetShapeImport()->GetAutoStylesContext();
         if( pAutoStyles )
diff --git a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
index d8f34b3..236ae27 100644
--- a/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
+++ b/xmloff/source/text/XMLFootnoteConfigurationImportContext.cxx
@@ -375,28 +375,28 @@ void XMLFootnoteConfigurationImportContext::ProcessSettings(
 {
     Any aAny;
 
-    if (sCitationStyle.getLength() > 0)
+    if (!sCitationStyle.isEmpty())
     {
         aAny <<= GetImport().GetStyleDisplayName(
                         XML_STYLE_FAMILY_TEXT_TEXT, sCitationStyle );
         rConfig->setPropertyValue(sPropertyCharStyleName, aAny);
     }
 
-    if (sAnchorStyle.getLength() > 0)
+    if (!sAnchorStyle.isEmpty())
     {
         aAny <<= GetImport().GetStyleDisplayName(
                         XML_STYLE_FAMILY_TEXT_TEXT, sAnchorStyle );
         rConfig->setPropertyValue(sPropertyAnchorCharStyleName, aAny);
     }
 
-    if (sPageStyle.getLength() > 0)
+    if (!sPageStyle.isEmpty())
     {
         aAny <<= GetImport().GetStyleDisplayName(
                         XML_STYLE_FAMILY_MASTER_PAGE, sPageStyle );
         rConfig->setPropertyValue(sPropertyPageStyleName, aAny);
     }
 
-    if (sDefaultStyle.getLength() > 0)
+    if (!sDefaultStyle.isEmpty())
     {
         aAny <<= GetImport().GetStyleDisplayName(
                         XML_STYLE_FAMILY_TEXT_PARAGRAPH, sDefaultStyle );
diff --git a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
index 28c799c..fc7fa4d 100644
--- a/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexAlphabeticalSourceContext.cxx
@@ -232,14 +232,13 @@ void XMLIndexAlphabeticalSourceContext::EndElement()
     rIndexPropertySet->setPropertyValue(sIsCommaSeparated, aAny);
 
 
-    if (sAlgorithm.getLength() > 0)
+    if (!sAlgorithm.isEmpty())
     {
         aAny <<= sAlgorithm;
         rIndexPropertySet->setPropertyValue(sSortAlgorithm, aAny);
     }
 
-    if ( (aLocale.Language.getLength() > 0) &&
-         (aLocale.Country.getLength() > 0)      )
+    if ( !aLocale.Language.isEmpty()  && !aLocale.Country.isEmpty() )
     {
         aAny <<= aLocale;
         rIndexPropertySet->setPropertyValue(sLocale, aAny);
diff --git a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
index e5963f7..254c00d 100644
--- a/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
+++ b/xmloff/source/text/XMLIndexBibliographyConfigurationContext.cxx
@@ -267,14 +267,13 @@ void XMLIndexBibliographyConfigurationContext::CreateAndInsert(sal_Bool)
                 aAny.setValue(&bSortByPosition, ::getBooleanCppuType());
                 xPropSet->setPropertyValue(sIsSortByPosition, aAny);
 
-                if( (aLocale.Language.getLength() > 0) &&
-                    (aLocale.Country.getLength() > 0)     )
+                if( !aLocale.Language.isEmpty() && !aLocale.Country.isEmpty() )
                 {
                     aAny <<= aLocale;
                     xPropSet->setPropertyValue(sLocale, aAny);
                 }
 
-                if( sAlgorithm.getLength() > 0 )
+                if( !sAlgorithm.isEmpty() )
                 {
                     aAny <<= sAlgorithm;
                     xPropSet->setPropertyValue(sSortAlgorithm, aAny);
diff --git a/xmloff/source/text/XMLIndexMarkExport.cxx b/xmloff/source/text/XMLIndexMarkExport.cxx
index 71171bb..d7bc932 100644
--- a/xmloff/source/text/XMLIndexMarkExport.cxx
+++ b/xmloff/source/text/XMLIndexMarkExport.cxx
@@ -113,7 +113,7 @@ void XMLIndexMarkExport::ExportIndexMark(
             aAny = xIndexMarkPropSet->getPropertyValue(sAlternativeText);
             OUString sTmp;
             aAny >>= sTmp;
-            DBG_ASSERT(sTmp.getLength() > 0,
+            DBG_ASSERT(!sTmp.isEmpty(),
                        "collapsed index mark without alternative text");
             rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_STRING_VALUE, sTmp);
         }
@@ -203,7 +203,7 @@ void lcl_ExportPropertyString( SvXMLExport& rExport,
     OUString sValue;
     if( rAny >>= sValue )
     {
-        if( sValue.getLength() > 0 )
+        if( !sValue.isEmpty() )
         {
             rExport.AddAttribute( XML_NAMESPACE_TEXT, eToken, sValue );
         }
diff --git a/xmloff/source/text/XMLIndexTOCContext.cxx b/xmloff/source/text/XMLIndexTOCContext.cxx
index a0e7ba3..4662c87 100644
--- a/xmloff/source/text/XMLIndexTOCContext.cxx
+++ b/xmloff/source/text/XMLIndexTOCContext.cxx
@@ -261,7 +261,7 @@ void XMLIndexTOCContext::StartElement(
         aAny.setValue( &bProtected, ::getBooleanCppuType() );
         xTOCPropertySet->setPropertyValue( sIsProtected, aAny );
 
-        if (sIndexName.getLength() > 0)
+        if (!sIndexName.isEmpty())
         {
             aAny <<= sIndexName;
             xTOCPropertySet->setPropertyValue( sName, aAny );
diff --git a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
index 3b11834..7c5f035 100644
--- a/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
+++ b/xmloff/source/text/XMLIndexTabStopEntryContext.cxx
@@ -109,7 +109,7 @@ void XMLIndexTabStopEntryContext::StartElement(
             {
                 sLeaderChar = sAttr;
                 // valid only, if we have a char!
-                bLeaderCharOK = (sAttr.getLength() > 0);
+                bLeaderCharOK = !sAttr.isEmpty();
             }
             // #i21237#
             else if ( IsXMLToken( sLocalName, XML_WITH_TAB ) )
diff --git a/xmloff/source/text/XMLIndexUserSourceContext.cxx b/xmloff/source/text/XMLIndexUserSourceContext.cxx
index 0f750ee..97e02b5 100644
--- a/xmloff/source/text/XMLIndexUserSourceContext.cxx
+++ b/xmloff/source/text/XMLIndexUserSourceContext.cxx
@@ -194,7 +194,7 @@ void XMLIndexUserSourceContext::EndElement()
     aAny.setValue(&bUseLevelParagraphStyles, ::getBooleanCppuType());
     rIndexPropertySet->setPropertyValue(sCreateFromLevelParagraphStyles, aAny);
 
-    if( sIndexName.getLength() > 0 )
+    if( !sIndexName.isEmpty() )
     {
         aAny <<= sIndexName;
         rIndexPropertySet->setPropertyValue(sUserIndexName, aAny);
diff --git a/xmloff/source/text/XMLLineNumberingExport.cxx b/xmloff/source/text/XMLLineNumberingExport.cxx
index aa7f1e9..295ca6b 100644
--- a/xmloff/source/text/XMLLineNumberingExport.cxx
+++ b/xmloff/source/text/XMLLineNumberingExport.cxx
@@ -93,7 +93,7 @@ void XMLLineNumberingExport::Export()
             aAny = xLineNumbering->getPropertyValue(sCharStyleName);
             OUString sTmp;
             aAny >>= sTmp;
-            if (sTmp.getLength() > 0)
+            if (!sTmp.isEmpty())
             {
                 rExport.AddAttribute(XML_NAMESPACE_TEXT, XML_STYLE_NAME,
                                      rExport.EncodeStyleName( sTmp ));
@@ -189,7 +189,7 @@ void XMLLineNumberingExport::Export()
             aAny = xLineNumbering->getPropertyValue(sSeparatorText);
             OUString sSeparator;
             aAny >>= sSeparator;
-            if (sSeparator.getLength() > 0)
+            if (!sSeparator.isEmpty())
             {
 
                 // SeparatorInterval
diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx
index fadec64..0d8beec 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.cxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx
@@ -61,7 +61,7 @@ XMLPropertyBackpatcher<A>::XMLPropertyBackpatcher(
     A aDef)
 :   sPropertyName(sPropName)
 ,   bDefaultHandling(bDefault)
-,   bPreserveProperty(sPreserveName.getLength()>0)
+,   bPreserveProperty(!sPreserveName.isEmpty())
 ,   sPreservePropertyName(sPreserveName)
 ,   aDefault(aDef)
 {
diff --git a/xmloff/source/text/XMLRedlineExport.cxx b/xmloff/source/text/XMLRedlineExport.cxx
index 244fd5b..007aac1 100644
--- a/xmloff/source/text/XMLRedlineExport.cxx
+++ b/xmloff/source/text/XMLRedlineExport.cxx
@@ -483,7 +483,7 @@ void XMLRedlineExport::ExportChangeInfo(
     Any aAny = rPropSet->getPropertyValue(sRedlineAuthor);
     OUString sTmp;
     aAny >>= sTmp;
-    if (sTmp.getLength() > 0)
+    if (!sTmp.isEmpty())
     {
         SvXMLElementExport aCreatorElem( rExport, XML_NAMESPACE_DC,
                                           XML_CREATOR, sal_True,
@@ -523,7 +523,7 @@ void XMLRedlineExport::ExportChangeInfo(
         {
             OUString sTmp;
             rVal.Value >>= sTmp;
-            if (sTmp.getLength() > 0)
+            if (!sTmp.isEmpty())
             {
                 rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CHG_AUTHOR, sTmp);
             }
@@ -607,7 +607,7 @@ void XMLRedlineExport::ExportStartOrEndRedline(
 
     if( bIdOK )
     {
-        DBG_ASSERT( sId.getLength() > 0, "Redlines must have IDs" );
+        DBG_ASSERT( !sId.isEmpty(), "Redlines must have IDs" );
 
         // TODO: use GetRedlineID or elimiate that function
         OUStringBuffer sBuffer(sChangePrefix);
@@ -658,7 +658,7 @@ void XMLRedlineExport::ExportStartOrEndRedline(
 
 void XMLRedlineExport::WriteComment(const OUString& rComment)
 {
-    if (rComment.getLength() > 0)
+    if (!rComment.isEmpty())
     {
         // iterate over all string-pieces separated by return (0x0a) and
         // put each inside a paragraph element.
diff --git a/xmloff/source/text/XMLSectionExport.cxx b/xmloff/source/text/XMLSectionExport.cxx
index 83ea374..77244e3 100644
--- a/xmloff/source/text/XMLSectionExport.cxx
+++ b/xmloff/source/text/XMLSectionExport.cxx
@@ -439,7 +439,7 @@ void XMLSectionExport::ExportRegularSectionStart(
     OUString sCond;
     aAny >>= sCond;
     enum XMLTokenEnum eDisplay = XML_TOKEN_INVALID;
-    if (sCond.getLength() > 0)
+    if (!sCond.isEmpty())
     {
         OUString sQValue =
             GetExport().GetNamespaceMap().GetQNameByKey( XML_NAMESPACE_OOOW,
@@ -495,23 +495,23 @@ void XMLSectionExport::ExportRegularSectionStart(
     OUString sRegionName;
     aAny >>= sRegionName;
 
-    if ( (aFileLink.FileURL.getLength() > 0) ||
-         (aFileLink.FilterName.getLength() > 0) ||
-         (sRegionName.getLength() > 0) )
+    if ( !aFileLink.FileURL.isEmpty() ||
+         !aFileLink.FilterName.isEmpty() ||
+         !sRegionName.isEmpty())
     {
-        if (aFileLink.FileURL.getLength() > 0)
+        if (!aFileLink.FileURL.isEmpty())
         {
             GetExport().AddAttribute(XML_NAMESPACE_XLINK, XML_HREF,
                                      GetExport().GetRelativeReference( aFileLink.FileURL) );
         }
 
-        if (aFileLink.FilterName.getLength() > 0)
+        if (!aFileLink.FilterName.isEmpty())
         {
             GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_FILTER_NAME,
                                      aFileLink.FilterName);
         }
 
-        if (sRegionName.getLength() > 0)
+        if (!sRegionName.isEmpty())
         {
             GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_SECTION_NAME,
                                      sRegionName);
@@ -539,9 +539,9 @@ void XMLSectionExport::ExportRegularSectionStart(
             OUString sItem;
             aAny >>= sItem;
 
-            if ( (sApplication.getLength() > 0) ||
-                 (sTopic.getLength() > 0) ||
-                 (sItem.getLength() > 0 )   )
+            if ( !sApplication.isEmpty() ||
+                 !sTopic.isEmpty() ||
+                 !sItem.isEmpty())
             {
                 GetExport().AddAttribute(XML_NAMESPACE_OFFICE,
                                          XML_DDE_APPLICATION, sApplication);
@@ -682,7 +682,7 @@ void XMLSectionExport::ExportAlphabeticalIndexStart(
         aAny = rPropertySet->getPropertyValue(sMainEntryCharacterStyleName);
         OUString sStyleName;
         aAny >>= sStyleName;
-        if (sStyleName.getLength())
+        if (!sStyleName.isEmpty())
         {
             GetExport().AddAttribute(XML_NAMESPACE_TEXT,
                                      XML_MAIN_ENTRY_STYLE_NAME,
@@ -711,7 +711,7 @@ void XMLSectionExport::ExportAlphabeticalIndexStart(
         aAny = rPropertySet->getPropertyValue(sSortAlgorithm);
         OUString sAlgorithm;
         aAny >>= sAlgorithm;
-        if (sAlgorithm.getLength() > 0)
+        if (!sAlgorithm.isEmpty())
         {
             GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_SORT_ALGORITHM,
                                       sAlgorithm );
@@ -799,7 +799,7 @@ void XMLSectionExport::ExportBaseIndexStart(
     // index name
     OUString sIndexName;
     rPropertySet->getPropertyValue(sName) >>= sIndexName;
-    if ( sIndexName.getLength() > 0 )
+    if ( !sIndexName.isEmpty() )
     {
         GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_NAME, sIndexName);
     }
@@ -1304,7 +1304,7 @@ void XMLSectionExport::ExportIndexTemplateElement(
                 case TOK_TPARAM_CHAR_STYLE:
                     // only valid, if not empty
                     rValues[i].Value >>= sCharStyle;
-                    bCharStyleOK = sCharStyle.getLength() > 0;
+                    bCharStyleOK = !sCharStyle.isEmpty();
                     break;
 
                 case TOK_TPARAM_TEXT:
@@ -1496,7 +1496,7 @@ void XMLSectionExport::ExportIndexTemplateElement(
             }
 
             // fill char ("leader char")
-            if (bFillCharOK && (sFillChar.getLength() > 0))
+            if (bFillCharOK && !sFillChar.isEmpty())
             {
                 GetExport().AddAttribute(XML_NAMESPACE_STYLE,
                                          XML_LEADER_CHAR, sFillChar);
@@ -1705,7 +1705,7 @@ void XMLSectionExport::ExportBibliographyConfiguration(SvXMLExport& rExport)
             aAny = xPropSet->getPropertyValue(sSortAlgorithm);
             OUString sAlgorithm;
             aAny >>= sAlgorithm;
-            if( sAlgorithm.getLength() > 0 )
+            if( !sAlgorithm.isEmpty() )
             {
                 rExport.AddAttribute( XML_NAMESPACE_TEXT,
                                       XML_SORT_ALGORITHM, sAlgorithm );
@@ -1908,7 +1908,7 @@ void XMLSectionExport::ExportMasterDocHeadingDummies()
                 break;
             }
         }
-        if( sStyle.getLength() > 0 )
+        if( !sStyle.isEmpty() )
         {
             GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
                                       GetExport().EncodeStyleName( sStyle ) );
diff --git a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx
index 9e806aa..3c09c16 100644
--- a/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx
+++ b/xmloff/source/text/XMLSectionFootnoteConfigExport.cxx
@@ -164,12 +164,12 @@ void XMLSectionFootnoteConfigExport::exportXML(
         if (bNumOwn)
         {
             // prefix and suffix
-            if (sNumPrefix.getLength() > 0)
+            if (!sNumPrefix.isEmpty())
             {
                     rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_NUM_PREFIX,
                                          sNumPrefix);
             }
-            if (sNumSuffix.getLength() > 0)
+            if (!sNumSuffix.isEmpty())
             {
                 rExport.AddAttribute(XML_NAMESPACE_STYLE, XML_NUM_SUFFIX,
                                      sNumSuffix);
diff --git a/xmloff/source/text/XMLSectionImportContext.cxx b/xmloff/source/text/XMLSectionImportContext.cxx
index 1ada22a..f5be934 100644
--- a/xmloff/source/text/XMLSectionImportContext.cxx
+++ b/xmloff/source/text/XMLSectionImportContext.cxx
@@ -165,7 +165,7 @@ void XMLSectionImportContext::StartElement(
                 xNamed->setName(sName);
 
                 // stylename?
-                if (sStyleName.getLength() > 0)
+                if (!sStyleName.isEmpty())
                 {
                     XMLPropStyleContext* pStyle = rHelper->
                         FindSectionStyle(sStyleName);
diff --git a/xmloff/source/text/XMLSectionSourceImportContext.cxx b/xmloff/source/text/XMLSectionSourceImportContext.cxx
index 906b08b..c2af73c 100644
--- a/xmloff/source/text/XMLSectionSourceImportContext.cxx
+++ b/xmloff/source/text/XMLSectionSourceImportContext.cxx
@@ -123,7 +123,7 @@ void XMLSectionSourceImportContext::StartElement(
     const OUString sLinkRegion(RTL_CONSTASCII_USTRINGPARAM("LinkRegion"));
 
     Any aAny;
-    if ((sURL.getLength() > 0) || (sFilterName.getLength() > 0))
+    if (!sURL.isEmpty() || !sFilterName.isEmpty())
     {
         SectionFileLink aFileLink;
         aFileLink.FileURL = GetImport().GetAbsoluteReference( sURL );
@@ -133,7 +133,7 @@ void XMLSectionSourceImportContext::StartElement(
         rSectionPropertySet->setPropertyValue(sFileLink, aAny);
     }
 
-    if (sSectionName.getLength() > 0)
+    if (!sSectionName.isEmpty())
     {
         aAny <<= sSectionName;
         rSectionPropertySet->setPropertyValue(sLinkRegion, aAny);
diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index f12f66b..e984b34 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -214,7 +214,7 @@ XMLTextFrameParam_Impl::XMLTextFrameParam_Impl(
             }
         }
     }
-    if (sName.getLength() && bFoundValue )
+    if (!sName.isEmpty() && bFoundValue )
         rParamMap[sName] = sValue;
 }
 class XMLTextFrameContourContext_Impl : public SvXMLImportContext
@@ -301,10 +301,9 @@ XMLTextFrameContourContext_Impl::XMLTextFrameContourContext_Impl(
             RTL_CONSTASCII_USTRINGPARAM("ContourPolyPolygon") );
     Reference < XPropertySetInfo > xPropSetInfo =
         rPropSet->getPropertySetInfo();
-    if( xPropSetInfo->hasPropertyByName(
-                                                    sContourPolyPolygon ) &&
+    if( xPropSetInfo->hasPropertyByName(sContourPolyPolygon ) &&
         nWidth > 0 && nHeight > 0 && bPixelWidth == bPixelHeight &&
-        (bPath ? sD : sPoints).getLength() )
+        !(bPath ? sD : sPoints).isEmpty() )
     {
         awt::Point aPoint( 0,  0 );
         awt::Size aSize( nWidth, nHeight );
@@ -482,14 +481,14 @@ void XMLTextFrameContext_Impl::Create( sal_Bool /*bHRefOrBase64*/ )
             if( xBase64Stream.is() )
             {
                 OUString sURL( GetImport().ResolveEmbeddedObjectURLFromBase64() );
-                if( sURL.getLength() )
+                if( !sURL.isEmpty() )
                     xPropSet = GetImport().GetTextImport()
                             ->createAndInsertOLEObject( GetImport(), sURL,
                                                         sStyleName,
                                                         sTblName,
                                                         nWidth, nHeight );
             }
-            else if( sHRef.getLength() )
+            else if( !sHRef.isEmpty() )
             {
                 OUString sURL( GetImport().ResolveEmbeddedObjectURL( sHRef,
                                                                 OUString() ) );
@@ -535,7 +534,7 @@ void XMLTextFrameContext_Impl::Create( sal_Bool /*bHRefOrBase64*/ )
         }
         case XML_TEXT_FRAME_PLUGIN:
         {
-            if(sHRef.getLength())
+            if(!sHRef.isEmpty())
                 GetImport().GetAbsoluteReference(sHRef);
             xPropSet = GetImport().GetTextImport()
                             ->createAndInsertPlugin( sMimeType, sHRef,
@@ -584,8 +583,8 @@ void XMLTextFrameContext_Impl::Create( sal_Bool /*bHRefOrBase64*/ )
     if( xNamed.is() )
     {
         OUString sOrigName( xNamed->getName() );
-        if( !sOrigName.getLength() ||
-            (sName.getLength() && sOrigName != sName) )
+        if( sOrigName.isEmpty() ||
+            (!sName.isEmpty() && sOrigName != sName) )
         {
             OUString sOldName( sName );
             sal_Int32 i = 0;
@@ -603,7 +602,7 @@ void XMLTextFrameContext_Impl::Create( sal_Bool /*bHRefOrBase64*/ )
 
     // frame style
     XMLPropStyleContext *pStyle = 0;
-    if( sStyleName.getLength() )
+    if( !sStyleName.isEmpty() )
     {
         pStyle = xTextImportHelper->FindAutoFrameStyle( sStyleName );
         if( pStyle )
@@ -611,7 +610,7 @@ void XMLTextFrameContext_Impl::Create( sal_Bool /*bHRefOrBase64*/ )
     }
 
     Any aAny;
-    if( sStyleName.getLength() )
+    if( !sStyleName.isEmpty() )
     {
         OUString sDisplayStyleName( GetImport().GetStyleDisplayName(
                             XML_STYLE_FAMILY_SD_GRAPHICS_ID, sStyleName ) );
@@ -711,11 +710,11 @@ void XMLTextFrameContext_Impl::Create( sal_Bool /*bHRefOrBase64*/ )
     if( XML_TEXT_FRAME_GRAPHIC == nType )
     {
         // URL
-        OSL_ENSURE( sHRef.getLength() > 0 || xBase64Stream.is(),
+        OSL_ENSURE( !sHRef.isEmpty() || xBase64Stream.is(),
                     "neither URL nor base64 image data given" );
         UniReference < XMLTextImportHelper > xTxtImport =
             GetImport().GetTextImport();
-        if( sHRef.getLength() )
+        if( !sHRef.isEmpty() )
         {
             sal_Bool bForceLoad = xTxtImport->IsInsertMode() ||
                                   xTxtImport->IsBlockMode() ||
@@ -1058,10 +1057,10 @@ XMLTextFrameContext_Impl::XMLTextFrameContext_Impl(
     if( ( (XML_TEXT_FRAME_GRAPHIC == nType ||
            XML_TEXT_FRAME_OBJECT == nType ||
            XML_TEXT_FRAME_OBJECT_OLE == nType) &&
-          !sHRef.getLength() ) ||
-        ( XML_TEXT_FRAME_APPLET  == nType && !sCode.getLength() ) ||
+          sHRef.isEmpty() ) ||
+        ( XML_TEXT_FRAME_APPLET  == nType && sCode.isEmpty() ) ||
         ( XML_TEXT_FRAME_PLUGIN == nType &&
-          sHRef.getLength() == 0 && sMimeType.getLength() == 0 ) )
+          sHRef.isEmpty() && sMimeType.isEmpty() ) )
         return; // no URL: no image or OLE object
 
     Create( sal_True );
@@ -1145,7 +1144,7 @@ SvXMLImportContext *XMLTextFrameContext_Impl::CreateChildContext(
                 new XMLEmbeddedObjectImportContext( GetImport(), nPrefix,
                                                     rLocalName, xAttrList );
             sFilterService = pEContext->GetFilterServiceName();
-            if( sFilterService.getLength() != 0 )
+            if( !sFilterService.isEmpty() )
             {
                 Create( sal_False );
                 if( xPropSet.is() )
@@ -1179,7 +1178,7 @@ void XMLTextFrameContext_Impl::Characters( const OUString& rChars )
         !xPropSet.is() && !bCreateFailed )
     {
         OUString sTrimmedChars( rChars. trim() );
-        if( sTrimmedChars.getLength() )
+        if( !sTrimmedChars.isEmpty() )
         {
             if( !xBase64Stream.is() )
             {
@@ -1199,7 +1198,7 @@ void XMLTextFrameContext_Impl::Characters( const OUString& rChars )
             if( bOwnBase64Stream && xBase64Stream.is() )
             {
                 OUString sChars;
-                if( sBase64CharsLeft.getLength() )
+                if( !sBase64CharsLeft.isEmpty() )
                 {
                     sChars = sBase64CharsLeft;
                     sChars += sTrimmedChars;
@@ -1350,13 +1349,13 @@ XMLTextFrameContext::XMLTextFrameContext(
              IsXMLToken( aLocalName, XML_STYLE_NAME ) )
         {
             OUString aStyleName = xAttrList->getValueByIndex( i );
-            if( aStyleName.getLength() )
+            if( !aStyleName.isEmpty() )
             {
                 UniReference < XMLTextImportHelper > xTxtImport =
                                                     GetImport().GetTextImport();
                 XMLPropStyleContext* pStyle( 0L );
                 pStyle = xTxtImport->FindAutoFrameStyle( aStyleName );
-                if ( pStyle && !pStyle->GetParentName().getLength() )
+                if ( pStyle && pStyle->GetParentName().isEmpty() )
                 {
                     m_HasAutomaticStyleWithoutParentStyle = sal_True;
                 }
@@ -1390,11 +1389,11 @@ void XMLTextFrameContext::EndElement()
     {
         pImpl->CreateIfNotThere();
 
-        if( m_sTitle.getLength() )
+        if( !m_sTitle.isEmpty() )
         {
             pImpl->SetTitle( m_sTitle );
         }
-        if( m_sDesc.getLength() )
+        if( !m_sDesc.isEmpty() )
         {
             pImpl->SetDesc( m_sDesc );
         }
diff --git a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
index fa87c92..afe55e8 100644
--- a/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
+++ b/xmloff/source/text/XMLTextFrameHyperlinkContext.cxx
@@ -99,7 +99,7 @@ XMLTextFrameHyperlinkContext::XMLTextFrameHyperlinkContext(
         }
     }
 
-    if( sShow.getLength() && !sTargetFrameName.getLength() )
+    if( !sShow.isEmpty() && sTargetFrameName.isEmpty() )
     {
         if( IsXMLToken( sShow, XML_NEW ) )
             sTargetFrameName =
diff --git a/xmloff/source/text/XMLTextListBlockContext.cxx b/xmloff/source/text/XMLTextListBlockContext.cxx
index 244b2e2..e97ab6d 100644
--- a/xmloff/source/text/XMLTextListBlockContext.cxx
+++ b/xmloff/source/text/XMLTextListBlockContext.cxx
@@ -162,12 +162,12 @@ XMLTextListBlockContext::XMLTextListBlockContext(
                 {
                     xNumRuleProps->getPropertyValue(s_PropNameDefaultListId)
                         >>= sListStyleDefaultListId;
-                    DBG_ASSERT( sListStyleDefaultListId.getLength() != 0,
+                    DBG_ASSERT( !sListStyleDefaultListId.isEmpty(),
                                 "no default list id found at numbering rules instance. Serious defect -> please inform OD." );
                 }
             }
         }
-        if ( msListId.getLength() == 0 )  // no text:id property found
+        if ( msListId.isEmpty() )  // no text:id property found
         {
             sal_Int32 nUPD( 0 );
             sal_Int32 nBuild( 0 );
@@ -179,7 +179,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
                    use default list id of numbering rules instance, if existing
                    (#i92811#)
                 */
-                if ( sListStyleDefaultListId.getLength() != 0 )
+                if ( !sListStyleDefaultListId.isEmpty() )
                 {
                     msListId = sListStyleDefaultListId;
                     if ( !bIsContinueNumberingAttributePresent &&
@@ -190,7 +190,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
                     }
                 }
             }
-            if ( msListId.getLength() == 0 )
+            if ( msListId.isEmpty() )
             {
                 // generate a new list id for the list
                 msListId = rTextListsHelper.GenerateNewListId();
@@ -198,7 +198,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
         }
 
         if ( bIsContinueNumberingAttributePresent && !mbRestartNumbering &&
-             msContinueListId.getLength() == 0 )
+             msContinueListId.isEmpty() )
         {
             ::rtl::OUString Last( rTextListsHelper.GetLastProcessedListId() );
             if ( rTextListsHelper.GetListStyleOfLastProcessedList() == msListStyleName
@@ -208,7 +208,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
             }
         }
 
-        if ( msContinueListId.getLength() > 0 )
+        if ( !msContinueListId.isEmpty() )
         {
             if ( !rTextListsHelper.IsListProcessed( msContinueListId ) )
             {
@@ -220,7 +220,7 @@ XMLTextListBlockContext::XMLTextListBlockContext(
                 // continue the master list.
                 ::rtl::OUString sTmpStr =
                     rTextListsHelper.GetContinueListIdOfProcessedList( msContinueListId );
-                while ( sTmpStr.getLength() > 0 )
+                while ( !sTmpStr.isEmpty() )
                 {
                     msContinueListId = sTmpStr;
 
diff --git a/xmloff/source/text/XMLTextListItemContext.cxx b/xmloff/source/text/XMLTextListItemContext.cxx
index 9508bba..032ac26 100644
--- a/xmloff/source/text/XMLTextListItemContext.cxx
+++ b/xmloff/source/text/XMLTextListItemContext.cxx
@@ -84,7 +84,7 @@ XMLTextListItemContext::XMLTextListItemContext(
                   IsXMLToken( aLocalName, XML_STYLE_OVERRIDE ) )
         {
             const ::rtl::OUString sListStyleOverrideName = rValue;
-            if ( sListStyleOverrideName.getLength() > 0 )
+            if ( !sListStyleOverrideName.isEmpty() )
             {
                 OUString sDisplayStyleName(
                         GetImport().GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_LIST,
diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
index 6a3c5e4..53c558a 100644
--- a/xmloff/source/text/XMLTextMarkImportContext.cxx
+++ b/xmloff/source/text/XMLTextMarkImportContext.cxx
@@ -102,7 +102,7 @@ void XMLFieldParamImportContext::StartElement(const ::com::sun::star::uno::Refer
             sValue = xAttrList->getValueByIndex(nAttr);
         }
     }
-    if (rHelper.hasCurrentFieldCtx() && sName.getLength()>0) {
+    if (rHelper.hasCurrentFieldCtx() && !sName.isEmpty()) {
         rHelper.addFieldParam(sName, sValue);
     }
 }
@@ -185,7 +185,7 @@ void XMLTextMarkImportContext::StartElement(
 
     if (IsXMLToken(GetLocalName(), XML_FIELDMARK_START) || IsXMLToken(GetLocalName(), XML_FIELDMARK))
     {
-        if (m_sBookmarkName.getLength() == 0)
+        if (m_sBookmarkName.isEmpty())
         {
             m_sBookmarkName = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Unknown"));
         }
@@ -206,7 +206,7 @@ void XMLTextMarkImportContext::EndElement()
     static const OUString sAPI_formfieldmark(
         RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.FormFieldmark"));
 
-    if (m_sBookmarkName.getLength() > 0)
+    if (!m_sBookmarkName.isEmpty())
     {
         sal_uInt16 nTmp;
         if (SvXMLUnitConverter::convertEnum(nTmp, GetLocalName(),
@@ -397,7 +397,7 @@ Reference<XTextContent> XMLTextMarkImportContext::CreateAndInsertMark(
         }
         else
         {
-            if (sMarkName.getLength())
+            if (!sMarkName.isEmpty())
             {
                 OSL_FAIL("name given, but XNamed not supported?");
                 return 0;
diff --git a/xmloff/source/text/XMLTextMasterPageContext.cxx b/xmloff/source/text/XMLTextMasterPageContext.cxx
index d2f214a..1075079 100644
--- a/xmloff/source/text/XMLTextMasterPageContext.cxx
+++ b/xmloff/source/text/XMLTextMasterPageContext.cxx
@@ -116,7 +116,7 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
         }
     }
 
-    if( sDisplayName.getLength() )
+    if( !sDisplayName.isEmpty() )
     {
         rImport.AddStyleDisplayName( XML_STYLE_FAMILY_MASTER_PAGE, sName,
                                      sDisplayName );
@@ -126,7 +126,7 @@ XMLTextMasterPageContext::XMLTextMasterPageContext( SvXMLImport& rImport,
         sDisplayName = sName;
     }
 
-    if( 0 == sDisplayName.getLength() )
+    if( sDisplayName.isEmpty() )
         return;
 
     Reference < XNameContainer > xPageStyles =
@@ -252,7 +252,7 @@ void XMLTextMasterPageContext::Finish( sal_Bool bOverwrite )
     if( xStyle.is() && (IsNew() || bOverwrite) )
     {
         Reference < XPropertySet > xPropSet( xStyle, UNO_QUERY );
-        if( sPageMasterName.getLength() )
+        if( !sPageMasterName.isEmpty() )
         {
             XMLPropStyleContext* pStyle =
                 GetImport().GetTextImport()->FindPageMaster( sPageMasterName );
@@ -274,7 +274,7 @@ void XMLTextMasterPageContext::Finish( sal_Bool bOverwrite )
             OUString sDisplayFollow(
                 GetImport().GetStyleDisplayName(
                         XML_STYLE_FAMILY_MASTER_PAGE, sFollow ) );
-            if( !sDisplayFollow.getLength() ||
+            if( sDisplayFollow.isEmpty() ||
                 !xPageStyles->hasByName( sDisplayFollow ) )
                 sDisplayFollow = xStyle->getName();
 
diff --git a/xmloff/source/text/XMLTextNumRuleInfo.cxx b/xmloff/source/text/XMLTextNumRuleInfo.cxx
index b086136..d8aebcc 100644
--- a/xmloff/source/text/XMLTextNumRuleInfo.cxx
+++ b/xmloff/source/text/XMLTextNumRuleInfo.cxx
@@ -141,7 +141,7 @@ void XMLTextNumRuleInfo::Set(
         // First try to find the numbering rules in the list auto style pool.
         // If not found, the numbering rules instance has to be named.
         msNumRulesName = rListAutoPool.Find( mxNumRules );
-        if ( msNumRulesName.getLength() == 0 )
+        if ( msNumRulesName.isEmpty() )
         {
             Reference < XNamed > xNamed( mxNumRules, UNO_QUERY );
             DBG_ASSERT( xNamed.is(),
@@ -151,7 +151,7 @@ void XMLTextNumRuleInfo::Set(
                 msNumRulesName = xNamed->getName();
             }
         }
-        DBG_ASSERT( msNumRulesName.getLength() > 0,
+        DBG_ASSERT( !msNumRulesName.isEmpty(),
                     "<XMLTextNumRuleInfo::Set(..)> - no name found for numbering rules instance. Serious defect -> please inform OD." );
 
         if( xPropSetInfo->hasPropertyByName( msPropNameListId ) )
@@ -230,8 +230,7 @@ sal_Bool XMLTextNumRuleInfo::BelongsToSameList( const XMLTextNumRuleInfo& rCmp )
 {
     sal_Bool bRet( sal_True );
     // Currently only the text documents support <ListId>.
-    if ( rCmp.msListId.getLength() > 0 ||
-         msListId.getLength() > 0 )
+    if ( !rCmp.msListId.isEmpty() || !msListId.isEmpty() )
     {
         bRet = rCmp.msListId == msListId;
     }
diff --git a/xmloff/source/text/txtdrope.cxx b/xmloff/source/text/txtdrope.cxx
index a7324cb..75bd3bb 100644
--- a/xmloff/source/text/txtdrope.cxx
+++ b/xmloff/source/text/txtdrope.cxx
@@ -80,7 +80,7 @@ void XMLTextDropCapExport::exportXML( const Any& rAny,
             ::sax::Converter::convertNumber(sBuffer, (sal_Int32)aFormat.Count);
             sValue = sBuffer.makeStringAndClear();
         }
-        if( sValue.getLength() )
+        if( !sValue.isEmpty() )
             rExport.AddAttribute( XML_NAMESPACE_STYLE, XML_LENGTH, sValue );
 
         // style:distance
@@ -92,7 +92,7 @@ void XMLTextDropCapExport::exportXML( const Any& rAny,
         }
 
         // style:style-name
-        if( rStyleName.getLength() )
+        if( !rStyleName.isEmpty() )
             rExport.AddAttribute( XML_NAMESPACE_STYLE, XML_STYLE_NAME,
                                   rExport.EncodeStyleName( rStyleName ) );
     }
diff --git a/xmloff/source/text/txtexppr.cxx b/xmloff/source/text/txtexppr.cxx
index f7eb9c9..e2ea779 100644
--- a/xmloff/source/text/txtexppr.cxx
+++ b/xmloff/source/text/txtexppr.cxx
@@ -157,8 +157,7 @@ void XMLTextExportPropertySetMapper::handleSpecialItem(
         pThis->bDropWholeWord = *(sal_Bool *)rProperty.maValue.getValue();
         break;
     case CTF_DROPCAPCHARSTYLE:
-        DBG_ASSERT( !sDropCharStyle.getLength(),
-                    "drop char style is set already!" );
+        DBG_ASSERT( sDropCharStyle.isEmpty(), "drop char style is set already!" );
         rProperty.maValue >>= pThis->sDropCharStyle;
         break;
     case CTF_NUMBERINGSTYLENAME:
@@ -236,7 +235,7 @@ void XMLTextExportPropertySetMapper::ContextFontFilter(
 
     OUString sName( ((SvXMLExport&)GetExport()).GetFontAutoStylePool()->Find(
                         sFamilyName, sStyleName, nFamily, nPitch, eEnc ) );
-    if( sName.getLength() )
+    if( !sName.isEmpty() )
     {
         pFontNameState->maValue <<= sName;
         if( pFontFamilyNameState )
@@ -255,12 +254,12 @@ void XMLTextExportPropertySetMapper::ContextFontFilter(
         pFontNameState->mnIndex = -1;
     }
 
-    if( pFontFamilyNameState && (0 == sFamilyName.getLength()) )
+    if( pFontFamilyNameState && sFamilyName.isEmpty() )
     {
         pFontFamilyNameState->mnIndex = -1;
     }
 
-    if( pFontStyleNameState && (0 == sStyleName.getLength()) )
+    if( pFontStyleNameState && sStyleName.isEmpty() )
     {
         pFontStyleNameState->mnIndex = -1;
     }
diff --git a/xmloff/source/text/txtflde.cxx b/xmloff/source/text/txtflde.cxx
index fc550cf..cc8a399 100644
--- a/xmloff/source/text/txtflde.cxx
+++ b/xmloff/source/text/txtflde.cxx
@@ -400,7 +400,7 @@ enum FieldIdEnum XMLTextFieldExport::GetFieldID(
     }
 
     // if this is not a normal text field, check if its a presentation text field
-    if( sFieldName.getLength() == 0 )
+    if( sFieldName.isEmpty() )
     {
         const OUString* pNames2 = aServices.getConstArray();
         sal_Int32 nCount2 = aServices.getLength();
@@ -417,7 +417,7 @@ enum FieldIdEnum XMLTextFieldExport::GetFieldID(
             ++pNames2;
         }
 
-        if( sFieldName.getLength() != 0 )
+        if( !sFieldName.isEmpty() )
         {
             if( sFieldName.reverseCompareToAsciiL( RTL_CONSTASCII_STRINGPARAM( "Header" ) ) == 0 )
             {
@@ -435,7 +435,7 @@ enum FieldIdEnum XMLTextFieldExport::GetFieldID(
     }
 
     // map postfix of service name to field ID
-    DBG_ASSERT(sFieldName.getLength()>0, "no TextField service found!");
+    DBG_ASSERT(!sFieldName.isEmpty(), "no TextField service found!");
     return MapFieldName(sFieldName, xPropSet);
 }
 
@@ -452,9 +452,9 @@ enum FieldIdEnum XMLTextFieldExport::MapFieldName(
     // a) find prelim. FIELD_ID via aFieldServiceMapping
 
     // check for non-empty service name
-    DBG_ASSERT(sFieldName.getLength()>0, "no valid service name!");
+    DBG_ASSERT(!sFieldName.isEmpty(), "no valid service name!");
     enum FieldIdEnum nToken = FIELD_ID_UNKNOWN;
-    if (sFieldName.getLength() > 0)
+    if (!sFieldName.isEmpty())
     {
         // map name to prelim. ID
         sal_uInt16 nTmp;
@@ -792,7 +792,7 @@ void XMLTextFieldExport::ExportFieldAutoStyle(
             // insert this text field master
             OUString sFieldMasterName = GetStringProperty(
                 sPropertyInstanceName, xDepField->getTextFieldMaster());
-            if (sFieldMasterName.getLength() > 0)
+            if (!sFieldMasterName.isEmpty())
                 aMapIter->second.insert( sFieldMasterName );
         }
         // else: no dependent field -> no master -> ignore
@@ -1009,7 +1009,7 @@ void XMLTextFieldExport::ExportField(
     OUString sStyle = GetExport().GetTextParagraphExport()->
         FindTextStyleAndHyperlink( xRangePropSet, bHasHyperlink, bIsUICharStyle,
                                    bHasAutoStyle, pStates );
-    sal_Bool bHasStyle = (sStyle.getLength() > 0);
+    sal_Bool bHasStyle = !sStyle.isEmpty();
 
     // export hyperlink (if we have one)
     Reference < XPropertySetInfo > xRangePropSetInfo;
@@ -1741,7 +1741,7 @@ void XMLTextFieldExport::ExportFieldHelper(
 
         // author
         OUString aAuthor( GetStringProperty(sPropertyAuthor, rPropSet) );
-        if( aAuthor.getLength() )
+        if( !aAuthor.isEmpty() )
         {
             SvXMLElementExport aCreatorElem( GetExport(), XML_NAMESPACE_DC,
                                               XML_CREATOR, sal_True,
@@ -2268,7 +2268,7 @@ void XMLTextFieldExport::ExportMacro(
 
     // if the ScriptURL property is not empty then this is a Scripting
     // Framework URL, otherwise treat it as a Basic Macro
-    if (sName.getLength() != 0)
+    if (!sName.isEmpty())
     {
         aSeq = Sequence<PropertyValue> (2);
         PropertyValue* pArr = aSeq.getArray();
@@ -2389,7 +2389,7 @@ void XMLTextFieldExport::ProcessValueAndType(
 
                 OUString sDataStyleName =
                     GetExport().getDataStyleName(nFormatKey, bTimeStyle);
-                if( sDataStyleName.getLength() > 0 )
+                if( !sDataStyleName.isEmpty() )
                 {
                     GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                               XML_DATA_STYLE_NAME,
@@ -2457,7 +2457,7 @@ void XMLTextFieldExport::ProcessString(enum XMLTokenEnum eName,
         return;
 
     // check for empty string, if applicable
-    if ( bOmitEmpty && (sValue.getLength()==0) )
+    if ( bOmitEmpty && sValue.isEmpty() )
         return;
 
     // write attribute
@@ -2750,7 +2750,7 @@ void XMLTextFieldExport::ProcessBibliographyData(
             OUString sStr;
             aValues[i].Value >>= sStr;
 
-            if (sStr.getLength() > 0)
+            if (!sStr.isEmpty())
             {
                 rExport.AddAttribute(XML_NAMESPACE_TEXT,
                                      MapBibliographyFieldName(aValues[i].Name),
@@ -2827,19 +2827,19 @@ void XMLTextFieldExport::ExportDataBaseElement(
     OUString sDataBaseURL;
     OUString sStr;
     if( ( rPropertySet->getPropertyValue( sPropertyDataBaseName ) >>= sStr )
-        && ( sStr.getLength() > 0 ) )
+        && !sStr.isEmpty() )
     {
         sDataBaseName = sStr;
     }
     else if( rPropertySetInfo->hasPropertyByName( sPropertyDataBaseURL ) &&
              (rPropertySet->getPropertyValue( sPropertyDataBaseURL ) >>= sStr) &&
-             (sStr.getLength() > 0) )
+             !sStr.isEmpty() )
     {
         sDataBaseURL = sStr;
     }
 
     // add database name property (if present)
-    if( sDataBaseName.getLength() > 0 )
+    if( !sDataBaseName.isEmpty() )
         rExport.AddAttribute( XML_NAMESPACE_TEXT, XML_DATABASE_NAME,
                               sDataBaseName );
     SvXMLElementExport aDataBaseElement( GetExport(),
@@ -2847,7 +2847,7 @@ void XMLTextFieldExport::ExportDataBaseElement(
                                          sal_False, sal_False );
 
     // write URL as children
-    if( sDataBaseURL.getLength() > 0 )
+    if( !sDataBaseURL.isEmpty() )
     {
         rExport.AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sDataBaseURL );
         SvXMLElementExport aDataSourceElement(
diff --git a/xmloff/source/text/txtfldi.cxx b/xmloff/source/text/txtfldi.cxx
index d09e5e1..cd655bf 100644
--- a/xmloff/source/text/txtfldi.cxx
+++ b/xmloff/source/text/txtfldi.cxx
@@ -251,7 +251,7 @@ XMLTextFieldImportContext::~XMLTextFieldImportContext() {
 
 OUString XMLTextFieldImportContext::GetContent()
 {
-    if (sContent.getLength()==0)
+    if (sContent.isEmpty())
     {
         sContent = sContentBuffer.makeStringAndClear();
     }
@@ -261,7 +261,7 @@ OUString XMLTextFieldImportContext::GetContent()
 
 void XMLTextFieldImportContext::EndElement()
 {
-    DBG_ASSERT(GetServiceName().getLength()>0, "no service name for element!");
+    DBG_ASSERT(!GetServiceName().isEmpty(), "no service name for element!");
     if (bValid)
     {
 
@@ -2011,7 +2011,7 @@ void XMLUserDocInfoImportContext::PrepareField(
         ::com::sun::star::beans::XPropertySet> & xPropertySet)
 {
     uno::Any aAny;
-    if ( aName.getLength() )
+    if ( !aName.isEmpty() )
     {
         aAny <<= aName;
         xPropertySet->setPropertyValue(sPropertyName, aAny);
@@ -3707,7 +3707,7 @@ SvXMLImportContext* XMLAnnotationImportContext::CreateChildContext(
 
 void XMLAnnotationImportContext::EndElement()
 {
-    DBG_ASSERT(GetServiceName().getLength()>0, "no service name for element!");
+    DBG_ASSERT(!GetServiceName().isEmpty(), "no service name for element!");
     if( mxCursor.is() )
     {
         // delete addition newline
diff --git a/xmloff/source/text/txtftne.cxx b/xmloff/source/text/txtftne.cxx
index b9fa46d..2297b5a 100644
--- a/xmloff/source/text/txtftne.cxx
+++ b/xmloff/source/text/txtftne.cxx
@@ -143,7 +143,7 @@ void XMLTextParagraphExport::exportTextFootnote(
                              aCharStyleNamesPropInfoCache.hasProperty(
                                                     rPropSet ), bHasAutoStyle,
                 rPropSet, sCharStyleNames );
-            if( sStyle.getLength() )
+            if( !sStyle.isEmpty() )
             {
                 GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
                                           GetExport().EncodeStyleName( sStyle ) );
@@ -195,7 +195,7 @@ void XMLTextParagraphExport::exportTextFootnoteHelper(
         {
             // handle label vs. automatic numbering
             OUString sLabel = rFootnote->getLabel();
-            if (sLabel.getLength()>0)
+            if (!sLabel.isEmpty())
             {
                 GetExport().AddAttribute(XML_NAMESPACE_TEXT, XML_LABEL,
                                          sLabel);
@@ -248,7 +248,7 @@ void lcl_exportString(
     Any aAny = rPropSet->getPropertyValue(sProperty);
     OUString sTmp;
     aAny >>= sTmp;
-    if (!bOmitIfEmpty || (sTmp.getLength() > 0))
+    if (!bOmitIfEmpty || !sTmp.isEmpty())
     {
         if( bEncodeName )
             sTmp = rExport.EncodeStyleName( sTmp );
@@ -368,7 +368,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
         aAny = rFootnoteConfig->getPropertyValue(sEndNotice);
         aAny >>= sTmp;
 
-        if (sTmp.getLength() > 0)
+        if (!sTmp.isEmpty())
         {
             SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_TEXT,
                                      XML_FOOTNOTE_CONTINUATION_NOTICE_FORWARD,
@@ -380,7 +380,7 @@ void XMLTextParagraphExport::exportTextFootnoteConfigurationHelper(
         aAny = rFootnoteConfig->getPropertyValue(sBeginNotice);
         aAny >>= sTmp;
 
-        if (sTmp.getLength() > 0)
+        if (!sTmp.isEmpty())
         {
             SvXMLElementExport aElem(GetExport(), XML_NAMESPACE_TEXT,
                                      XML_FOOTNOTE_CONTINUATION_NOTICE_BACKWARD,
diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
index 61021eb..276baaf 100644
--- a/xmloff/source/text/txtimp.cxx
+++ b/xmloff/source/text/txtimp.cxx
@@ -957,9 +957,9 @@ XMLTextImportHelper::XMLTextImportHelper(
                     ::rtl::OUString sListId;
                     xNumRuleProps->getPropertyValue(s_PropNameDefaultListId)
                         >>= sListId;
-                    DBG_ASSERT( sListId.getLength() != 0,
+                    DBG_ASSERT( !sListId.isEmpty(),
                                 "no default list id found at chapter numbering rules instance. Serious defect -> please inform OD." );
-                    if ( sListId.getLength() )
+                    if ( !sListId.isEmpty() )
                     {
                         Reference< XNamed > const xChapterNumNamed(
                             m_pImpl->m_xChapterNumbering, UNO_QUERY);
@@ -1262,7 +1262,7 @@ OUString XMLTextImportHelper::ConvertStarFonts( const OUString& rChars,
                 XMLTextStyleContext *pStyle = 0;
                 sal_uInt16 nFamily = bPara ? XML_STYLE_FAMILY_TEXT_PARAGRAPH
                                            : XML_STYLE_FAMILY_TEXT_TEXT;
-                if (rStyleName.getLength() && m_pImpl->m_xAutoStyles.Is())
+                if (!rStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is())
                 {
                     const SvXMLStyleContext* pTempStyle =
                         ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
@@ -1363,7 +1363,7 @@ sal_Bool lcl_HasListStyle( OUString sStyleName,
         {
             OUString sListStyle;
             xPropSet->getPropertyValue( sNumberingStyleName ) >>= sListStyle;
-            if ( sListStyle.getLength() != 0 &&
+            if ( !sListStyle.isEmpty() &&
                  sListStyle == sOutlineStyleName )
             {
                 bRet = sal_False;
@@ -1382,14 +1382,13 @@ sal_Bool lcl_HasListStyle( OUString sStyleName,
         while ( xStyle.is() )
         {
             OUString aParentStyle( xStyle->getParentStyle() );
-            if ( aParentStyle.getLength() > 0 )
+            if ( !aParentStyle.isEmpty() )
             {
                 aParentStyle =
                     rImport.GetStyleDisplayName( XML_STYLE_FAMILY_TEXT_PARAGRAPH,
                                                  aParentStyle );
             }
-            if ( aParentStyle.getLength() == 0 ||
-                 !xParaStyles->hasByName( aParentStyle ) )
+            if ( aParentStyle.isEmpty() || !xParaStyles->hasByName( aParentStyle ) )
             {
                 // no list style found
                 break;
@@ -1414,7 +1413,7 @@ sal_Bool lcl_HasListStyle( OUString sStyleName,
                     {
                         OUString sListStyle;
                         xPropSet->getPropertyValue( sNumberingStyleName ) >>= sListStyle;
-                        if ( sListStyle.getLength() != 0 &&
+                        if ( !sListStyle.isEmpty() &&
                              sListStyle == sOutlineStyleName )
                         {
                             bRet = sal_False;
@@ -1423,7 +1422,7 @@ sal_Bool lcl_HasListStyle( OUString sStyleName,
                         /* Check explicitly on certain versions and on import of
                            text documents in OpenOffice.org file format (#i86058#)
                         */
-                        else if ( sListStyle.getLength() == 0 &&
+                        else if ( sListStyle.isEmpty() &&
                                   ( rImport.IsTextDocInOOoFileFormat() ||
                                     ( bBuildIdFound &&
                                       ( ( nUPD == 641 ) || ( nUPD == 645 ) || // prior OOo 2.0
@@ -1486,7 +1485,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
                                      : XML_STYLE_FAMILY_TEXT_TEXT;
     XMLTextStyleContext *pStyle = 0;
     OUString sStyleName( rStyleName );
-    if (sStyleName.getLength() && m_pImpl->m_xAutoStyles.Is())
+    if (!sStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is())
     {
         const SvXMLStyleContext* pTempStyle =
             ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
@@ -1501,7 +1500,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
         xPropSet->getPropertySetInfo());
 
     // style
-    if( sStyleName.getLength() )
+    if( !sStyleName.isEmpty() )
     {
         sStyleName = rImport.GetStyleDisplayName( nFamily, sStyleName );
         const String& rPropName = (bPara) ? s_ParaStyleName : s_CharStyleName;
@@ -1654,7 +1653,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
 
             if (xPropSetInfo->hasPropertyByName(s_PropNameListId))
             {
-                if (sListId.getLength()) {
+                if (!sListId.isEmpty()) {
                     xPropSet->setPropertyValue(s_PropNameListId,
                         makeAny(sListId) );
                 }
@@ -1678,7 +1677,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
                 DBG_ASSERT( ( bBuildIdFound && nUPD == 680 ) ||
                             !pStyle ||
                             !pStyle->IsListStyleSet() ||
-                            pStyle->GetListStyle().getLength() == 0,
+                            pStyle->GetListStyle().isEmpty(),
                             "automatic paragraph style with list style name, but paragraph not in list???" );
                 if ( ( bBuildIdFound && nUPD == 680 ) ||
                      !pStyle || !pStyle->IsListStyleSet() )
@@ -1716,7 +1715,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
                 rImport.GetStyleDisplayName(
                                 XML_STYLE_FAMILY_MASTER_PAGE,
                                 pStyle->GetMasterPageName()) );
-            if( !sDisplayName.getLength() ||
+            if( sDisplayName.isEmpty() ||
                 (m_pImpl->m_xPageStyles.is() &&
                  m_pImpl->m_xPageStyles->hasByName( sDisplayName)))
             {
@@ -1724,7 +1723,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
                         makeAny(sDisplayName));
             }
         }
-        if( bPara && pStyle->GetDropCapStyleName().getLength() &&
+        if( bPara && !pStyle->GetDropCapStyleName().isEmpty() &&
             m_pImpl->m_xTextStyles.is())
         {
             OUString sDisplayName(
@@ -1771,7 +1770,7 @@ OUString XMLTextImportHelper::SetStyleAndAttrs(
                         // the selected text has to be removed afterwards
                         m_pImpl->m_xText->insertTextContent( xRange->getStart(), xTextContent, sal_True );
 
-                        if( xRange->getString().getLength() )
+                        if( !xRange->getString().isEmpty() )
                         {
                             try
                             {
@@ -1914,7 +1913,7 @@ void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName,
         RTL_CONSTASCII_USTRINGPARAM("HeadingStyleName"));
 
     // style name empty?
-    if( rStyleName.getLength() == 0 )
+    if( rStyleName.isEmpty() )
     {
         // Empty? Then we need o do stuff. Let's do error checking first.
         if (m_pImpl->m_xChapterNumbering.is() &&
@@ -1962,7 +1961,7 @@ void XMLTextImportHelper::FindOutlineStyleName( ::rtl::OUString& rStyleName,
 void XMLTextImportHelper::AddOutlineStyleCandidate( const sal_Int8 nOutlineLevel,
                                                     const OUString& rStyleName )
 {
-    if (rStyleName.getLength()
+    if (!rStyleName.isEmpty()
         && m_pImpl->m_xChapterNumbering.is()
         && (nOutlineLevel > 0)
         && (nOutlineLevel <= m_pImpl->m_xChapterNumbering->getCount()))
@@ -2063,8 +2062,7 @@ void XMLTextImportHelper::SetOutlineStyles( sal_Bool bSetEmptyLevels )
         for ( sal_Int32 i = 0; i < nCount; ++i )
         {
             // Paragraph style assignments in Outline of template lost from second level on (#i107610#)
-            if ( bSetEmptyLevels ||
-                 sChosenStyles[i].getLength() > 0 )
+            if ( bSetEmptyLevels || !sChosenStyles[i].isEmpty() )
             {
                 pProps->Value <<= sChosenStyles[i];
                 m_pImpl->m_xChapterNumbering->replaceByIndex(i,
@@ -2140,7 +2138,7 @@ void XMLTextImportHelper::SetHyperlink(
         OUString sDisplayName(
             rImport.GetStyleDisplayName(
                             XML_STYLE_FAMILY_TEXT_TEXT, rStyleName ) );
-        if( sDisplayName.getLength() &&
+        if( !sDisplayName.isEmpty() &&
             xPropSetInfo->hasPropertyByName(s_UnvisitedCharStyleName) &&
             m_pImpl->m_xTextStyles->hasByName(sDisplayName))
         {
@@ -2151,7 +2149,7 @@ void XMLTextImportHelper::SetHyperlink(
         sDisplayName =
             rImport.GetStyleDisplayName(
                             XML_STYLE_FAMILY_TEXT_TEXT, rVisitedStyleName );
-        if( sDisplayName.getLength() &&
+        if( !sDisplayName.isEmpty() &&
             xPropSetInfo->hasPropertyByName(s_VisitedCharStyleName) &&
             m_pImpl->m_xTextStyles->hasByName(sDisplayName))
         {
@@ -2182,7 +2180,7 @@ void XMLTextImportHelper::SetRuby(
 
         // the ruby style (ruby-adjust)
         XMLPropStyleContext *pStyle = 0;
-        if (rStyleName.getLength() && m_pImpl->m_xAutoStyles.Is())
+        if (!rStyleName.isEmpty() && m_pImpl->m_xAutoStyles.Is())
         {
             const SvXMLStyleContext* pTempStyle =
                 ((SvXMLStylesContext *)&m_pImpl->m_xAutoStyles)->
@@ -2200,7 +2198,7 @@ void XMLTextImportHelper::SetRuby(
             OUString sDisplayName(
                 rImport.GetStyleDisplayName(
                             XML_STYLE_FAMILY_TEXT_TEXT, rTextStyleName ) );
-            if( (sDisplayName.getLength() > 0) &&
+            if( (!sDisplayName.isEmpty()) &&
                 m_pImpl->m_xTextStyles->hasByName( sDisplayName ))
             {
                 xPropSet->setPropertyValue(sRubyCharStyleName, makeAny(sDisplayName));
@@ -2243,7 +2241,7 @@ sal_Bool XMLTextImportHelper::HasDrawNameAttribute(
         if( XML_NAMESPACE_DRAW == nPrefix &&
             IsXMLToken( aLocalName, XML_NAME ) )
         {
-            return xAttrList->getValueByIndex(i).getLength() != 0;
+            return !xAttrList->getValueByIndex(i).isEmpty();
         }
     }
 
@@ -2720,10 +2718,10 @@ void XMLTextImportHelper::ConnectFrameChains(
     static ::rtl::OUString s_ChainPrevName(
         RTL_CONSTASCII_USTRINGPARAM("ChainPrevName"));
 
-    if( !rFrmName.getLength() )
+    if( rFrmName.isEmpty() )
         return;
 
-    if( rNextFrmName.getLength() )
+    if( !rNextFrmName.isEmpty() )
     {
         OUString sNextFrmName(GetRenameMap().Get( XML_TEXT_RENAME_TYPE_FRAME,
                                                     rNextFrmName ));
commit dfa8287f8bbb6c523266237ff67eb4b3d07b5c8b
Author: Olivier Hallot <olivier.hallot at alta.org.br>
Date:   Thu Jan 26 14:47:19 2012 -0200

    Fix for fdo43460 Part XLIX getLength() to isEmpty()
    
    Part XLIX
    Modules
    xmloff (part 3)

diff --git a/xmloff/source/style/escphdl.cxx b/xmloff/source/style/escphdl.cxx
index 8ebd2a5..47aad3e 100644
--- a/xmloff/source/style/escphdl.cxx
+++ b/xmloff/source/style/escphdl.cxx
@@ -164,14 +164,14 @@ sal_Bool XMLEscapementHeightPropHdl::exportXML( OUString& rStrExpValue, const un
     sal_Int32 nValue = 0;
     if( rValue >>= nValue )
     {
-        if( rStrExpValue.getLength() )
+        if( !rStrExpValue.isEmpty() )
             aOut.append( sal_Unicode(' '));
 
         ::sax::Converter::convertPercent( aOut, nValue );
     }
 
     rStrExpValue = aOut.makeStringAndClear();
-    return rStrExpValue.getLength() != 0;
+    return !rStrExpValue.isEmpty();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/impastp4.cxx b/xmloff/source/style/impastp4.cxx
index bb86944..884bf0f 100644
--- a/xmloff/source/style/impastp4.cxx
+++ b/xmloff/source/style/impastp4.cxx
@@ -390,7 +390,7 @@ void SvXMLAutoStylePoolP_Impl::exportXML(
                         XML_NAMESPACE_STYLE, XML_FAMILY, aStrFamilyName );
                 }
 
-                if( aExpStyles[i].mpParent->getLength() )
+                if( !aExpStyles[i].mpParent->isEmpty() )
                 {
                     GetExport().AddAttribute(
                         XML_NAMESPACE_STYLE, XML_PARENT_STYLE_NAME,
diff --git a/xmloff/source/style/lspachdl.cxx b/xmloff/source/style/lspachdl.cxx
index e02efbc..9a76574 100644
--- a/xmloff/source/style/lspachdl.cxx
+++ b/xmloff/source/style/lspachdl.cxx
@@ -110,7 +110,7 @@ sal_Bool XMLLineHeightHdl::exportXML( OUString& rStrExpValue, const uno::Any& rV
     }
 
     rStrExpValue = aOut.makeStringAndClear();
-    return rStrExpValue.getLength() != 0;
+    return !rStrExpValue.isEmpty();
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -151,7 +151,7 @@ sal_Bool XMLLineHeightAtLeastHdl::exportXML( OUString& rStrExpValue, const uno::
     rUnitConverter.convertMeasureToXML( aOut, aLSp.Height );
 
     rStrExpValue = aOut.makeStringAndClear();
-    return rStrExpValue.getLength() != 0;
+    return !rStrExpValue.isEmpty();
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -192,7 +192,7 @@ sal_Bool XMLLineSpacingHdl::exportXML( OUString& rStrExpValue, const uno::Any& r
     rUnitConverter.convertMeasureToXML( aOut, aLSp.Height );
 
     rStrExpValue = aOut.makeStringAndClear();
-    return rStrExpValue.getLength() != 0;
+    return !rStrExpValue.isEmpty();
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/style/numehelp.cxx b/xmloff/source/style/numehelp.cxx
index d0e0004..7026560 100644
--- a/xmloff/source/style/numehelp.cxx
+++ b/xmloff/source/style/numehelp.cxx
@@ -142,7 +142,7 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(SvXMLExport& rXMLExp
             if (!bWasSetTypeAttribute)
             {
                 rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_CURRENCY);
-                if (rCurrency.getLength() > 0)
+                if (!rCurrency.isEmpty())
                     rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_CURRENCY, rCurrency);
                 bWasSetTypeAttribute = sal_True;
             }
@@ -258,7 +258,7 @@ sal_Bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int3
                     rtl::OUString sCurrencyAbbreviation;
                     if ( xNumberPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_CURRENCYABBREVIATION))) >>= sCurrencyAbbreviation)
                     {
-                        if ( sCurrencyAbbreviation.getLength() != 0 )
+                        if ( !sCurrencyAbbreviation.isEmpty())
                             sCurrencySymbol = sCurrencyAbbreviation;
                         else
                         {
@@ -323,7 +323,7 @@ void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(SvXMLExpor
 {
     if (bExportTypeAttribute)
         rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_VALUE_TYPE, XML_STRING);
-    if (bExportValue && rValue.getLength() && (rValue != rCharacters))
+    if (bExportValue && !rValue.isEmpty() && (rValue != rCharacters))
         rXMLExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_STRING_VALUE, rValue);
 }
 
@@ -342,7 +342,7 @@ sal_Bool XMLNumberFormatAttributesExportHelper::GetCurrencySymbol(const sal_Int3
                 rtl::OUString sCurrencyAbbreviation;
                 if ( xNumberPropertySet->getPropertyValue(msCurrencyAbbreviation) >>= sCurrencyAbbreviation)
                 {
-                    if ( sCurrencyAbbreviation.getLength() != 0 )
+                    if ( !sCurrencyAbbreviation.isEmpty())
                         rCurrencySymbol = sCurrencyAbbreviation;
                     else
                     {
@@ -425,7 +425,7 @@ void XMLNumberFormatAttributesExportHelper::WriteAttributes(
             if (!bWasSetTypeAttribute)
             {
                 pExport->AddAttribute(sAttrValueType, XML_CURRENCY);
-                if (rCurrency.getLength() > 0)
+                if (!rCurrency.isEmpty())
                     pExport->AddAttribute(sAttrCurrency, rCurrency);
                 bWasSetTypeAttribute = sal_True;
             }
@@ -548,7 +548,7 @@ void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(
     {
         if (bExportTypeAttribute)
             pExport->AddAttribute(sAttrValueType, XML_STRING);
-        if (bExportValue && rValue.getLength() && (rValue != rCharacters))
+        if (bExportValue && !rValue.isEmpty() && (rValue != rCharacters))
             pExport->AddAttribute(sAttrStringValue, rValue);
     }
     else {
diff --git a/xmloff/source/style/prstylei.cxx b/xmloff/source/style/prstylei.cxx
index 8e2a3f7..9217888 100644
--- a/xmloff/source/style/prstylei.cxx
+++ b/xmloff/source/style/prstylei.cxx
@@ -165,7 +165,7 @@ Reference < XStyle > XMLPropStyleContext::Create()
 
     OUString sServiceName(
         ((SvXMLStylesContext *)&mxStyles)->GetServiceName( GetFamily() ) );
-    if( sServiceName.getLength() )
+    if( !sServiceName.isEmpty() )
     {
         Reference< XMultiServiceFactory > xFactory( GetImport().GetModel(),
                                                     UNO_QUERY );
@@ -209,7 +209,7 @@ void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite )
                     PropertyValue *pProps = aValues.getArray() + nLen;
                     pProps->Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ParaStyleName"));
                     OUString sParent( GetParentName() );
-                    if( sParent.getLength() )
+                    if( !sParent.isEmpty() )
                         sParent = GetImport().GetStyleDisplayName( GetFamily(), sParent );
                     else
                         sParent =  rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Standard"));
@@ -240,7 +240,7 @@ void XMLPropStyleContext::CreateAndInsert( sal_Bool bOverwrite )
     else
     {
         const OUString& rName = GetDisplayName();
-        if( 0 == rName.getLength() || IsDefaultStyle() )
+        if( rName.isEmpty() || IsDefaultStyle() )
             return;
 
         Reference < XNameContainer > xFamilies =
@@ -354,9 +354,9 @@ void XMLPropStyleContext::Finish( sal_Bool bOverwrite )
 
         // connect parent
         OUString sParent( GetParentName() );
-        if( sParent.getLength() )
+        if( !sParent.isEmpty() )
             sParent = GetImport().GetStyleDisplayName( GetFamily(), sParent );
-        if( sParent.getLength() && !xFamilies->hasByName( sParent ) )
+        if( !sParent.isEmpty() && !xFamilies->hasByName( sParent ) )
             sParent = OUString();
 
         if( sParent != mxStyle->getParentStyle() )
@@ -392,9 +392,9 @@ void XMLPropStyleContext::Finish( sal_Bool bOverwrite )
 
         // connect follow
         OUString sFollow( GetFollow() );
-        if( sFollow.getLength() )
+        if( !sFollow.isEmpty() )
             sFollow = GetImport().GetStyleDisplayName( GetFamily(), sFollow );
-        if( !sFollow.getLength() || !xFamilies->hasByName( sFollow ) )
+        if( sFollow.isEmpty() || !xFamilies->hasByName( sFollow ) )
             sFollow = mxStyle->getName();
 
         Reference < XPropertySet > xPropSet( mxStyle, UNO_QUERY );
diff --git a/xmloff/source/style/styleexp.cxx b/xmloff/source/style/styleexp.cxx
index a4af1aa..e7c48f2 100644
--- a/xmloff/source/style/styleexp.cxx
+++ b/xmloff/source/style/styleexp.cxx
@@ -131,14 +131,14 @@ sal_Bool XMLStyleExport::exportStyle(
                                    sName);
 
     // style:family="..."
-    if( rXMLFamily.getLength() > 0 )
+    if( !rXMLFamily.isEmpty() )
         GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY, rXMLFamily);
 
     // style:parent-style-name="..."
     OUString sParentString(rStyle->getParentStyle());
     OUString sParent;
 
-    if(sParentString.getLength())
+    if(!sParentString.isEmpty())
     {
         if(pPrefix)
             sParent = *pPrefix;
@@ -147,7 +147,7 @@ sal_Bool XMLStyleExport::exportStyle(
     else
         sParent = sPoolStyleName;
 
-    if( sParent.getLength() )
+    if( !sParent.isEmpty() )
         GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_PARENT_STYLE_NAME,
                                     GetExport().EncodeStyleName( sParent ) );
 
@@ -223,7 +223,7 @@ sal_Bool XMLStyleExport::exportStyle(
                    this information is lost and causes an error, if the parent
                    style has a list style set. (#i69523#)
                 */
-                if ( !sListName.getLength() )
+                if ( sListName.isEmpty() )
                 {
                     GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                               XML_LIST_STYLE_NAME,
@@ -259,7 +259,7 @@ sal_Bool XMLStyleExport::exportStyle(
                         }
                     }
 
-                    if ( sListName.getLength() && !bSuppressListStyle )
+                    if ( !sListName.isEmpty() && !bSuppressListStyle )
                     {
                         GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                                   XML_LIST_STYLE_NAME,
@@ -278,8 +278,7 @@ sal_Bool XMLStyleExport::exportStyle(
             while ( xStyle.is() )
             {
                 OUString aParentStyle( xStyle->getParentStyle() );
-                if ( aParentStyle.getLength() == 0 ||
-                    !xStyles->hasByName( aParentStyle ) )
+                if ( aParentStyle.isEmpty() || !xStyles->hasByName( aParentStyle ) )
                 {
                     break;
                 }
@@ -356,7 +355,7 @@ sal_Bool XMLStyleExport::exportDefaultStyle(
 
     {
         // style:family="..."
-        if( rXMLFamily.getLength() > 0 )
+        if( !rXMLFamily.isEmpty() )
             GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_FAMILY,
                                       rXMLFamily );
         // <style:style>
@@ -491,8 +490,7 @@ void XMLStyleExport::exportStyleFamily(
 
                 if( !xPropSetInfo->hasPropertyByName( sFollowStyle ) )
                 {
-                    DBG_ASSERT( 0==sFollowStyle.getLength(),
-                                "no follow style???" );
+                    DBG_ASSERT( sFollowStyle.isEmpty(), "no follow style???" );
                     continue;
                 }
 
diff --git a/xmloff/source/style/xmlaustp.cxx b/xmloff/source/style/xmlaustp.cxx
index 6af6df5..d0eed7a 100644
--- a/xmloff/source/style/xmlaustp.cxx
+++ b/xmloff/source/style/xmlaustp.cxx
@@ -60,7 +60,7 @@ namespace
         // obtain the data style name
         ::rtl::OUString sDataStyleName;
         _rProperty.maValue >>= sDataStyleName;
-        DBG_ASSERT( sDataStyleName.getLength(), "xmloff::lcl_exportDataStyle: invalid property value for the data style name!" );
+        DBG_ASSERT( !sDataStyleName.isEmpty(), "xmloff::lcl_exportDataStyle: invalid property value for the data style name!" );
 
         // add the attribute
         _rExport.AddAttribute(
diff --git a/xmloff/source/style/xmlexppr.cxx b/xmloff/source/style/xmlexppr.cxx
index 2cdf096..d610e4e 100644
--- a/xmloff/source/style/xmlexppr.cxx
+++ b/xmloff/source/style/xmlexppr.cxx
@@ -976,7 +976,7 @@ void SvXMLExportPropertyMapper::_exportXML(
                 if( nColonPos != -1 )
                     sPrefix = pAttribName->copy( 0, nColonPos );
 
-                if( sPrefix.getLength() )
+                if( !sPrefix.isEmpty() )
                 {
                     OUString sNamespace( aData.Namespace );
 
@@ -1044,9 +1044,9 @@ void SvXMLExportPropertyMapper::_exportXML(
                     }
                 }
                 OUString sOldValue( rAttrList.getValueByName( sAttribName ) );
-                OSL_ENSURE( sOldValue.getLength() == 0, "alien attribute exists already" );
+                OSL_ENSURE( sOldValue.isEmpty(), "alien attribute exists already" );
                 OSL_ENSURE(aData.Type == GetXMLToken(XML_CDATA), "different type to our default type which should be written out");
-                if( !sOldValue.getLength() )
+                if( sOldValue.isEmpty() )
                     rAttrList.AddAttribute( sAttribName, aData.Value );
             }
 
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 9793a97..d896429 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -374,7 +374,7 @@ void SvXMLImportPropertyMapper::FillPropertySequence(
         if( nIdx == -1 )
             continue;
         pProps->Name = maPropMapper->GetEntryAPIName( nIdx );
-        if( pProps->Name.getLength() )
+        if( !pProps->Name.isEmpty() )
         {
             pProps->Value <<= rProp.maValue;
             ++pProps;
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index ec524b4..3b2aba2 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -164,7 +164,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
         {
             OUString sValue;
             rProp.Value >>= sValue;
-            if( sValue.getLength() > 0 )
+            if( !sValue.isEmpty() )
             {
                 cBullet = (sal_Unicode)sValue[0];
             }
@@ -294,17 +294,17 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
     // #i116149#: neither prefix/suffix
     if (NumberingType::BITMAP != eType)
     {
-        if (sTextStyleName.getLength() > 0)
+        if (!sTextStyleName.isEmpty())
         {
             GetExport().AddAttribute( XML_NAMESPACE_TEXT, XML_STYLE_NAME,
                     GetExport().EncodeStyleName( sTextStyleName ) );
         }
-        if (sPrefix.getLength() > 0)
+        if (!sPrefix.isEmpty())
         {
             GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_PREFIX,
                     sPrefix );
         }
-        if (sSuffix.getLength() > 0)
+        if (!sSuffix.isEmpty())
         {
             GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NUM_SUFFIX,
                     sSuffix );
@@ -337,10 +337,10 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
         eElem = XML_LIST_LEVEL_STYLE_IMAGE;
 
 
-        if( sImageURL.getLength() )
+        if( !sImageURL.isEmpty() )
         {
             OUString sURL( GetExport().AddEmbeddedGraphicObject( sImageURL ) );
-            if( sURL.getLength() )
+            if( !sURL.isEmpty() )
             {
                 GetExport().AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sURL );
 
@@ -562,7 +562,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
 
         if( NumberingType::CHAR_SPECIAL == eType )
         {
-            if( sBulletFontName.getLength() )
+            if( !sBulletFontName.isEmpty() )
             {
                 OUString sStyleName =
                     GetExport().GetFontAutoStylePool()->Find(
@@ -570,7 +570,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
                         eBulletFontFamily, eBulletFontPitch,
                         eBulletFontEncoding );
 
-                if( sStyleName.getLength() )
+                if( !sStyleName.isEmpty() )
                 {
                         GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                                   XML_FONT_NAME,
@@ -589,7 +589,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
                         GetExport().AddAttribute( XML_NAMESPACE_FO,
                                                   XML_FONT_FAMILY, sTemp );
 
-                    if( sBulletFontStyleName.getLength() )
+                    if( !sBulletFontStyleName.isEmpty() )
                         GetExport().AddAttribute( XML_NAMESPACE_STYLE,
                                                   XML_FONT_STYLE_NAME,
                                                   sBulletFontStyleName );
@@ -644,7 +644,7 @@ void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
             SvXMLElementExport aElement( GetExport(), XML_NAMESPACE_STYLE,
                                       XML_TEXT_PROPERTIES, sal_True, sal_True );
         }
-        if( NumberingType::BITMAP == eType && sImageURL.getLength() )
+        if( NumberingType::BITMAP == eType && !sImageURL.isEmpty() )
         {
             // optional office:binary-data
             GetExport().AddEmbeddedGraphicObjectAsBase64( sImageURL );
@@ -702,7 +702,7 @@ void SvxXMLNumRuleExport::exportNumberingRule(
     GetExport().CheckAttrList();
 
     // style:name="..."
-    if( rName.getLength() )
+    if( !rName.isEmpty() )
     {
         sal_Bool bEncoded = sal_False;
         GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME,
@@ -802,7 +802,7 @@ void SvxXMLNumRuleExport::exportOutline()
                 {
                     // style:name="..."
                     GetExport().CheckAttrList();
-                    if ( sOutlineStyleName.getLength() > 0 )
+                    if ( !sOutlineStyleName.isEmpty() )
                      {
                         sal_Bool bEncoded = sal_False;
                         GetExport().AddAttribute( XML_NAMESPACE_STYLE, XML_NAME,
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index ea923d8..7025a3d 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -329,7 +329,7 @@ OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, sal_Bool bDefPart
 
 void SvXMLNumFmtExport::AddCalendarAttr_Impl( const OUString& rCalendar )
 {
-    if ( rCalendar.getLength() )
+    if ( !rCalendar.isEmpty() )
     {
         rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_CALENDAR, rCalendar );
     }
@@ -358,9 +358,9 @@ void SvXMLNumFmtExport::AddLanguageAttr_Impl( sal_Int32 nLang )
         OUString aLangStr, aCountryStr;
         MsLangId::convertLanguageToIsoNames( (LanguageType)nLang, aLangStr, aCountryStr );
 
-        if (aLangStr.getLength())
+        if (!aLangStr.isEmpty())
             rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_LANGUAGE, aLangStr );
-        if (aCountryStr.getLength())
+        if (!aCountryStr.isEmpty())
             rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_COUNTRY, aCountryStr );
     }
 }
@@ -407,7 +407,7 @@ void SvXMLNumFmtExport::WriteCurrencyElement_Impl( const OUString& rString,
 {
     FinishTextElement_Impl();
 
-    if ( rExt.getLength() )
+    if ( !rExt.isEmpty() )
     {
         sal_Int32 nLang = rExt.toInt32(16);     // hex
         if ( nLang < 0 )                        // extension string may contain "-" separator
@@ -586,7 +586,7 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
     }
 
     //  decimal replacement (dashes) or variable decimals (#)
-    if ( rDashStr.getLength() || bVarDecimals )
+    if ( !rDashStr.isEmpty() || bVarDecimals )
     {
         //  variable decimals means an empty replacement string
         rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_DECIMAL_REPLACEMENT,
@@ -1033,7 +1033,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
     //  title (comment)
     //  titles for builtin formats are not written
     sAttrValue = rFormat.GetComment();
-    if ( sAttrValue.getLength() && bUserDef && bDefPart )
+    if ( !sAttrValue.isEmpty() && bUserDef && bDefPart )
     {
         rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TITLE, sAttrValue );
     }
@@ -1099,7 +1099,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
     //
     ::com::sun::star::i18n::NativeNumberXmlAttributes aAttr;
     rFormat.GetNatNumXml( aAttr, nPart );
-    if ( aAttr.Format.getLength() )
+    if ( !aAttr.Format.isEmpty() )
     {
         rExport.AddAttribute( XML_NAMESPACE_NUMBER, XML_TRANSLITERATION_FORMAT,
                               aAttr.Format );
@@ -1213,7 +1213,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
                 case NF_KEY_EEC:
                 case NF_KEY_R:
                 case NF_KEY_RR:
-                    if (!aCalendar.getLength())
+                    if (aCalendar.isEmpty())
                         aCalendar = lcl_GetDefaultCalendar( pFormatter, nLang );
                     break;
             }
@@ -1474,7 +1474,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
                         if ( nElemType == NF_KEY_AAA || nElemType == NF_KEY_AAAA )
                         {
                             //  calendar attribute for AAA and AAAA is switched only for this element
-                            if (!aCalAttr.getLength())
+                            if (aCalAttr.isEmpty())
                                 aCalAttr = lcl_GetDefaultCalendar( pFormatter, nLang );
                         }
 
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index ea896d9..3a964a3 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -973,7 +973,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport,
                     aNumInfo.fDisplayFactor = fAttrDouble;
                 break;
             case XML_TOK_ELEM_ATTR_DECIMAL_REPLACEMENT:
-                if ( sValue.getLength() > 0 )
+                if ( !sValue.isEmpty() )
                     aNumInfo.bDecReplace = sal_True;    // only a default string is supported
                 else
                     aNumInfo.bVarDecimals = sal_True;   // empty replacement string: variable decimals
@@ -1010,7 +1010,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport,
         }
     }
 
-    if ( sLanguage.getLength() || sCountry.getLength() )
+    if ( !sLanguage.isEmpty() || !sCountry.isEmpty() )
     {
         nElementLang = MsLangId::convertIsoNamesToLanguage( sLanguage, sCountry );
         if ( nElementLang == LANGUAGE_DONTKNOW )
@@ -1044,7 +1044,7 @@ void SvXMLNumFmtElementContext::Characters( const rtl::OUString& rChars )
 
 void SvXMLNumFmtElementContext::AddEmbeddedElement( sal_Int32 nFormatPos, const rtl::OUString& rContent )
 {
-    if ( rContent.getLength() )
+    if ( !rContent.isEmpty() )
     {
         SvXMLEmbeddedElement* pObj = new SvXMLEmbeddedElement( nFormatPos, rContent );
         if ( !aNumInfo.aEmbeddedElements.Insert( pObj ) )
@@ -1357,14 +1357,14 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
         }
     }
 
-    if ( sLanguage.getLength() || sCountry.getLength() )
+    if ( !sLanguage.isEmpty() || !sCountry.isEmpty() )
     {
         nFormatLang = MsLangId::convertIsoNamesToLanguage( sLanguage, sCountry );
         if ( nFormatLang == LANGUAGE_DONTKNOW )
             nFormatLang = LANGUAGE_SYSTEM;          //! error handling for invalid locales?
     }
 
-    if ( aNatNumAttr.Format.getLength() )
+    if ( !aNatNumAttr.Format.isEmpty() )
     {
         SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
         if ( pFormatter )
@@ -1613,7 +1613,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
         }
     }
 
-    if ( nIndex == NUMBERFORMAT_ENTRY_NOT_FOUND && sFormat.getLength() )
+    if ( nIndex == NUMBERFORMAT_ENTRY_NOT_FOUND && !sFormat.isEmpty() )
     {
         //  insert by format string
 
@@ -1662,7 +1662,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
         }
     }
 
-    if ((nIndex != NUMBERFORMAT_ENTRY_NOT_FOUND) && sFormatTitle.getLength())
+    if ((nIndex != NUMBERFORMAT_ENTRY_NOT_FOUND) && !sFormatTitle.isEmpty())
     {
         SvNumberformat* pFormat = const_cast<SvNumberformat*>(pFormatter->GetEntry( nIndex ));
         if (pFormat)
@@ -1848,7 +1848,7 @@ void SvXMLNumFormatContext::AddCurrency( const rtl::OUString& rContent, Language
 {
     sal_Bool bAutomatic = sal_False;
     OUString aSymbol = rContent;
-    if ( aSymbol.getLength() == 0 )
+    if ( aSymbol.isEmpty())
     {
         SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
         if ( pFormatter )
@@ -2146,7 +2146,7 @@ void SvXMLNumFormatContext::UpdateCalendar( const rtl::OUString& rNewCalendar )
     if ( rNewCalendar != sCalendar )
     {
         sCalendar = rNewCalendar;
-        if ( sCalendar.getLength() )
+        if ( !sCalendar.isEmpty() )
         {
             aFormatCode.appendAscii( "[~" );            // intro for calendar code
             aFormatCode.append( sCalendar );
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index de1ce74..5903277 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -436,7 +436,7 @@ SvXMLImportContext *SvxXMLListLevelStyleContext_Impl::CreateChildContext(
     else if( (XML_NAMESPACE_OFFICE == nPrefix) && xmloff::token::IsXMLToken( rLocalName,
                                         xmloff::token::XML_BINARY_DATA ) )
     {
-        if( bImage && !sImageURL.getLength() && !xBase64Stream.is() )
+        if( bImage && sImageURL.isEmpty() && !xBase64Stream.is() )
         {
             xBase64Stream = GetImport().GetStreamForGraphicObjectURLFromBase64();
             if( xBase64Stream.is() )
@@ -469,7 +469,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
         eType = NumberingType::BITMAP;
         nCount = 15;
 
-        if( (sImageURL.getLength() > 0L) || xBase64Stream.is() )
+        if( !sImageURL.isEmpty() || xBase64Stream.is() )
             nCount++;
     }
     if( bNum )
@@ -488,7 +488,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
         nCount++;
     }
 
-    if (bBullet && sSuffix.getLength())
+    if (bBullet && !sSuffix.isEmpty())
     {
         sal_uInt16 const nVersion(GetImport().getGeneratorVersion());
         sal_Int32 nUPD;
@@ -556,7 +556,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
         OUString sDisplayTextStyleName = GetImport().GetStyleDisplayName(
                                 XML_STYLE_FAMILY_TEXT_TEXT, sTextStyleName  );
         OUString sStyleName = sDisplayTextStyleName;
-        if( sStyleName.getLength() && pI18NMap )
+        if( !sStyleName.isEmpty() && pI18NMap )
             sStyleName = pI18NMap->Get( SFX_STYLE_FAMILY_CHAR, sStyleName );
         pProps[nPos].Name =
                 OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_CHAR_STYLE_NAME ));
@@ -566,7 +566,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
         {
             awt::FontDescriptor aFDesc;
             aFDesc.Name = sBulletFontName;
-            if( sBulletFontName.getLength() )
+            if( !sBulletFontName.isEmpty() )
             {
                 aFDesc.StyleName = sBulletFontStyleName;
                 aFDesc.Family = eBulletFontFamily;
@@ -607,7 +607,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
         if( bImage )
         {
             OUString sStr( sImageURL );
-            if( sImageURL.getLength() )
+            if( !sImageURL.isEmpty() )
             {
                 sStr = GetImport().ResolveGraphicObjectURL( sImageURL,
                                                                  sal_False );
@@ -617,7 +617,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
                 sStr = GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream );
             }
 
-            if( sStr.getLength() )
+            if( !sStr.isEmpty() )
             {
                 pProps[nPos].Name =
                         OUString(RTL_CONSTASCII_USTRINGPARAM( XML_UNO_NAME_NRULE_GRAPHICURL ));
@@ -773,7 +773,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
                 rListLevel.SetMinLabelDist( nVal );
             break;
         case XML_TOK_STYLE_ATTRIBUTES_ATTR_TEXT_ALIGN:
-            if( rValue.getLength() )
+            if( !rValue.isEmpty() )
             {
                 sal_Int16 eAdjust = HoriOrientation::LEFT;
                 if( IsXMLToken( rValue, XML_CENTER ) )
@@ -845,7 +845,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
         }
     }
 
-    if( sFontName.getLength() )
+    if( !sFontName.isEmpty() )
     {
         const XMLFontStylesContext *pFontDecls =
             GetImport().GetTextImport()->GetFontDecls();
@@ -886,7 +886,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
             }
         }
     }
-    if( sFontFamily.getLength() )
+    if( !sFontFamily.isEmpty() )
     {
         String sEmpty;
         Any aAny;
@@ -900,7 +900,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
         }
 
         XMLFontFamilyPropHdl aFamilyHdl;
-        if( sFontFamilyGeneric.getLength() &&
+        if( !sFontFamilyGeneric.isEmpty() &&
             aFamilyHdl.importXML( sFontFamilyGeneric, aAny, rUnitConv  ) )
         {
             sal_Int16 nTmp = 0;
@@ -908,11 +908,11 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
             rListLevel.SetBulletFontFamily( nTmp );
         }
 
-        if( sFontStyleName.getLength() )
+        if( !sFontStyleName.isEmpty() )
             rListLevel.SetBulletFontStyleName( sFontStyleName );
 
         XMLFontPitchPropHdl aPitchHdl;
-        if( sFontPitch.getLength() &&
+        if( !sFontPitch.isEmpty() &&
             aPitchHdl.importXML( sFontPitch, aAny, rUnitConv  ) )
         {
             sal_Int16 nTmp = 0;
@@ -921,7 +921,7 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
         }
 
         XMLFontEncodingPropHdl aEncHdl;
-        if( sFontCharset.getLength() &&
+        if( !sFontCharset.isEmpty() &&
             aEncHdl.importXML( sFontCharset, aAny, rUnitConv  ) )
         {
             sal_Int16 nTmp = 0;
@@ -931,14 +931,14 @@ SvxXMLListLevelStyleAttrContext_Impl::SvxXMLListLevelStyleAttrContext_Impl(
     }
 
     sal_Int16 eVertOrient = VertOrientation::LINE_CENTER;
-    if( sVerticalPos.getLength() )
+    if( !sVerticalPos.isEmpty() )
     {
         if( IsXMLToken( sVerticalPos, XML_TOP ) )
             eVertOrient = VertOrientation::LINE_TOP;
         else if( IsXMLToken( sVerticalPos, XML_BOTTOM ) )
             eVertOrient = VertOrientation::LINE_BOTTOM;
     }
-    if( sVerticalRel.getLength() )
+    if( !sVerticalRel.isEmpty() )
     {
         if( IsXMLToken( sVerticalRel, XML_BASELINE ) )
         {
@@ -1234,7 +1234,7 @@ void SvxXMLListStyleContext::CreateAndInsertLate( sal_Bool bOverwrite )
     {
         Reference < XStyle > xStyle;
         const OUString& rName = GetDisplayName();
-        if( 0 == rName.getLength() )
+        if( rName.isEmpty() )
         {
             SetValid( sal_False );
             return;
@@ -1312,7 +1312,7 @@ void SvxXMLListStyleContext::CreateAndInsertAuto() const
     DBG_ASSERT( !xNumRules.is(), "Numbering Rule is existing already" );
 
     const OUString& rName = GetName();
-    if( bOutline || xNumRules.is() || 0 == rName.getLength() )
+    if( bOutline || xNumRules.is() || rName.isEmpty() )
     {
         ((SvxXMLListStyleContext *)this)->SetValid( sal_False );
         return;
diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx
index 668577c..beae4d6 100644
--- a/xmloff/source/style/xmlstyle.cxx
+++ b/xmloff/source/style/xmlstyle.cxx
@@ -776,7 +776,7 @@ Reference < XNameContainer > SvXMLStylesContext::GetStylesContainer(
                 OUString( RTL_CONSTASCII_USTRINGPARAM( "CharacterStyles" ) );
         break;
     }
-    if( !xStyles.is() && sName.getLength() )
+    if( !xStyles.is() && !sName.isEmpty() )
     {
         Reference< XStyleFamiliesSupplier > xFamiliesSupp(
                                         GetImport().GetModel(), UNO_QUERY );
diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx
index ca57577..c613825 100644
--- a/xmloff/source/style/xmltabi.cxx
+++ b/xmloff/source/style/xmltabi.cxx
@@ -147,7 +147,7 @@ SvxXMLTabStopContext_Impl::SvxXMLTabStopContext_Impl(
             }
             break;
         case XML_TOK_TABSTOP_CHAR:
-            if( 0 != rValue.getLength() )
+            if( !rValue.isEmpty() )
                 aTabStop.DecimalChar = rValue[0];
             break;
         case XML_TOK_TABSTOP_LEADER_STYLE:
@@ -159,7 +159,7 @@ SvxXMLTabStopContext_Impl::SvxXMLTabStopContext_Impl(
                 aTabStop.FillChar = '_';
             break;
         case XML_TOK_TABSTOP_LEADER_TEXT:
-            if( 0 != rValue.getLength() )
+            if( !rValue.isEmpty() )
                 cTextFillChar = rValue[0];
             break;
         }


More information about the Libreoffice-commits mailing list