[Libreoffice-commits] core.git: Branch 'aoo/trunk' - 2 commits - apple_remote/inc apple_remote/RemoteMainController.m chart2/source vcl/aqua vcl/inc

Herbert Dürr hdu at apache.org
Mon Feb 10 02:08:44 PST 2014


 apple_remote/RemoteMainController.m                                                |    8 +-
 apple_remote/inc/RemoteMainController.h                                            |    2 
 chart2/source/controller/accessibility/AccessibleTextHelper.cxx                    |    4 -
 chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx                        |    6 -
 chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx |    2 
 chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx            |    4 -
 chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx                |    4 -
 chart2/source/controller/dialogs/ChartTypeDialogController.cxx                     |    2 
 chart2/source/controller/dialogs/DataBrowser.cxx                                   |    2 
 chart2/source/controller/dialogs/DataBrowserModel.cxx                              |    2 
 chart2/source/controller/dialogs/ObjectNameProvider.cxx                            |   12 +--
 chart2/source/controller/dialogs/res_ErrorBar.cxx                                  |    2 
 chart2/source/controller/dialogs/tp_DataSource.cxx                                 |    8 +-
 chart2/source/controller/dialogs/tp_RangeChooser.cxx                               |    2 
 chart2/source/controller/drawinglayer/DrawViewWrapper.cxx                          |    2 
 chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx                  |    2 
 chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx           |    4 -
 chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx                |    2 
 chart2/source/controller/main/ChartController.cxx                                  |    4 -
 chart2/source/controller/main/ChartController_Position.cxx                         |    2 
 chart2/source/controller/main/ChartController_Properties.cxx                       |    2 
 chart2/source/controller/main/ChartController_TextEdit.cxx                         |    2 
 chart2/source/controller/main/ChartController_Tools.cxx                            |    2 
 chart2/source/controller/main/ChartController_Window.cxx                           |   12 +--
 chart2/source/controller/main/ControllerCommandDispatch.cxx                        |    6 -
 chart2/source/controller/main/DrawCommandDispatch.cxx                              |    2 
 chart2/source/controller/main/ElementSelector.cxx                                  |    2 
 chart2/source/controller/main/FeatureCommandDispatchBase.cxx                       |    2 
 chart2/source/controller/main/ObjectHierarchy.cxx                                  |    2 
 chart2/source/controller/main/SelectionHelper.cxx                                  |   10 +-
 chart2/source/controller/main/StatusBarCommandDispatch.cxx                         |    2 
 chart2/source/controller/main/UndoCommandDispatch.cxx                              |    2 
 chart2/source/model/filter/XMLFilter.cxx                                           |   10 +-
 chart2/source/model/main/ChartModel.cxx                                            |    2 
 chart2/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                                       |    2 
 chart2/source/tools/NamedProperties.cxx                                            |    2 
 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/VLegend.cxx                                                |    2 
 chart2/source/view/main/VTitle.cxx                                                 |    2 
 vcl/aqua/source/app/saldata.cxx                                                    |    6 -
 vcl/aqua/source/app/salinst.cxx                                                    |    3 
 vcl/aqua/source/app/vclnsapp.mm                                                    |   14 ++--
 vcl/inc/aqua/saldata.hxx                                                           |    2 
 58 files changed, 138 insertions(+), 137 deletions(-)

New commits:
commit 8ef3836059ca613d125f66e6bad21c83200dadad
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Feb 10 09:36:08 2014 +0000

    #i124201# rename apple_remote's MainController to AppleRemoteController
    
    having a MainController class in the global namespace of an application with
    gazillions of MVC patterns is not a good idea. Renaming it to better match
    its scope (i.e. the Apple Remote) cleans this up.

diff --git a/apple_remote/RemoteMainController.m b/apple_remote/RemoteMainController.m
index ae23cd4..2f36877 100644
--- a/apple_remote/RemoteMainController.m
+++ b/apple_remote/RemoteMainController.m
@@ -37,7 +37,7 @@
 // Sample Code 3: Multi Click Behavior and Hold Event Simulation
 // -------------------------------------------------------------------------------------------
 
- at implementation MainController
+ at implementation AppleRemoteMainController
 
 - (id) init {
     self = [super init];  // because we redefined our own init instead of use the fu..nny awakeFromNib 
@@ -73,11 +73,11 @@
         // to give the binding mechanism a chance to see the change of the attribute
         [self setValue: container forKey: @"remoteControl"];	
 #ifdef DEBUG
-            NSLog(@"MainController init done");
+            NSLog(@"AppleRemoteMainController init done");
 #endif
     }
     else 
-        NSLog(@"MainController init failed");
+        NSLog(@"AppleRemoteMainController init failed");
     return self;
 }
 
@@ -164,4 +164,4 @@
 	return remoteControlBehavior;
 }
 
- at end
\ No newline at end of file
+ at end
diff --git a/apple_remote/inc/RemoteMainController.h b/apple_remote/inc/RemoteMainController.h
index 7143f1f..d102b15 100644
--- a/apple_remote/inc/RemoteMainController.h
+++ b/apple_remote/inc/RemoteMainController.h
@@ -37,7 +37,7 @@
 
 //static void sendTheEvent( unichar, int );
 
- at interface MainController : NSObject {
+ at interface AppleRemoteMainController : NSObject {
 @public // else remoteControl is not reachable from GetSalData()->mpMainController
     RemoteControl* remoteControl;
 @private
diff --git a/vcl/aqua/source/app/saldata.cxx b/vcl/aqua/source/app/saldata.cxx
index 49a8b4f..95db940 100644
--- a/vcl/aqua/source/app/saldata.cxx
+++ b/vcl/aqua/source/app/saldata.cxx
@@ -54,7 +54,7 @@ SalData::SalData()
     maCursors( POINTER_COUNT, INVALID_CURSOR_PTR ),
     mbIsScrollbarDoubleMax( false ),
     mnSystemVersion( OSX_VER_LION ),
-    mpMainController( NULL ),
+    mpAppleRemoteMainController( NULL ),
     mpDockIconClickHandler( nil ),
     mnDPIX( 0 ),
     mnDPIY( 0 )
@@ -89,8 +89,8 @@ SalData::~SalData()
         osl_destroyThreadKey( s_aAutoReleaseKey );
         s_aAutoReleaseKey = 0;
     }
-    if ( mpMainController )
-        [mpMainController release];
+    if ( mpAppleRemoteMainController )
+        [mpAppleRemoteMainController release];
 }
 
 void SalData::ensureThreadAutoreleasePool()
diff --git a/vcl/aqua/source/app/salinst.cxx b/vcl/aqua/source/app/salinst.cxx
index 46e367d..699dc9f 100644
--- a/vcl/aqua/source/app/salinst.cxx
+++ b/vcl/aqua/source/app/salinst.cxx
@@ -190,8 +190,7 @@ static void initNSApp()
     else
         NSLog(@"Unable to obtain system version: %ld", (long)err);
 
-    // Initialize Apple Remote
-    GetSalData()->mpMainController = [[MainController alloc] init]; // TODO: rename MainController to AppleRemoteController
+    GetSalData()->mpAppleRemoteMainController = [[AppleRemoteMainController alloc] init];
 
     [[NSDistributedNotificationCenter defaultCenter] addObserver: NSApp
                                            selector: @selector(applicationWillBecomeActive:)
diff --git a/vcl/aqua/source/app/vclnsapp.mm b/vcl/aqua/source/app/vclnsapp.mm
index af63414..eab7664 100644
--- a/vcl/aqua/source/app/vclnsapp.mm
+++ b/vcl/aqua/source/app/vclnsapp.mm
@@ -450,15 +450,16 @@
 {
     (void)pNotification;
     SalData* pSalData = GetSalData();
-    if( pSalData->mpMainController && pSalData->mpMainController->remoteControl)
+    AppleRemoteMainController* pAppleRemoteCtrl = pSalData->mpAppleRemoteMainController;
+    if( pAppleRemoteCtrl && pAppleRemoteCtrl->remoteControl)
     {
         // [remoteControl startListening: self];
         // does crash because the right thing to do is 
-        // [GetSalData()->mpMainController->remoteControl startListening: self];
+        // [pAppleRemoteCtrl->remoteControl startListening: self];
         // but the instance variable 'remoteControl' is declared protected
         // workaround : declare remoteControl instance variable as public in RemoteMainController.m
 
-        [pSalData->mpMainController->remoteControl startListening: self];
+        [pAppleRemoteCtrl->remoteControl startListening: self];
 #ifdef DEBUG
         NSLog(@"Apple Remote will become active - Using remote controls");
 #endif
@@ -477,15 +478,16 @@
 {
     (void)pNotification;
     SalData* pSalData = GetSalData();
-    if( pSalData->mpMainController && pSalData->mpMainController->remoteControl)
+    AppleRemoteMainController* pAppleRemoteCtrl = pSalData->mpAppleRemoteMainController;
+    if( pAppleRemoteCtrl && pAppleRemoteCtrl->remoteControl)
     {
         // [remoteControl stopListening: self];
         // does crash because the right thing to do is 
-        // [GetSalData()->mpMainController->remoteControl stopListening: self];
+        // [pAppleRemoteCtrl->remoteControl stopListening: self];
         // but the instance variable 'remoteControl' is declared protected
         // workaround : declare remoteControl instance variable as public in RemoteMainController.m
 
-        [pSalData->mpMainController->remoteControl stopListening: self]; 
+        [pAppleRemoteCtrl->remoteControl stopListening: self]; 
 #ifdef DEBUG
         NSLog(@"Apple Remote will resign active - Releasing remote controls");
 #endif
diff --git a/vcl/inc/aqua/saldata.hxx b/vcl/inc/aqua/saldata.hxx
index 2d0b07b..35f3c1a 100644
--- a/vcl/inc/aqua/saldata.hxx
+++ b/vcl/inc/aqua/saldata.hxx
@@ -106,7 +106,7 @@ struct SalData
 
     bool                                          mbIsScrollbarDoubleMax;   // TODO: support DoubleMin and DoubleBoth too
     SInt32                                        mnSystemVersion;          // Store System Version
-    MainController*                               mpMainController;         // Apple Remote
+    AppleRemoteMainController*                    mpAppleRemoteMainController;
 
     NSObject*                                     mpDockIconClickHandler;
     long                                          mnDPIX;           // #i100617# read DPI only once per office life
commit 17b6784443432419e9aa9fddf56e5fa6c3ce4c60
Author: Herbert Dürr <hdu at apache.org>
Date:   Mon Feb 10 09:09:32 2014 +0000

    #i123862# use O*String's isEmpty() method to check for emptiness in chart2 module
    
    Patch-by: j.nitschke at ok.de
    Review-by: hdu at apache.org

diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index 92c4bcd..f79ad86 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -75,10 +75,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;
 
     // /-- solar
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index 568e603..10ee710 100755
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -666,7 +666,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
@@ -674,10 +674,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 22f2d6b..fb33997 100755
--- a/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx
@@ -310,7 +310,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() == false) )
         bHasTitle = sal_True;
 
     Any aRet;
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index 2f5ab43..3a1832d 100755
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -145,7 +145,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 );
@@ -161,7 +161,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 1f806eb..7c8075f 100755
--- a/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx
@@ -172,7 +172,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())
@@ -245,7 +245,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 57980b8..30c05f5 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -295,7 +295,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 4024466..f95736c 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -1155,7 +1155,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 647643b..2e2b5f7 100644
--- a/chart2/source/controller/dialogs/DataBrowserModel.cxx
+++ b/chart2/source/controller/dialogs/DataBrowserModel.cxx
@@ -100,7 +100,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 eeab1c8..9113d55 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -90,9 +90,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;
 }
 
@@ -185,7 +185,7 @@ OUString lcl_getDataPointValueText( const Reference< XDataSeries >& xSeries, sal
         }
     }
 
-    if( aX.getLength() == 0 )
+    if( aX.isEmpty() )
     {
         aRet = ExplicitCategoriesProvider::getCategoryByIndex( xCooSys, xChartModel, nPointIndex );
     }
@@ -394,7 +394,7 @@ OUString ObjectNameProvider::getTitleNameByType( TitleHelper::eTitleType eType )
             break;
     }
 
-    if( !aRet.getLength() )
+    if( aRet.isEmpty() )
         aRet=String(SchResId(STR_OBJECT_TITLE));
 
     return aRet;
@@ -413,7 +413,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;
@@ -737,7 +737,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 f8892b5..b806427 100644
--- a/chart2/source/controller/dialogs/res_ErrorBar.cxx
+++ b/chart2/source/controller/dialogs/res_ErrorBar.cxx
@@ -760,7 +760,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 e7253d8..4280588 100644
--- a/chart2/source/controller/dialogs/tp_DataSource.cxx
+++ b/chart2/source/controller/dialogs/tp_DataSource.cxx
@@ -398,7 +398,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 )
@@ -903,7 +903,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())
@@ -969,7 +969,7 @@ bool DataSourceTabPage::updateModelFromControl( Edit * pField )
                         }
                         if( xLabeledSeq.is())
                         {
-                            if( aRange.getLength())
+                            if( !aRange.isEmpty() )
                             {
                                 Reference< data::XDataSequence > xNewSeq;
                                 try
@@ -1000,7 +1000,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 c4d4d95..4717773 100644
--- a/chart2/source/controller/dialogs/tp_RangeChooser.cxx
+++ b/chart2/source/controller/dialogs/tp_RangeChooser.cxx
@@ -284,7 +284,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 eb9f509..b803382 100644
--- a/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
+++ b/chart2/source/controller/drawinglayer/DrawViewWrapper.cxx
@@ -353,7 +353,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 f30b6e08c..b013a18 100644
--- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
@@ -298,7 +298,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 5c2611a..63541ce 100644
--- a/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx
@@ -304,7 +304,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 );
@@ -547,7 +547,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 cdb89eb..8692314 100644
--- a/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx
@@ -477,7 +477,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 5f65a23..9f6ad5c 100644
--- a/chart2/source/controller/main/ChartController.cxx
+++ b/chart2/source/controller/main/ChartController.cxx
@@ -1066,7 +1066,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 );
     }
@@ -1453,7 +1453,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 7236f2c..4e9bc62 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -124,7 +124,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 09a6523..ca5a14d 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -727,7 +727,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() )
     {
         //DBG_ERROR("empty ObjectID");
         return bRet;
diff --git a/chart2/source/controller/main/ChartController_TextEdit.cxx b/chart2/source/controller/main/ChartController_TextEdit.cxx
index 98746f4..077d4cd 100644
--- a/chart2/source/controller/main/ChartController_TextEdit.cxx
+++ b/chart2/source/controller/main/ChartController_TextEdit.cxx
@@ -155,7 +155,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 9d884a8..633e719 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -637,7 +637,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 b4507cc..09f924d 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -942,7 +942,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 )
@@ -1232,7 +1232,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() == false );
 
                         if( OBJECTTYPE_AXIS  != eObjectType && bIsAxisVisible )
                             lcl_insertMenuCommand( xPopupMenu, nUniqueId++, C2U(".uno:FormatAxis") );
@@ -1508,7 +1508,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(
@@ -1622,7 +1622,7 @@ bool ChartController::requestQuickHelp(
         aCID = SelectionHelper::getHitObjectCID(
             aAtLogicPosition, *m_pDrawViewWrapper );
     }
-    bool bResult( aCID.getLength());
+    bool bResult( !aCID.isEmpty() );
 
     if( bResult )
     {
@@ -1702,7 +1702,7 @@ bool ChartController::requestQuickHelp(
     if ( m_aSelection.hasSelection() )
     {
         ::rtl::OUString aCID( m_aSelection.getSelectedCID() );
-        if ( aCID.getLength() )
+        if ( !aCID.isEmpty() )
         {
             aReturn = uno::makeAny( aCID );
         }
@@ -2027,7 +2027,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 c0315e6..35556ca 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -705,14 +705,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 );
@@ -721,7 +721,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 80f927a..ed13b45 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -592,7 +592,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 4d7602e..e3927ad 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -152,7 +152,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() ? aName : ::rtl::OUString( String( SchResId( STR_OBJECT_SHAPE ) ) ) );
                 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 5aebafe..5f6f306 100644
--- a/chart2/source/controller/main/FeatureCommandDispatchBase.cxx
+++ b/chart2/source/controller/main/FeatureCommandDispatchBase.cxx
@@ -63,7 +63,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 f4c21c1..30eb537 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -93,7 +93,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 d32b12f..7853150 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 ) )
         {
@@ -511,7 +511,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 6e58f2f..85c1366 100644
--- a/chart2/source/controller/main/StatusBarCommandDispatch.cxx
+++ b/chart2/source/controller/main/StatusBarCommandDispatch.cxx
@@ -80,7 +80,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 6f6aecf..d1dd2c7 100644
--- a/chart2/source/controller/main/UndoCommandDispatch.cxx
+++ b/chart2/source/controller/main/UndoCommandDispatch.cxx
@@ -74,7 +74,7 @@ void UndoCommandDispatch::fireStatusEvent(
 {
     if( m_xUndoManager.is() )
     {
-        bool bFireAll = (rURL.getLength() == 0);
+        const 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 550da89..0f63748 100644
--- a/chart2/source/model/filter/XMLFilter.cxx
+++ b/chart2/source/model/filter/XMLFilter.cxx
@@ -158,7 +158,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 ));
         }
@@ -433,10 +433,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
@@ -544,7 +544,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
                     {
@@ -642,7 +642,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 0dd47f1..5d9bdef 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -344,7 +344,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 7c42448..c2e4e0e 100644
--- a/chart2/source/model/main/ChartModel_Persistence.cxx
+++ b/chart2/source/model/main/ChartModel_Persistence.cxx
@@ -160,7 +160,7 @@ Reference< document::XFilter > ChartModel::impl_createFilter(
         lcl_getProperty< OUString >( rMediaDescriptor, OUString::createFromAscii("FilterName")));
 
     // if FilterName was found, get Filter from factory
-    if( aFilterName.getLength() > 0 )
+    if( !aFilterName.isEmpty() )
     {
         try
         {
@@ -177,7 +177,7 @@ Reference< document::XFilter > ChartModel::impl_createFilter(
                 OUString aFilterServiceName(
                     lcl_getProperty< OUString >( aProps, OUString::createFromAscii("FilterService")));
 
-                if( aFilterServiceName.getLength())
+                if( !aFilterServiceName.isEmpty() )
                 {
                     xFilter.set(
                         m_xContext->getServiceManager()->createInstanceWithContext(
@@ -229,7 +229,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()
@@ -255,7 +255,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 912de88..60de35a 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -330,7 +330,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 d6cd45c..851d221 100755
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -348,7 +348,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() ));
@@ -403,7 +403,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());
             }
 //         else if( aProperty.Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "SequenceMapping" ) ))
 //         {
diff --git a/chart2/source/tools/DiagramHelper.cxx b/chart2/source/tools/DiagramHelper.cxx
index 6210d47..3624902 100755
--- a/chart2/source/tools/DiagramHelper.cxx
+++ b/chart2/source/tools/DiagramHelper.cxx
@@ -92,7 +92,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 08a4fd9..92e5956 100755
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -84,7 +84,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;
@@ -299,7 +299,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;
@@ -399,9 +399,9 @@ Sequence< OUString > lcl_getExplicitSimpleCategories(
                 if(!aOuterIt->empty()) // #121277# Caution, aOuterIt may be empty (!)
                 {
                     aAddText = (*aOuterIt)[nN].Text;
-                    if( aAddText.getLength() )
+                    if( !aAddText.isEmpty() )
                     {
-                        if(aText.getLength())
+                        if( !aText.isEmpty() )
                             aText += aSpace;
                         aText += aAddText;
                     }
@@ -483,7 +483,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 7c1fc27..9c26112 100755
--- a/chart2/source/tools/InternalDataProvider.cxx
+++ b/chart2/source/tools/InternalDataProvider.cxx
@@ -712,7 +712,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
         sal_Int32 nIndex = aRangeRepresentation.toInt32();
diff --git a/chart2/source/tools/NamedProperties.cxx b/chart2/source/tools/NamedProperties.cxx
index a8c65d8..a8b99d0 100755
--- a/chart2/source/tools/NamedProperties.cxx
+++ b/chart2/source/tools/NamedProperties.cxx
@@ -46,7 +46,7 @@ void NamedProperties::AddPropertiesToVector(
 OUString NamedProperties::GetPropertyNameForHandle( sal_Int32 nHandle )
 {
     OUString aName = NamedFillProperties::GetPropertyNameForHandle( nHandle );
-    if( !aName.getLength() )
+    if( aName.isEmpty() )
         aName = NamedLineProperties::GetPropertyNameForHandle( nHandle );
     return aName;
 }
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 653059b..741debb 100755
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -86,14 +86,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(":");
@@ -186,7 +186,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 )
@@ -317,15 +317,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;
     }
@@ -440,10 +440,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);
@@ -593,7 +593,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 ));
@@ -725,7 +725,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;
     }
@@ -788,7 +788,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);
@@ -816,7 +816,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;
@@ -1016,9 +1016,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();
@@ -1109,7 +1109,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(
@@ -1125,7 +1125,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;
@@ -1411,7 +1411,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 fee7a7f..27b2ab0 100644
--- a/chart2/source/tools/PropertyHelper.cxx
+++ b/chart2/source/tools/PropertyHelper.cxx
@@ -135,14 +135,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;
@@ -161,7 +161,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 5231e1a..7b8ba89 100644
--- a/chart2/source/tools/RangeHighlighter.cxx
+++ b/chart2/source/tools/RangeHighlighter.cxx
@@ -111,7 +111,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 c94a4bd..7fd70f4 100755
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -374,7 +374,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(
@@ -484,7 +484,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 7c640bc..03d0456 100644
--- a/chart2/source/tools/WrappedProperty.cxx
+++ b/chart2/source/tools/WrappedProperty.cxx
@@ -90,7 +90,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
     {
@@ -116,7 +116,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 32a6c22..8ebebfe 100644
--- a/chart2/source/tools/XMLRangeHelper.cxx
+++ b/chart2/source/tools/XMLRangeHelper.cxx
@@ -270,7 +270,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
@@ -279,7 +279,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;
@@ -290,7 +290,7 @@ bool lcl_getCellRangeAddressFromXMLString(
                                                        sTableSecondName );
         }
         if( bResult &&
-            sTableSecondName.getLength() &&
+            !sTableSecondName.isEmpty() &&
             ! sTableSecondName.equals( rOutRange.aTableName ))
             bResult = false;
     }
@@ -368,7 +368,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 5fd61b5..9d1f02c 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -96,7 +96,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 8d15deb..ed1226c 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -520,7 +520,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);
@@ -539,7 +539,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);
@@ -2152,7 +2152,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 056e07c..4f82e1d 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1317,7 +1317,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() )
@@ -1332,7 +1332,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 )
@@ -2225,7 +2225,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));
@@ -2799,7 +2799,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 98c99c4..49f7904 100644
--- a/chart2/source/view/main/DrawModelWrapper.cxx
+++ b/chart2/source/view/main/DrawModelWrapper.cxx
@@ -361,7 +361,7 @@ XBitmapListSharedPtr DrawModelWrapper::GetBitmapListFromSdrModel() 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 eff9de5..7939d01 100644
--- a/chart2/source/view/main/ShapeFactory.cxx
+++ b/chart2/source/view/main/ShapeFactory.cxx
@@ -1929,7 +1929,7 @@ uno::Reference< drawing::XShapes >
         xTarget->add(xShape);
 
         //set name
-        if(aName.getLength())
+        if( !aName.isEmpty() )
             setShapeName( xShape , aName );
 
         {//workaround
@@ -1987,7 +1987,7 @@ uno::Reference< drawing::XShapes >
         }
 
         //set name
-        if(aName.getLength())
+        if( !aName.isEmpty() )
             setShapeName( xShape , aName );
 
         //return
@@ -2244,7 +2244,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/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index faa1519..f060eb2 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -205,7 +205,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 4de17d1..047d71f 100644
--- a/chart2/source/view/main/VTitle.cxx
+++ b/chart2/source/view/main/VTitle.cxx
@@ -169,7 +169,7 @@ void VTitle::createShapes(
             ////aValueMap.insert( tPropertyNameValueMap::value_type( C2U("TextMaximumFrameHeight"), uno::makeAny(rSize.Height) ) ); //sal_Int32
 
             //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
         }
 


More information about the Libreoffice-commits mailing list