diff options
author | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-05-29 12:49:12 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-05-29 17:06:45 +0200 |
commit | 12c76a4fa169ee2362e79ea19284ed132eac9084 (patch) | |
tree | 12dd6df199521e390ba6dad065c5cf9c0a1bf828 /sw | |
parent | be76f48d602e5d0a1091973b2df7f20cb7f1a545 (diff) |
GetMarkedObjectCount() -> GetMarkedObjectList().GetMarkCount()
In order to reduce number of calls to GetMarkedObjectList() later on
Change-Id: Id94f66545950f0fdf124ba7b985a5215a01d63fe
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168213
Tested-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/drawsh.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/shells/drwbassh.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/shells/frmsh.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/viewdlg2.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 2 |
5 files changed, 13 insertions, 13 deletions
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index 23c4dd61872d..d56fc7b458d5 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -81,7 +81,7 @@ SdrObject* SwDrawShell::IsSingleFillableNonOLESelected() return nullptr; } - if(1 != pSdrView->GetMarkedObjectCount()) + if(1 != pSdrView->GetMarkedObjectList().GetMarkCount()) { return nullptr; } diff --git a/sw/source/uibase/shells/drwbassh.cxx b/sw/source/uibase/shells/drwbassh.cxx index 01673532ecbd..070354432bda 100644 --- a/sw/source/uibase/shells/drwbassh.cxx +++ b/sw/source/uibase/shells/drwbassh.cxx @@ -604,7 +604,7 @@ void SwDrawBaseShell::Execute(SfxRequest& rReq) { bDone = true; - if(1 == pSdrView->GetMarkedObjectCount()) + if(1 == pSdrView->GetMarkedObjectList().GetMarkCount()) { // #i68101# rtl::Reference<SdrObject> pSelected = pSdrView->GetMarkedObjectByIndex(0); @@ -649,7 +649,7 @@ void SwDrawBaseShell::Execute(SfxRequest& rReq) { bDone = true; - if(1 == pSdrView->GetMarkedObjectCount()) + if(1 == pSdrView->GetMarkedObjectList().GetMarkCount()) { rtl::Reference<SdrObject> pSelected = pSdrView->GetMarkedObjectByIndex(0); assert(pSelected && "DrawViewShell::FuTemp03: nMarkCount, but no object (!)"); @@ -909,7 +909,7 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) case FN_NAME_SHAPE : { - if(1 != pSdrView->GetMarkedObjectCount()) + if(1 != pSdrView->GetMarkedObjectList().GetMarkCount()) { rSet.DisableItem( nWhich ); } @@ -921,7 +921,7 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) { const bool bIsWebView(nullptr != dynamic_cast<SwWebView*>(&GetView())); - if(!bIsWebView && 1 != pSdrView->GetMarkedObjectCount()) + if(!bIsWebView && 1 != pSdrView->GetMarkedObjectList().GetMarkCount()) { rSet.DisableItem( nWhich ); } @@ -934,7 +934,7 @@ void SwDrawBaseShell::GetState(SfxItemSet& rSet) case SID_REMOVE_HYPERLINK: case SID_COPY_HYPERLINK_LOCATION: { - if (pSdrView->GetMarkedObjectCount() != 1) + if (pSdrView->GetMarkedObjectList().GetMarkCount() != 1) { rSet.DisableItem(nWhich); break; diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx index 2785f7133031..605475cc935e 100644 --- a/sw/source/uibase/shells/frmsh.cxx +++ b/sw/source/uibase/shells/frmsh.cxx @@ -658,7 +658,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) bUpdateMgr = false; SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList(); if ( pSdrView && - pSdrView->GetMarkedObjectCount() == 1 ) + pSdrView->GetMarkedObjectList().GetMarkCount() == 1 ) { OUString aName(rSh.GetFlyName()); SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create(); @@ -682,7 +682,7 @@ void SwFrameShell::Execute(SfxRequest &rReq) bUpdateMgr = false; SdrView* pSdrView = rSh.GetDrawViewWithValidMarkList(); if ( pSdrView && - pSdrView->GetMarkedObjectCount() == 1 ) + pSdrView->GetMarkedObjectList().GetMarkCount() == 1 ) { OUString aDescription(rSh.GetObjDescription()); OUString aTitle(rSh.GetObjTitle()); @@ -1022,7 +1022,7 @@ void SwFrameShell::GetState(SfxItemSet& rSet) SwWrtShell &rWrtSh = GetShell(); SdrView* pSdrView = rWrtSh.GetDrawViewWithValidMarkList(); if ( !pSdrView || - pSdrView->GetMarkedObjectCount() != 1 ) + pSdrView->GetMarkedObjectList().GetMarkCount() != 1 ) { rSet.DisableItem( nWhich ); } diff --git a/sw/source/uibase/uiview/viewdlg2.cxx b/sw/source/uibase/uiview/viewdlg2.cxx index 7d78b693dfaa..0f3019e58412 100644 --- a/sw/source/uibase/uiview/viewdlg2.cxx +++ b/sw/source/uibase/uiview/viewdlg2.cxx @@ -155,7 +155,7 @@ bool SwView::isSignatureLineSelected() const if (!pSdrView) return false; - if (pSdrView->GetMarkedObjectCount() != 1) + if (pSdrView->GetMarkedObjectList().GetMarkCount() != 1) return false; SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0); @@ -176,7 +176,7 @@ bool SwView::isSignatureLineSigned() const if (!pSdrView) return false; - if (pSdrView->GetMarkedObjectCount() != 1) + if (pSdrView->GetMarkedObjectList().GetMarkCount() != 1) return false; SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0); @@ -197,7 +197,7 @@ bool SwView::isQRCodeSelected() const if (!pSdrView) return false; - if (pSdrView->GetMarkedObjectCount() != 1) + if (pSdrView->GetMarkedObjectList().GetMarkCount() != 1) return false; SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0); diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index d044b611eb59..78177a9e226c 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -4317,7 +4317,7 @@ void SwContentTree::UpdateTracking() SdrView* pSdrView = m_pActiveShell->GetDrawView(); if (pSdrView) { - for (size_t nIdx(0); nIdx < pSdrView->GetMarkedObjectCount(); nIdx++) + for (size_t nIdx(0); nIdx < pSdrView->GetMarkedObjectList().GetMarkCount(); nIdx++) { SdrObject* pSelected = pSdrView->GetMarkedObjectByIndex(nIdx); OUString aName(pSelected->GetName()); |