chart2/source/controller/main/ShapeController.cxx | 4 - include/svx/svdmrkv.hxx | 2 reportdesign/source/ui/report/ReportController.cxx | 2 reportdesign/source/ui/report/ViewsWindow.cxx | 6 +- sc/source/ui/drawfunc/drawsh5.cxx | 4 - sc/source/ui/drawfunc/fuins1.cxx | 2 sc/source/ui/view/cliputil.cxx | 2 sc/source/ui/view/gridwin.cxx | 2 sc/source/ui/view/tabvwshb.cxx | 10 ++-- sd/source/ui/dlg/navigatr.cxx | 2 sd/source/ui/func/smarttag.cxx | 2 sd/source/ui/view/drviews2.cxx | 6 +- sd/source/ui/view/sdview.cxx | 8 +-- sd/source/ui/view/sdview2.cxx | 8 +-- sd/source/ui/view/sdview3.cxx | 2 svx/source/dialog/imapwnd.cxx | 2 svx/source/engine3d/view3d.cxx | 28 ++++++------ svx/source/engine3d/view3d1.cxx | 2 svx/source/svdraw/svddrgmt.cxx | 8 +-- svx/source/svdraw/svddrgv.cxx | 12 ++--- svx/source/svdraw/svdedtv.cxx | 10 ++-- svx/source/svdraw/svdedtv1.cxx | 48 ++++++++++----------- svx/source/svdraw/svdedtv2.cxx | 38 ++++++++-------- svx/source/svdraw/svdedxv.cxx | 7 +-- svx/source/svdraw/svdglev.cxx | 8 +-- svx/source/svdraw/svdmrkv.cxx | 46 ++++++++++---------- svx/source/svdraw/svdmrkv1.cxx | 26 +++++------ svx/source/svdraw/svdpoev.cxx | 18 +++---- svx/source/svdraw/svdview.cxx | 10 ++-- svx/source/svdraw/svdxcgv.cxx | 8 +-- svx/source/unodraw/unoshap2.cxx | 2 sw/source/uibase/shells/drawsh.cxx | 2 sw/source/uibase/shells/drwbassh.cxx | 10 ++-- sw/source/uibase/shells/frmsh.cxx | 6 +- sw/source/uibase/uiview/viewdlg2.cxx | 6 +- sw/source/uibase/utlui/content.cxx | 2 36 files changed, 180 insertions(+), 181 deletions(-)
New commits: commit 12c76a4fa169ee2362e79ea19284ed132eac9084 Author: Xisco Fauli <[email protected]> AuthorDate: Wed May 29 12:49:12 2024 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Wed May 29 17:06:45 2024 +0200 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 <[email protected]> Reviewed-by: Xisco Fauli <[email protected]> diff --git a/chart2/source/controller/main/ShapeController.cxx b/chart2/source/controller/main/ShapeController.cxx index c440a7d97925..96c14a4fadad 100644 --- a/chart2/source/controller/main/ShapeController.cxx +++ b/chart2/source/controller/main/ShapeController.cxx @@ -397,7 +397,7 @@ void ShapeController::executeDispatch_ObjectTitleDescription() return; DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper(); - if ( !(pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectCount() == 1) ) + if ( !(pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectList().GetMarkCount() == 1) ) return; SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject(); @@ -432,7 +432,7 @@ void ShapeController::executeDispatch_RenameObject() return; DrawViewWrapper* pDrawViewWrapper = m_pChartController->GetDrawViewWrapper(); - if ( !(pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectCount() == 1) ) + if ( !(pDrawViewWrapper && pDrawViewWrapper->GetMarkedObjectList().GetMarkCount() == 1) ) return; SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject(); diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index 2c1ee0d88f5d..214de9f65bf9 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -261,7 +261,6 @@ public: // returns SAL_MAX_SIZE if not found SdrPageView* GetSdrPageViewOfMarkedByIndex(size_t nNum) const { return GetMarkedObjectList().GetMark(nNum)->GetPageView(); } SdrObject* GetMarkedObjectByIndex(size_t nNum) const { return GetMarkedObjectList().GetMark(nNum)->GetMarkedSdrObj(); } - size_t GetMarkedObjectCount() const { return GetMarkedObjectList().GetMarkCount(); } void SortMarkedObjects() const { GetMarkedObjectList().ForceSort(); } bool AreObjectsMarked() const { return 0 != GetMarkedObjectList().GetMarkCount(); } OUString const & GetDescriptionOfMarkedObjects() const { return GetMarkedObjectList().GetMarkDescription(); } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index c4a4fb8d4abb..49cb91063efe 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -468,7 +468,7 @@ FeatureState OReportController::GetState(sal_uInt16 _nId) const if ( aReturn.bEnabled ) { OSectionView* pSectionView = getCurrentSectionView(); - aReturn.bEnabled = pSectionView && pSectionView->GetMarkedObjectCount() > 2; + aReturn.bEnabled = pSectionView && pSectionView->GetMarkedObjectList().GetMarkCount() > 2; } break; case SID_ARRANGEMENU: diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx index c04a01b2d53e..d5e7d7b8c930 100644 --- a/reportdesign/source/ui/report/ViewsWindow.cxx +++ b/reportdesign/source/ui/report/ViewsWindow.cxx @@ -628,7 +628,7 @@ void OViewsWindow::collectRectangles(TRectangleMap& _rSortRectangles) if ( rView.AreObjectsMarked() ) { rView.SortMarkedObjects(); - const size_t nCount = rView.GetMarkedObjectCount(); + const size_t nCount = rView.GetMarkedObjectList().GetMarkCount(); for (size_t i=0; i < nCount; ++i) { const SdrMark* pM = rView.GetMarkedObjectList().GetMark(i); @@ -1024,7 +1024,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* _pHdl,const OSectionVi if ( rView.AreObjectsMarked() ) { - const size_t nCount = rView.GetMarkedObjectCount(); + const size_t nCount = rView.GetMarkedObjectList().GetMarkCount(); for (size_t i=0; i < nCount; ++i) { const SdrMark* pM = rView.GetMarkedObjectList().GetMark(i); @@ -1367,7 +1367,7 @@ sal_uInt32 OViewsWindow::getMarkedObjectCount() const { return std::accumulate(m_aSections.begin(), m_aSections.end(), sal_uInt32(0), [](const sal_uInt32 nCount, const VclPtr<OSectionWindow>& rxSection) { - return nCount + static_cast<sal_uInt32>(rxSection->getReportSection().getSectionView().GetMarkedObjectCount()); }); + return nCount + static_cast<sal_uInt32>(rxSection->getReportSection().getSectionView().GetMarkedObjectList().GetMarkCount()); }); } void OViewsWindow::handleKey(const vcl::KeyCode& _rCode) diff --git a/sc/source/ui/drawfunc/drawsh5.cxx b/sc/source/ui/drawfunc/drawsh5.cxx index c2fe632c3bd5..e4edfd455f4f 100644 --- a/sc/source/ui/drawfunc/drawsh5.cxx +++ b/sc/source/ui/drawfunc/drawsh5.cxx @@ -506,7 +506,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) case SID_RENAME_OBJECT: { - if(1 == pView->GetMarkedObjectCount()) + if(1 == pView->GetMarkedObjectList().GetMarkCount()) { // #i68101# SdrObject* pSelected = pView->GetMarkedObjectByIndex(0); @@ -580,7 +580,7 @@ void ScDrawShell::ExecDrawFunc( SfxRequest& rReq ) // #i68101# case SID_TITLE_DESCRIPTION_OBJECT: { - if(1 == pView->GetMarkedObjectCount()) + if(1 == pView->GetMarkedObjectList().GetMarkCount()) { SdrObject* pSelected = pView->GetMarkedObjectByIndex(0); assert(pSelected && "ScDrawShell::ExecDrawFunc: nMarkCount, but no object (!)"); diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index 9b51a62c5b2a..1152eaf10024 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -129,7 +129,7 @@ static void lcl_InsertGraphic( const Graphic& rGraphic, // #i123922# check if an existing object is selected; if yes, evtl. replace // the graphic for a SdrGraphObj (including link state updates) or adapt the fill // style for other objects - if(pDrawView && 1 == pDrawView->GetMarkedObjectCount()) + if(pDrawView && 1 == pDrawView->GetMarkedObjectList().GetMarkCount()) { SdrObject* pPickObj = pDrawView->GetMarkedObjectByIndex(0); diff --git a/sc/source/ui/view/cliputil.cxx b/sc/source/ui/view/cliputil.cxx index e4d75d3b34b5..b1e14127e2d3 100644 --- a/sc/source/ui/view/cliputil.cxx +++ b/sc/source/ui/view/cliputil.cxx @@ -85,7 +85,7 @@ void ScClipUtil::PasteFromClipboard( ScViewData& rViewData, ScTabViewShell* pTab pTabViewShell->PasteFromSystem(); // Anchor To Cell rather than To Page ScDrawView* pDrawView = pTabViewShell->GetScDrawView(); - if(pDrawView && 1 == pDrawView->GetMarkedObjectCount()) + if(pDrawView && 1 == pDrawView->GetMarkedObjectList().GetMarkCount()) { SdrObject* pPickObj = pDrawView->GetMarkedObjectByIndex(0); if(pPickObj) diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 1b62cfb695e4..3b48b2adda9e 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -4953,7 +4953,7 @@ void ScGridWindow::PasteSelection( const Point& rPosPixel ) SdrView* pDrawView = mrViewData.GetViewShell()->GetScDrawView(); if (pDrawView) { - const size_t nCount = pDrawView->GetMarkedObjectCount(); + const size_t nCount = pDrawView->GetMarkedObjectList().GetMarkCount(); for (size_t i = 0; i < nCount; ++i) { SdrObject* pObj = pDrawView->GetMarkedObjectByIndex(i); diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx index 13ba1dcf04c0..7b34b1fce5d8 100644 --- a/sc/source/ui/view/tabvwshb.cxx +++ b/sc/source/ui/view/tabvwshb.cxx @@ -646,7 +646,7 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet) break; case SID_INSERT_SIGNATURELINE: - if ( bTabProt || bShared || (pSdrView && pSdrView->GetMarkedObjectCount() != 0)) + if ( bTabProt || bShared || (pSdrView && pSdrView->GetMarkedObjectList().GetMarkCount() != 0)) rSet.DisableItem( nWhich ); break; case SID_EDIT_SIGNATURELINE: @@ -656,7 +656,7 @@ void ScTabViewShell::GetDrawInsState(SfxItemSet &rSet) break; case SID_INSERT_QRCODE: - if ( bTabProt || bShared || (pSdrView && pSdrView->GetMarkedObjectCount() != 0)) + if ( bTabProt || bShared || (pSdrView && pSdrView->GetMarkedObjectList().GetMarkCount() != 0)) rSet.DisableItem( nWhich ); break; case SID_EDIT_QRCODE: @@ -704,7 +704,7 @@ bool ScTabViewShell::IsSignatureLineSelected() if (!pSdrView) return false; - if (pSdrView->GetMarkedObjectCount() != 1) + if (pSdrView->GetMarkedObjectList().GetMarkCount() != 1) return false; SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0); @@ -724,7 +724,7 @@ bool ScTabViewShell::IsQRCodeSelected() if (!pSdrView) return false; - if (pSdrView->GetMarkedObjectCount() != 1) + if (pSdrView->GetMarkedObjectList().GetMarkCount() != 1) return false; SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0); @@ -750,7 +750,7 @@ bool ScTabViewShell::IsSignatureLineSigned() if (!pSdrView) return false; - if (pSdrView->GetMarkedObjectCount() != 1) + if (pSdrView->GetMarkedObjectList().GetMarkCount() != 1) return false; SdrObject* pPickObj = pSdrView->GetMarkedObjectByIndex(0); diff --git a/sd/source/ui/dlg/navigatr.cxx b/sd/source/ui/dlg/navigatr.cxx index 5b25db0e13e7..51ad28d89e4b 100644 --- a/sd/source/ui/dlg/navigatr.cxx +++ b/sd/source/ui/dlg/navigatr.cxx @@ -924,7 +924,7 @@ void SdPageNameControllerItem::StateChangedAtToolBoxControl( sal_uInt16 nSId, if (pInfo->GetDrawDocShell() && pInfo->GetDrawDocShell()->GetViewShell()) { const SdrView* pDrawView = pInfo->GetDrawDocShell()->GetViewShell()->GetDrawView(); - if (pDrawView && pDrawView->GetMarkedObjectCount()) + if (pDrawView && pDrawView->GetMarkedObjectList().GetMarkCount()) bDrawViewHasMarkedObjects = true; } diff --git a/sd/source/ui/func/smarttag.cxx b/sd/source/ui/func/smarttag.cxx index b9fdc74c9721..99d0e14d9248 100644 --- a/sd/source/ui/func/smarttag.cxx +++ b/sd/source/ui/func/smarttag.cxx @@ -163,7 +163,7 @@ void SmartTagSet::select( const SmartTagReference& xTag ) mxSelectedTag = xTag; mxSelectedTag->select(); mrView.SetPossibilitiesDirty(); - if( mrView.GetMarkedObjectCount() > 0 ) + if( mrView.GetMarkedObjectList().GetMarkCount() > 0 ) mrView.UnmarkAllObj(); else mrView.updateHandles(); diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 37df200a18e6..689b89c8b79f 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -1137,7 +1137,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) // exception to get good results for Svgs. This is how the code gets more // and more crowded, at last I made a remark for myself to change this // as one of the next tasks. - if(1 == mpDrawView->GetMarkedObjectCount()) + if(1 == mpDrawView->GetMarkedObjectList().GetMarkCount()) { const SdrGrafObj* pSdrGrafObj = dynamic_cast< const SdrGrafObj* >(mpDrawView->GetMarkedObjectByIndex(0)); @@ -2662,7 +2662,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) { // only allow for single object selection since the name of an object needs // to be unique - if(1 == mpDrawView->GetMarkedObjectCount()) + if(1 == mpDrawView->GetMarkedObjectList().GetMarkCount()) { // #i68101# rtl::Reference<SdrObject> pSelected = mpDrawView->GetMarkedObjectByIndex(0); @@ -2701,7 +2701,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) // #i68101# case SID_OBJECT_TITLE_DESCRIPTION: { - if(1 == mpDrawView->GetMarkedObjectCount()) + if(1 == mpDrawView->GetMarkedObjectList().GetMarkCount()) { rtl::Reference<SdrObject> pSelected = mpDrawView->GetMarkedObjectByIndex(0); OSL_ENSURE(pSelected, "DrawViewShell::FuTemp03: nMarkCount, but no object (!)"); diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 9c4713fcb0ac..de33dab73649 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -503,7 +503,7 @@ void View::MarkListHasChanged() { FmFormView::MarkListHasChanged(); - if( GetMarkedObjectCount() > 0 ) + if( GetMarkedObjectList().GetMarkCount() > 0 ) maSmartTags.deselect(); } @@ -865,7 +865,7 @@ bool View::RestoreDefaultText( SdrTextObj* pTextObj ) void View::SetMarkedOriginalSize() { std::unique_ptr<SdrUndoGroup> pUndoGroup(new SdrUndoGroup(mrDoc)); - const size_t nCount = GetMarkedObjectCount(); + const size_t nCount = GetMarkedObjectList().GetMarkCount(); bool bOK = false; for( size_t i = 0; i < nCount; ++i ) @@ -1196,7 +1196,7 @@ bool View::ShouldToggleOn( bool bToggleOn = false; std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OutlinerMode::TextObject, rSdrModel)); - const size_t nMarkCount = GetMarkedObjectCount(); + const size_t nMarkCount = GetMarkedObjectList().GetMarkCount(); for (size_t nIndex = 0; nIndex < nMarkCount && !bToggleOn; ++nIndex) { SdrTextObj* pTextObj = DynCastSdrTextObj(GetMarkedObjectByIndex(nIndex)); @@ -1267,7 +1267,7 @@ void View::ChangeMarkedObjectsBulletsNumbering( std::unique_ptr<SdrOutliner> pOutliner(SdrMakeOutliner(OutlinerMode::TextObject, rSdrModel)); OutlinerView aOutlinerView(pOutliner.get(), pWindow); - const size_t nMarkCount = GetMarkedObjectCount(); + const size_t nMarkCount = GetMarkedObjectList().GetMarkCount(); for (size_t nIndex = 0; nIndex < nMarkCount; ++nIndex) { SdrTextObj* pTextObj = DynCastSdrTextObj(GetMarkedObjectByIndex(nIndex)); diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx index 2ce09acf8b32..f48da6715287 100644 --- a/sd/source/ui/view/sdview2.cxx +++ b/sd/source/ui/view/sdview2.cxx @@ -104,7 +104,7 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateClipboardDat pNewPage->SetLayoutName( pOldPage->GetLayoutName() ); } - if( GetMarkedObjectCount() == 1 ) + if( GetMarkedObjectList().GetMarkCount() == 1 ) { SdrObject* pObj = GetMarkedObjectByIndex(0); @@ -150,7 +150,7 @@ css::uno::Reference< css::datatransfer::XTransferable > View::CreateDragDataObje OUString aDisplayName; SdrOle2Obj* pSdrOleObj = nullptr; - if( GetMarkedObjectCount() == 1 ) + if( GetMarkedObjectList().GetMarkCount() == 1 ) { SdrObject* pObj = GetMarkedObjectByIndex( 0 ); @@ -451,7 +451,7 @@ sal_Int8 View::AcceptDrop( const AcceptDropEvent& rEvt, DropTargetHelper& rTarge { ::tools::Rectangle aRect( pOLV->GetOutputArea() ); - if (GetMarkedObjectCount() == 1) + if (GetMarkedObjectList().GetMarkCount() == 1) { SdrMark* pMark = GetMarkedObjectList().GetMark(0); SdrObject* pObj = pMark->GetMarkedSdrObj(); @@ -632,7 +632,7 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt, { ::tools::Rectangle aRect( pOLV->GetOutputArea() ); - if( GetMarkedObjectCount() == 1 ) + if( GetMarkedObjectList().GetMarkCount() == 1 ) { SdrMark* pMark = GetMarkedObjectList().GetMark(0); SdrObject* pObj = pMark->GetMarkedSdrObj(); diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx index 6df4d8161548..02cdd653fc5f 100644 --- a/sd/source/ui/view/sdview3.cxx +++ b/sd/source/ui/view/sdview3.cxx @@ -403,7 +403,7 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper, pOwnData->SetInternalMove( true ); SortMarkedObjects(); - for( size_t nM = 0; nM < GetMarkedObjectCount(); ++nM ) + for( size_t nM = 0; nM < GetMarkedObjectList().GetMarkCount(); ++nM ) { SdrMark* pM = GetMarkedObjectList().GetMark( nM ); SdrObject* pO = pM->GetMarkedSdrObj(); diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index b7fec33f9735..ffe1a047d859 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -504,7 +504,7 @@ bool IMapWindow::Command(const CommandEvent& rCEvt) mxPopupMenu->set_sensitive(u"url"_ustr, false); mxPopupMenu->set_sensitive(u"active"_ustr, false); mxPopupMenu->set_sensitive(u"macro"_ustr, false); - mxPopupMenu->set_sensitive(u"selectall"_ustr, pModel->GetPage(0)->GetObjCount() != pView->GetMarkedObjectCount()); + mxPopupMenu->set_sensitive(u"selectall"_ustr, pModel->GetPage(0)->GetObjCount() != pView->GetMarkedObjectList().GetMarkCount()); if ( !nMarked ) { diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx index eb4a6e758e2f..384cf5f2d550 100644 --- a/svx/source/engine3d/view3d.cxx +++ b/svx/source/engine3d/view3d.cxx @@ -88,7 +88,7 @@ public: Impl3DMirrorConstructOverlay::Impl3DMirrorConstructOverlay(const E3dView& rView) : mrView(rView), - mnCount(rView.GetMarkedObjectCount()), + mnCount(rView.GetMarkedObjectList().GetMarkCount()), mpPolygons(nullptr) { if(!mnCount) @@ -217,7 +217,7 @@ void E3dView::DrawMarkedObj(OutputDevice& rOut) const bool bSpecialHandling = false; E3dScene *pScene = nullptr; - const size_t nCnt = GetMarkedObjectCount(); + const size_t nCnt = GetMarkedObjectList().GetMarkCount(); for(size_t nObjs = 0; nObjs < nCnt; ++nObjs) { SdrObject *pObj = GetMarkedObjectByIndex(nObjs); @@ -313,7 +313,7 @@ std::unique_ptr<SdrModel> E3dView::CreateMarkedObjModel() const { // Does 3D objects exist which scenes are not selected? bool bSpecialHandling(false); - const size_t nCount(GetMarkedObjectCount()); + const size_t nCount(GetMarkedObjectList().GetMarkCount()); E3dScene *pScene = nullptr; for(size_t nObjs = 0; nObjs < nCount; ++nObjs) @@ -585,7 +585,7 @@ bool E3dView::IsConvertTo3DObjPossible() const bool bGroupSelected(false); bool bRetval(true); - for(size_t a=0; !bAny3D && a<GetMarkedObjectCount(); ++a) + for(size_t a=0; !bAny3D && a<GetMarkedObjectList().GetMarkCount(); ++a) { SdrObject *pObj = GetMarkedObjectByIndex(a); if(pObj) @@ -877,7 +877,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 aInvLatheMat.invert(); // SnapRect extension enables mirroring in the axis of rotation - for(size_t a=0; a<GetMarkedObjectCount(); ++a) + for(size_t a=0; a<GetMarkedObjectList().GetMarkCount(); ++a) { SdrMark* pMark = GetMarkedObjectList().GetMark(a); SdrObject* pObj = pMark->GetMarkedSdrObj(); @@ -917,7 +917,7 @@ void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& rPnt1 // Walk through the selection and convert it into 3D, complete with // Conversion to SdrPathObject, also fonts - for(size_t a=0; a<GetMarkedObjectCount(); ++a) + for(size_t a=0; a<GetMarkedObjectList().GetMarkCount(); ++a) { SdrMark* pMark = GetMarkedObjectList().GetMark(a); SdrObject* pObj = pMark->GetMarkedSdrObj(); @@ -1135,7 +1135,7 @@ bool E3dView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl, short nMinMov, SdrDragMethod* pForcedMeth) { - if(Is3DRotationCreationActive() && GetMarkedObjectCount()) + if(Is3DRotationCreationActive() && GetMarkedObjectList().GetMarkCount()) { // Determine all selected polygons and return the mirrored helper overlay mpMirrorOverlay->SetMirrorAxis(maRef1, maRef2); @@ -1156,12 +1156,12 @@ bool E3dView::BegDragObj(const Point& rPnt, OutputDevice* pOut, bOwnActionNecessary = false; } - if(bOwnActionNecessary && GetMarkedObjectCount() > 0) + if(bOwnActionNecessary && GetMarkedObjectList().GetMarkCount() > 0) { E3dDragConstraint eConstraint = E3dDragConstraint::XYZ; bool bThereAreRootScenes = false; bool bThereAre3DObjects = false; - const size_t nCnt = GetMarkedObjectCount(); + const size_t nCnt = GetMarkedObjectList().GetMarkCount(); for(size_t nObjs = 0; nObjs < nCnt; ++nObjs) { SdrObject *pObj = GetMarkedObjectByIndex(nObjs); @@ -1284,7 +1284,7 @@ void E3dView::InitScene(E3dScene* pScene, double fW, double fH, double fCamZ) void E3dView::Start3DCreation() { - if (!GetMarkedObjectCount()) + if (!GetMarkedObjectList().GetMarkCount()) return; //positioned @@ -1324,7 +1324,7 @@ void E3dView::Start3DCreation() // and then attach the marks at the top and bottom of the object basegfx::B2DRange aR; - for(size_t nMark = 0; nMark < GetMarkedObjectCount(); ++nMark) + for(size_t nMark = 0; nMark < GetMarkedObjectList().GetMarkCount(); ++nMark) { SdrObject* pMark = GetMarkedObjectByIndex(nMark); basegfx::B2DPolyPolygon aXPP(pMark->TakeXorPoly()); @@ -1468,7 +1468,7 @@ void E3dView::InitView () bool E3dView::IsBreak3DObjPossible() const { - const size_t nCount = GetMarkedObjectCount(); + const size_t nCount = GetMarkedObjectList().GetMarkCount(); if (nCount > 0) { @@ -1501,7 +1501,7 @@ void E3dView::Break3DObj() return; // ALL selected objects are changed - const size_t nCount = GetMarkedObjectCount(); + const size_t nCount = GetMarkedObjectList().GetMarkCount(); BegUndo(SvxResId(RID_SVX_3D_UNDO_BREAK_LATHE)); for(size_t a=0; a<nCount; ++a) @@ -1549,7 +1549,7 @@ void E3dView::CheckPossibilities() if(!(m_bGroupPossible || m_bUnGroupPossible || m_bGrpEnterPossible)) return; - const size_t nMarkCnt = GetMarkedObjectCount(); + const size_t nMarkCnt = GetMarkedObjectList().GetMarkCount(); bool bCompound = false; bool b3DObject = false; for(size_t nObjs = 0; (nObjs < nMarkCnt) && !bCompound; ++nObjs) diff --git a/svx/source/engine3d/view3d1.cxx b/svx/source/engine3d/view3d1.cxx index 8ef11e54a650..3b80a00c3337 100644 --- a/svx/source/engine3d/view3d1.cxx +++ b/svx/source/engine3d/view3d1.cxx @@ -36,7 +36,7 @@ void E3dView::ConvertMarkedToPolyObj() { rtl::Reference<SdrObject> pNewObj; - if (GetMarkedObjectCount() == 1) + if (GetMarkedObjectList().GetMarkCount() == 1) { SdrObject* pObj = GetMarkedObjectByIndex(0); diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx index dec7c55a4147..995ef538a2f6 100644 --- a/svx/source/svdraw/svddrgmt.cxx +++ b/svx/source/svdraw/svddrgmt.cxx @@ -361,7 +361,7 @@ void SdrDragMethod::insertNewlyCreatedOverlayObjectForSdrDragMethod( void SdrDragMethod::createSdrDragEntries_SolidDrag() { - const size_t nMarkCount(getSdrDragView().GetMarkedObjectCount()); + const size_t nMarkCount(getSdrDragView().GetMarkedObjectList().GetMarkCount()); SdrPageView* pPV = getSdrDragView().GetSdrPageView(); if(!pPV) @@ -420,7 +420,7 @@ void SdrDragMethod::createSdrDragEntries_SolidDrag() void SdrDragMethod::createSdrDragEntries_PolygonDrag() { - const size_t nMarkCount(getSdrDragView().GetMarkedObjectCount()); + const size_t nMarkCount(getSdrDragView().GetMarkedObjectList().GetMarkCount()); bool bNoPolygons(getSdrDragView().IsNoDragXorPolys() || nMarkCount > SdrDragView::GetDragXorPolyLimit()); basegfx::B2DPolyPolygon aResult; sal_uInt32 nPointCount(0); @@ -467,7 +467,7 @@ void SdrDragMethod::createSdrDragEntries_PolygonDrag() void SdrDragMethod::createSdrDragEntries_PointDrag() { - const size_t nMarkCount(getSdrDragView().GetMarkedObjectCount()); + const size_t nMarkCount(getSdrDragView().GetMarkedObjectList().GetMarkCount()); std::vector< basegfx::B2DPoint > aPositions; for(size_t nm = 0; nm < nMarkCount; ++nm) @@ -512,7 +512,7 @@ void SdrDragMethod::createSdrDragEntries_PointDrag() void SdrDragMethod::createSdrDragEntries_GlueDrag() { - const size_t nMarkCount(getSdrDragView().GetMarkedObjectCount()); + const size_t nMarkCount(getSdrDragView().GetMarkedObjectList().GetMarkCount()); std::vector< basegfx::B2DPoint > aPositions; for(size_t nm = 0; nm < nMarkCount; ++nm) diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx index a91f88df3159..0fb64eee11eb 100644 --- a/svx/source/svdraw/svddrgv.cxx +++ b/svx/source/svdraw/svddrgv.cxx @@ -144,7 +144,7 @@ bool SdrDragView::TakeDragObjAnchorPos(Point& rPos, bool bTR ) const tools::Rectangle aR; TakeActionRect(aR); rPos = bTR ? aR.TopRight() : aR.TopLeft(); - if (GetMarkedObjectCount()==1 && IsDragObj() && // only on single selection + if (GetMarkedObjectList().GetMarkCount()==1 && IsDragObj() && // only on single selection !IsDraggingPoints() && !IsDraggingGluePoints() && // not when moving points dynamic_cast<const SdrDragMovHdl*>( mpCurrentSdrDragMethod.get() ) == nullptr) // not when moving handles { @@ -267,7 +267,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl { // are 3D objects selected? bool b3DObjSelected = false; - for(size_t a=0; !b3DObjSelected && a<GetMarkedObjectCount(); ++a) + for(size_t a=0; !b3DObjSelected && a<GetMarkedObjectList().GetMarkCount(); ++a) { SdrObject* pObj = GetMarkedObjectByIndex(a); if(DynCastE3dObject(pObj)) @@ -415,7 +415,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl } bool bSingleTextObjMark = false; // SJ: #i100490# - if ( GetMarkedObjectCount() == 1 ) + if ( GetMarkedObjectList().GetMarkCount() == 1 ) { mpMarkedObj=GetMarkedObjectByIndex(0); if ( mpMarkedObj && @@ -433,7 +433,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl { if(SdrHdlKind::Move == meDragHdl) { - const bool bCustomShapeSelected(1 == GetMarkedObjectCount() && dynamic_cast<const SdrObjCustomShape*>(GetMarkedObjectByIndex(0)) != nullptr); + const bool bCustomShapeSelected(1 == GetMarkedObjectList().GetMarkCount() && dynamic_cast<const SdrObjCustomShape*>(GetMarkedObjectByIndex(0)) != nullptr); if(bCustomShapeSelected) { @@ -442,7 +442,7 @@ bool SdrDragView::BegDragObj(const Point& rPnt, OutputDevice* pOut, SdrHdl* pHdl } else if(SdrHdlKind::Poly == meDragHdl) { - const bool bConnectorSelected(1 == GetMarkedObjectCount() && dynamic_cast<const SdrEdgeObj*>(GetMarkedObjectByIndex(0)) != nullptr); + const bool bConnectorSelected(1 == GetMarkedObjectList().GetMarkCount() && dynamic_cast<const SdrEdgeObj*>(GetMarkedObjectByIndex(0)) != nullptr); if(bConnectorSelected) { @@ -713,7 +713,7 @@ bool SdrDragView::IsInsGluePointPossible() const bool bRet=false; if (IsInsGluePointMode() && AreObjectsMarked()) { - if (GetMarkedObjectCount()==1) + if (GetMarkedObjectList().GetMarkCount()==1) { // return sal_False, if only 1 object which is a connector. const SdrObject* pObj=GetMarkedObjectByIndex(0); diff --git a/svx/source/svdraw/svdedtv.cxx b/svx/source/svdraw/svdedtv.cxx index 0a0cd49ddea3..7f3548fad311 100644 --- a/svx/source/svdraw/svdedtv.cxx +++ b/svx/source/svdraw/svdedtv.cxx @@ -492,7 +492,7 @@ void SdrEditView::CheckPossibilities() ImpResetPossibilityFlags(); SortMarkedObjects(); - const size_t nMarkCount = GetMarkedObjectCount(); + const size_t nMarkCount = GetMarkedObjectList().GetMarkCount(); if (nMarkCount != 0) { m_bReverseOrderPossible = (nMarkCount >= 2); @@ -686,7 +686,7 @@ void SdrEditView::CheckPossibilities() void SdrEditView::ForceMarkedObjToAnotherPage() { bool bFlg=false; - for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) { + for (size_t nm=0; nm<GetMarkedObjectList().GetMarkCount(); ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); SdrObject* pObj=pM->GetMarkedSdrObj(); tools::Rectangle aObjRect(pObj->GetCurrentBoundRect()); @@ -797,7 +797,7 @@ static void lcl_LazyDelete(std::vector<rtl::Reference<SdrObject>> & rLazyDelete) void SdrEditView::DeleteMarkedObj() { // #i110981# return when nothing is to be done at all - if(!GetMarkedObjectCount()) + if(!GetMarkedObjectList().GetMarkCount()) { return; } @@ -809,7 +809,7 @@ void SdrEditView::DeleteMarkedObj() std::vector<rtl::Reference<SdrObject>> lazyDeleteObjects; // remove as long as something is selected. This allows to schedule objects for // removal for a next run as needed - while(GetMarkedObjectCount()) + while(GetMarkedObjectList().GetMarkCount()) { // vector to remember the parents which may be empty after object removal std::vector< SdrObject* > aParents; @@ -872,7 +872,7 @@ void SdrEditView::DeleteMarkedObj() GetMarkedObjectListWriteAccess().Clear(); maHdlList.Clear(); - while(!aParents.empty() && !GetMarkedObjectCount()) + while(!aParents.empty() && !GetMarkedObjectList().GetMarkCount()) { // iterate over remembered parents SdrObject* pParent = aParents.back(); diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx index 19a46dd2e173..bc99b67017e6 100644 --- a/svx/source/svdraw/svdedtv1.cxx +++ b/svx/source/svdraw/svdedtv1.cxx @@ -77,7 +77,7 @@ void SdrEditView::SetMarkedObjRect(const tools::Rectangle& rRect) { DBG_ASSERT(!rRect.IsEmpty(),"SetMarkedObjRect() with an empty Rect does not make sense."); if (rRect.IsEmpty()) return; - const size_t nCount=GetMarkedObjectCount(); + const size_t nCount=GetMarkedObjectList().GetMarkCount(); if (nCount==0) return; tools::Rectangle aR0(GetMarkedObjRect()); DBG_ASSERT(!aR0.IsEmpty(),"SetMarkedObjRect(): GetMarkedObjRect() is empty."); @@ -196,7 +196,7 @@ void SdrEditView::MoveMarkedObj(const Size& rSiz, bool bCopy) if (bCopy) CopyMarkedObj(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -228,7 +228,7 @@ void SdrEditView::ResizeMarkedObj(const Point& rRef, const Fraction& xFact, cons if (bCopy) CopyMarkedObj(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -257,7 +257,7 @@ void SdrEditView::ResizeMultMarkedObj(const Point& rRef, BegUndo(ImpGetDescriptionString(STR_EditResize)); } - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -284,7 +284,7 @@ Degree100 SdrEditView::GetMarkedObjRotate() const { Degree100 nRetval(0); - if(GetMarkedObjectCount()) + if(GetMarkedObjectList().GetMarkCount()) { SdrMark* pM = GetMarkedObjectList().GetMark(0); SdrObject* pO = pM->GetMarkedSdrObj(); @@ -311,7 +311,7 @@ void SdrEditView::RotateMarkedObj(const Point& rRef, Degree100 nAngle, bool bCop double nSin = sin(toRadians(nAngle)); double nCos = cos(toRadians(nAngle)); - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); if(nMarkCount) { @@ -375,7 +375,7 @@ void SdrEditView::MirrorMarkedObj(const Point& rRef1, const Point& rRef2, bool b if (bCopy) CopyMarkedObj(); - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); if(nMarkCount) { @@ -436,7 +436,7 @@ Degree100 SdrEditView::GetMarkedObjShear() const bool b1st=true; bool bOk=true; Degree100 nAngle(0); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount && bOk; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); SdrObject* pO=pM->GetMarkedSdrObj(); @@ -468,7 +468,7 @@ void SdrEditView::ShearMarkedObj(const Point& rRef, Degree100 nAngle, bool bVShe CopyMarkedObj(); double nTan = tan(toRadians(nAngle)); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -583,7 +583,7 @@ void SdrEditView::CrookMarkedObj(const Point& rRef, const Point& rRad, SdrCrookM if (bCopy) CopyMarkedObj(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -657,7 +657,7 @@ void SdrEditView::DistortMarkedObj(const tools::Rectangle& rRef, const XPolygon& if (bCopy) CopyMarkedObj(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -768,7 +768,7 @@ void SdrEditView::SetNotPersistAttrToMarked(const SfxItemSet& rAttr) const bool bUndo = IsUndoEnabled(); // TODO: check if WhichRange is necessary. - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { const SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -805,7 +805,7 @@ void SdrEditView::MergeNotPersistAttrFromMarked(SfxItemSet& rAttr) const Degree100 nShrAngle(0); bool bShrAngleDC=false; tools::Rectangle aSnapRect; tools::Rectangle aLogicRect; - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { const SdrMark* pM=GetMarkedObjectList().GetMark(nm); const SdrObject* pObj=pM->GetMarkedSdrObj(); @@ -905,7 +905,7 @@ SfxItemSet SdrEditView::GetAttrFromMarked(bool bOnlyHardAttr) const void SdrEditView::MergeAttrFromMarked(SfxItemSet& rAttr, bool bOnlyHardAttr) const { - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); for(size_t a = 0; a < nMarkCount; ++a) { @@ -1125,7 +1125,7 @@ void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll) BegUndo(ImpGetDescriptionString(STR_EditSetAttributes)); } - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); std::vector< E3DModifySceneSnapRectUpdater* > aUpdaters; // create ItemSet without SfxItemState::INVALID. Put() @@ -1280,7 +1280,7 @@ SfxStyleSheet* SdrEditView::GetStyleSheetFromMarked() const { SfxStyleSheet* pRet=nullptr; bool b1st=true; - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); SfxStyleSheet* pSS=pM->GetMarkedSdrObj()->GetStyleSheet(); @@ -1309,7 +1309,7 @@ void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, bool bDontRe BegUndo(aStr); } - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -1328,7 +1328,7 @@ void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, bool bDontRe void SdrEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) const { - if(GetMarkedObjectCount()) + if(GetMarkedObjectList().GetMarkCount()) { rTargetSet.Put(GetAttrFromMarked(bOnlyHardAttr), false); } @@ -1340,7 +1340,7 @@ void SdrEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) cons void SdrEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) { - if (GetMarkedObjectCount()!=0) { + if (GetMarkedObjectList().GetMarkCount()!=0) { SetAttrToMarked(rSet,bReplaceAll); } else { SdrMarkView::SetAttributes(rSet,bReplaceAll); @@ -1349,7 +1349,7 @@ void SdrEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) SfxStyleSheet* SdrEditView::GetStyleSheet() const { - if (GetMarkedObjectCount()!=0) { + if (GetMarkedObjectList().GetMarkCount()!=0) { return GetStyleSheetFromMarked(); } else { return SdrMarkView::GetStyleSheet(); @@ -1358,7 +1358,7 @@ SfxStyleSheet* SdrEditView::GetStyleSheet() const void SdrEditView::SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr) { - if (GetMarkedObjectCount()!=0) { + if (GetMarkedObjectList().GetMarkCount()!=0) { SetStyleSheetToMarked(pStyleSheet,bDontRemoveHardAttr); } else { SdrMarkView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr); @@ -1858,7 +1858,7 @@ void SdrEditView::SetGeoAttrToMarked(const SfxItemSet& rAttr, bool addPageMargin bool SdrEditView::IsAlignPossible() const { // at least two selected objects, at least one of them movable ForcePossibilities(); - const size_t nCount=GetMarkedObjectCount(); + const size_t nCount=GetMarkedObjectList().GetMarkCount(); if (nCount==0) return false; // nothing selected! if (nCount==1) return m_bMoveAllowed; // align single object to page return m_bOneOrMoreMovable; // otherwise: MarkCount>=2 @@ -1870,7 +1870,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) return; SortMarkedObjects(); - if (!GetMarkedObjectCount()) + if (!GetMarkedObjectList().GetMarkCount()) return; const bool bUndo = IsUndoEnabled(); @@ -1922,7 +1922,7 @@ void SdrEditView::AlignMarkedObjects(SdrHorAlign eHor, SdrVertAlign eVert) } tools::Rectangle aBound; - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); bool bHasFixed=false; for (size_t nm=0; nm<nMarkCount; ++nm) { diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index 47f612dcc6bf..f372ac9c1f31 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -71,7 +71,7 @@ void SdrEditView::ObjOrderChanged(SdrObject* /*pObj*/, size_t /*nOldPos*/, size_ void SdrEditView::MovMarkedToTop() { - const size_t nCount=GetMarkedObjectCount(); + const size_t nCount=GetMarkedObjectList().GetMarkCount(); if (nCount==0) return; @@ -159,7 +159,7 @@ void SdrEditView::MovMarkedToTop() void SdrEditView::MovMarkedToBtm() { - const size_t nCount=GetMarkedObjectCount(); + const size_t nCount=GetMarkedObjectList().GetMarkCount(); if (nCount==0) return; @@ -255,7 +255,7 @@ void SdrEditView::PutMarkedToTop() void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj) { - const size_t nCount=GetMarkedObjectCount(); + const size_t nCount=GetMarkedObjectList().GetMarkCount(); if (nCount==0) return; @@ -356,7 +356,7 @@ void SdrEditView::PutMarkedToBtm() void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj) { - const size_t nCount=GetMarkedObjectCount(); + const size_t nCount=GetMarkedObjectList().GetMarkCount(); if (nCount==0) return; @@ -437,7 +437,7 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj) void SdrEditView::ReverseOrderOfMarked() { SortMarkedObjects(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); if (nMarkCount<=0) return; @@ -488,7 +488,7 @@ void SdrEditView::ReverseOrderOfMarked() void SdrEditView::ImpCheckToTopBtmPossible() { - const size_t nCount=GetMarkedObjectCount(); + const size_t nCount=GetMarkedObjectList().GetMarkCount(); if (nCount==0) return; if (nCount==1) @@ -773,7 +773,7 @@ typedef std::vector<ImpDistributeEntry> ImpDistributeEntryList; void SdrEditView::DistributeMarkedObjects(sal_uInt16 SlotID) { - const size_t nMark(GetMarkedObjectCount()); + const size_t nMark(GetMarkedObjectList().GetMarkCount()); if(nMark <= 2) return; @@ -1021,7 +1021,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode) ConvertMarkedToPathObj(true); OSL_ENSURE(AreObjectsMarked(), "no more objects selected after preparations (!)"); - for(size_t a=0; a<GetMarkedObjectCount(); ++a) + for(size_t a=0; a<GetMarkedObjectList().GetMarkCount(); ++a) { SdrMark* pM = GetMarkedObjectList().GetMark(a); SdrObject* pObj = pM->GetMarkedSdrObj(); @@ -1268,7 +1268,7 @@ void SdrEditView::CombineMarkedTextObjects() MarkListHasChanged(); AdjustMarkHdl(); - if ( GetMarkedObjectCount() > 1 ) + if ( GetMarkedObjectList().GetMarkCount() > 1 ) { rtl::Reference<SdrRectObj> pReplacement = new SdrRectObj( getSdrModelFromSdrView(), SdrObjKind::Text ); pReplacement->SetOutlinerParaObject( rDrawOutliner.CreateParaObject() ); @@ -1333,7 +1333,7 @@ void SdrEditView::CombineMarkedObjects(bool bNoPolyPoly) SdrPageView* pInsPV = nullptr; const SdrObject* pAttrObj = nullptr; - for(size_t a = GetMarkedObjectCount(); a; ) + for(size_t a = GetMarkedObjectList().GetMarkCount(); a; ) { --a; SdrMark* pM = GetMarkedObjectList().GetMark(a); @@ -1737,7 +1737,7 @@ void SdrEditView::DismantleMarkedObjects(bool bMakeLines) SdrObjList* pOL0=nullptr; const bool bWasLocked = GetModel().isLocked(); GetModel().setLock(true); - for (size_t nm=GetMarkedObjectCount(); nm>0;) { + for (size_t nm=GetMarkedObjectList().GetMarkCount(); nm>0;) { --nm; SdrMark* pM=GetMarkedObjectList().GetMark(nm); SdrObject* pObj=pM->GetMarkedSdrObj(); @@ -1791,7 +1791,7 @@ void SdrEditView::GroupMarked() { BegUndo(SvxResId(STR_EditGroup),GetDescriptionOfMarkedObjects(),SdrRepeatFunc::Group); - for(size_t nm = GetMarkedObjectCount(); nm>0; ) + for(size_t nm = GetMarkedObjectList().GetMarkCount(); nm>0; ) { // add UndoActions for all affected objects --nm; @@ -1819,7 +1819,7 @@ void SdrEditView::GroupMarked() // the group object is the last one in the list. size_t nInsPos=pSrcLst->GetObjCount(); bool bNeedInsPos=true; - for (size_t nm=GetMarkedObjectCount(); nm>0;) + for (size_t nm=GetMarkedObjectList().GetMarkCount(); nm>0;) { --nm; SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -1892,7 +1892,7 @@ void SdrEditView::UnGroupMarked() OUString aName1; OUString aName; bool bNameOk=false; - for (size_t nm=GetMarkedObjectCount(); nm>0;) { + for (size_t nm=GetMarkedObjectList().GetMarkCount(); nm>0;) { --nm; SdrMark* pM=GetMarkedObjectList().GetMark(nm); SdrObject* pGrp=pM->GetMarkedSdrObj(); @@ -2034,7 +2034,7 @@ void SdrEditView::ImpConvertTo(bool bPath, bool bLineToArea) if (!AreObjectsMarked()) return; bool bMrkChg = false; - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); TranslateId pDscrID; if(bLineToArea) { @@ -2117,7 +2117,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) SortMarkedObjects(); SdrMarkList aForTheDescription; SdrMarkList aNewMarked; - for (size_t nm =GetMarkedObjectCount(); nm > 0; ) + for (size_t nm =GetMarkedObjectList().GetMarkCount(); nm > 0; ) { // create Undo objects for all new objects // check for cancellation between the metafiles diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 928d235b2296..6422656791bd 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2320,7 +2320,7 @@ SvtScriptType SdrObjEditView::GetScriptType() const } else { - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); for (size_t i = 0; i < nMarkCount; ++i) { @@ -2366,7 +2366,7 @@ void SdrObjEditView::GetAttributes(SfxItemSet& rTargetSet, bool bOnlyHardAttr) c rTargetSet.Put(mpTextEditOutlinerView->GetAttribs(), false); } - if (GetMarkedObjectCount() == 1 && GetMarkedObjectByIndex(0) == pText.get()) + if (GetMarkedObjectList().GetMarkCount() == 1 && GetMarkedObjectByIndex(0) == pText.get()) { MergeNotPersistAttrFromMarked(rTargetSet); } @@ -2495,7 +2495,8 @@ bool SdrObjEditView::SetAttributes(const SfxItemSet& rSet, bool bReplaceAll) pTextEditObj->SetMergedItemSetAndBroadcast(aSet, bReplaceAll); - if (GetMarkedObjectCount() == 1 && GetMarkedObjectByIndex(0) == pTextEditObj.get()) + if (GetMarkedObjectList().GetMarkCount() == 1 + && GetMarkedObjectByIndex(0) == pTextEditObj.get()) { SetNotPersistAttrToMarked(aSet); } diff --git a/svx/source/svdraw/svdglev.cxx b/svx/source/svdraw/svdglev.cxx index 1904af079748..6075cbc84c9d 100644 --- a/svx/source/svdraw/svdglev.cxx +++ b/svx/source/svdraw/svdglev.cxx @@ -41,7 +41,7 @@ SdrGlueEditView::~SdrGlueEditView() void SdrGlueEditView::ImpDoMarkedGluePoints(PGlueDoFunc pDoFunc, bool bConst, const void* p1, const void* p2, const void* p3, const void* p4) { - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); SdrObject* pObj=pM->GetMarkedSdrObj(); @@ -228,7 +228,7 @@ void SdrGlueEditView::DeleteMarkedGluePoints() if( bUndo ) BegUndo(SvxResId(STR_EditDelete),GetDescriptionOfMarkedGluePoints(),SdrRepeatFunc::Delete); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -270,7 +270,7 @@ void SdrGlueEditView::ImpCopyMarkedGluePoints() if( bUndo ) BegUndo(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -311,7 +311,7 @@ void SdrGlueEditView::ImpCopyMarkedGluePoints() void SdrGlueEditView::ImpTransformMarkedGluePoints(PGlueTrFunc pTrFunc, const void* p1, const void* p2, const void* p3, const void* p4) { - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); SdrObject* pObj=pM->GetMarkedSdrObj(); diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index e1bbf8f6daee..62a001e19bf1 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -238,7 +238,7 @@ void SdrMarkView::ModelHasChanged() void SdrMarkView::modelHasChangedLOKit() { - if (GetMarkedObjectCount() <= 0) + if (GetMarkedObjectList().GetMarkCount() <= 0) return; //TODO: Is MarkedObjRect valid at this point? @@ -601,7 +601,7 @@ void SdrMarkView::showMarkHandles() bool SdrMarkView::ImpIsFrameHandles() const { - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); bool bFrmHdl=nMarkCount>static_cast<size_t>(mnFrameHandlesLimit) || mbForceFrameHandles; bool bStdDrag=meDragMode==SdrDragMode::Move; if (nMarkCount==1 && bStdDrag && bFrmHdl) @@ -902,7 +902,7 @@ void SdrMarkView::SetMarkHandlesForLOKit(tools::Rectangle const & rRect, const S SdrPageView* pPageView = GetSdrPageView(); - if (GetMarkedObjectCount()) + if (GetMarkedObjectList().GetMarkCount()) { SdrMark* pM = GetMarkedObjectList().GetMark(0); SdrObject* pO = pM->GetMarkedSdrObj(); @@ -1271,7 +1271,7 @@ void SdrMarkView::SetMarkHandles(SfxViewShell* pOtherShell) // There can be multiple mark views, but we're only interested in the one that has a window associated. const bool bTiledRendering = comphelper::LibreOfficeKit::isActive() && GetFirstOutputDevice() && GetFirstOutputDevice()->GetOutDevType() == OUTDEV_WINDOW; - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); bool bStdDrag=meDragMode==SdrDragMode::Move; bool bSingleTextObjMark=false; bool bLimitedRotation(false); @@ -1619,7 +1619,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode) case SdrDragMode::Transparence: { // add interactive transparency handle - const size_t nMarkCount = GetMarkedObjectCount(); + const size_t nMarkCount = GetMarkedObjectList().GetMarkCount(); if(nMarkCount == 1) { SdrObject* pObj = GetMarkedObjectByIndex(0); @@ -1681,7 +1681,7 @@ void SdrMarkView::AddDragModeHdl(SdrDragMode eMode) case SdrDragMode::Gradient: { // add interactive gradient handle - const size_t nMarkCount = GetMarkedObjectCount(); + const size_t nMarkCount = GetMarkedObjectList().GetMarkCount(); if(nMarkCount == 1) { SdrObject* pObj = GetMarkedObjectByIndex(0); @@ -1905,7 +1905,7 @@ SfxViewShell* SdrMarkView::GetSfxViewShell() const void SdrMarkView::CheckMarked() { - for (size_t nm=GetMarkedObjectCount(); nm>0;) { + for (size_t nm=GetMarkedObjectList().GetMarkCount(); nm>0;) { --nm; SdrMark* pM = GetMarkedObjectList().GetMark(nm); SdrObject* pObj = pM->GetMarkedSdrObj(); @@ -1990,7 +1990,7 @@ bool SdrMarkView::IsMarkedObjHit(const Point& rPnt, short nTol) const { bool bRet=false; nTol=ImpGetHitTolLogic(nTol,nullptr); - for (size_t nm=0; nm<GetMarkedObjectCount() && !bRet; ++nm) { + for (size_t nm=0; nm<GetMarkedObjectList().GetMarkCount() && !bRet; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); bRet = nullptr != CheckSingleSdrObjectHit(rPnt,sal_uInt16(nTol),pM->GetMarkedSdrObj(),pM->GetPageView(),SdrSearchOptions::NONE,nullptr); } @@ -2029,7 +2029,7 @@ bool SdrMarkView::MarkNextObj(bool bPrev) } SortMarkedObjects(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); size_t nChgMarkNum = SAL_MAX_SIZE; // number of the MarkEntry we want to replace size_t nSearchObjNum = bPrev ? 0 : SAL_MAX_SIZE; if (nMarkCount!=0) { @@ -2083,7 +2083,7 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev) size_t nTopMarkHit=0; size_t nBtmMarkHit=0; // find topmost of the selected objects that is hit by rPnt - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=nMarkCount; nm>0 && pTopMarkHit==nullptr;) { --nm; SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -2508,7 +2508,7 @@ SdrObject* SdrMarkView::PickObj(const Point& rPnt, short nTol, SdrPageView*& rpP pPV=static_cast<const SdrObjEditView*>(this)->GetTextEditPageView(); } if (bMarked) { - const size_t nMrkCnt=GetMarkedObjectCount(); + const size_t nMrkCnt=GetMarkedObjectList().GetMarkCount(); size_t nMrkNum=nMrkCnt; while (pHitObj==nullptr && nMrkNum>0) { nMrkNum--; @@ -2595,7 +2595,7 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie const bool bBoundCheckOn2ndPass(nOptions & SdrSearchOptions::PASS2BOUND); rpObj=nullptr; rpPV=nullptr; - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nMarkNum=nMarkCount; nMarkNum>0;) { --nMarkNum; SdrMark* pM=GetMarkedObjectList().GetMark(nMarkNum); @@ -2631,7 +2631,7 @@ bool SdrMarkView::PickMarkedObj(const Point& rPnt, SdrObject*& rpObj, SdrPageVie void SdrMarkView::UnmarkAllObj(SdrPageView const * pPV) { - if (GetMarkedObjectCount()==0) + if (GetMarkedObjectList().GetMarkCount()==0) return; BrkAction(); @@ -2670,7 +2670,7 @@ void SdrMarkView::MarkAllObj(SdrPageView* pPV) } } - if(GetMarkedObjectCount()) + if(GetMarkedObjectList().GetMarkCount()) { AdjustMarkHdl(); } @@ -2687,7 +2687,7 @@ void SdrMarkView::AdjustMarkHdl(SfxViewShell* pOtherShell) tools::Rectangle SdrMarkView::GetMarkedObjBoundRect() const { tools::Rectangle aRect; - for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) { + for (size_t nm=0; nm<GetMarkedObjectList().GetMarkCount(); ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); SdrObject* pO=pM->GetMarkedSdrObj(); tools::Rectangle aR1(pO->GetCurrentBoundRect()); @@ -2703,7 +2703,7 @@ const tools::Rectangle& SdrMarkView::GetMarkedObjRect() const if (mbMarkedObjRectDirty) { const_cast<SdrMarkView*>(this)->mbMarkedObjRectDirty=false; tools::Rectangle aRect; - for (size_t nm=0; nm<GetMarkedObjectCount(); ++nm) { + for (size_t nm=0; nm<GetMarkedObjectList().GetMarkCount(); ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); SdrObject* pO = pM->GetMarkedSdrObj(); if (!pO) @@ -2754,7 +2754,7 @@ void SdrMarkView::EnterMarkedGroup() return; bool bEnter=false; - for (size_t nm = GetMarkedObjectCount(); nm > 0 && !bEnter;) + for (size_t nm = GetMarkedObjectList().GetMarkCount(); nm > 0 && !bEnter;) { --nm; SdrMark* pM=GetMarkedObjectList().GetMark(nm); @@ -2778,7 +2778,7 @@ void SdrMarkView::MarkListHasChanged() mbMarkedObjRectDirty=true; mbMarkedPointsRectsDirty=true; bool bOneEdgeMarked=false; - if (GetMarkedObjectCount()==1) { + if (GetMarkedObjectList().GetMarkCount()==1) { const SdrObject* pObj=GetMarkedObjectByIndex(0); if (pObj->GetObjInventor()==SdrInventor::Default) { bOneEdgeMarked = pObj->GetObjIdentifier() == SdrObjKind::Edge; diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx index 0dfc9c4bb79f..03c239ac2a54 100644 --- a/svx/source/svdraw/svdmrkv1.cxx +++ b/svx/source/svdraw/svdmrkv1.cxx @@ -31,7 +31,7 @@ bool SdrMarkView::HasMarkablePoints() const ForceUndirtyMrkPnt(); bool bRet=false; if (!ImpIsFrameHandles()) { - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); if (nMarkCount<=static_cast<size_t>(mnFrameHandlesLimit)) { for (size_t nMarkNum=0; nMarkNum<nMarkCount && !bRet; ++nMarkNum) { const SdrMark* pM=GetMarkedObjectList().GetMark(nMarkNum); @@ -48,7 +48,7 @@ sal_Int32 SdrMarkView::GetMarkablePointCount() const ForceUndirtyMrkPnt(); sal_Int32 nCount=0; if (!ImpIsFrameHandles()) { - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); if (nMarkCount<=static_cast<size_t>(mnFrameHandlesLimit)) { for (size_t nMarkNum=0; nMarkNum<nMarkCount; ++nMarkNum) { const SdrMark* pM=GetMarkedObjectList().GetMark(nMarkNum); @@ -67,7 +67,7 @@ bool SdrMarkView::HasMarkedPoints() const ForceUndirtyMrkPnt(); bool bRet=false; if (!ImpIsFrameHandles()) { - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); if (nMarkCount<=static_cast<size_t>(mnFrameHandlesLimit)) { for (size_t nMarkNum=0; nMarkNum<nMarkCount && !bRet; ++nMarkNum) { const SdrMark* pM=GetMarkedObjectList().GetMark(nMarkNum); @@ -288,7 +288,7 @@ void SdrMarkView::ImpSetPointsRects() const void SdrMarkView::UndirtyMrkPnt() const { bool bChg=false; - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nMarkNum=0; nMarkNum<nMarkCount; ++nMarkNum) { SdrMark* pM=GetMarkedObjectList().GetMark(nMarkNum); const SdrObject* pObj=pM->GetMarkedSdrObj(); @@ -355,7 +355,7 @@ bool SdrMarkView::HasMarkableGluePoints() const bool bRet=false; if (IsGluePointEditMode()) { ForceUndirtyMrkPnt(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nMarkNum=0; nMarkNum<nMarkCount && !bRet; ++nMarkNum) { const SdrMark* pM=GetMarkedObjectList().GetMark(nMarkNum); const SdrObject* pObj=pM->GetMarkedSdrObj(); @@ -381,7 +381,7 @@ bool SdrMarkView::HasMarkedGluePoints() const { ForceUndirtyMrkPnt(); bool bRet=false; - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nMarkNum=0; nMarkNum<nMarkCount && !bRet; ++nMarkNum) { const SdrMark* pM=GetMarkedObjectList().GetMark(nMarkNum); const SdrUShortCont& rPts = pM->GetMarkedGluePoints(); @@ -396,7 +396,7 @@ bool SdrMarkView::MarkGluePoints(const tools::Rectangle* pRect, bool bUnmark) ForceUndirtyMrkPnt(); bool bChgd=false; SortMarkedObjects(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nMarkNum=0; nMarkNum<nMarkCount; ++nMarkNum) { SdrMark* pM=GetMarkedObjectList().GetMark(nMarkNum); const SdrObject* pObj=pM->GetMarkedSdrObj(); @@ -448,7 +448,7 @@ bool SdrMarkView::PickGluePoint(const Point& rPnt, SdrObject*& rpObj, sal_uInt16 if (pOut==nullptr) pOut=GetFirstOutputDevice(); if (pOut==nullptr) return false; SortMarkedObjects(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); size_t nMarkNum=nMarkCount; while (nMarkNum>0) { nMarkNum--; diff --git a/svx/source/svdraw/svdpoev.cxx b/svx/source/svdraw/svdpoev.cxx index ea71bbb06b67..8cd84dfb4df0 100644 --- a/svx/source/svdraw/svdpoev.cxx +++ b/svx/source/svdraw/svdpoev.cxx @@ -60,7 +60,7 @@ SdrPolyEditView::~SdrPolyEditView() void SdrPolyEditView::ImpCheckPolyPossibilities() { ImpResetPolyPossibilityFlags(); - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); if(!nMarkCount || ImpIsFrameHandles()) return; @@ -197,7 +197,7 @@ void SdrPolyEditView::SetMarkedPointsSmooth(SdrPathSmoothKind eKind) const bool bUndo = IsUndoEnabled(); if( bUndo ) BegUndo(SvxResId(STR_EditSetPointsSmooth), GetDescriptionOfMarkedPoints()); - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); for(size_t nMarkNum(nMarkCount); nMarkNum > 0;) { @@ -231,7 +231,7 @@ void SdrPolyEditView::SetMarkedSegmentsKind(SdrPathSegmentKind eKind) const bool bUndo = IsUndoEnabled(); if( bUndo ) BegUndo(SvxResId(STR_EditSetSegmentsKind), GetDescriptionOfMarkedPoints()); - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); for(size_t nMarkNum=nMarkCount; nMarkNum > 0;) { @@ -290,7 +290,7 @@ void SdrPolyEditView::DeleteMarkedPoints() BrkAction(); SortMarkedObjects(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); const bool bUndo = IsUndoEnabled(); if( bUndo ) @@ -338,7 +338,7 @@ void SdrPolyEditView::RipUpAtMarkedPoints() return; SortMarkedObjects(); - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); const bool bUndo = IsUndoEnabled(); if( bUndo ) @@ -410,7 +410,7 @@ void SdrPolyEditView::RipUpAtMarkedPoints() bool SdrPolyEditView::IsRipUpAtMarkedPointsPossible() const { bool bRetval(false); - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); for(size_t a = 0; a < nMarkCount; ++a) { @@ -450,7 +450,7 @@ bool SdrPolyEditView::IsRipUpAtMarkedPointsPossible() const bool SdrPolyEditView::IsOpenCloseMarkedObjectsPossible() const { bool bRetval(false); - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); for(size_t a = 0; a < nMarkCount; ++a) { @@ -481,7 +481,7 @@ SdrObjClosedKind SdrPolyEditView::GetMarkedObjectsClosedState() const { bool bOpen(false); bool bClosed(false); - const size_t nMarkCount(GetMarkedObjectCount()); + const size_t nMarkCount(GetMarkedObjectList().GetMarkCount()); for(size_t a = 0; !(bOpen && bClosed) && a < nMarkCount; ++a) { @@ -519,7 +519,7 @@ void SdrPolyEditView::ImpTransformMarkedPoints(PPolyTrFunc pTrFunc, const void* { const bool bUndo = IsUndoEnabled(); - const size_t nMarkCount=GetMarkedObjectCount(); + const size_t nMarkCount=GetMarkedObjectList().GetMarkCount(); for (size_t nm=0; nm<nMarkCount; ++nm) { SdrMark* pM=GetMarkedObjectList().GetMark(nm); diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx index bed1294645a2..c8bf0484502d 100644 --- a/svx/source/svdraw/svdview.cxx +++ b/svx/source/svdraw/svdview.cxx @@ -856,10 +856,10 @@ bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt) bRet=MarkNextObj(aLogicPos, mnHitTolLog, rVEvt.mbMarkPrev); } else { SortMarkedObjects(); - const size_t nCount0=GetMarkedObjectCount(); + const size_t nCount0=GetMarkedObjectList().GetMarkCount(); bRet=MarkObj(aLogicPos, mnHitTolLog, rVEvt.mbAddMark); SortMarkedObjects(); - const size_t nCount1=GetMarkedObjectCount(); + const size_t nCount1=GetMarkedObjectList().GetMarkCount(); bUnmark=nCount1<nCount0; } if (!bUnmark) { @@ -1077,7 +1077,7 @@ PointerStyle SdrView::GetPreferredPointer(const Point& rMousePos, const OutputDe // are 3D objects selected? bool b3DObjSelected = false; - for (size_t a=0; !b3DObjSelected && a<GetMarkedObjectCount(); ++a) { + for (size_t a=0; !b3DObjSelected && a<GetMarkedObjectList().GetMarkCount(); ++a) { SdrObject* pObj = GetMarkedObjectByIndex(a); if(DynCastE3dObject(pObj)) b3DObjSelected = true; @@ -1307,7 +1307,7 @@ SdrViewContext SdrView::GetContext() const if( IsGluePointEditMode() ) return SdrViewContext::GluePointEdit; - const size_t nMarkCount = GetMarkedObjectCount(); + const size_t nMarkCount = GetMarkedObjectList().GetMarkCount(); if( HasMarkablePoints() && !IsFrameHandles() ) { @@ -1320,7 +1320,7 @@ SdrViewContext SdrView::GetContext() const return SdrViewContext::PointEdit; } - if( GetMarkedObjectCount() ) + if( GetMarkedObjectList().GetMarkCount() ) { bool bGraf = true, bMedia = true, bTable = true; diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx index 4d5b6fa476df..025ada793041 100644 --- a/svx/source/svdraw/svdxcgv.cxx +++ b/svx/source/svdraw/svdxcgv.cxx @@ -432,7 +432,7 @@ BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool bNoVDevIfOneBmpMarked, const if( AreObjectsMarked() ) { - if(1 == GetMarkedObjectCount()) + if(1 == GetMarkedObjectList().GetMarkCount()) { if(bNoVDevIfOneBmpMarked) { @@ -530,7 +530,7 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile(bool bNoVDevIfOneMtfMarked) co if( bNoVDevIfOneMtfMarked ) { SdrObject* pGrafObjTmp = GetMarkedObjectByIndex( 0 ); - SdrGrafObj* pGrafObj = ( GetMarkedObjectCount() ==1 ) ? dynamic_cast<SdrGrafObj*>( pGrafObjTmp ) : nullptr; + SdrGrafObj* pGrafObj = ( GetMarkedObjectList().GetMarkCount() ==1 ) ? dynamic_cast<SdrGrafObj*>( pGrafObjTmp ) : nullptr; if( pGrafObj ) { @@ -584,7 +584,7 @@ Graphic SdrExchangeView::GetAllMarkedGraphic() const if( AreObjectsMarked() ) { - if( ( 1 == GetMarkedObjectCount() ) && GetMarkedObjectList().GetMark( 0 ) ) + if( ( 1 == GetMarkedObjectList().GetMarkCount() ) && GetMarkedObjectList().GetMark( 0 ) ) aRet = SdrExchangeView::GetObjGraphic(*GetMarkedObjectByIndex(0)); else aRet = GetMarkedObjMetaFile(); @@ -686,7 +686,7 @@ Graphic SdrExchangeView::GetObjGraphic(const SdrObject& rSdrObject, bool bSVG) const SdrLayerAdmin& rLayerAdmin = GetModel().GetLayerAdmin(); const SdrLayerID nControlLayerId = rLayerAdmin.GetLayerID( rLayerAdmin.GetControlLayerName() ); - for( size_t n = 0, nCount = GetMarkedObjectCount(); n < nCount; ++n ) + for( size_t n = 0, nCount = GetMarkedObjectList().GetMarkCount(); n < nCount; ++n ) { SdrMark* pMark = GetMarkedObjectList().GetMark( n ); 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()); commit be76f48d602e5d0a1091973b2df7f20cb7f1a545 Author: Xisco Fauli <[email protected]> AuthorDate: Wed May 29 12:41:42 2024 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Wed May 29 17:06:33 2024 +0200 svx: TryToFindMarkedObject -> GetMarkedObjectList().FindObject In order to reduce number of calls to GetMarkedObjectList() later on Change-Id: If05f5630e9413c162821370532f36598fc2e0341 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168212 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Xisco Fauli <[email protected]> diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx index 8838005e3d21..2c1ee0d88f5d 100644 --- a/include/svx/svdmrkv.hxx +++ b/include/svx/svdmrkv.hxx @@ -259,7 +259,6 @@ public: // all available const methods for read access to selection const SdrMarkList& GetMarkedObjectList() const { return maSdrViewSelection.GetMarkedObjectList(); } // returns SAL_MAX_SIZE if not found - size_t TryToFindMarkedObject(const SdrObject* pObj) const { return GetMarkedObjectList().FindObject(pObj); } SdrPageView* GetSdrPageViewOfMarkedByIndex(size_t nNum) const { return GetMarkedObjectList().GetMark(nNum)->GetPageView(); } SdrObject* GetMarkedObjectByIndex(size_t nNum) const { return GetMarkedObjectList().GetMark(nNum)->GetMarkedSdrObj(); } size_t GetMarkedObjectCount() const { return GetMarkedObjectList().GetMarkCount(); } diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx index f88f30ec30b2..47f612dcc6bf 100644 --- a/svx/source/svdraw/svdedtv2.cxx +++ b/svx/source/svdraw/svdedtv2.cxx @@ -269,7 +269,7 @@ void SdrEditView::PutMarkedInFrontOfObj(const SdrObject* pRefObj) { // Make "in front of the object" work, even if the // selected objects are already in front of the other object - const size_t nRefMark=TryToFindMarkedObject(pRefObj); + const size_t nRefMark=GetMarkedObjectList().FindObject(pRefObj); SdrMark aRefMark; if (nRefMark!=SAL_MAX_SIZE) { @@ -370,7 +370,7 @@ void SdrEditView::PutMarkedBehindObj(const SdrObject* pRefObj) { // Make "behind the object" work, even if the // selected objects are already behind the other object - const size_t nRefMark=TryToFindMarkedObject(pRefObj); + const size_t nRefMark=GetMarkedObjectList().FindObject(pRefObj); SdrMark aRefMark; if (nRefMark!=SAL_MAX_SIZE) { @@ -2215,7 +2215,7 @@ void SdrEditView::DoImportMarkedMtf(SvdProgressInfo *pProgrInfo) AddUndo(GetModel().GetSdrUndoFactory().CreateUndoDeleteObject(*pObj)); // remove object from selection and delete - GetMarkedObjectListWriteAccess().DeleteMark(TryToFindMarkedObject(pObj)); + GetMarkedObjectListWriteAccess().DeleteMark(GetMarkedObjectList().FindObject(pObj)); pOL->RemoveObject(nInsPos-1); } } diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 5aa16c456d08..e1bbf8f6daee 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -2052,7 +2052,7 @@ bool SdrMarkView::MarkNextObj(bool bPrev) SdrObject* pSearchObj = pSearchObjList->GetObjectForNavigationPosition(nSearchObjNum); if (IsObjMarkable(pSearchObj,pPageView)) { - if (TryToFindMarkedObject(pSearchObj)==SAL_MAX_SIZE) + if (GetMarkedObjectList().FindObject(pSearchObj)==SAL_MAX_SIZE) { pMarkObj=pSearchObj; } @@ -2165,7 +2165,7 @@ bool SdrMarkView::MarkNextObj(const Point& rPnt, short nTol, bool bPrev) if (CheckSingleSdrObjectHit(rPnt,sal_uInt16(nTol),pObj,pPV,SdrSearchOptions::TESTMARKABLE,nullptr)) { - if (TryToFindMarkedObject(pObj)==SAL_MAX_SIZE) { + if (GetMarkedObjectList().FindObject(pObj)==SAL_MAX_SIZE) { pFndObj=pObj; } else { // TODO: for performance reasons set on to Top or Btm, if necessary @@ -2205,7 +2205,7 @@ void SdrMarkView::MarkObj(const tools::Rectangle& rRect, bool bUnmark) bFnd=true; } } else { - const size_t nPos=TryToFindMarkedObject(pObj.get()); + const size_t nPos=GetMarkedObjectList().FindObject(pObj.get()); if (nPos!=SAL_MAX_SIZE) { GetMarkedObjectListWriteAccess().DeleteMark(nPos); @@ -2255,7 +2255,7 @@ void collectUIInformation(const SdrObject* pObj) } else { - const size_t nPos=TryToFindMarkedObject(pObj); + const size_t nPos=GetMarkedObjectList().FindObject(pObj); if (nPos!=SAL_MAX_SIZE) { GetMarkedObjectListWriteAccess().DeleteMark(nPos); @@ -2272,7 +2272,7 @@ void collectUIInformation(const SdrObject* pObj) bool SdrMarkView::IsObjMarked(SdrObject const * pObj) const { - return TryToFindMarkedObject(pObj)!=SAL_MAX_SIZE; + return GetMarkedObjectList().FindObject(pObj)!=SAL_MAX_SIZE; } sal_uInt16 SdrMarkView::GetMarkHdlSizePixel() const diff --git a/svx/source/svdraw/svdmrkv1.cxx b/svx/source/svdraw/svdmrkv1.cxx index 62d0e0f0ba4e..0dfc9c4bb79f 100644 --- a/svx/source/svdraw/svdmrkv1.cxx +++ b/svx/source/svdraw/svdmrkv1.cxx @@ -103,7 +103,7 @@ bool SdrMarkView::ImpMarkPoint(SdrHdl* pHdl, SdrMark* pMark, bool bUnmark) if (pMark==nullptr) { - const size_t nMarkNum=TryToFindMarkedObject(pObj); + const size_t nMarkNum=GetMarkedObjectList().FindObject(pObj); if (nMarkNum==SAL_MAX_SIZE) return false; pMark=GetMarkedObjectList().GetMark(nMarkNum); @@ -170,7 +170,7 @@ bool SdrMarkView::MarkPoint(SdrHdl& rHdl, bool bUnmark) bool bRet=false; const SdrObject* pObj=rHdl.GetObj(); if (IsPointMarkable(rHdl) && rHdl.IsSelected()==bUnmark) { - const size_t nMarkNum=TryToFindMarkedObject(pObj); + const size_t nMarkNum=GetMarkedObjectList().FindObject(pObj); if (nMarkNum!=SAL_MAX_SIZE) { SdrMark* pM=GetMarkedObjectList().GetMark(nMarkNum); if (ImpMarkPoint(&rHdl,pM,bUnmark)) { @@ -200,7 +200,7 @@ bool SdrMarkView::MarkPoints(const tools::Rectangle* pRect, bool bUnmark) const SdrObject* pObj=pHdl->GetObj(); const SdrPageView* pPV=pHdl->GetPageView(); if (pObj!=pObj0 || pPV!=pPV0 || pM==nullptr) { // This section is for optimization, - const size_t nMarkNum=TryToFindMarkedObject(pObj); // so ImpMarkPoint() doesn't always + const size_t nMarkNum=GetMarkedObjectList().FindObject(pObj); // so ImpMarkPoint() doesn't always if (nMarkNum!=SAL_MAX_SIZE) { // have to search the object in the MarkList. pM=GetMarkedObjectList().GetMark(nMarkNum); pObj0=pObj; @@ -482,7 +482,7 @@ bool SdrMarkView::MarkGluePoint(const SdrObject* pObj, sal_uInt16 nId, bool bUnm ForceUndirtyMrkPnt(); bool bChgd=false; if (pObj!=nullptr) { - const size_t nMarkPos=TryToFindMarkedObject(pObj); + const size_t nMarkPos=GetMarkedObjectList().FindObject(pObj); if (nMarkPos!=SAL_MAX_SIZE) { SdrMark* pM=GetMarkedObjectList().GetMark(nMarkPos); SdrUShortCont& rPts = pM->GetMarkedGluePoints(); @@ -510,7 +510,7 @@ bool SdrMarkView::IsGluePointMarked(const SdrObject* pObj, sal_uInt16 nId) const { ForceUndirtyMrkPnt(); bool bRet=false; - const size_t nPos=TryToFindMarkedObject(pObj); // casting to NonConst + const size_t nPos=GetMarkedObjectList().FindObject(pObj); // casting to NonConst if (nPos!=SAL_MAX_SIZE) { const SdrMark* pM=GetMarkedObjectList().GetMark(nPos); const SdrUShortCont& rPts = pM->GetMarkedGluePoints(); diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx index 2cf5c33e26b6..21607afa8a74 100644 --- a/svx/source/unodraw/unoshap2.cxx +++ b/svx/source/unodraw/unoshap2.cxx @@ -262,7 +262,7 @@ void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xS SdrViewIter::ForAllViews( pSdrShape, [&pSdrShape] (SdrView* pView) { - if(SAL_MAX_SIZE != pView->TryToFindMarkedObject(pSdrShape)) + if(SAL_MAX_SIZE != pView->GetMarkedObjectList().FindObject(pSdrShape)) { pView->MarkObj(pSdrShape, pView->GetSdrPageView(), true); }
