summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOlivier Hallot <olivier.hallot@alta.org.br>2011-12-10 22:03:11 -0200
committerIvan Timofeev <timofeev.i.s@gmail.com>2011-12-13 00:36:43 +0400
commit0eac98aa742e8e76ebb1af91b32bd02e04b2e20a (patch)
treed44b28e26f61342e8a05d9c2c52e9139a5a2258b
parent187077c21bd73e22f35370ad8a475191614a398d (diff)
Fix for fdo43460 Part V getLength to isEmpty
Part V Module chart2
-rw-r--r--chart2/source/controller/accessibility/AccessibleTextHelper.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedAxisAndGridExistenceProperties.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStockProperties.cxx4
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.cxx2
-rw-r--r--chart2/source/controller/dialogs/DataBrowser.cxx2
-rw-r--r--chart2/source/controller/dialogs/DataBrowserModel.cxx2
-rw-r--r--chart2/source/controller/dialogs/ObjectNameProvider.cxx12
-rw-r--r--chart2/source/controller/dialogs/res_ErrorBar.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_DataSource.cxx8
-rw-r--r--chart2/source/controller/dialogs/tp_RangeChooser.cxx2
-rw-r--r--chart2/source/controller/drawinglayer/DrawViewWrapper.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/GraphicPropertyItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/StatisticsItemConverter.cxx2
-rw-r--r--chart2/source/controller/main/ChartController.cxx4
-rw-r--r--chart2/source/controller/main/ChartController_Position.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_TextEdit.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx2
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx12
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.cxx6
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx2
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx2
-rw-r--r--chart2/source/controller/main/FeatureCommandDispatchBase.cxx2
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx2
-rw-r--r--chart2/source/controller/main/SelectionHelper.cxx10
-rw-r--r--chart2/source/controller/main/StatusBarCommandDispatch.cxx2
-rw-r--r--chart2/source/controller/main/UndoCommandDispatch.cxx2
-rw-r--r--chart2/source/model/filter/XMLFilter.cxx10
-rw-r--r--chart2/source/model/main/ChartModel.cxx2
-rw-r--r--chart2/source/model/main/ChartModel_Persistence.cxx8
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx2
-rw-r--r--chart2/source/tools/DataSourceHelper.cxx4
-rw-r--r--chart2/source/tools/DiagramHelper.cxx2
-rw-r--r--chart2/source/tools/ExplicitCategoriesProvider.cxx10
-rw-r--r--chart2/source/tools/InternalDataProvider.cxx4
-rw-r--r--chart2/source/tools/ObjectIdentifier.cxx34
-rw-r--r--chart2/source/tools/PropertyHelper.cxx6
-rw-r--r--chart2/source/tools/RangeHighlighter.cxx2
-rw-r--r--chart2/source/tools/RegressionCurveHelper.cxx4
-rw-r--r--chart2/source/tools/WrappedProperty.cxx4
-rw-r--r--chart2/source/tools/XMLRangeHelper.cxx8
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx2
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx6
-rw-r--r--chart2/source/view/main/ChartView.cxx8
-rw-r--r--chart2/source/view/main/DrawModelWrapper.cxx2
-rw-r--r--chart2/source/view/main/ShapeFactory.cxx6
-rw-r--r--chart2/source/view/main/VDataSeries.cxx2
-rw-r--r--chart2/source/view/main/VLegend.cxx2
-rw-r--r--chart2/source/view/main/VTitle.cxx2
52 files changed, 121 insertions, 121 deletions
diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index 380e3cf799fd..c14ddcbb6e67 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 46bb9a1f416d..0000196ee94e 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 65b76e93713c..076e87caabc7 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 54f76d8dbf19..75ac24569a7d 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 bd1ed551a6fd..c01fc8ef10d4 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 1dae363fd956..af6794b11cd5 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 5a3198fa3cf7..5de9287229ec 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 80e19a222d7e..1ec9acfae18f 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 ee0e61d3a740..84e31162559f 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 ed1f5e858429..e05c5195966e 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 2deb40595b7a..3d99e97aac80 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 7403771ce6ca..67889c3408a9 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 8359aa2f4362..e573944e5be4 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 c9d290e04d33..71082044e8dd 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 c173ad26b5d3..debad5880281 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 797df1e6b6e1..a15fdda68f2a 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 31ad274858c6..1d8424bbd80b 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 f4dcb0340d04..3c7ecee03728 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 4697458d3140..9d73b31f9af2 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 96f0eab8139b..9263fb50e4a7 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 51021eeca84a..e1a22797157d 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 84fb32e0a606..4b285dc640ec 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 1a37a1ce75ab..c6dac76313cb 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 0a3ec48380a1..b367245bc331 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 7015526795f3..e795a7dcf4a2 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 fecbe84e1686..15a6bfa45637 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 d059c1ab2234..14158baf57fd 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 def21edc2861..256354a6c3e3 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 bee7a543cd1f..db5a09ca3a11 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 643667f16967..f1dbf032ea3c 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 33131714c201..57c7975b8492 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 a1f20b823f61..0ab069be4d67 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 de820b94ea69..6e1a9132c9ac 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 ab0a471f4844..5fd34d5bfb6f 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 ce35f68f5677..ac11380fa76b 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 3664e96ec28c..cdf11d55d8f9 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 c682eb57284f..80f2808c492e 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 e068b822e673..09dfd0508f4c 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 1cdb599ad63a..7b3b231bcc1c 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 8ef1ba740899..5973d94224f4 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 00d588155f26..d923b5136c2b 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 cd17a4ec7347..4566238cb7b8 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 d073f4d6423f..6bb394ea9b38 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 c345d6a0edcb..331e361fb7be 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 2d73cb7b545a..2c822aac3ca7 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 5ba19a053012..22fecf58fe28 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 78a50e2f50bc..3e5df1871b72 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 f3fe2d8e90ef..a594511a7724 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 e6ba468850cd..38e085eed270 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 db0b2b038563..29cfc959053c 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 4311619b1685..469ab95f50d0 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 62e24407cc73..c6d7754de8c5 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
}