diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2011-12-10 22:03:11 -0200 |
---|---|---|
committer | Ivan Timofeev <timofeev.i.s@gmail.com> | 2011-12-13 00:36:43 +0400 |
commit | 0eac98aa742e8e76ebb1af91b32bd02e04b2e20a (patch) | |
tree | d44b28e26f61342e8a05d9c2c52e9139a5a2258b /chart2/source/controller/main | |
parent | 187077c21bd73e22f35370ad8a475191614a398d (diff) |
Fix for fdo43460 Part V getLength to isEmpty
Part V
Module
chart2
Diffstat (limited to 'chart2/source/controller/main')
14 files changed, 26 insertions, 26 deletions
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()) { |