diff options
author | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-06 14:22:10 -0200 |
---|---|---|
committer | Olivier Hallot <olivier.hallot@alta.org.br> | 2012-01-07 07:37:38 -0200 |
commit | 49e11ffbe1cc04f2855b18acd501954d80901efa (patch) | |
tree | 20bfbbab637d13ea81e8c467b59189701fedf1e4 /sc/source/ui/drawfunc | |
parent | e4ce7225dd987f9b2f250f055d9688de79931444 (diff) |
Fix for fdo43460 Part XXX getLength() to isEmpty()
Part XXX
Modules
sc
Diffstat (limited to 'sc/source/ui/drawfunc')
-rw-r--r-- | sc/source/ui/drawfunc/drawsh.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drawsh2.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/drawsh5.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fudraw.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fuins2.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/drawfunc/fusel.cxx | 4 |
6 files changed, 12 insertions, 12 deletions
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx index 4c7e32fbbfdf..992f296b9d8c 100644 --- a/sc/source/ui/drawfunc/drawsh.cxx +++ b/sc/source/ui/drawfunc/drawsh.cxx @@ -226,7 +226,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq ) } ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj ); - if ( pInfo && (pInfo->GetHlink().getLength() > 0) ) + if ( pInfo && !pInfo->GetHlink().isEmpty() ) ScGlobal::OpenURL( pInfo->GetHlink(), String::EmptyString() ); } break; @@ -306,7 +306,7 @@ void ScDrawShell::ExecuteMacroAssign( SdrObject* pObj, Window* pWin ) { SvxMacroItem aItem ( SFX_APP()->GetPool().GetWhich( SID_ATTR_MACROITEM ) ); ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, sal_True ); - if ( pInfo->GetMacro().getLength() > 0 ) + if ( !pInfo->GetMacro().isEmpty() ) { SvxMacroTableDtor aTab; String sMacro( pInfo->GetMacro() ); diff --git a/sc/source/ui/drawfunc/drawsh2.cxx b/sc/source/ui/drawfunc/drawsh2.cxx index 8c9c1e5ce10a..ff082367f621 100644 --- a/sc/source/ui/drawfunc/drawsh2.cxx +++ b/sc/source/ui/drawfunc/drawsh2.cxx @@ -205,7 +205,7 @@ void ScDrawShell::GetDrawFuncState( SfxItemSet& rSet ) // Funktionen disabl { SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj(); ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj ); - if ( !pInfo || (pInfo->GetHlink().getLength() == 0) ) + if ( !pInfo || pInfo->GetHlink().isEmpty() ) { rSet.DisableItem( SID_DRAW_HLINK_DELETE ); rSet.DisableItem( SID_OPEN_HYPERLINK ); diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index d72d5295aa85..a146b426452a 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -90,7 +90,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink { SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj(); ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj ); - if ( pInfo && (pInfo->GetHlink().getLength() > 0) ) + if ( pInfo && !pInfo->GetHlink().isEmpty() ) { aHLinkItem.SetURL( pInfo->GetHlink() ); aHLinkItem.SetInsertMode(HLINK_FIELD); @@ -122,7 +122,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink if(xInfo->hasPropertyByName( sPropLabel )) { aAny = xPropSet->getPropertyValue( sPropLabel ); - if ( (aAny >>= sTmp) && sTmp.getLength() ) + if ( (aAny >>= sTmp) && !sTmp.isEmpty() ) { aHLinkItem.SetName(sTmp); } @@ -131,7 +131,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink if(xInfo->hasPropertyByName( sPropTargetURL )) { aAny = xPropSet->getPropertyValue( sPropTargetURL ); - if ( (aAny >>= sTmp) && sTmp.getLength() ) + if ( (aAny >>= sTmp) && !sTmp.isEmpty() ) { aHLinkItem.SetURL(sTmp); } @@ -140,7 +140,7 @@ void ScDrawShell::GetHLinkState( SfxItemSet& rSet ) // Hyperlink if(xInfo->hasPropertyByName( sPropTargetFrame )) { aAny = xPropSet->getPropertyValue( sPropTargetFrame ); - if ( (aAny >>= sTmp) && sTmp.getLength() ) + if ( (aAny >>= sTmp) && !sTmp.isEmpty() ) { aHLinkItem.SetTargetFrame(sTmp); } diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx index e949b75aa011..ed0e51840e59 100644 --- a/sc/source/ui/drawfunc/fudraw.cxx +++ b/sc/source/ui/drawfunc/fudraw.cxx @@ -793,7 +793,7 @@ void FuDraw::ForcePointer(const MouseEvent* pMEvt) SdrObjMacroHitRec aHitRec; //! muss da noch irgendwas gesetzt werden ???? pViewShell->SetActivePointer( pObj->GetMacroPointer(aHitRec) ); } - else if ( !bAlt && pInfo && ((pInfo->GetMacro().getLength() > 0) || (pInfo->GetHlink().getLength() > 0)) ) + else if ( !bAlt && pInfo && (!pInfo->GetMacro().isEmpty() || !pInfo->GetHlink().isEmpty()) ) pWindow->SetPointer( Pointer( POINTER_REFHAND ) ); else if ( IsDetectiveHit( aPnt ) ) pViewShell->SetActivePointer( Pointer( POINTER_DETECTIVE ) ); diff --git a/sc/source/ui/drawfunc/fuins2.cxx b/sc/source/ui/drawfunc/fuins2.cxx index bf7338cb6304..ba7f2df9e54b 100644 --- a/sc/source/ui/drawfunc/fuins2.cxx +++ b/sc/source/ui/drawfunc/fuins2.cxx @@ -109,7 +109,7 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie ScDocument* pScDoc = pDocShell->GetDocument(); rtl::OUString aRangeString( rRangeParam ); - if ( !aRangeString.getLength() ) + if ( aRangeString.isEmpty() ) { SCCOL nCol1 = 0; SCROW nRow1 = 0; @@ -137,7 +137,7 @@ void lcl_ChartInit( const uno::Reference < embed::XEmbeddedObject >& xObj, ScVie } } - if ( aRangeString.getLength() ) + if ( !aRangeString.isEmpty() ) { // connect to Calc data (if no range string, leave chart alone, with its own data) diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx index ccd47d353632..eec1dee833b2 100644 --- a/sc/source/ui/drawfunc/fusel.cxx +++ b/sc/source/ui/drawfunc/fusel.cxx @@ -206,12 +206,12 @@ sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt) ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( pObj, true ); // For interoperability favour links over macros if both are defined - if ( pInfo->GetHlink().getLength() > 0 ) + if ( !pInfo->GetHlink().isEmpty() ) { OSL_TRACE("** Got URL"); sURL = pInfo->GetHlink(); } - else if ( pInfo->GetMacro().getLength() > 0 ) + else if ( !pInfo->GetMacro().isEmpty() ) { SfxObjectShell* pObjSh = SfxObjectShell::Current(); if ( pObjSh && SfxApplication::IsXScriptURL( pInfo->GetMacro() ) ) |