[PATCH] Fix for fdo43460 Part V getLength to isEmpty

Olivier Hallot olivier.hallot at alta.org.br
Sat Dec 10 16:03:11 PST 2011


Part V
Module
chart2
---
 .../accessibility/AccessibleTextHelper.cxx         |    4 +-
 .../controller/chartapiwrapper/DiagramWrapper.cxx  |    6 ++--
 .../WrappedAxisAndGridExistenceProperties.cxx      |    2 +-
 .../chartapiwrapper/WrappedStatisticProperties.cxx |    4 +-
 .../chartapiwrapper/WrappedStockProperties.cxx     |    4 +-
 .../dialogs/ChartTypeDialogController.cxx          |    2 +-
 chart2/source/controller/dialogs/DataBrowser.cxx   |    2 +-
 .../source/controller/dialogs/DataBrowserModel.cxx |    2 +-
 .../controller/dialogs/ObjectNameProvider.cxx      |   12 +++---
 chart2/source/controller/dialogs/res_ErrorBar.cxx  |    2 +-
 chart2/source/controller/dialogs/tp_DataSource.cxx |    8 ++--
 .../source/controller/dialogs/tp_RangeChooser.cxx  |    2 +-
 .../controller/drawinglayer/DrawViewWrapper.cxx    |    2 +-
 .../itemsetwrapper/ErrorBarItemConverter.cxx       |    2 +-
 .../GraphicPropertyItemConverter.cxx               |    4 +-
 .../itemsetwrapper/StatisticsItemConverter.cxx     |    2 +-
 chart2/source/controller/main/ChartController.cxx  |    4 +-
 .../controller/main/ChartController_Position.cxx   |    2 +-
 .../controller/main/ChartController_Properties.cxx |    2 +-
 .../controller/main/ChartController_TextEdit.cxx   |    2 +-
 .../controller/main/ChartController_Tools.cxx      |    2 +-
 .../controller/main/ChartController_Window.cxx     |   12 +++---
 .../controller/main/ControllerCommandDispatch.cxx  |    6 ++--
 .../source/controller/main/DrawCommandDispatch.cxx |    2 +-
 chart2/source/controller/main/ElementSelector.cxx  |    2 +-
 .../controller/main/FeatureCommandDispatchBase.cxx |    2 +-
 chart2/source/controller/main/ObjectHierarchy.cxx  |    2 +-
 chart2/source/controller/main/SelectionHelper.cxx  |   10 +++---
 .../controller/main/StatusBarCommandDispatch.cxx   |    2 +-
 .../source/controller/main/UndoCommandDispatch.cxx |    2 +-
 chart2/source/model/filter/XMLFilter.cxx           |   10 +++---
 chart2/source/model/main/ChartModel.cxx            |    2 +-
 .../source/model/main/ChartModel_Persistence.cxx   |    8 ++--
 chart2/source/tools/DataSeriesHelper.cxx           |    2 +-
 chart2/source/tools/DataSourceHelper.cxx           |    4 +-
 chart2/source/tools/DiagramHelper.cxx              |    2 +-
 chart2/source/tools/ExplicitCategoriesProvider.cxx |   10 +++---
 chart2/source/tools/InternalDataProvider.cxx       |    4 +-
 chart2/source/tools/ObjectIdentifier.cxx           |   34 ++++++++++----------
 chart2/source/tools/PropertyHelper.cxx             |    6 ++--
 chart2/source/tools/RangeHighlighter.cxx           |    2 +-
 chart2/source/tools/RegressionCurveHelper.cxx      |    4 +-
 chart2/source/tools/WrappedProperty.cxx            |    4 +-
 chart2/source/tools/XMLRangeHelper.cxx             |    8 ++--
 chart2/source/view/axes/VCartesianAxis.cxx         |    2 +-
 chart2/source/view/charttypes/VSeriesPlotter.cxx   |    6 ++--
 chart2/source/view/main/ChartView.cxx              |    8 ++--
 chart2/source/view/main/DrawModelWrapper.cxx       |    2 +-
 chart2/source/view/main/ShapeFactory.cxx           |    6 ++--
 chart2/source/view/main/VDataSeries.cxx            |    2 +-
 chart2/source/view/main/VLegend.cxx                |    2 +-
 chart2/source/view/main/VTitle.cxx                 |    2 +-
 52 files changed, 121 insertions(+), 121 deletions(-)

diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index 380e3cf..c14ddcb 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -78,10 +78,10 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg
         aArguments[1] >>= xEventSource;
         aArguments[2] >>= xWindow;
     }
-    OSL_ENSURE( aCID.getLength() > 0, "Empty CID" );
+    OSL_ENSURE( !aCID.isEmpty(), "Empty CID" );
     OSL_ENSURE( xEventSource.is(), "Empty Event Source" );
     OSL_ENSURE( xWindow.is(), "Empty Window" );
-    if( !xEventSource.is() || aCID.getLength() == 0 )
+    if( !xEventSource.is() || aCID.isEmpty() )
         return;
 
     SolarMutexGuard aSolarGuard;
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 46bb9a1..0000196 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -668,7 +668,7 @@ OUString SAL_CALL DiagramWrapper::getDiagramType()
         aRet = lcl_getDiagramType( aTemplateAndService.second );
     }
 
-    if( !aRet.getLength())
+    if( aRet.isEmpty())
     {
         // none of the standard templates matched
         // use first chart type
@@ -676,10 +676,10 @@ OUString SAL_CALL DiagramWrapper::getDiagramType()
         if( xChartType.is() )
         {
             aRet = xChartType->getChartType();
-            if( aRet.getLength() )
+            if( !aRet.isEmpty() )
                 aRet = lcl_getOldChartTypeName( aRet );
         }
-        if( !aRet.getLength())
+        if( aRet.isEmpty())
             aRet = C2U( "com.sun.star.chart.BarDiagram" );
     }
 
diff --git a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
index 65b76e9..076e87c 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
@@ -311,7 +311,7 @@ Any WrappedAxisTitleExistenceProperty::getPropertyValue( const Reference< beans:
     sal_Bool bHasTitle = sal_False;
 
     Reference< chart2::XTitle > xTitle( TitleHelper::getTitle( m_eTitleType, m_spChart2ModelContact->getChartModel() ) );
-    if( xTitle.is() && (TitleHelper::getCompleteString( xTitle ).getLength() != 0) )
+    if( xTitle.is() && !TitleHelper::getCompleteString( xTitle ).isEmpty() )
         bHasTitle = sal_True;
 
     Any aRet;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index 54f76d8..75ac245 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -146,7 +146,7 @@ void lcl_ConvertRangeFromXML(
     ::rtl::OUString & rInOutRange,
     ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
 {
-    if( rInOutRange.getLength())
+    if( !rInOutRange.isEmpty())
     {
         uno::Reference< chart2::data::XRangeXMLConversion > xConverter(
             lcl_getDataProviderFromContact( spChart2ModelContact ), uno::UNO_QUERY );
@@ -162,7 +162,7 @@ void lcl_ConvertRangeToXML(
     ::rtl::OUString & rInOutRange,
     ::boost::shared_ptr< Chart2ModelContact > spChart2ModelContact )
 {
-    if( rInOutRange.getLength())
+    if( !rInOutRange.isEmpty())
     {
         uno::Reference< chart2::data::XRangeXMLConversion > xConverter(
             lcl_getDataProviderFromContact( spChart2ModelContact ), uno::UNO_QUERY );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
index bd1ed55..c01fc8e 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
@@ -169,7 +169,7 @@ WrappedVolumeProperty::~WrappedVolumeProperty()
             if(    aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.StockVolumeLowHighClose" ) )
                 || aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) ) )
                 m_aOuterValue <<= sal_Bool(sal_True);
-            else if( aTemplateAndService.second.getLength() || !m_aOuterValue.hasValue() )
+            else if( !aTemplateAndService.second.isEmpty() || !m_aOuterValue.hasValue() )
                 m_aOuterValue <<= sal_Bool(sal_False);
         }
         else if(!m_aOuterValue.hasValue())
@@ -240,7 +240,7 @@ WrappedUpDownProperty::~WrappedUpDownProperty()
             if(    aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.StockOpenLowHighClose" ) )
                 || aTemplateAndService.second.equals( C2U( "com.sun.star.chart2.template.StockVolumeOpenLowHighClose" ) ) )
                 m_aOuterValue <<= sal_Bool(sal_True);
-            else if( aTemplateAndService.second.getLength() || !m_aOuterValue.hasValue() )
+            else if( !aTemplateAndService.second.isEmpty() || !m_aOuterValue.hasValue() )
                 m_aOuterValue <<= sal_Bool(sal_False);
         }
         else if(!m_aOuterValue.hasValue())
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index 1dae363..af6794b 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -285,7 +285,7 @@ uno::Reference< XChartTypeTemplate > ChartTypeDialogController::getCurrentTempla
     uno::Reference< XChartTypeTemplate > xTemplate(0);
 
     rtl::OUString aServiceName( this->getServiceNameForParameter( rParameter ) );
-    if(aServiceName.getLength())
+    if(!aServiceName.isEmpty())
     {
         xTemplate.set( xTemplateManager->createInstance( aServiceName ), uno::UNO_QUERY );
         if(xTemplate.is())
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 5a3198f..5de9287 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -1138,7 +1138,7 @@ bool DataBrowser::isDateString( rtl::OUString aInputString, double& fOutDateValu
 {
     sal_uInt32 nNumberFormat=0;
     SvNumberFormatter* pSvNumberFormatter = m_spNumberFormatterWrapper.get() ? m_spNumberFormatterWrapper->getSvNumberFormatter() : 0;
-    if( aInputString.getLength() > 0 &&  pSvNumberFormatter && pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateValue ) )
+    if( !aInputString.isEmpty() &&  pSvNumberFormatter && pSvNumberFormatter->IsNumberFormat( aInputString, nNumberFormat, fOutDateValue ) )
     {
         Reference< util::XNumberFormatsSupplier > xNumberFormatsSupplier( m_xChartDoc, uno::UNO_QUERY );
         Reference< util::XNumberFormats > xNumberFormats;
diff --git a/chart2/source/controller/dialogs/DataBrowserModel.cxx b/chart2/source/controller/dialogs/DataBrowserModel.cxx
index 80e19a2..1ec9acf 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -103,7 +103,7 @@ OUString lcl_getUIRoleName(
     const Reference< chart2::data::XLabeledDataSequence > & xLSeq )
 {
     OUString aResult( lcl_getRole( xLSeq ));
-    if( aResult.getLength())
+    if( !aResult.isEmpty())
         aResult = ::chart::DialogModel::ConvertRoleFromInternalToUI( aResult );
     return aResult;
 }
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index ee0e61d..84e3116 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -93,9 +93,9 @@ OUString lcl_getFullSeriesName( const rtl::OUString& rObjectCID, const Reference
 
 void lcl_addText( OUString& rOut, const OUString& rSeparator, const OUString& rNext )
 {
-    if( rOut.getLength() && rNext.getLength() )
+    if( !(rOut.isEmpty() || rNext.isEmpty()) )
         rOut+=rSeparator;
-    if( rNext.getLength() )
+    if( !rNext.isEmpty() )
         rOut+=rNext;
 }
 
@@ -188,7 +188,7 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
         }
     }
 
-    if( aX.getLength() == 0 )
+    if( aX.isEmpty() )
     {
         aRet = ExplicitCategoriesProvider::getCategoryByIndex( xCooSys, xChartModel, nPointIndex );
     }
@@ -396,7 +396,7 @@ OUString ObjectNameProvider::getTitleNameByType( TitleHelper::eTitleType eType )
             break;
     }
 
-    if( !aRet.getLength() )
+    if( aRet.isEmpty() )
         aRet=String(SchResId(STR_OBJECT_TITLE));
 
     return aRet;
@@ -415,7 +415,7 @@ OUString ObjectNameProvider::getTitleName( const OUString& rObjectCID
         if( TitleHelper::getTitleType( eType, xTitle, xChartModel ) )
             aRet = ObjectNameProvider::getTitleNameByType( eType );
     }
-    if( !aRet.getLength() )
+    if( aRet.isEmpty() )
         aRet=String(SchResId(STR_OBJECT_TITLE));
 
     return aRet;
@@ -721,7 +721,7 @@ rtl::OUString ObjectNameProvider::getSelectedObjectText( const rtl::OUString & r
         // use the verbose text including the formula for trend lines
         const bool bVerbose( OBJECTTYPE_DATA_CURVE == eObjectType || OBJECTTYPE_DATA_AVERAGE_LINE == eObjectType );
         const OUString aHelpText( getHelpText( rObjectCID, xChartModel, bVerbose ));
-        if( aHelpText.getLength())
+        if( !aHelpText.isEmpty())
         {
             aRet = String( SchResId( STR_STATUS_OBJECT_MARKED ));
             replaceParamterInString( aRet, C2U("%OBJECTNAME"), aHelpText );
diff --git a/chart2/source/controller/dialogs/res_ErrorBar.cxx b/chart2/source/controller/dialogs/res_ErrorBar.cxx
index ed1f5e8..e05c519 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -748,7 +748,7 @@ void ErrorBarResources::disposingRangeSelection()
 bool ErrorBarResources::isRangeFieldContentValid( Edit & rEdit )
 {
     ::rtl::OUString aRange( rEdit.GetText());
-    bool bIsValid = ( aRange.getLength() == 0 ) ||
+    bool bIsValid = ( aRange.isEmpty() ) ||
         ( m_apRangeSelectionHelper.get() &&
           m_apRangeSelectionHelper->verifyCellRange( aRange ));
 
diff --git a/chart2/source/controller/dialogs/tp_DataSource.cxx b/chart2/source/controller/dialogs/tp_DataSource.cxx
index 2deb405..3d99e97 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -401,7 +401,7 @@ sal_Bool DataSourceTabPage::commitPage( ::svt::WizardTypes::CommitPageReason /*e
 bool DataSourceTabPage::isRangeFieldContentValid( Edit & rEdit )
 {
     OUString aRange( rEdit.GetText());
-    bool bIsValid = ( aRange.getLength() == 0 ) ||
+    bool bIsValid = ( aRange.isEmpty() ) ||
         m_rDialogModel.getRangeSelectionHelper()->verifyCellRange( aRange );
 
     if( bIsValid )
@@ -906,7 +906,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
         if( xDataProvider.is())
         {
             OUString aRange( m_aEDT_CATEGORIES.GetText());
-            if( aRange.getLength())
+            if( !aRange.isEmpty())
             {
                 // create or change categories
                 if( !xLabeledSeq.is())
@@ -972,7 +972,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
                         }
                         if( xLabeledSeq.is())
                         {
-                            if( aRange.getLength())
+                            if( !aRange.isEmpty())
                             {
                                 Reference< data::XDataSequence > xNewSeq;
                                 try
@@ -1003,7 +1003,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
                     }
                     else
                     {
-                        if( aRange.getLength())
+                        if( !aRange.isEmpty())
                         {
                             Reference< data::XDataSequence > xNewSeq;
                             try
diff --git a/chart2/source/controller/dialogs/tp_RangeChooser.cxx b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
index 7403771..67889c3 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -285,7 +285,7 @@ bool RangeChooserTabPage::isValid()
         || ( m_aCB_FirstRowAsLabel.IsChecked()    && !m_aRB_Rows.IsChecked() );
     sal_Bool bHasCategories = ( m_aCB_FirstColumnAsLabel.IsChecked() && m_aRB_Columns.IsChecked() )
         || ( m_aCB_FirstRowAsLabel.IsChecked()    && m_aRB_Rows.IsChecked() );
-    bool bIsValid = ( aRange.getLength() == 0 ) ||
+    bool bIsValid = ( aRange.isEmpty() ) ||
         m_rDialogModel.getRangeSelectionHelper()->verifyArguments(
             DataSourceHelper::createArguments(
                 aRange, Sequence< sal_Int32 >(), m_aRB_Columns.IsChecked(), bFirstCellAsLabel, bHasCategories ));
diff --git a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
index 8359aa2..e573944 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -311,7 +311,7 @@ SfxItemSet DrawViewWrapper::getPositionAndSizeItemSetFromMarkedObject() const
 
 SdrObject* DrawViewWrapper::getNamedSdrObject( const rtl::OUString& rName ) const
 {
-    if(rName.getLength()==0)
+    if(rName.isEmpty())
         return 0;
     SdrPageView* pSdrPageView = this->GetPageView();
     if( pSdrPageView )
diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
index c9d290e..7108204 100644
--- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
@@ -301,7 +301,7 @@ bool ErrorBarItemConverter::ApplySpecialItem(
                 bool bIsPositiveValue( nWhichId == SCHATTR_STAT_RANGE_POS );
                 if( xChartDoc->hasInternalDataProvider())
                 {
-                    if( aNewRange.getLength())
+                    if( !aNewRange.isEmpty())
                     {
                         uno::Reference< chart2::data::XDataSequence > xSeq(
                             StatisticsHelper::getErrorDataSequenceFromDataSource(
diff --git a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
index c173ad2..debad58 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -290,7 +290,7 @@ void GraphicPropertyItemConverter::FillSpecialItem(
                         // this is important to enable the item
                         ::rtl::OUString aName;
                         if( (aValue >>= aName) &&
-                            aName.getLength())
+                            !aName.isEmpty())
                         {
                             aItem.SetEnabled( sal_True );
                             rOutItemSet.Put( aItem );
@@ -532,7 +532,7 @@ bool GraphicPropertyItemConverter::ApplySpecialItem(
                     {
                         ::rtl::OUString aName;
                         if( ( GetPropertySet()->getPropertyValue( aPropName ) >>= aName )
-                            && aName.getLength() > 0 )
+                            && !aName.isEmpty() )
                         {
                             uno::Reference< beans::XPropertyState > xState( GetPropertySet(), uno::UNO_QUERY );
                             if( xState.is())
diff --git a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
index 797df1e..a15fdda 100644
--- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
@@ -480,7 +480,7 @@ bool StatisticsItemConverter::ApplySpecialItem(
                 bool bIsPositiveValue( nWhichId == SCHATTR_STAT_RANGE_POS );
                 if( xChartDoc->hasInternalDataProvider())
                 {
-                    if( aNewRange.getLength())
+                    if( !aNewRange.isEmpty())
                     {
                         uno::Reference< chart2::data::XDataSequence > xSeq(
                             StatisticsHelper::getErrorDataSequenceFromDataSource(
diff --git a/chart2/source/controller/main/ChartController.cxx b/chart2/source/controller/main/ChartController.cxx
index 31ad274..1d8424b 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1041,7 +1041,7 @@ bool lcl_isFormatObjectCommand( const rtl::OString& aCommand )
 {
     if ( !m_aLifeTimeManager.impl_isDisposed() && getModel().is() )
     {
-        if( rTargetFrameName.getLength() &&
+        if( !rTargetFrameName.isEmpty() &&
             rTargetFrameName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("_self")))
             return m_aDispatchContainer.getDispatchForURL( rURL );
     }
@@ -1394,7 +1394,7 @@ IMPL_LINK( ChartController, NotifyUndoActionHdl, SdrUndoAction*, pUndoAction )
     ENSURE_OR_RETURN( pUndoAction, "invalid Undo action", 1L );
 
     ::rtl::OUString aObjectCID = m_aSelection.getSelectedCID();
-    if ( aObjectCID.getLength() == 0 )
+    if ( aObjectCID.isEmpty() )
     {
         try
         {
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index f4dcb03..3c7ecee 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -127,7 +127,7 @@ void SAL_CALL ChartController::executeDispatch_PositionAndSize()
 {
     const ::rtl::OUString aCID( m_aSelection.getSelectedCID() );
 
-    if( !aCID.getLength() )
+    if( aCID.isEmpty() )
         return;
 
     awt::Size aSelectedSize;
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 4697458..9d73b31 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -726,7 +726,7 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard( const ::rtl:
 {
     //return true if the properties were changed successfully
     bool bRet = false;
-    if( !rObjectCID.getLength() )
+    if( rObjectCID.isEmpty() )
     {
        return bRet;
     }
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 96f0eab..9263fb5 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -145,7 +145,7 @@ bool ChartController::EndTextEdit()
                             pOutliner->GetParagraphCount() );
 
         ::rtl::OUString aObjectCID = m_aSelection.getSelectedCID();
-        if ( aObjectCID.getLength() > 0 )
+        if ( !aObjectCID.isEmpty() )
         {
             uno::Reference< beans::XPropertySet > xPropSet =
                 ObjectIdentifier::getObjectPropertySet( aObjectCID, getModel() );
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 51021ee..e1a2279 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -600,7 +600,7 @@ bool ChartController::executeDispatch_Delete()
 
     // remove the selected object
     rtl::OUString aCID( m_aSelection.getSelectedCID() );
-    if( aCID.getLength() )
+    if( !aCID.isEmpty() )
     {
         if( !isObjectDeleteable( uno::Any( aCID ) ) )
             return false;
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index 84fb32e..4b285dc 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -944,7 +944,7 @@ void ChartController::execute_DoubleClick( const Point* pMousePixel )
     if ( m_aSelection.hasSelection() )
     {
         ::rtl::OUString aCID( m_aSelection.getSelectedCID() );
-        if ( aCID.getLength() )
+        if ( !aCID.isEmpty() )
         {
             ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID );
             if ( OBJECTTYPE_TITLE == eObjectType )
@@ -1227,7 +1227,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
                         bool bHasTitle = false;
                         uno::Reference< XTitled > xTitled( xAxis, uno::UNO_QUERY );
                         if( xTitled.is())
-                            bHasTitle = TitleHelper::getCompleteString( xTitled->getTitleObject() ).getLength()>0;
+                            bHasTitle = !TitleHelper::getCompleteString( xTitled->getTitleObject() ).isEmpty();
 
                         if( OBJECTTYPE_AXIS  != eObjectType && bIsAxisVisible )
                             lcl_insertMenuCommand( xPopupMenu, xMenuEx, nUniqueId++, C2U(".uno:FormatAxis") );
@@ -1500,7 +1500,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
                             fShiftAmountX = 0.0;
                             break;
                     }
-                    if( m_aSelection.getSelectedCID().getLength() )
+                    if( !m_aSelection.getSelectedCID().isEmpty() )
                     {
                         //move chart objects
                         bReturn = impl_moveOrResizeObject(
@@ -1599,7 +1599,7 @@ bool ChartController::requestQuickHelp(
         aCID = SelectionHelper::getHitObjectCID(
             aAtLogicPosition, *m_pDrawViewWrapper );
     }
-    bool bResult( aCID.getLength());
+    bool bResult( !aCID.isEmpty());
 
     if( bResult )
     {
@@ -1679,7 +1679,7 @@ bool ChartController::requestQuickHelp(
     if ( m_aSelection.hasSelection() )
     {
         ::rtl::OUString aCID( m_aSelection.getSelectedCID() );
-        if ( aCID.getLength() )
+        if ( !aCID.isEmpty() )
         {
             aReturn = uno::makeAny( aCID );
         }
@@ -2004,7 +2004,7 @@ void ChartController::impl_SetMousePointer( const MouseEvent & rEvent )
                 }
             }
 
-            if( !aHitObjectCID.getLength() )
+            if( aHitObjectCID.isEmpty() )
             {
                 //additional shape was hit
                 m_pChartWindow->SetPointer( POINTER_MOVE );
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 1a37a1c..c6dac76 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -708,14 +708,14 @@ void ControllerCommandDispatch::fireStatusEvent(
     const Reference< frame::XStatusListener > & xSingleListener /* = 0 */ )
 {
     bool bIsChartSelectorURL = rURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(".uno:ChartElementSelector") );
-    if( rURL.getLength() == 0 || bIsChartSelectorURL )
+    if( rURL.isEmpty() || bIsChartSelectorURL )
     {
         uno::Any aArg;
         aArg <<= m_xController;
         fireStatusEventForURL( C2U(".uno:ChartElementSelector"), aArg, true, xSingleListener );
     }
 
-    if( rURL.getLength() == 0 )
+    if( rURL.isEmpty() )
         for( ::std::map< OUString, bool >::const_iterator aIt( m_aCommandAvailability.begin());
              aIt != m_aCommandAvailability.end(); ++aIt )
             fireStatusEventForURLImpl( aIt->first, xSingleListener );
@@ -724,7 +724,7 @@ void ControllerCommandDispatch::fireStatusEvent(
 
     // statusbar. Should be handled by base implementation
     // @todo: remove if Issue 68864 is fixed
-    if( rURL.getLength() == 0 ||
+    if( rURL.isEmpty() ||
         rURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(".uno:StatusBarVisible")))
     {
         bool bIsStatusBarVisible( lcl_isStatusBarVisible( m_xController ));
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index 0a3ec48..b367245 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -595,7 +595,7 @@ bool DrawCommandDispatch::parseCommandURL( const ::rtl::OUString& rCommandURL, s
 
     sal_Int32 nIndex = 1;
     ::rtl::OUString aToken = rCommandURL.getToken( 0, '.', nIndex );
-    if ( nIndex == -1 || !aToken.getLength() )
+    if ( nIndex == -1 || aToken.isEmpty() )
     {
         aBaseCommand = rCommandURL;
         SupportedFeatures::const_iterator aIter = m_aSupportedFeatures.find( aBaseCommand );
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index 7015526..e795a7d 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -155,7 +155,7 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
                 ListBoxEntryData aEntry;
                 SdrObject* pSelectedObj = DrawViewWrapper::getSdrObject( aSelectedOID.getAdditionalShape() );
                 ::rtl::OUString aName( pSelectedObj ? pSelectedObj->GetName() : String() );
-                aEntry.UIName = ( aName.getLength() > 0 ? aName : ::rtl::OUString( String( SchResId( STR_OBJECT_SHAPE ) ) ) );
+                aEntry.UIName = ( aName.isEmpty() ?  ::rtl::OUString( String( SchResId( STR_OBJECT_SHAPE ) ) ) : aName );
                 aEntry.OID = aSelectedOID;
                 m_aEntries.push_back( aEntry );
             }
diff --git a/chart2/source/controller/main/FeatureCommandDispatchBase.cxx b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx
index fecbe84..15a6bfa 100644
--- a/chart2/source/controller/main/FeatureCommandDispatchBase.cxx
+++ b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx
@@ -66,7 +66,7 @@ bool FeatureCommandDispatchBase::isFeatureSupported( const ::rtl::OUString& rCom
 void FeatureCommandDispatchBase::fireStatusEvent( const ::rtl::OUString& rURL,
     const Reference< frame::XStatusListener >& xSingleListener /* = 0 */ )
 {
-    if ( rURL.getLength() == 0 )
+    if ( rURL.isEmpty() )
     {
         SupportedFeatures::const_iterator aEnd( m_aSupportedFeatures.end() );
         for ( SupportedFeatures::const_iterator aIter( m_aSupportedFeatures.begin() ); aIter != aEnd; ++aIter )
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index d059c1a..14158ba 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -96,7 +96,7 @@ void lcl_getChildOIDs(
                 if( xInfo.is() &&
                     xInfo->hasPropertyByName( C2U("Name")) &&
                     (xShapeProp->getPropertyValue( C2U("Name")) >>= aName ) &&
-                    aName.getLength() > 0 &&
+                    !aName.isEmpty() &&
                     ::chart::ObjectIdentifier::isCID( aName ))
                 {
                     rOutChildren.push_back( ::chart::ObjectIdentifier( aName ) );
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index def21ed..256354a 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -372,7 +372,7 @@ bool SelectionHelper::findNamedParent( SdrObject*& pInOutObject
 
     if(!pObj)
         return false;
-    if(!aName.getLength())
+    if(aName.isEmpty())
         return false;
 
     pInOutObject = pObj;
@@ -397,7 +397,7 @@ bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos
                     , const rtl::OUString& rNameOfSelectedObject
                     , const DrawViewWrapper& rDrawViewWrapper )
 {
-    if(!rNameOfSelectedObject.getLength())
+    if(rNameOfSelectedObject.isEmpty())
         return false;
     if( !ObjectIdentifier::isDragableObject(rNameOfSelectedObject) )
         return false;
@@ -436,13 +436,13 @@ bool SelectionHelper::isDragableObjectHitTwice( const Point& rMPos
 
     rtl::OUString aPageCID( ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_PAGE, rtl::OUString() ) );//@todo read CID from model
     //get page when nothing was hit
-    if( aRet.getLength() == 0  && !pNewObj )
+    if( aRet.isEmpty() && !pNewObj )
     {
         aRet = aPageCID;
     }
 
     //get diagram instead wall or page if hit inside diagram
-    if( aRet.getLength() != 0  )
+    if( !aRet.isEmpty() )
     {
         if( aRet.equals( aPageCID ) )
         {
@@ -510,7 +510,7 @@ SdrObject* SelectionHelper::getMarkHandlesObject( SdrObject* pObj )
     rtl::OUString aName( lcl_getObjectName( pObj ) );
     if( aName.match(C2U("MarkHandles")) || aName.match(C2U("HandlesOnly")) )
         return pObj;
-    if( aName.getLength() )//dont't get the markhandles of a different object
+    if( !aName.isEmpty() )//dont't get the markhandles of a different object
         return 0;
 
     //search for a child with name "MarkHandles" or "HandlesOnly"
diff --git a/chart2/source/controller/main/StatusBarCommandDispatch.cxx b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
index bee7a54..db5a09c 100644
--- a/chart2/source/controller/main/StatusBarCommandDispatch.cxx
+++ b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
@@ -76,7 +76,7 @@ void StatusBarCommandDispatch::fireStatusEvent(
     const OUString & rURL,
     const Reference< frame::XStatusListener > & xSingleListener /* = 0 */ )
 {
-    bool bFireAll(rURL.getLength() == 0);
+    bool bFireAll( rURL.isEmpty() );
     bool bFireContext(  bFireAll || rURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(".uno:Context")));
     bool bFireModified( bFireAll || rURL.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM(".uno:ModifiedStatus")));
 
diff --git a/chart2/source/controller/main/UndoCommandDispatch.cxx b/chart2/source/controller/main/UndoCommandDispatch.cxx
index 643667f..f1dbf03 100644
--- a/chart2/source/controller/main/UndoCommandDispatch.cxx
+++ b/chart2/source/controller/main/UndoCommandDispatch.cxx
@@ -77,7 +77,7 @@ void UndoCommandDispatch::fireStatusEvent(
 {
     if( m_xUndoManager.is() )
     {
-        bool bFireAll = (rURL.getLength() == 0);
+        bool bFireAll = rURL.isEmpty();
         uno::Any aUndoState, aRedoState;
         if( m_xUndoManager->isUndoPossible())
         {
diff --git a/chart2/source/model/filter/XMLFilter.cxx b/chart2/source/model/filter/XMLFilter.cxx
index 3313171..57c7975 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -155,7 +155,7 @@ uno::Reference< embed::XStorage > lcl_getWriteStorage(
         OUString aMediaType;
         if ( ! xProp.is() ||
              ! ( xProp->getPropertyValue( C2U("MediaType")) >>= aMediaType ) ||
-             ( aMediaType.getLength() == 0 ))
+             ( aMediaType.isEmpty() ))
         {
             xProp->setPropertyValue( C2U("MediaType"), uno::makeAny( _sMediaType ));
         }
@@ -424,10 +424,10 @@ sal_Int32 XMLFilter::impl_Import(
             }
         }
 
-        if( aBaseUri.getLength() )
+        if( !aBaseUri.isEmpty() )
             xImportInfo->setPropertyValue( C2U("BaseURI"), uno::makeAny( aBaseUri ) );
 
-        if( aHierarchName.getLength() )
+        if( !aHierarchName.isEmpty() )
             xImportInfo->setPropertyValue( C2U("StreamRelPath"), uno::makeAny( aHierarchName ) );
 
         // import meta information
@@ -531,7 +531,7 @@ sal_Int32 XMLFilter::impl_ImportStream(
                 Reference< document::XImporter > xImporter( xDocHandler, uno::UNO_QUERY_THROW );
                 xImporter->setTargetDocument( Reference< lang::XComponent >( m_xTargetDoc, uno::UNO_QUERY_THROW ));
 
-                if ( m_sDocumentHandler.getLength() )
+                if ( !m_sDocumentHandler.isEmpty() )
                 {
                     try
                     {
@@ -629,7 +629,7 @@ sal_Int32 XMLFilter::impl_Export(
 
         uno::Reference< xml::sax::XDocumentHandler> xDocHandler( xSaxWriter, uno::UNO_QUERY );
 
-        if ( m_sDocumentHandler.getLength() )
+        if ( !m_sDocumentHandler.isEmpty() )
         {
             try
             {
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index a1f20b8..0ab069b 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -347,7 +347,7 @@ sal_Bool SAL_CALL ChartModel::attachResource( const ::rtl::OUString& rURL
         return sal_False; //behave passive if already disposed or closed or throw exception @todo?
     //mutex is acquired
 
-    if(m_aResource.getLength()!=0)//we have a resource already //@todo? or is setting a new resource allowed?
+    if(!m_aResource.isEmpty())//we have a resource already //@todo? or is setting a new resource allowed?
         return sal_False;
     m_aResource = rURL;
     m_aMediaDescriptor = rMediaDescriptor;
diff --git a/chart2/source/model/main/ChartModel_Persistence.cxx b/chart2/source/model/main/ChartModel_Persistence.cxx
index de820b9..6e1a913 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -161,7 +161,7 @@ Reference< document::XFilter > ChartModel::impl_createFilter(
         lcl_getProperty< OUString >( rMediaDescriptor, OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterName" ))));
 
     // if FilterName was found, get Filter from factory
-    if( aFilterName.getLength() > 0 )
+    if( !aFilterName.isEmpty() )
     {
         try
         {
@@ -178,7 +178,7 @@ Reference< document::XFilter > ChartModel::impl_createFilter(
                 OUString aFilterServiceName(
                     lcl_getProperty< OUString >( aProps, OUString( RTL_CONSTASCII_USTRINGPARAM( "FilterService" ))));
 
-                if( aFilterServiceName.getLength())
+                if( !aFilterServiceName.isEmpty())
                 {
                     xFilter.set(
                         m_xContext->getServiceManager()->createInstanceWithContext(
@@ -230,7 +230,7 @@ sal_Bool SAL_CALL ChartModel::hasLocation()
     throw(uno::RuntimeException)
 {
     //@todo guard
-    return m_aResource.getLength()!=0;
+    return !m_aResource.isEmpty();
 }
 
 ::rtl::OUString SAL_CALL ChartModel::getLocation()
@@ -256,7 +256,7 @@ void SAL_CALL ChartModel::store()
 
     ::rtl::OUString aLocation = m_aResource;
 
-    if( aLocation.getLength() == 0 )
+    if( aLocation.isEmpty() )
         throw io::IOException( C2U( "no location specified" ), static_cast< ::cppu::OWeakObject* >(this));
     //@todo check wether aLocation is something like private:factory...
     if( m_bReadOnly )
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index ab0a471..5fd34d5 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -333,7 +333,7 @@ OUString getLabelForLabeledDataSequence(
         Reference< chart2::data::XDataSequence > xSeq( xLabeledSeq->getLabel());
         if( xSeq.is() )
             aResult = lcl_getDataSequenceLabel( xSeq );
-        if( !xSeq.is() || !aResult.getLength() )
+        if( !xSeq.is() || aResult.isEmpty() )
         {
             // no label set or label content is empty -> use auto-generated one
             Reference< chart2::data::XDataSequence > xValueSeq( xLabeledSeq->getValues() );
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index ce35f68..ac11380 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -351,7 +351,7 @@ bool DataSourceHelper::detectRangeSegmentation(
         DataSourceHelper::readArguments(
             xDataProvider->detectArguments( pressUsedDataIntoRectangularFormat( xChartDocument ) ),
             rOutRangeString, rSequenceMapping, rOutUseColumns, rOutFirstCellAsLabel, rOutHasCategories );
-        bSomethingDetected = (rOutRangeString.getLength() > 0);
+        bSomethingDetected = !rOutRangeString.isEmpty();
 
         uno::Reference< chart2::data::XLabeledDataSequence > xCategories(
                     DiagramHelper::getCategoriesFromDiagram( xChartDocument->getFirstDiagram() ));
@@ -399,7 +399,7 @@ bool DataSourceHelper::allArgumentsForRectRangeDetected(
             {
                 ::rtl::OUString aRange;
                 bHasCellRangeRepresentation =
-                    (aProperty.Value.hasValue() && (aProperty.Value >>= aRange) && aRange.getLength() > 0);
+                    (aProperty.Value.hasValue() && (aProperty.Value >>= aRange) && !aRange.isEmpty());
             }
         }
     }
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 3664e96..cdf11d5 100644
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -95,7 +95,7 @@ DiagramHelper::tTemplateWithServiceName
     Sequence< OUString > aServiceNames( xChartTypeManager->getAvailableServiceNames());
     const sal_Int32 nLength = aServiceNames.getLength();
 
-    bool bHasPreferredTemplate = (rPreferredTemplateName.getLength() > 0);
+    bool bHasPreferredTemplate = !rPreferredTemplateName.isEmpty();
     bool bTemplateFound = false;
 
     if( bHasPreferredTemplate )
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index c682eb5..80f2808 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -87,7 +87,7 @@ ExplicitCategoriesProvider::ExplicitCategoriesProvider( const Reference< chart2:
                 uno::Reference< data::XDataProvider > xDataProvider( xChartDoc->getDataProvider() );
 
                 OUString aCatgoriesRange( DataSourceHelper::getRangeFromValues( m_xOriginalCategories ) );
-                if( xDataProvider.is() && aCatgoriesRange.getLength() )
+                if( xDataProvider.is() && !aCatgoriesRange.isEmpty() )
                 {
                     const bool bFirstCellAsLabel = false;
                     const bool bHasCategories = false;
@@ -302,7 +302,7 @@ std::vector< ComplexCategory > lcl_DataSequenceToComplexCategoryVector(
         }
         else
         {
-            if( aCurrent.getLength() && aPrevious != aCurrent )
+            if( !aCurrent.isEmpty() && aPrevious != aCurrent )
             {
                 aResult.push_back( ComplexCategory(aPrevious,nCurrentCount) );
                 nCurrentCount=1;
@@ -395,9 +395,9 @@ Sequence< OUString > lcl_getExplicitSimpleCategories(
             for( aOuterIt=aComplexCatsPerIndex.begin() ; aOuterIt != aOuterEnd; ++aOuterIt )
             {
                 OUString aAddText = (*aOuterIt)[nN].Text;
-                if( aAddText.getLength() )
+                if( !aAddText.isEmpty() )
                 {
-                    if(aText.getLength())
+                    if(!aText.isEmpty())
                         aText += aSpace;
                     aText += aAddText;
                 }
@@ -478,7 +478,7 @@ bool lcl_fillDateCategories( const uno::Reference< data::XDataSequence >& xDataS
             {
                 OUString aTest;
                 double fTest = 0;
-                if( (aAny>>=aTest) && !aTest.getLength() ) //empty String
+                if( (aAny>>=aTest) && aTest.isEmpty() ) //empty String
                     bContainsEmptyString = true;
                 else if( (aAny>>=fTest) &&  ::rtl::math::isNan(fTest) )
                     bContainsNan = true;
diff --git a/chart2/source/tools/InternalDataProvider.cxx b/chart2/source/tools/InternalDataProvider.cxx
index e068b82..09dfd05 100644
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -532,7 +532,7 @@ Reference< chart2::data::XDataSequence > InternalDataProvider::lcl_createDataSeq
             // TODO: This will be problematic if ';' is used in label names
             // '"' character also needs to be considered in such cases
             aToken = str.getToken(0,';',nIndex);
-            if( !aToken.getLength() )
+            if( aToken.isEmpty() )
                 break;
             if( aToken.indexOf('"') < 0 )
             {
@@ -774,7 +774,7 @@ Reference< chart2::data::XDataSequence > SAL_CALL InternalDataProvider::createDa
                             : m_aInternalData.getRowCount()) - 1;
         return lcl_createDataSequenceAndAddToMap( OUString::valueOf( nIndex ));
     }
-    else if( aRangeRepresentation.getLength())
+    else if( !aRangeRepresentation.isEmpty())
     {
         // data
         return lcl_createDataSequenceAndAddToMap( aRangeRepresentation );
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 1cdb599..7b3b231 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -89,14 +89,14 @@ OUString lcl_createClassificationStringForType( ObjectType eObjectType
         default:
             ;//empty string
     }
-    if( rDragMethodServiceName.getLength() )
+    if( !rDragMethodServiceName.isEmpty() )
     {
         if( aRet.getLength() )
             aRet.appendAscii(":");
         aRet.append( m_aDragMethodEquals );
         aRet.append( rDragMethodServiceName );
 
-        if( rDragParameterString.getLength() )
+        if( !rDragParameterString.isEmpty() )
         {
             if( aRet.getLength() )
                 aRet.appendAscii(":");
@@ -189,7 +189,7 @@ OUString lcl_getIndexStringAfterString( const OUString& rString, const OUString&
 sal_Int32 lcl_StringToIndex( const OUString& rIndexString )
 {
     sal_Int32 nRet = -1;
-    if( rIndexString.getLength() )
+    if( !rIndexString.isEmpty() )
     {
         nRet = rIndexString.toInt32();
         if( nRet < -1 )
@@ -320,15 +320,15 @@ bool ObjectIdentifier::operator!=( const ObjectIdentifier& rOID ) const
 bool ObjectIdentifier::operator<( const ObjectIdentifier& rOID ) const
 {
     bool bReturn = false;
-    if ( m_aObjectCID.getLength() && rOID.m_aObjectCID.getLength() )
+    if ( !(m_aObjectCID.isEmpty() || rOID.m_aObjectCID.isEmpty()) )
     {
         bReturn = ( m_aObjectCID.compareTo( rOID.m_aObjectCID ) < 0 );
     }
-    else if ( m_aObjectCID.getLength() )
+    else if ( !m_aObjectCID.isEmpty() )
     {
         bReturn = true;
     }
-    else if ( rOID.m_aObjectCID.getLength() )
+    else if ( !rOID.m_aObjectCID.isEmpty() )
     {
         bReturn = false;
     }
@@ -443,10 +443,10 @@ OUString ObjectIdentifier::createClassifiedIdentifierForParticles(
     if(aRet.getLength()>m_aProtocol.getLength())
         aRet.appendAscii("/");
 
-    if(rParentParticle.getLength())
+    if(!rParentParticle.isEmpty())
     {
         aRet.append(rParentParticle);
-        if( rChildParticle.getLength() )
+        if( !rChildParticle.isEmpty() )
             aRet.appendAscii(":");
     }
     aRet.append(rChildParticle);
@@ -596,7 +596,7 @@ OUString ObjectIdentifier::createClassifiedIdentifierWithParent(
     if(aRet.getLength()>m_aProtocol.getLength())
         aRet.appendAscii("/");
     aRet.append(rParentPartical);
-    if(rParentPartical.getLength())
+    if(!rParentPartical.isEmpty())
         aRet.appendAscii(":");
 
     aRet.append(getStringForType( eObjectType ));
@@ -728,7 +728,7 @@ bool ObjectIdentifier::isDragableObject( const OUString& rClassifiedIdentifier )
             return true;
         default:
             OUString aDragMethodServiceName( ObjectIdentifier::getDragMethodServiceName( rClassifiedIdentifier ) );
-            if( aDragMethodServiceName.getLength() )
+            if( !aDragMethodServiceName.isEmpty() )
                 return true;
             return false;
     }
@@ -791,7 +791,7 @@ bool ObjectIdentifier::areSiblings( const OUString& rCID1, const OUString& rCID2
     else
     {
         OUString aParent1( ObjectIdentifier::getFullParentParticle( rCID1 ) );
-        if( aParent1.getLength() )
+        if( !aParent1.isEmpty() )
         {
             OUString aParent2( ObjectIdentifier::getFullParentParticle( rCID2 ) );
             bRet=aParent1.equals(aParent2);
@@ -819,7 +819,7 @@ bool ObjectIdentifier::areIdenticalObjects( const OUString& rCID1, const OUStrin
 
         OUString aID1( ObjectIdentifier::getObjectID( rCID1 ) );
         OUString aID2( ObjectIdentifier::getObjectID( rCID2 ) );
-        if( aID1.getLength() &&  aID1.equals( aID2 ) )
+        if( !aID1.isEmpty() &&  aID1.equals( aID2 ) )
             return true;
         }
     return false;
@@ -1019,9 +1019,9 @@ OUString ObjectIdentifier::addChildParticle( const rtl::OUString& rParticle, con
 {
     OUStringBuffer aRet(rParticle);
 
-    if( aRet.getLength() && rChildParticle.getLength() )
+    if( aRet.getLength() && !rChildParticle.isEmpty() )
         aRet.appendAscii(":");
-    if( rChildParticle.getLength() )
+    if( !rChildParticle.isEmpty() )
         aRet.append(rChildParticle);
 
     return aRet.makeStringAndClear();
@@ -1112,7 +1112,7 @@ OUString ObjectIdentifier::getObjectID( const rtl::OUString& rCID )
 
 bool ObjectIdentifier::isCID( const OUString& rName )
 {
-    return rName.getLength() && rName.match( m_aProtocol );
+    return !rName.isEmpty() && rName.match( m_aProtocol );
 }
 
 Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
@@ -1128,7 +1128,7 @@ Reference< beans::XPropertySet > ObjectIdentifier::getObjectPropertySet(
                 , const Reference< frame::XModel >& xChartModel )
 {
     //return the model object that is indicated by rObjectCID
-    if(!rObjectCID.getLength())
+    if(rObjectCID.isEmpty())
         return NULL;
     if(!xChartModel.is())
         return NULL;
@@ -1414,7 +1414,7 @@ bool ObjectIdentifier::isValid() const
 
 bool ObjectIdentifier::isAutoGeneratedObject() const
 {
-    return ( m_aObjectCID.getLength() > 0 );
+    return ( !m_aObjectCID.isEmpty() );
 }
 
 bool ObjectIdentifier::isAdditionalShape() const
diff --git a/chart2/source/tools/PropertyHelper.cxx b/chart2/source/tools/PropertyHelper.cxx
index 8ef1ba7..5973d94 100644
--- a/chart2/source/tools/PropertyHelper.cxx
+++ b/chart2/source/tools/PropertyHelper.cxx
@@ -138,14 +138,14 @@ OUString lcl_addNamedPropertyUniqueNameToTable(
             OUString aUniqueName;
 
             // check if preferred name is already used
-            if( rPreferredName.getLength())
+            if( !rPreferredName.isEmpty())
             {
                 aIt = ::std::find( aNames.begin(), aNames.end(), rPreferredName );
                 if( aIt == aNames.end())
                     aUniqueName = rPreferredName;
             }
 
-            if( ! aUniqueName.getLength())
+            if( aUniqueName.isEmpty())
             {
                 // create a unique id using the prefix plus a number
                 ::std::vector< sal_Int32 > aNumbers;
@@ -164,7 +164,7 @@ OUString lcl_addNamedPropertyUniqueNameToTable(
                 aUniqueName = rPrefix + OUString::valueOf( nIndex );
             }
 
-            OSL_ASSERT( aUniqueName.getLength());
+            OSL_ASSERT( !aUniqueName.isEmpty());
             xNameContainer->insertByName( aUniqueName, rValue );
             return aUniqueName;
         }
diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx
index 00d5881..d923b51 100644
--- a/chart2/source/tools/RangeHighlighter.cxx
+++ b/chart2/source/tools/RangeHighlighter.cxx
@@ -114,7 +114,7 @@ void RangeHighlighter::determineRanges()
 
                 OUString aCID;
                 aSelection >>= aCID;
-                if ( aCID.getLength() > 0 )
+                if ( !aCID.isEmpty() )
                 {
                     ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID );
                     sal_Int32 nIndex = ObjectIdentifier::getIndexFromParticleOrCID( aCID );
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx
index cd17a4e..4566238 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -377,7 +377,7 @@ void RegressionCurveHelper::addRegressionCurve(
     uno::Reference< chart2::XRegressionCurve > xCurve;
     ::rtl::OUString aServiceName( lcl_getServiceNameForType( eType ));
 
-    if( aServiceName.getLength())
+    if( !aServiceName.isEmpty())
     {
         // todo: use a valid context
         xCurve.set( createRegressionCurveByServiceName(
@@ -487,7 +487,7 @@ void RegressionCurveHelper::replaceOrAddCurveAndReduceToOne(
     else
     {
         OUString aServiceName( lcl_getServiceNameForType( eType ));
-        if( aServiceName.getLength())
+        if( !aServiceName.isEmpty())
         {
             RegressionCurveHelper::removeAllExceptMeanValueLine( xRegCnt );
             RegressionCurveHelper::addRegressionCurve(
diff --git a/chart2/source/tools/WrappedProperty.cxx b/chart2/source/tools/WrappedProperty.cxx
index d073f4d..6bb394e 100644
--- a/chart2/source/tools/WrappedProperty.cxx
+++ b/chart2/source/tools/WrappedProperty.cxx
@@ -92,7 +92,7 @@ Any WrappedProperty::getPropertyValue( const Reference< beans::XPropertySet >& x
 void WrappedProperty::setPropertyToDefault( const Reference< beans::XPropertyState >& xInnerPropertyState ) const
                         throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::uno::RuntimeException)
 {
-    if( xInnerPropertyState.is() && this->getInnerName().getLength() )
+    if( xInnerPropertyState.is() && !this->getInnerName().isEmpty() )
         xInnerPropertyState->setPropertyToDefault(this->getInnerName());
     else
     {
@@ -118,7 +118,7 @@ beans::PropertyState WrappedProperty::getPropertyState( const Reference< beans::
 {
     beans::PropertyState aState = beans::PropertyState_DIRECT_VALUE;
     rtl::OUString aInnerName( this->getInnerName() );
-    if( xInnerPropertyState.is() && aInnerName.getLength() )
+    if( xInnerPropertyState.is() && !aInnerName.isEmpty() )
         aState = xInnerPropertyState->getPropertyState( aInnerName );
     else
     {
diff --git a/chart2/source/tools/XMLRangeHelper.cxx b/chart2/source/tools/XMLRangeHelper.cxx
index c345d6a..331e361 100644
--- a/chart2/source/tools/XMLRangeHelper.cxx
+++ b/chart2/source/tools/XMLRangeHelper.cxx
@@ -272,7 +272,7 @@ bool lcl_getCellRangeAddressFromXMLString(
         bResult = lcl_getCellAddressFromXMLString( rXMLString, nStartPos, nEndPos,
                                                    rOutRange.aUpperLeft,
                                                    rOutRange.aTableName );
-        if( !rOutRange.aTableName.getLength() )
+        if( rOutRange.aTableName.isEmpty() )
             bResult = false;
     }
     else
@@ -281,7 +281,7 @@ bool lcl_getCellRangeAddressFromXMLString(
         bResult = lcl_getCellAddressFromXMLString( rXMLString, nStartPos, nDelimiterPos - 1,
                                                    rOutRange.aUpperLeft,
                                                    rOutRange.aTableName );
-        if( !rOutRange.aTableName.getLength() )
+        if( rOutRange.aTableName.isEmpty() )
             bResult = false;
 
         ::rtl::OUString sTableSecondName;
@@ -292,7 +292,7 @@ bool lcl_getCellRangeAddressFromXMLString(
                                                        sTableSecondName );
         }
         if( bResult &&
-            sTableSecondName.getLength() &&
+            !sTableSecondName.isEmpty() &&
             ! sTableSecondName.equals( rOutRange.aTableName ))
             bResult = false;
     }
@@ -370,7 +370,7 @@ OUString getXMLStringFromCellRange( const CellRange & rRange )
 
     ::rtl::OUStringBuffer aBuffer;
 
-    if( (rRange.aTableName).getLength())
+    if( !(rRange.aTableName).isEmpty())
     {
         bool bNeedsEscaping = ( rRange.aTableName.indexOf( aQuote ) > -1 );
         bool bNeedsQuoting = bNeedsEscaping || ( rRange.aTableName.indexOf( aSpace ) > -1 );
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 2d73cb7..2c822aa 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -99,7 +99,7 @@ Reference< drawing::XShape > createSingleLabel(
           , const tAnySequence& rPropValues
           )
 {
-    if(!rLabel.getLength())
+    if(rLabel.isEmpty())
         return 0;
 
     // #i78696# use mathematically correct rotation now
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 5ba19a0..22fecf5 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -518,7 +518,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
             {
                 OUString aNumber( this->getLabelTextForValue( rDataSeries
                     , nPointIndex, fValue, false /*bAsPercentage*/ ) );
-                if( aNumber.getLength() )
+                if( !aNumber.isEmpty() )
                 {
                     if(aText.getLength())
                         aText.append(aSeparator);
@@ -537,7 +537,7 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
 
                 OUString aPercentage( this->getLabelTextForValue( rDataSeries
                     , nPointIndex, fValue, true /*bAsPercentage*/ ) );
-                if( aPercentage.getLength() )
+                if( !aPercentage.isEmpty() )
                 {
                     if(aText.getLength())
                         aText.append(aSeparator);
@@ -2127,7 +2127,7 @@ std::vector< ViewLegendEntry > VSeriesPlotter::createLegendEntriesForSeries(
 
                 // label
                 aLabelText = aCategoryNames[nIdx];
-                if( xShape.is() || aLabelText.getLength() )
+                if( xShape.is() || !aLabelText.isEmpty() )
                 {
                     aEntry.aLabel = FormattedStringHelper::createFormattedStringSequence( xContext, aLabelText, xTextProperties );
                     aResult.push_back(aEntry);
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 78a50e2..3e5df18 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1270,7 +1270,7 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod
                                             }
                                         }
                                     }
-                                    if( !aPageStyle.getLength() )
+                                    if( aPageStyle.isEmpty() )
                                     {
                                         uno::Reference< text::XText > xText( xTextDocument->getText() );
                                         if( xText.is() )
@@ -1285,7 +1285,7 @@ void lcl_setDefaultWritingMode( ::boost::shared_ptr< DrawModelWrapper > pDrawMod
                                 {
                                     //Calc is parent document
                                     xParentProps->getPropertyValue( C2U("PageStyle") ) >>= aPageStyle;
-                                    if(!aPageStyle.getLength())
+                                    if(aPageStyle.isEmpty())
                                         aPageStyle = C2U("Default");
                                 }
                                 if( nWritingMode == -1 || nWritingMode == text::WritingMode2::PAGE )
@@ -2159,7 +2159,7 @@ std::auto_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
 
     uno::Reference< XTitle > xTitle( TitleHelper::getTitle( eType, xChartModel ) );
     rtl::OUString aCompleteString( TitleHelper::getCompleteString( xTitle ) );
-    if( aCompleteString.getLength() != 0 )
+    if( !aCompleteString.isEmpty() )
     {
         //create title
         apVTitle = std::auto_ptr<VTitle>(new VTitle(xTitle));
@@ -2720,7 +2720,7 @@ void ChartView::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
             ::rtl::OUString aSelObjCID;
             uno::Any aSelObj( xSelectionSupplier->getSelection() );
             aSelObj >>= aSelObjCID;
-            if ( aSelObjCID.getLength() > 0 )
+            if ( !aSelObjCID.isEmpty() )
             {
                 return;
             }
diff --git a/chart2/source/view/main/DrawModelWrapper.cxx b/chart2/source/view/main/DrawModelWrapper.cxx
index f3fe2d8..a594511 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -364,7 +364,7 @@ XBitmapListRef DrawModelWrapper::GetBitmapList() const
 
 SdrObject* DrawModelWrapper::getNamedSdrObject( const rtl::OUString& rName )
 {
-    if(rName.getLength()==0)
+    if( rName.isEmpty() )
         return 0;
     return getNamedSdrObject( rName, GetPage(0) );
 }
diff --git a/chart2/source/view/main/ShapeFactory.cxx b/chart2/source/view/main/ShapeFactory.cxx
index e6ba468..38e085e 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -1893,7 +1893,7 @@ uno::Reference< drawing::XShapes >
         xTarget->add(xShape);
 
         //set name
-        if(aName.getLength())
+        if(!aName.isEmpty())
             setShapeName( xShape , aName );
 
         {//workaround
@@ -1951,7 +1951,7 @@ uno::Reference< drawing::XShapes >
         }
 
         //set name
-        if(aName.getLength())
+        if(!aName.isEmpty())
             setShapeName( xShape , aName );
 
         //return
@@ -2204,7 +2204,7 @@ uno::Reference< drawing::XShape >
     if( !xTarget.is() )
         return 0;
 
-    if(!rText.getLength())
+    if(rText.isEmpty())
         return 0;
 
     //create shape and add to page
diff --git a/chart2/source/view/main/VDataSeries.cxx b/chart2/source/view/main/VDataSeries.cxx
index db0b2b0..29cfc95 100644
--- a/chart2/source/view/main/VDataSeries.cxx
+++ b/chart2/source/view/main/VDataSeries.cxx
@@ -134,7 +134,7 @@ void lcl_clearIfNoValuesButTextIsContained( VDataSequence& rData, const uno::Ref
     sal_Int32 nTextCount = aStrings.getLength();
     for( sal_Int32 j = 0; j < nTextCount; ++j )
     {
-        if( aStrings[j].getLength() )
+        if( !aStrings[j].isEmpty() )
         {
             rData.clear();
             return;
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 4311619..469ab95 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -189,7 +189,7 @@ awt::Size lcl_createTextShapes(
                 Reference< text::XTextRange > xRange( xEntry, uno::UNO_QUERY );
                 OUString aLabelString( aLabelSeq[i]->getString());
                 // workaround for Issue #i67540#
-                if( !aLabelString.getLength())
+                if( aLabelString.isEmpty())
                     aLabelString = C2U(" ");
                 if( xRange.is())
                     xRange->setString( aLabelString );
diff --git a/chart2/source/view/main/VTitle.cxx b/chart2/source/view/main/VTitle.cxx
index 62e2440..c6d7754 100644
--- a/chart2/source/view/main/VTitle.cxx
+++ b/chart2/source/view/main/VTitle.cxx
@@ -167,7 +167,7 @@ void VTitle::createShapes(
             aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextAutoGrowWidth"), uno::makeAny(sal_True) ) ); // sal_Bool
 
             //set name/classified ObjectID (CID)
-            if( m_aCID.getLength() )
+            if( !m_aCID.isEmpty() )
                 aValueMap.insert( tPropertyNameValueMap::value_type( C2U("Name"), uno::makeAny( m_aCID ) ) ); //CID rtl::OUString
         }
 
-- 
1.7.5.4


--------------080105000307050702080305--


More information about the LibreOffice mailing list