basctl/source/basicide/baside3.cxx                       |    8 +++---
 basctl/source/dlged/dlged.cxx                            |    4 +--
 basctl/source/dlged/dlgedfunc.cxx                        |   12 ++++-----
 chart2/source/controller/main/ChartController_Tools.cxx  |    2 -
 chart2/source/controller/main/ChartController_Window.cxx |    2 -
 chart2/source/controller/main/ShapeController.cxx        |    6 ++--
 cui/source/tabpages/tpbitmap.cxx                         |    2 -
 include/svx/svdmrkv.hxx                                  |    1 
 reportdesign/source/ui/report/ReportSection.cxx          |    4 +--
 reportdesign/source/ui/report/SectionView.cxx            |    2 -
 reportdesign/source/ui/report/ViewsWindow.cxx            |   10 +++----
 reportdesign/source/ui/report/dlgedfunc.cxx              |   12 ++++-----
 sc/qa/unit/anchor.cxx                                    |    2 -
 sc/qa/unit/scshapetest.cxx                               |    2 -
 sc/qa/unit/tiledrendering/tiledrendering.cxx             |    2 -
 sc/qa/unit/uicalc/uicalc2.cxx                            |    3 +-
 sc/source/ui/drawfunc/drawsh.cxx                         |   12 ++++-----
 sc/source/ui/drawfunc/drawsh2.cxx                        |    4 +--
 sc/source/ui/drawfunc/drawsh5.cxx                        |    4 +--
 sc/source/ui/drawfunc/fuconstr.cxx                       |    8 +++---
 sc/source/ui/drawfunc/fudraw.cxx                         |   20 +++++++--------
 sc/source/ui/drawfunc/fupoor.cxx                         |    2 -
 sc/source/ui/drawfunc/fusel.cxx                          |    4 +--
 sc/source/ui/drawfunc/futext.cxx                         |   10 +++----
 sc/source/ui/view/drawvie3.cxx                           |    6 ++--
 sc/source/ui/view/drawvie4.cxx                           |    2 -
 sc/source/ui/view/drawview.cxx                           |    2 -
 sc/source/ui/view/gridwin.cxx                            |    4 +--
 sc/source/ui/view/gridwin3.cxx                           |    8 +++---
 sc/source/ui/view/tabvwsh2.cxx                           |    4 +--
 sc/source/ui/view/tabvwsh4.cxx                           |    2 -
 sc/source/ui/view/tabvwshb.cxx                           |    2 -
 sd/source/ui/dlg/tpaction.cxx                            |    2 -
 sd/source/ui/func/fuconstr.cxx                           |    4 +--
 sd/source/ui/func/fucopy.cxx                             |    2 -
 sd/source/ui/func/fudraw.cxx                             |   12 ++++-----
 sd/source/ui/func/fuediglu.cxx                           |    2 -
 sd/source/ui/func/fuformatpaintbrush.cxx                 |    2 -
 sd/source/ui/func/fuinsert.cxx                           |    2 -
 sd/source/ui/func/fuline.cxx                             |    2 -
 sd/source/ui/func/fupoor.cxx                             |    4 +--
 sd/source/ui/func/fusel.cxx                              |    2 -
 sd/source/ui/func/futempl.cxx                            |    2 -
 sd/source/ui/func/futext.cxx                             |    8 +++---
 sd/source/ui/func/futhes.cxx                             |    2 -
 sd/source/ui/func/futransf.cxx                           |    2 -
 sd/source/ui/view/Outliner.cxx                           |    4 +--
 sd/source/ui/view/drbezob.cxx                            |    2 -
 sd/source/ui/view/drviews1.cxx                           |    4 +--
 sd/source/ui/view/drviews2.cxx                           |    2 -
 sd/source/ui/view/drviews3.cxx                           |    4 +--
 sd/source/ui/view/drviews4.cxx                           |    6 ++--
 sd/source/ui/view/drviews7.cxx                           |    6 ++--
 sd/source/ui/view/drviews8.cxx                           |    2 -
 sd/source/ui/view/drviews9.cxx                           |    2 -
 sd/source/ui/view/drviewsa.cxx                           |    2 -
 sd/source/ui/view/drviewse.cxx                           |    6 ++--
 sd/source/ui/view/drviewsf.cxx                           |   10 +++----
 sd/source/ui/view/sdview2.cxx                            |    6 ++--
 sd/source/ui/view/sdview5.cxx                            |    2 -
 sd/source/ui/view/unmodpg.cxx                            |    4 +--
 sd/source/ui/view/viewshe3.cxx                           |    2 -
 svx/source/dialog/graphctl.cxx                           |    4 +--
 svx/source/engine3d/view3d.cxx                           |    6 ++--
 svx/source/svdraw/svddrgv.cxx                            |    2 -
 svx/source/svdraw/svdedtv1.cxx                           |    6 ++--
 svx/source/svdraw/svdedtv2.cxx                           |    9 +++---
 svx/source/svdraw/svdmrkv.cxx                            |    2 -
 svx/source/svdraw/svdundo.cxx                            |   10 +++----
 svx/source/svdraw/svdview.cxx                            |    4 +--
 svx/source/svdraw/svdxcgv.cxx                            |    6 ++--
 sw/source/core/frmedt/fefly1.cxx                         |    2 -
 sw/source/core/frmedt/feshview.cxx                       |    2 -
 sw/source/core/frmedt/fews.cxx                           |    6 ++--
 sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx     |    2 -
 sw/source/uibase/docvw/edtwin.cxx                        |   12 ++++-----
 sw/source/uibase/shells/drawdlg.cxx                      |   12 ++++-----
 sw/source/uibase/shells/drwbassh.cxx                     |    4 +--
 sw/source/uibase/shells/drwtxtsh.cxx                     |    4 +--
 sw/source/uibase/uiview/formatclipboard.cxx              |    2 -
 sw/source/uibase/uiview/view2.cxx                        |    2 -
 81 files changed, 189 insertions(+), 188 deletions(-)

New commits:
commit 322a6ca8f912513f69747a68fe5497ee6b643293
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Wed May 29 13:49:41 2024 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Thu May 30 08:44:37 2024 +0200

    AreObjectsMarked -> GetMarkedObjectList().GetMarkCount() != 0
    
    In order to reduce number of calls to GetMarkedObjectList() later on
    
    Change-Id: Ib2eb7c88338e64744f886a338acca65f782f8170
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168218
    Tested-by: Jenkins
    Tested-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/basctl/source/basicide/baside3.cxx 
b/basctl/source/basicide/baside3.cxx
index ea4fcb4c33de..1d8660ee8289 100644
--- a/basctl/source/basicide/baside3.cxx
+++ b/basctl/source/basicide/baside3.cxx
@@ -204,7 +204,7 @@ void DialogWindow::Command( const CommandEvent& rCEvt )
         if (GetDispatcher())
         {
             SdrView& rView = GetView();
-            if( !rCEvt.IsMouseEvent() && rView.AreObjectsMarked() )
+            if( !rCEvt.IsMouseEvent() && 
rView.GetMarkedObjectList().GetMarkCount() != 0 )
             {
                 tools::Rectangle aMarkedRect( rView.GetMarkedRect() );
                 Point MarkedCenter( aMarkedRect.Center() );
@@ -271,7 +271,7 @@ void DialogWindow::GetState( SfxItemSet& rSet )
             case SID_COPY:
             {
                 // any object selected?
-                if ( !m_pEditor->GetView().AreObjectsMarked() )
+                if ( m_pEditor->GetView().GetMarkedObjectList().GetMarkCount() 
== 0 )
                     rSet.DisableItem( nWh );
             }
             break;
@@ -280,7 +280,7 @@ void DialogWindow::GetState( SfxItemSet& rSet )
             case SID_BACKSPACE:
             {
                 // any object selected?
-                if ( !m_pEditor->GetView().AreObjectsMarked() )
+                if ( m_pEditor->GetView().GetMarkedObjectList().GetMarkCount() 
== 0 )
                     rSet.DisableItem( nWh );
 
                 if ( IsReadOnly() )
@@ -314,7 +314,7 @@ void DialogWindow::GetState( SfxItemSet& rSet )
             {
                 Shell* pShell = GetShell();
                 SfxViewFrame* pViewFrame = pShell ? &pShell->GetViewFrame() : 
nullptr;
-                if ( pViewFrame && !pViewFrame->HasChildWindow( 
SID_SHOW_PROPERTYBROWSER ) && !m_pEditor->GetView().AreObjectsMarked() )
+                if ( pViewFrame && !pViewFrame->HasChildWindow( 
SID_SHOW_PROPERTYBROWSER ) && 
m_pEditor->GetView().GetMarkedObjectList().GetMarkCount() == 0 )
                     rSet.DisableItem( nWh );
 
                 if ( IsReadOnly() )
diff --git a/basctl/source/dlged/dlged.cxx b/basctl/source/dlged/dlged.cxx
index abdc662802d8..c1e9a28b2c61 100644
--- a/basctl/source/dlged/dlged.cxx
+++ b/basctl/source/dlged/dlged.cxx
@@ -641,7 +641,7 @@ static void implCopyStreamToByteSequence( const Reference< 
XInputStream >& xStre
 
 void DlgEditor::Copy()
 {
-    if( !pDlgEdView->AreObjectsMarked() )
+    if( pDlgEdView->GetMarkedObjectList().GetMarkCount() == 0 )
         return;
 
     // stop all drawing actions
@@ -959,7 +959,7 @@ void DlgEditor::Paste()
 
 void DlgEditor::Delete()
 {
-    if( !pDlgEdView->AreObjectsMarked() )
+    if( pDlgEdView->GetMarkedObjectList().GetMarkCount() == 0 )
         return;
 
     // remove control models of marked objects from dialog model
diff --git a/basctl/source/dlged/dlgedfunc.cxx 
b/basctl/source/dlged/dlgedfunc.cxx
index 7f1a0388eeaa..719814933d6e 100644
--- a/basctl/source/dlged/dlgedfunc.cxx
+++ b/basctl/source/dlged/dlgedfunc.cxx
@@ -120,7 +120,7 @@ bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
                 rView.BrkAction();
                 bReturn = true;
             }
-            else if ( rView.AreObjectsMarked() )
+            else if ( rView.GetMarkedObjectList().GetMarkCount() != 0 )
             {
                 const SdrHdlList& rHdlList = rView.GetHdlList();
                 SdrHdl* pHdl = rHdlList.GetFocusHdl();
@@ -145,7 +145,7 @@ bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
                     rView.MarkNextObj( !aCode.IsShift() );
                 }
 
-                if ( rView.AreObjectsMarked() )
+                if ( rView.GetMarkedObjectList().GetMarkCount() != 0 )
                     rView.MakeVisible( rView.GetAllMarkedRect(), rWindow );
 
                 bReturn = true;
@@ -201,7 +201,7 @@ bool DlgEdFunc::KeyInput( const KeyEvent& rKEvt )
                 nY =  0;
             }
 
-            if ( rView.AreObjectsMarked() && !aCode.IsMod1() )
+            if ( rView.GetMarkedObjectList().GetMarkCount() != 0 && 
!aCode.IsMod1() )
             {
                 if ( aCode.IsMod2() )
                 {
@@ -357,7 +357,7 @@ void DlgEdFuncInsert::MouseButtonDown( const MouseEvent& 
rMEvt )
         // if selected object was hit, drag object
         if ( pHdl!=nullptr || rView.IsMarkedHit(aPos, nHitLog) )
             rView.BegDragObj(aPos, nullptr, pHdl, nDrgLog);
-        else if ( rView.AreObjectsMarked() )
+        else if ( rView.GetMarkedObjectList().GetMarkCount() != 0 )
             rView.UnmarkAll();
 
         // if no action, create object
@@ -387,14 +387,14 @@ bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& 
rMEvt )
     {
         rView.EndCreateObj(SdrCreateCmd::ForceEnd);
 
-        if ( !rView.AreObjectsMarked() )
+        if ( rView.GetMarkedObjectList().GetMarkCount() == 0 )
         {
             sal_uInt16 nHitLog = 
static_cast<sal_uInt16>(rWindow.PixelToLogic(Size(3, 0)).Width());
             Point aPos( rWindow.PixelToLogic( rMEvt.GetPosPixel() ) );
             rView.MarkObj(aPos, nHitLog);
         }
 
-        return rView.AreObjectsMarked();
+        return rView.GetMarkedObjectList().GetMarkCount() != 0;
     }
     else
     {
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx 
b/chart2/source/controller/main/ChartController_Tools.cxx
index ded134db24c6..a988f6ed9a6b 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -576,7 +576,7 @@ bool ChartController::isObjectDeleteable( const uno::Any& 
rSelection )
 bool ChartController::isShapeContext() const
 {
     return m_aSelection.isAdditionalShapeSelected() ||
-         ( m_pDrawViewWrapper && m_pDrawViewWrapper->AreObjectsMarked() &&
+         ( m_pDrawViewWrapper && 
m_pDrawViewWrapper->GetMarkedObjectList().GetMarkCount() != 0 &&
            ( m_pDrawViewWrapper->GetCurrentObjIdentifier() == SdrObjKind::Text 
) );
 }
 
diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index d8f5662ab882..bb9e58009d50 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -785,7 +785,7 @@ void ChartController::execute_MouseButtonUp( const 
MouseEvent& rMEvt )
                     // don't want the positioning Undo action to appear in the 
UI
                 impl_switchDiagramPositioningToExcludingPositioning();
             }
-            if ( pDrawViewWrapper->AreObjectsMarked() )
+            if ( pDrawViewWrapper->GetMarkedObjectList().GetMarkCount() != 0 )
             {
                 if ( pDrawViewWrapper->GetCurrentObjIdentifier() == 
SdrObjKind::Text )
                 {
diff --git a/chart2/source/controller/main/ShapeController.cxx 
b/chart2/source/controller/main/ShapeController.cxx
index 96c14a4fadad..1c317d1bf3dc 100644
--- a/chart2/source/controller/main/ShapeController.cxx
+++ b/chart2/source/controller/main/ShapeController.cxx
@@ -244,7 +244,7 @@ void ShapeController::executeDispatch_FormatLine()
 
     SdrObject* pSelectedObj = pDrawViewWrapper->getSelectedObject();
     SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
-    bool bHasMarked = pDrawViewWrapper->AreObjectsMarked();
+    bool bHasMarked = pDrawViewWrapper->GetMarkedObjectList().GetMarkCount() 
!= 0;
     if ( bHasMarked )
     {
         pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
@@ -280,7 +280,7 @@ void ShapeController::executeDispatch_FormatArea()
         return;
 
     SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
-    bool bHasMarked = pDrawViewWrapper->AreObjectsMarked();
+    bool bHasMarked = pDrawViewWrapper->GetMarkedObjectList().GetMarkCount() 
!= 0;
     if ( bHasMarked )
     {
         pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
@@ -314,7 +314,7 @@ void ShapeController::executeDispatch_TextAttributes()
         return;
 
     SfxItemSet aAttr( pDrawViewWrapper->GetDefaultAttr() );
-    bool bHasMarked = pDrawViewWrapper->AreObjectsMarked();
+    bool bHasMarked = pDrawViewWrapper->GetMarkedObjectList().GetMarkCount() 
!= 0;
     if ( bHasMarked )
     {
         pDrawViewWrapper->MergeAttrFromMarked( aAttr, false );
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 4844cc1d3e51..9dadae520bd5 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -263,7 +263,7 @@ void SvxBitmapTabPage::Reset( const SfxItemSet* rAttrs )
         fUIScale  = double(mpView->GetModel().GetUIScale());
 
 
-        if (mpView->AreObjectsMarked())
+        if (mpView->GetMarkedObjectList().GetMarkCount() != 0)
         {
             SfxItemSet rGeoAttr(mpView->GetGeoAttrFromMarked());
             transfWidth = static_cast<double>(GetItem( rGeoAttr, 
SID_ATTR_TRANSFORM_WIDTH )->GetValue());
diff --git a/include/svx/svdmrkv.hxx b/include/svx/svdmrkv.hxx
index 5e008b3d9095..4cffc9c3de88 100644
--- a/include/svx/svdmrkv.hxx
+++ b/include/svx/svdmrkv.hxx
@@ -258,7 +258,6 @@ protected:
 public:
     // all available const methods for read access to selection
     const SdrMarkList& GetMarkedObjectList() const { return 
maSdrViewSelection.GetMarkedObjectList(); }
-    bool AreObjectsMarked() const { return 0 != 
GetMarkedObjectList().GetMarkCount(); }
 
     // Get a list of all those links which are connected to marked nodes,
     // but which are not marked themselves.
diff --git a/reportdesign/source/ui/report/ReportSection.cxx 
b/reportdesign/source/ui/report/ReportSection.cxx
index 3a96cd636ae7..ec70ae7192e8 100644
--- a/reportdesign/source/ui/report/ReportSection.cxx
+++ b/reportdesign/source/ui/report/ReportSection.cxx
@@ -287,7 +287,7 @@ void OReportSection::Paste(const uno::Sequence< 
beans::NamedValue >& _aAllreadyC
 
 void OReportSection::Delete()
 {
-    if( !m_pView->AreObjectsMarked() )
+    if( m_pView->GetMarkedObjectList().GetMarkCount() == 0 )
         return;
 
     m_pView->BrkAction();
@@ -320,7 +320,7 @@ void OReportSection::Copy(uno::Sequence< beans::NamedValue 
>& _rAllreadyCopiedOb
 void OReportSection::Copy(uno::Sequence< beans::NamedValue >& 
_rAllreadyCopiedObjects,bool _bEraseAnddNoClone)
 {
     OSL_ENSURE(m_xSection.is(),"Why is the section here NULL!");
-    if( !m_pView->AreObjectsMarked() || !m_xSection.is() )
+    if( m_pView->GetMarkedObjectList().GetMarkCount() == 0 || !m_xSection.is() 
)
         return;
 
     // insert control models of marked objects into clipboard dialog model
diff --git a/reportdesign/source/ui/report/SectionView.cxx 
b/reportdesign/source/ui/report/SectionView.cxx
index e5c425ace570..4a4bf32ad1b4 100644
--- a/reportdesign/source/ui/report/SectionView.cxx
+++ b/reportdesign/source/ui/report/SectionView.cxx
@@ -157,7 +157,7 @@ void OSectionView::ObjectRemovedInAliveMode( const 
SdrObject* _pObject )
 
 void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo )
 {
-    if (!AreObjectsMarked())
+    if (GetMarkedObjectList().GetMarkCount() == 0)
         return;
 
     //  #i11702# use SdrUndoObjectLayerChange for undo
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx 
b/reportdesign/source/ui/report/ViewsWindow.cxx
index 7c79896e82e0..111cb612227c 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -348,7 +348,7 @@ void OViewsWindow::SetMode( DlgEdMode eNewMode )
 bool OViewsWindow::HasSelection() const
 {
     return std::any_of(m_aSections.begin(), m_aSections.end(),
-        [](const VclPtr<OSectionWindow>& rxSection) { return 
rxSection->getReportSection().getSectionView().AreObjectsMarked(); });
+        [](const VclPtr<OSectionWindow>& rxSection) { return 
rxSection->getReportSection().getSectionView().GetMarkedObjectList().GetMarkCount()
 != 0; });
 }
 
 void OViewsWindow::Delete()
@@ -539,7 +539,7 @@ void OViewsWindow::MouseButtonUp( const MouseEvent& rMEvt )
         return;
 
     auto aIter = std::find_if(m_aSections.begin(), m_aSections.end(),
-        [](const VclPtr<OSectionWindow>& rxSection) { return 
rxSection->getReportSection().getSectionView().AreObjectsMarked(); });
+        [](const VclPtr<OSectionWindow>& rxSection) { return 
rxSection->getReportSection().getSectionView().GetMarkedObjectList().GetMarkCount()
 != 0; });
     if (aIter != m_aSections.end())
     {
         (*aIter)->getReportSection().MouseButtonUp(rMEvt);
@@ -625,7 +625,7 @@ void OViewsWindow::collectRectangles(TRectangleMap& 
_rSortRectangles)
     for (const auto& rxSection : m_aSections)
     {
         OSectionView& rView = rxSection->getReportSection().getSectionView();
-        if ( rView.AreObjectsMarked() )
+        if ( rView.GetMarkedObjectList().GetMarkCount() != 0 )
         {
             rView.GetMarkedObjectList().ForceSort();
             const size_t nCount = rView.GetMarkedObjectList().GetMarkCount();
@@ -1022,7 +1022,7 @@ void OViewsWindow::BegDragObj(const Point& _aPnt, SdrHdl* 
_pHdl,const OSectionVi
 
         OSectionView& rView = rReportSection.getSectionView();
 
-        if ( rView.AreObjectsMarked() )
+        if ( rView.GetMarkedObjectList().GetMarkCount() != 0 )
         {
             const size_t nCount = rView.GetMarkedObjectList().GetMarkCount();
             for (size_t i=0; i < nCount; ++i)
@@ -1402,7 +1402,7 @@ void OViewsWindow::handleKey(const vcl::KeyCode& _rCode)
         else if ( nCode == KEY_RIGHT )
             nX =  1;
 
-        if ( rReportSection.getSectionView().AreObjectsMarked() )
+        if ( 
rReportSection.getSectionView().GetMarkedObjectList().GetMarkCount() != 0 )
         {
             if ( _rCode.IsMod2() )
             {
diff --git a/reportdesign/source/ui/report/dlgedfunc.cxx 
b/reportdesign/source/ui/report/dlgedfunc.cxx
index b8468d90bcc4..b22f6f652eee 100644
--- a/reportdesign/source/ui/report/dlgedfunc.cxx
+++ b/reportdesign/source/ui/report/dlgedfunc.cxx
@@ -238,7 +238,7 @@ void DlgEdFunc::checkTwoClicks(const MouseEvent& rMEvt)
     if ( !(nClicks == 2 && rMEvt.IsLeft()) )
         return;
 
-    if ( m_rView.AreObjectsMarked() )
+    if ( m_rView.GetMarkedObjectList().GetMarkCount() != 0 )
     {
         const SdrMarkList& rMarkList = m_rView.GetMarkedObjectList();
         if (rMarkList.GetMarkCount() == 1)
@@ -287,7 +287,7 @@ bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
                     m_rView.SdrEndTextEdit();
                     bReturn = true;
                 }
-                else if ( m_rView.AreObjectsMarked() )
+                else if ( m_rView.GetMarkedObjectList().GetMarkCount() != 0 )
                 {
                     const SdrHdlList& rHdlList = m_rView.GetHdlList();
                     SdrHdl* pHdl = rHdlList.GetFocusHdl();
@@ -317,7 +317,7 @@ bool DlgEdFunc::handleKeyEvent(const KeyEvent& _rEvent)
                         m_rView.MarkNextObj( !rCode.IsShift() );
                     }
 
-                    if ( m_rView.AreObjectsMarked() )
+                    if ( m_rView.GetMarkedObjectList().GetMarkCount() != 0 )
                         m_rView.MakeVisible( m_rView.GetAllMarkedRect(), 
*m_pParent);
 
                     bReturn = true;
@@ -702,12 +702,12 @@ bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& 
rMEvt )
 
         m_rView.EndCreateObj(SdrCreateCmd::ForceEnd);
 
-        if ( !m_rView.AreObjectsMarked() )
+        if ( m_rView.GetMarkedObjectList().GetMarkCount() == 0 )
         {
             m_rView.MarkObj(aPos, nHitLog);
         }
 
-        bReturn = m_rView.AreObjectsMarked();
+        bReturn = m_rView.GetMarkedObjectList().GetMarkCount() != 0;
         if ( bReturn )
         {
             OReportController& rController = 
m_pParent->getSectionWindow()->getViewsWindow()->getView()->getReportView()->getController();
@@ -726,7 +726,7 @@ bool DlgEdFuncInsert::MouseButtonUp( const MouseEvent& 
rMEvt )
     else
         checkMovementAllowed(rMEvt);
 
-    if ( !m_rView.AreObjectsMarked() &&
+    if ( m_rView.GetMarkedObjectList().GetMarkCount() == 0 &&
          std::abs(m_aMDPos.X() - aPos.X()) < nHitLog &&
          std::abs(m_aMDPos.Y() - aPos.Y()) < nHitLog &&
          !rMEvt.IsShift() && !rMEvt.IsMod2() )
diff --git a/sc/qa/unit/anchor.cxx b/sc/qa/unit/anchor.cxx
index 0dfffdd8ba4b..d5f5975f5e45 100644
--- a/sc/qa/unit/anchor.cxx
+++ b/sc/qa/unit/anchor.cxx
@@ -100,7 +100,7 @@ void ScAnchorTest::testUndoAnchor()
 
     // Select graphic object
     pDrawView->MarkNextObj();
-    CPPUNIT_ASSERT(pDrawView->AreObjectsMarked());
+    CPPUNIT_ASSERT(pDrawView->GetMarkedObjectList().GetMarkCount() != 0);
 
     // Set Cell Anchor
     ScDrawLayer::SetCellAnchoredFromPosition(*pObject, rDoc, 0, false);
diff --git a/sc/qa/unit/scshapetest.cxx b/sc/qa/unit/scshapetest.cxx
index 294c5590843f..d6d018f4ab60 100644
--- a/sc/qa/unit/scshapetest.cxx
+++ b/sc/qa/unit/scshapetest.cxx
@@ -932,7 +932,7 @@ CPPUNIT_TEST_FIXTURE(ScShapeTest, testFitToCellSize)
 
     // Select the shape
     pDrawView->MarkNextObj();
-    CPPUNIT_ASSERT(pDrawView->AreObjectsMarked());
+    CPPUNIT_ASSERT(pDrawView->GetMarkedObjectList().GetMarkCount() != 0);
 
     // Fit selected shape into cell
     pViewShell->GetViewData().GetDispatcher().Execute(SID_FITCELLSIZE);
diff --git a/sc/qa/unit/tiledrendering/tiledrendering.cxx 
b/sc/qa/unit/tiledrendering/tiledrendering.cxx
index f184251132e3..02b6783bfe44 100644
--- a/sc/qa/unit/tiledrendering/tiledrendering.cxx
+++ b/sc/qa/unit/tiledrendering/tiledrendering.cxx
@@ -3870,7 +3870,7 @@ CPPUNIT_TEST_FIXTURE(ScTiledRenderingTest, 
testEditShapeText)
     const bool bShapeSelected = pView->SelectObject(u"Shape 1");
     CPPUNIT_ASSERT(bShapeSelected);
 
-    
CPPUNIT_ASSERT(ScDocShell::GetViewData()->GetScDrawView()->AreObjectsMarked());
+    
CPPUNIT_ASSERT(ScDocShell::GetViewData()->GetScDrawView()->GetMarkedObjectList().GetMarkCount()
 != 0);
 
     Scheduler::ProcessEventsToIdle();
 
diff --git a/sc/qa/unit/uicalc/uicalc2.cxx b/sc/qa/unit/uicalc/uicalc2.cxx
index 346255a42303..b1ee2a0c9856 100644
--- a/sc/qa/unit/uicalc/uicalc2.cxx
+++ b/sc/qa/unit/uicalc/uicalc2.cxx
@@ -69,7 +69,8 @@ static void lcl_SelectObjectByName(ScTabViewShell& 
rViewShell, std::u16string_vi
         OString(OUStringToOString(rObjName, RTL_TEXTENCODING_UTF8) + " not 
found.").getStr(),
         bFound);
 
-    
CPPUNIT_ASSERT(rViewShell.GetViewData().GetScDrawView()->AreObjectsMarked());
+    
CPPUNIT_ASSERT(rViewShell.GetViewData().GetScDrawView()->GetMarkedObjectList().GetMarkCount()
+                   != 0);
 }
 
 CPPUNIT_TEST_FIXTURE(ScUiCalcTest2, testTdf150499)
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index ee276c782ca4..68f277a1756c 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -255,7 +255,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 
                 }
 
-                if( pView->AreObjectsMarked() )
+                if( pView->GetMarkedObjectList().GetMarkCount() != 0 )
                 {
                     std::unique_ptr<SfxItemSet> pNewArgs = 
rReq.GetArgs()->Clone();
                     lcl_convertStringArguments(*pNewArgs);
@@ -327,7 +327,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
 
         case SID_ATTR_TRANSFORM:
             {
-                if ( pView->AreObjectsMarked() )
+                if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
                 {
                     const SfxItemSet* pArgs = rReq.GetArgs();
 
@@ -476,7 +476,7 @@ void ScDrawShell::ExecuteMacroAssign(SdrObject* pObj, 
weld::Window* pWin)
 void ScDrawShell::ExecuteLineDlg( const SfxRequest& rReq )
 {
     ScDrawView*         pView       = rViewData.GetScDrawView();
-    bool                bHasMarked  = pView->AreObjectsMarked();
+    bool                bHasMarked  = 
pView->GetMarkedObjectList().GetMarkCount() != 0;
     const SdrObject*    pObj        = nullptr;
     const SdrMarkList&  rMarkList   = pView->GetMarkedObjectList();
 
@@ -514,7 +514,7 @@ void ScDrawShell::ExecuteLineDlg( const SfxRequest& rReq )
 void ScDrawShell::ExecuteAreaDlg( const SfxRequest& rReq )
 {
     ScDrawView* pView       = rViewData.GetScDrawView();
-    bool        bHasMarked  = pView->AreObjectsMarked();
+    bool        bHasMarked  = pView->GetMarkedObjectList().GetMarkCount() != 0;
 
     std::shared_ptr<SfxRequest> xRequest = std::make_shared<SfxRequest>(rReq);
 
@@ -546,7 +546,7 @@ void ScDrawShell::ExecuteAreaDlg( const SfxRequest& rReq )
 void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq )
 {
     ScDrawView* pView       = rViewData.GetScDrawView();
-    bool        bHasMarked  = pView->AreObjectsMarked();
+    bool        bHasMarked  = pView->GetMarkedObjectList().GetMarkCount() != 0;
     SfxItemSet  aNewAttr    ( pView->GetDefaultAttr() );
 
     if( bHasMarked )
@@ -573,7 +573,7 @@ void ScDrawShell::ExecuteTextAttrDlg( SfxRequest& rReq )
 void ScDrawShell::ExecuteMeasureDlg( SfxRequest& rReq )
 {
     ScDrawView* pView       = rViewData.GetScDrawView();
-    bool        bHasMarked  = pView->AreObjectsMarked();
+    bool        bHasMarked  = pView->GetMarkedObjectList().GetMarkCount() != 0;
     SfxItemSet  aNewAttr    ( pView->GetDefaultAttr() );
 
     if( bHasMarked )
diff --git a/sc/source/ui/drawfunc/drawsh2.cxx 
b/sc/source/ui/drawfunc/drawsh2.cxx
index 0e7cc33f121d..e8d7b233d743 100644
--- a/sc/source/ui/drawfunc/drawsh2.cxx
+++ b/sc/source/ui/drawfunc/drawsh2.cxx
@@ -392,7 +392,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
     vcl::Window*     pWindow     = rViewData.GetActiveWin();
     ScDrawView* pDrView     = rViewData.GetScDrawView();
     Point       aPos        = pWindow->PixelToLogic(aMousePos);
-    bool        bHasMarked  = pDrView->AreObjectsMarked();
+    bool        bHasMarked  = pDrView->GetMarkedObjectList().GetMarkCount() != 
0;
 
     if( bHasMarked )
     {
@@ -448,7 +448,7 @@ void ScDrawShell::GetDrawAttrState( SfxItemSet& rSet )
     if ( bActionItem )
         return;
 
-    if ( pDrView->AreObjectsMarked() )      // selected objects
+    if ( pDrView->GetMarkedObjectList().GetMarkCount() != 0 )      // selected 
objects
     {
         tools::Rectangle aRect = pDrView->GetAllMarkedRect();
         pPV->LogicToPagePos(aRect);
diff --git a/sc/source/ui/drawfunc/drawsh5.cxx 
b/sc/source/ui/drawfunc/drawsh5.cxx
index c82b01bcc23e..acf843dc3692 100644
--- a/sc/source/ui/drawfunc/drawsh5.cxx
+++ b/sc/source/ui/drawfunc/drawsh5.cxx
@@ -709,7 +709,7 @@ void ScDrawShell::ExecFormatPaintbrush( const SfxRequest& 
rReq )
             bLock = pArgs->Get(SID_FORMATPAINTBRUSH).GetValue();
 
         ScDrawView* pDrawView = rViewData.GetScDrawView();
-        if ( pDrawView && pDrawView->AreObjectsMarked() )
+        if ( pDrawView && pDrawView->GetMarkedObjectList().GetMarkCount() != 0 
)
         {
             std::unique_ptr<SfxItemSet> pItemSet(new SfxItemSet( 
pDrawView->GetAttrFromMarked(true/*bOnlyHardAttr*/) ));
             pView->SetDrawBrushSet( std::move(pItemSet), bLock );
@@ -720,7 +720,7 @@ void ScDrawShell::ExecFormatPaintbrush( const SfxRequest& 
rReq )
 void ScDrawShell::StateFormatPaintbrush( SfxItemSet& rSet )
 {
     ScDrawView* pDrawView = rViewData.GetScDrawView();
-    bool bSelection = pDrawView && pDrawView->AreObjectsMarked();
+    bool bSelection = pDrawView && 
pDrawView->GetMarkedObjectList().GetMarkCount() != 0;
     bool bHasPaintBrush = rViewData.GetView()->HasPaintBrush();
 
     if ( !bHasPaintBrush && !bSelection )
diff --git a/sc/source/ui/drawfunc/fuconstr.cxx 
b/sc/source/ui/drawfunc/fuconstr.cxx
index 689f33d8fed8..2f3122dfba5c 100644
--- a/sc/source/ui/drawfunc/fuconstr.cxx
+++ b/sc/source/ui/drawfunc/fuconstr.cxx
@@ -71,7 +71,7 @@ bool FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
             pView->BegDragObj(aMDPos, nullptr, pHdl, 1);
             bReturn = true;
         }
-        else if ( pView->AreObjectsMarked() )
+        else if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
         {
             pView->UnmarkAll();
             bReturn = true;
@@ -136,7 +136,7 @@ bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
     sal_uInt16 nClicks = rMEvt.GetClicks();
     if ( nClicks == 2 && rMEvt.IsLeft() )
     {
-        if ( pView->AreObjectsMarked() )
+        if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
         {
             const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
             if (rMarkList.GetMarkCount() == 1)
@@ -199,12 +199,12 @@ bool FuConstruct::SimpleMouseButtonUp(const MouseEvent& 
rMEvt)
     {
         pWindow->ReleaseMouse();
 
-        if ( !pView->AreObjectsMarked() && rMEvt.GetClicks() < 2 )
+        if ( pView->GetMarkedObjectList().GetMarkCount() == 0 && 
rMEvt.GetClicks() < 2 )
         {
             pView->MarkObj(aPnt, -2, false, rMEvt.IsMod1());
 
             SfxDispatcher& rDisp = rViewShell.GetViewData().GetDispatcher();
-            if ( pView->AreObjectsMarked() )
+            if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
                 rDisp.Execute(SID_OBJECT_SELECT, SfxCallMode::SLOT | 
SfxCallMode::RECORD);
             else
                 rDisp.Execute(aSfxRequest.GetSlot(), SfxCallMode::SLOT | 
SfxCallMode::RECORD);
diff --git a/sc/source/ui/drawfunc/fudraw.cxx b/sc/source/ui/drawfunc/fudraw.cxx
index 1d5be0692b4a..4e79d513b9f8 100644
--- a/sc/source/ui/drawfunc/fudraw.cxx
+++ b/sc/source/ui/drawfunc/fudraw.cxx
@@ -209,7 +209,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                 rViewData.GetDispatcher().Execute(SID_OBJECT_SELECT, 
SfxCallMode::SLOT | SfxCallMode::RECORD);
                 bReturn = true;
             }
-            else if ( pView->AreObjectsMarked() )
+            else if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
             {
                 // III
                 SdrHdlList& rHdlList = const_cast< SdrHdlList& >( 
pView->GetHdlList() );
@@ -219,7 +219,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                     pView->UnmarkAll();
 
                 //  while bezier editing, object is selected
-                if (!pView->AreObjectsMarked())
+                if (pView->GetMarkedObjectList().GetMarkCount() == 0)
                     rViewShell.SetDrawShell( false );
 
                 bReturn = true;
@@ -287,7 +287,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
         {
             // in calc do NOT start draw object selection using TAB/SHIFT-TAB 
when
             // there is not yet an object selected
-            if(pView->AreObjectsMarked())
+            if(pView->GetMarkedObjectList().GetMarkCount() != 0)
             {
                 vcl::KeyCode aCode = rKEvt.GetKeyCode();
 
@@ -307,7 +307,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                     }
 
                     // II
-                    if(pView->AreObjectsMarked())
+                    if(pView->GetMarkedObjectList().GetMarkCount() != 0)
                         pView->MakeVisible(pView->GetAllMarkedRect(), 
*pWindow);
 
                     bReturn = true;
@@ -343,7 +343,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
         {
             // in calc do NOT select the last draw object when
             // there is not yet an object selected
-            if(pView->AreObjectsMarked())
+            if(pView->GetMarkedObjectList().GetMarkCount() != 0)
             {
                 vcl::KeyCode aCode = rKEvt.GetKeyCode();
 
@@ -354,7 +354,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                     pView->MarkNextObj();
 
                     // II
-                    if(pView->AreObjectsMarked())
+                    if(pView->GetMarkedObjectList().GetMarkCount() != 0)
                         pView->MakeVisible(pView->GetAllMarkedRect(), 
*pWindow);
 
                     bReturn = true;
@@ -367,7 +367,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
         {
             // in calc do NOT select the first draw object when
             // there is not yet an object selected
-            if(pView->AreObjectsMarked())
+            if(pView->GetMarkedObjectList().GetMarkCount() != 0)
             {
                 vcl::KeyCode aCode = rKEvt.GetKeyCode();
 
@@ -378,7 +378,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                     pView->MarkNextObj(true);
 
                     // II
-                    if(pView->AreObjectsMarked())
+                    if(pView->GetMarkedObjectList().GetMarkCount() != 0)
                         pView->MakeVisible(pView->GetAllMarkedRect(), 
*pWindow);
 
                     bReturn = true;
@@ -394,7 +394,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
         {
             // in calc do cursor travelling of draw objects only when
             // there is an object selected yet
-            if(pView->AreObjectsMarked())
+            if(pView->GetMarkedObjectList().GetMarkCount() != 0)
             {
 
                 const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -562,7 +562,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
         case KEY_SPACE:
         {
             // in calc do only something when draw objects are selected
-            if(pView->AreObjectsMarked())
+            if(pView->GetMarkedObjectList().GetMarkCount() != 0)
             {
                 const SdrHdlList& rHdlList = pView->GetHdlList();
                 SdrHdl* pHdl = rHdlList.GetFocusHdl();
diff --git a/sc/source/ui/drawfunc/fupoor.cxx b/sc/source/ui/drawfunc/fupoor.cxx
index 4299e02512d8..2f20077809b9 100644
--- a/sc/source/ui/drawfunc/fupoor.cxx
+++ b/sc/source/ui/drawfunc/fupoor.cxx
@@ -251,7 +251,7 @@ bool FuPoor::doConstructOrthogonal() const
     }
 
     // Detect image/media and resize proportionally, but don't constrain 
movement by default
-    if (pView->AreObjectsMarked())
+    if (pView->GetMarkedObjectList().GetMarkCount() != 0)
     {
         const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
         if (rMarkList.GetMarkCount() == 1)
diff --git a/sc/source/ui/drawfunc/fusel.cxx b/sc/source/ui/drawfunc/fusel.cxx
index 1fcc7a448750..a98ad29abe47 100644
--- a/sc/source/ui/drawfunc/fusel.cxx
+++ b/sc/source/ui/drawfunc/fusel.cxx
@@ -416,7 +416,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
             // unlock internal layer to include note captions
             pView->UnlockInternalLayer();
             pView->EndAction();
-            if ( pView->AreObjectsMarked() )
+            if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
             {
                 bReturn = true;
 
@@ -464,7 +464,7 @@ bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
     sal_uInt16 nClicks = rMEvt.GetClicks();
     if (pView && nClicks == 2 && rMEvt.IsLeft())
     {
-        if ( pView->AreObjectsMarked() )
+        if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
         {
             const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
             if (rMarkList.GetMarkCount() == 1)
diff --git a/sc/source/ui/drawfunc/futext.cxx b/sc/source/ui/drawfunc/futext.cxx
index 8db495b0f467..9256c0a5dc49 100644
--- a/sc/source/ui/drawfunc/futext.cxx
+++ b/sc/source/ui/drawfunc/futext.cxx
@@ -437,12 +437,12 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
             SetInEditMode();
 
                 // leave mode when sole click (-> fuconstr)
-            if ( !pView->AreObjectsMarked() )
+            if ( pView->GetMarkedObjectList().GetMarkCount() == 0 )
             {
                 pView->MarkObj(aPnt, -2, false, rMEvt.IsMod1());
 
                 SfxDispatcher& rDisp = 
rViewShell.GetViewData().GetDispatcher();
-                if ( pView->AreObjectsMarked() )
+                if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
                     rDisp.Execute(SID_OBJECT_SELECT, SfxCallMode::SLOT | 
SfxCallMode::RECORD);
                 else
                     rDisp.Execute(aSfxRequest.GetSlot(), SfxCallMode::SLOT | 
SfxCallMode::RECORD);
@@ -457,12 +457,12 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
     {
         pWindow->ReleaseMouse();
 
-        if ( !pView->AreObjectsMarked() && rMEvt.GetClicks() < 2 )
+        if ( pView->GetMarkedObjectList().GetMarkCount() == 0 && 
rMEvt.GetClicks() < 2 )
         {
             pView->MarkObj(aPnt, -2, false, rMEvt.IsMod1());
 
             SfxDispatcher& rDisp = rViewShell.GetViewData().GetDispatcher();
-            if ( pView->AreObjectsMarked() )
+            if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
                 rDisp.Execute(SID_OBJECT_SELECT, SfxCallMode::SLOT | 
SfxCallMode::RECORD);
             else
                 rDisp.Execute(aSfxRequest.GetSlot(), SfxCallMode::SLOT | 
SfxCallMode::RECORD);
@@ -541,7 +541,7 @@ void FuText::SetInEditMode(SdrObject* pObj, const Point* 
pMousePixel,
     if ( pObj && (pObj->GetLayer() == SC_LAYER_INTERN) )
         pView->UnlockInternalLayer();
 
-    if ( !pObj && pView->AreObjectsMarked() )
+    if ( !pObj && pView->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
         if (rMarkList.GetMarkCount() == 1)
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index 5ff00f515f7b..bb90c2a1c819 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -64,7 +64,7 @@ ScDrawView::ScDrawView(
 
 void ScDrawView::SetPageAnchored()
 {
-    if( !AreObjectsMarked() )
+    if( GetMarkedObjectList().GetMarkCount() == 0 )
         return;
 
     const SdrMarkList* pMark = &GetMarkedObjectList();
@@ -89,7 +89,7 @@ void ScDrawView::SetPageAnchored()
 
 void ScDrawView::SetCellAnchored(bool bResizeWithCell)
 {
-    if( !AreObjectsMarked() )
+    if( GetMarkedObjectList().GetMarkCount() == 0 )
         return;
 
     const SdrMarkList* pMark = &GetMarkedObjectList();
@@ -118,7 +118,7 @@ ScAnchorType ScDrawView::GetAnchorType() const
     bool bPage = false;
     bool bCell = false;
     bool bCellResize = false;
-    if( AreObjectsMarked() )
+    if( GetMarkedObjectList().GetMarkCount() != 0 )
     {
         const SdrMarkList* pMark = &GetMarkedObjectList();
         const size_t nCount = pMark->GetMarkCount();
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index 59291977cddd..8e2b55b9ca7d 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -57,7 +57,7 @@ Point aDragStartDiff;
 
 void ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos )
 {
-    if ( !AreObjectsMarked() )
+    if ( GetMarkedObjectList().GetMarkCount() == 0 )
         return;
 
     BrkAction();
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index e06d794888c0..26949721cd34 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -211,7 +211,7 @@ void ScDrawView::InvalidateDrawTextAttrs()
 
 void ScDrawView::SetMarkedToLayer( SdrLayerID nLayerNo )
 {
-    if (!AreObjectsMarked())
+    if (GetMarkedObjectList().GetMarkCount() == 0)
         return;
 
     //  #i11702# use SdrUndoObjectLayerChange for undo
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 3b453fbb32cc..b948bf837f41 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -3461,7 +3461,7 @@ void ScGridWindow::Command( const CommandEvent& rCEvt )
             //  Is a draw object selected?
 
             SdrView* pDrawView = pViewSh->GetScDrawView();
-            if (pDrawView && pDrawView->AreObjectsMarked())
+            if (pDrawView && pDrawView->GetMarkedObjectList().GetMarkCount() 
!= 0)
             {
                 // #100442#; the context menu should open in the middle of the 
selected objects
                 tools::Rectangle 
aSelectRect(LogicToPixel(pDrawView->GetAllMarkedBoundRect()));
@@ -3609,7 +3609,7 @@ void ScGridWindow::SelectForContextMenu( const Point& 
rPosPixel, SCCOL nCellX, S
     if ( bHitSelected )
         return;
 
-    bool bWasDraw = ( pDrawView && pDrawView->AreObjectsMarked() );
+    bool bWasDraw = ( pDrawView && 
pDrawView->GetMarkedObjectList().GetMarkCount() != 0 );
     bool bHitDraw = false;
     if ( pDrawView )
     {
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index e550447da8b5..b0a8c0e3628b 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -180,12 +180,12 @@ bool ScGridWindow::DrawKeyInput(const KeyEvent& rKEvt, 
vcl::Window* pWin)
     if (pDrView && pDraw && !mrViewData.IsRefMode())
     {
         pDraw->SetWindow( this );
-        bool bOldMarked = pDrView->AreObjectsMarked();
+        bool bOldMarked = pDrView->GetMarkedObjectList().GetMarkCount() != 0;
         if (pDraw->KeyInput( rKEvt ))
         {
             bool bLeaveDraw = false;
             bool bUsed = true;
-            bool bNewMarked = pDrView->AreObjectsMarked();
+            bool bNewMarked = pDrView->GetMarkedObjectList().GetMarkCount() != 
0;
             if ( !mrViewData.GetView()->IsDrawSelMode() )
                 if ( !bNewMarked )
                 {
@@ -363,7 +363,7 @@ void ScGridWindow::UpdateStatusPosSize()
     }
     if ( !bActionItem )
     {
-        if ( pDrView->AreObjectsMarked() ) // selected objects
+        if ( pDrView->GetMarkedObjectList().GetMarkCount() != 0 ) // selected 
objects
         {
             tools::Rectangle aRect = pDrView->GetAllMarkedRect();
             pPV->LogicToPagePos(aRect);
@@ -386,7 +386,7 @@ void ScGridWindow::UpdateStatusPosSize()
 bool ScGridWindow::DrawHasMarkedObj()
 {
     ScDrawView* p = mrViewData.GetScDrawView();
-    return p && p->AreObjectsMarked();
+    return p && p->GetMarkedObjectList().GetMarkCount() != 0;
 }
 
 void ScGridWindow::DrawMarkDropObj( SdrObject* pObj )
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index b2fef44d9656..593507098f07 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -166,14 +166,14 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
     if ( bSelectFirst )
     {
         // select first draw object if none is selected yet
-        if(!pView->AreObjectsMarked())
+        if(pView->GetMarkedObjectList().GetMarkCount() == 0)
         {
             // select first object
             pView->UnmarkAllObj();
             pView->MarkNextObj(true);
 
             // ...and make it visible
-            if(pView->AreObjectsMarked())
+            if(pView->GetMarkedObjectList().GetMarkCount() != 0)
                 pView->MakeVisible(pView->GetAllMarkedRect(), *pWin);
         }
     }
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 5c62962e2c06..5be05d61ce4f 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -577,7 +577,7 @@ void ScTabViewShell::UpdateDrawShell()
     // Remove DrawShell if nothing is selected.
 
     SdrView* pDrView = GetScDrawView();
-    if ( pDrView && !pDrView->AreObjectsMarked() && !IsDrawSelMode() )
+    if ( pDrView && pDrView->GetMarkedObjectList().GetMarkCount() == 0 && 
!IsDrawSelMode() )
         SetDrawShell( false );
 }
 
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index bbf98297f9c8..08400cdce9eb 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -497,7 +497,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
                     const SfxRectangleItem& rRect = 
rReq.GetArgs()->Get(SID_OBJECTRESIZE);
                     tools::Rectangle aRect( pWin->PixelToLogic( 
rRect.GetValue() ) );
 
-                    if ( pView->AreObjectsMarked() )
+                    if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
                     {
                         const SdrMarkList& rMarkList = 
pView->GetMarkedObjectList();
 
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index d9b0b7be6a74..f79005b7ef1d 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -157,7 +157,7 @@ void SdTPAction::Construct()
     SdrGrafObj* pGrafObj = nullptr;
     bool        bOLEAction = false;
 
-    if ( mpView->AreObjectsMarked() )
+    if ( mpView->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
         if (rMarkList.GetMarkCount() == 1)
diff --git a/sd/source/ui/func/fuconstr.cxx b/sd/source/ui/func/fuconstr.cxx
index 36c1f3428a89..b5e4b1b15bb0 100644
--- a/sd/source/ui/func/fuconstr.cxx
+++ b/sd/source/ui/func/fuconstr.cxx
@@ -91,7 +91,7 @@ bool FuConstruct::MouseButtonDown(const MouseEvent& rMEvt)
             mpView->BegDragObj(aMDPos, nullptr, pHdl, nDrgLog);
             bReturn = true;
         }
-        else if ( mpView->AreObjectsMarked() )
+        else if ( mpView->GetMarkedObjectList().GetMarkCount() != 0 )
         {
             mpView->UnmarkAll();
             bReturn = true;
@@ -166,7 +166,7 @@ bool FuConstruct::MouseButtonUp(const MouseEvent& rMEvt)
         mpWindow->ReleaseMouse();
         sal_uInt16 nDrgLog = sal_uInt16 ( 
mpWindow->PixelToLogic(Size(mpView->GetDragThresholdPixels(),0)).Width() );
 
-        if ( !mpView->AreObjectsMarked() )
+        if ( mpView->GetMarkedObjectList().GetMarkCount() == 0 )
         {
             SdrPageView* pPV;
             sal_uInt16 nHitLog = sal_uInt16 ( 
mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
diff --git a/sd/source/ui/func/fucopy.cxx b/sd/source/ui/func/fucopy.cxx
index 5edc4e2dc303..5df9f55ecfad 100644
--- a/sd/source/ui/func/fucopy.cxx
+++ b/sd/source/ui/func/fucopy.cxx
@@ -62,7 +62,7 @@ rtl::Reference<FuPoor> FuCopy::Create( ViewShell* pViewSh, 
::sd::Window* pWin, :
 
 void FuCopy::DoExecute( SfxRequest& rReq )
 {
-    if( !mpView->AreObjectsMarked() )
+    if( mpView->GetMarkedObjectList().GetMarkCount() == 0 )
         return;
 
     // Undo
diff --git a/sd/source/ui/func/fudraw.cxx b/sd/source/ui/func/fudraw.cxx
index fca4f65fa54e..a65bae0a6fa8 100644
--- a/sd/source/ui/func/fudraw.cxx
+++ b/sd/source/ui/func/fudraw.cxx
@@ -369,7 +369,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                 if(!mpView->MarkNextObj( !aCode.IsShift() ))
                 {
                     //If there is only one object, don't do the UnmarkAllObj() 
& MarkNextObj().
-                    if ( mpView->HasMultipleMarkableObjects() && 
mpView->AreObjectsMarked() )
+                    if ( mpView->HasMultipleMarkableObjects() && 
mpView->GetMarkedObjectList().GetMarkCount() != 0 )
                     {
                         // No next object: go over open end and get first from
                         // the other side
@@ -378,7 +378,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                     }
                 }
 
-                if(mpView->AreObjectsMarked())
+                if(mpView->GetMarkedObjectList().GetMarkCount() != 0)
                     mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow);
 
                 bReturn = true;
@@ -396,7 +396,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                 mpView->UnmarkAllObj();
                 mpView->MarkNextObj();
 
-                if(mpView->AreObjectsMarked())
+                if(mpView->GetMarkedObjectList().GetMarkCount() != 0)
                     mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow);
 
                 bReturn = true;
@@ -414,7 +414,7 @@ bool FuDraw::KeyInput(const KeyEvent& rKEvt)
                 mpView->UnmarkAllObj();
                 mpView->MarkNextObj(true);
 
-                if(mpView->AreObjectsMarked())
+                if(mpView->GetMarkedObjectList().GetMarkCount() != 0)
                     mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow);
 
                 bReturn = true;
@@ -628,7 +628,7 @@ void FuDraw::DoubleClick(const MouseEvent& rMEvt)
 {
     sal_uInt16 nHitLog = sal_uInt16 ( 
mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
 
-    if ( mpView->AreObjectsMarked() )
+    if ( mpView->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
 
@@ -790,7 +790,7 @@ bool FuDraw::cancel()
         rBindings.Invalidate( SID_PARASPACE_INCREASE );
         rBindings.Invalidate( SID_PARASPACE_DECREASE );
     }
-    else if ( mpView->AreObjectsMarked() )
+    else if ( mpView->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         const SdrHdlList& rHdlList = mpView->GetHdlList();
         SdrHdl* pHdl = rHdlList.GetFocusHdl();
diff --git a/sd/source/ui/func/fuediglu.cxx b/sd/source/ui/func/fuediglu.cxx
index 9d0281e2cc5e..15aea9cc0e2e 100644
--- a/sd/source/ui/func/fuediglu.cxx
+++ b/sd/source/ui/func/fuediglu.cxx
@@ -173,7 +173,7 @@ bool FuEditGluePoints::MouseButtonDown(const MouseEvent& 
rMEvt)
                 // move object
                 mpView->BegDragObj(aMDPos, nullptr, aVEvt.mpHdl, nDrgLog);
             }
-            else if (mpView->AreObjectsMarked())
+            else if (mpView->GetMarkedObjectList().GetMarkCount() != 0)
             {
                 // select gluepoint
                 if (!rMEvt.IsShift())
diff --git a/sd/source/ui/func/fuformatpaintbrush.cxx 
b/sd/source/ui/func/fuformatpaintbrush.cxx
index 342ad075f200..8f41b6344d53 100644
--- a/sd/source/ui/func/fuformatpaintbrush.cxx
+++ b/sd/source/ui/func/fuformatpaintbrush.cxx
@@ -175,7 +175,7 @@ bool FuFormatPaintBrush::MouseMove(const MouseEvent& rMEvt)
 
 bool FuFormatPaintBrush::MouseButtonUp(const MouseEvent& rMEvt)
 {
-    if( mxItemSet && mpView && mpView->AreObjectsMarked() )
+    if( mxItemSet && mpView && mpView->GetMarkedObjectList().GetMarkCount() != 
0 )
     {
         OutlinerView* pOLV = mpView->GetTextEditOutlinerView();
 
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index bba66778728f..d0fde55e4b72 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -549,7 +549,7 @@ void FuInsertOLE::DoExecute( SfxRequest& rReq )
                     }
                 }
 
-                if ( mpView->AreObjectsMarked() )
+                if ( mpView->GetMarkedObjectList().GetMarkCount() != 0 )
                 {
                     // as an empty OLE object available?
                     const SdrMarkList& rMarkList = 
mpView->GetMarkedObjectList();
diff --git a/sd/source/ui/func/fuline.cxx b/sd/source/ui/func/fuline.cxx
index da9cc795fdbf..640a5bfc5b09 100644
--- a/sd/source/ui/func/fuline.cxx
+++ b/sd/source/ui/func/fuline.cxx
@@ -64,7 +64,7 @@ void FuLine::DoExecute( SfxRequest& rReq )
     SfxItemSet aNewAttr( mpDoc->GetPool() );
     mpView->GetAttributes( aNewAttr );
 
-    bool bHasMarked = mpView->AreObjectsMarked();
+    bool bHasMarked = mpView->GetMarkedObjectList().GetMarkCount() != 0;
     SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
     VclPtr<SfxAbstractTabDialog> pDlg( 
pFact->CreateSvxLineTabDialog(mpViewShell->GetFrameWeld(), &aNewAttr, mpDoc, 
pObj, bHasMarked) );
 
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 23adf88ffaca..dc0a39dff5a2 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -593,7 +593,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
                     nY = 0;
                 }
 
-                if (mpView->AreObjectsMarked() && !rKEvt.GetKeyCode().IsMod1() 
&&
+                if (mpView->GetMarkedObjectList().GetMarkCount() != 0 && 
!rKEvt.GetKeyCode().IsMod1() &&
                     !mpDocSh->IsReadOnly())
                 {
                     const SdrHdlList& rHdlList = mpView->GetHdlList();
@@ -1086,7 +1086,7 @@ bool FuPoor::doConstructOrthogonal() const
     // Check whether a media object is selected
     bool bResizeKeepRatio = false;
     // tdf#89758 Avoid interactive crop preview from being proportionally 
scaled by default.
-    if (mpView->AreObjectsMarked() && mpView->GetDragMode() != 
SdrDragMode::Crop)
+    if (mpView->GetMarkedObjectList().GetMarkCount() != 0 && 
mpView->GetDragMode() != SdrDragMode::Crop)
     {
         const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
         if (rMarkList.GetMarkCount() == 1)
diff --git a/sd/source/ui/func/fusel.cxx b/sd/source/ui/func/fusel.cxx
index 501a99369248..2803c8f32633 100644
--- a/sd/source/ui/func/fusel.cxx
+++ b/sd/source/ui/func/fusel.cxx
@@ -568,7 +568,7 @@ bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
                 if ( ! rMEvt.IsRight())
                     mpView->BegDragObj(aMDPos, nullptr, aVEvt.mpHdl, nDrgLog);
             }
-            else if (mpView->AreObjectsMarked())
+            else if (mpView->GetMarkedObjectList().GetMarkCount() != 0)
             {
                 /**************************************************************
                 * Select gluepoint
diff --git a/sd/source/ui/func/futempl.cxx b/sd/source/ui/func/futempl.cxx
index 82c390166d00..324af035aa27 100644
--- a/sd/source/ui/func/futempl.cxx
+++ b/sd/source/ui/func/futempl.cxx
@@ -596,7 +596,7 @@ void FuTemplate::DoExecute( SfxRequest& rReq )
 
         case SID_STYLE_UPDATE_BY_EXAMPLE:
         {
-            if ((mpView->AreObjectsMarked() && 
mpView->GetMarkedObjectList().GetMarkCount() == 1) ||
+            if ((mpView->GetMarkedObjectList().GetMarkCount() != 0 && 
mpView->GetMarkedObjectList().GetMarkCount() == 1) ||
                  dynamic_cast< const OutlineView *>( mpView ) !=  nullptr)
             {
                 pStyleSheet = mpView->GetStyleSheet();
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index 541db2953b47..4383f9394b08 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -196,7 +196,7 @@ void FuText::DoExecute( SfxRequest& )
 
         mxTextObj = DynCastSdrTextObj( aVEvt.mpObj );
     }
-    else if (mpView->AreObjectsMarked())
+    else if (mpView->GetMarkedObjectList().GetMarkCount() != 0)
     {
         const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
 
@@ -208,7 +208,7 @@ void FuText::DoExecute( SfxRequest& )
     }
 
     // check for table
-    if (mpView->AreObjectsMarked())
+    if (mpView->GetMarkedObjectList().GetMarkCount() != 0)
     {
         const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
 
@@ -719,7 +719,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt)
     ForcePointer(&rMEvt);
     mpWindow->ReleaseMouse();
 
-    if ( mpView && !mpView->AreObjectsMarked() )
+    if ( mpView && mpView->GetMarkedObjectList().GetMarkCount() == 0 )
     {
         sal_uInt16 nDrgLog1 = sal_uInt16 ( 
mpWindow->PixelToLogic(Size(mpView->GetDragThresholdPixels(),0)).Width() );
         if ( std::abs(aMDPos.X() - aPnt.X()) < nDrgLog1 &&
@@ -1234,7 +1234,7 @@ void FuText::ReceiveRequest(SfxRequest& rReq)
             }
         }
     }
-    else if (mpView->AreObjectsMarked())
+    else if (mpView->GetMarkedObjectList().GetMarkCount() != 0)
     {
         const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
 
diff --git a/sd/source/ui/func/futhes.cxx b/sd/source/ui/func/futhes.cxx
index d978880039dd..74521700218a 100644
--- a/sd/source/ui/func/futhes.cxx
+++ b/sd/source/ui/func/futhes.cxx
@@ -69,7 +69,7 @@ void FuThesaurus::DoExecute(SfxRequest& rReq)
     {
         SdrTextObj* pTextObj = nullptr;
 
-        if ( mpView->AreObjectsMarked() )
+        if ( mpView->GetMarkedObjectList().GetMarkCount() != 0 )
         {
             const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
 
diff --git a/sd/source/ui/func/futransf.cxx b/sd/source/ui/func/futransf.cxx
index 864384ad125d..3b1790028102 100644
--- a/sd/source/ui/func/futransf.cxx
+++ b/sd/source/ui/func/futransf.cxx
@@ -64,7 +64,7 @@ void setUndo(::sd::View* pView, const SfxItemSet* pArgs, bool 
addPageMargin)
 
 void FuTransform::DoExecute( SfxRequest& rReq )
 {
-    if (!mpView->AreObjectsMarked())
+    if (mpView->GetMarkedObjectList().GetMarkCount() == 0)
         return;
 
     const SfxItemSet* pArgs = rReq.GetArgs();
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 131f4cb54a42..1ea3eba17955 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -1412,7 +1412,7 @@ void SdOutliner::ShowEndOfSearchDialog()
     }
 
     OUString aString;
-    if (mpView->AreObjectsMarked())
+    if (mpView->GetMarkedObjectList().GetMarkCount() != 0)
         aString = SdResId(STR_END_SPELLING_OBJ);
     else
         aString = SdResId(STR_END_SPELLING);
@@ -1770,7 +1770,7 @@ void SdOutliner::SetViewShell (const 
std::shared_ptr<sd::ViewShell>& rpViewShell
 void SdOutliner::HandleChangedSelection()
 {
     maMarkListCopy.clear();
-    mbRestrictSearchToSelection = mpView->AreObjectsMarked();
+    mbRestrictSearchToSelection = mpView->GetMarkedObjectList().GetMarkCount() 
!= 0;
     if (!mbRestrictSearchToSelection)
         return;
 
diff --git a/sd/source/ui/view/drbezob.cxx b/sd/source/ui/view/drbezob.cxx
index 197bc22c0019..863045043614 100644
--- a/sd/source/ui/view/drbezob.cxx
+++ b/sd/source/ui/view/drbezob.cxx
@@ -273,7 +273,7 @@ void BezierObjectBar::Execute(SfxRequest& rReq)
                 }
             }
 
-            if( (pIPPEC == mpView) && !mpView->AreObjectsMarked() )
+            if( (pIPPEC == mpView) && 
mpView->GetMarkedObjectList().GetMarkCount() == 0 )
                 
mpViewSh->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, 
SfxCallMode::ASYNCHRON);
 
             rReq.Ignore();
diff --git a/sd/source/ui/view/drviews1.cxx b/sd/source/ui/view/drviews1.cxx
index 6286b524ce4d..6bc11bef160b 100644
--- a/sd/source/ui/view/drviews1.cxx
+++ b/sd/source/ui/view/drviews1.cxx
@@ -167,7 +167,7 @@ void DrawViewShell::SelectionHasChanged()
 
     SdrOle2Obj* pOleObj = nullptr;
 
-    if ( mpDrawView->AreObjectsMarked() )
+    if ( mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
 
@@ -753,7 +753,7 @@ void DrawViewShell::ResetActualPage()
  */
 ErrCode DrawViewShell::DoVerb(sal_Int32 nVerb)
 {
-    if ( mpDrawView->AreObjectsMarked() )
+    if ( mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
 
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index ff53390f23d3..b8a8df1af3cc 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1477,7 +1477,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
             SetCurrentFunction( FuTransform::Create( this, GetActiveWindow(), 
mpDrawView.get(), GetDoc(), rReq ) );
             // tdf#138963 conditions tested for here must be the same as those
             // of the early returns from FuTransform::DoExecute
-            if (rReq.GetArgs() || !mpDrawView->AreObjectsMarked())
+            if (rReq.GetArgs() || 
mpDrawView->GetMarkedObjectList().GetMarkCount() == 0)
             {
                 Invalidate(SID_RULER_OBJECT);
                 Cancel();
diff --git a/sd/source/ui/view/drviews3.cxx b/sd/source/ui/view/drviews3.cxx
index 89f89bbddb03..ce7bf798083e 100644
--- a/sd/source/ui/view/drviews3.cxx
+++ b/sd/source/ui/view/drviews3.cxx
@@ -348,7 +348,7 @@ void  DrawViewShell::ExecCtrl(SfxRequest& rReq)
                     rReq.GetArgs()->Get(SID_OBJECTRESIZE);
                 ::tools::Rectangle aRect( GetActiveWindow()->PixelToLogic( 
rRect.GetValue() ) );
 
-                if ( mpDrawView->AreObjectsMarked() )
+                if ( mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 )
                 {
                     const SdrMarkList& rMarkList = 
mpDrawView->GetMarkedObjectList();
 
@@ -929,7 +929,7 @@ void  DrawViewShell::GetRulerState(SfxItemSet& rSet)
     const bool bRTL = GetDoc() && GetDoc()->GetDefaultWritingMode() == 
css::text::WritingMode_RL_TB;
     rSet.Put(SfxBoolItem(SID_RULER_TEXT_RIGHT_TO_LEFT, bRTL));
 
-    if( mpDrawView->AreObjectsMarked() )
+    if( mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         if( mpDrawView->IsTextEdit() )
         {
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 574d4c17601a..4297fc521b38 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -642,7 +642,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, 
::sd::Window* pWin)
         else
         {
             // is something selected?
-            if (mpDrawView->AreObjectsMarked() &&
+            if (mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 &&
                 mpDrawView->GetMarkedObjectList().GetMarkCount() == 1 )
             {
                 pObj = 
mpDrawView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
@@ -781,7 +781,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, 
::sd::Window* pWin)
             }
 
             // multiple selection
-            else if (mpDrawView->AreObjectsMarked() &&
+            else if (mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 &&
                 mpDrawView->GetMarkedObjectList().GetMarkCount() > 1 )
             {
                 aPopupId = "multiselect";
@@ -809,7 +809,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, 
::sd::Window* pWin)
                         ,GetActiveWindow()->GetSizePixel().Height()/2);
 
                 //middle of the bounding rect if something is marked
-                if( mpDrawView->AreObjectsMarked() && 
mpDrawView->GetMarkedObjectList().GetMarkCount() >= 1 )
+                if( mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 && 
mpDrawView->GetMarkedObjectList().GetMarkCount() >= 1 )
                 {
                     ::tools::Rectangle aMarkRect;
                     
mpDrawView->GetMarkedObjectList().TakeBoundRect(nullptr,aMarkRect);
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index 6e55a789bd34..8afeb9810513 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -219,7 +219,7 @@ void DrawViewShell::GetDrawAttrState(SfxItemSet& rSet)
         return nullptr;
 
     //when there is one object selected
-    if (!mpDrawView->AreObjectsMarked() || 
(mpDrawView->GetMarkedObjectList().GetMarkCount() != 1))
+    if (mpDrawView->GetMarkedObjectList().GetMarkCount() == 0 || 
(mpDrawView->GetMarkedObjectList().GetMarkCount() != 1))
         return nullptr;
 
     //and we are editing the outline object
@@ -286,7 +286,7 @@ bool DrawViewShell::ShouldDisableEditHyperlink() const
 {
     if (!mpDrawView)
         return true;
-    if (!mpDrawView->AreObjectsMarked())
+    if (mpDrawView->GetMarkedObjectList().GetMarkCount() == 0)
        return true;
     if (mpDrawView->GetMarkedObjectList().GetMarkCount() != 1)
         return true;
@@ -1364,7 +1364,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
 
     bool bSingleGraphicSelected = false;
 
-    if (!mpDrawView->AreObjectsMarked())
+    if (mpDrawView->GetMarkedObjectList().GetMarkCount() == 0)
     {
         rSet.DisableItem (SID_CONVERT_TO_METAFILE);
         rSet.DisableItem (SID_CONVERT_TO_BITMAP);
diff --git a/sd/source/ui/view/drviews8.cxx b/sd/source/ui/view/drviews8.cxx
index 15be1d1c95d0..31c16efb0378 100644
--- a/sd/source/ui/view/drviews8.cxx
+++ b/sd/source/ui/view/drviews8.cxx
@@ -89,7 +89,7 @@ void DrawViewShell::ScannerEvent()
                     ::tools::Rectangle   aRect( aPnt, aBmpSize );
                     bool        bInsertNewObject = true;
 
-                    if( GetView()->AreObjectsMarked() )
+                    if( GetView()->GetMarkedObjectList().GetMarkCount() != 0 )
                     {
                         const SdrMarkList& rMarkList = 
mpDrawView->GetMarkedObjectList();
 
diff --git a/sd/source/ui/view/drviews9.cxx b/sd/source/ui/view/drviews9.cxx
index 21c22a57994d..2d5df30be799 100644
--- a/sd/source/ui/view/drviews9.cxx
+++ b/sd/source/ui/view/drviews9.cxx
@@ -127,7 +127,7 @@ void DrawViewShell::ExecGallery(SfxRequest const & rReq)
 
         bool bInsertNewObject = true;
 
-        if ( mpDrawView->AreObjectsMarked() )
+        if ( mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 )
         {
             // is there an empty graphic object?
             const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
diff --git a/sd/source/ui/view/drviewsa.cxx b/sd/source/ui/view/drviewsa.cxx
index 2b43362f3a98..bf0b4023014a 100644
--- a/sd/source/ui/view/drviewsa.cxx
+++ b/sd/source/ui/view/drviewsa.cxx
@@ -650,7 +650,7 @@ void DrawViewShell::GetStatusBarState(SfxItemSet& rSet)
         }
         else
         {
-            if ( mpDrawView->AreObjectsMarked() )
+            if ( mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 )
             {
                 ::tools::Rectangle aRect = mpDrawView->GetAllMarkedRect();
                 pPageView->LogicToPagePos(aRect);
diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx
index 8455258ef4da..965b9bec40df 100644
--- a/sd/source/ui/view/drviewse.cxx
+++ b/sd/source/ui/view/drviewse.cxx
@@ -600,14 +600,14 @@ void DrawViewShell::FuPermanent(SfxRequest& rReq)
     // CTRL-SID_OBJECT_SELECT -> select first draw object if none is selected 
yet
     if(SID_OBJECT_SELECT == nSId && HasCurrentFunction() && 
(rReq.GetModifier() & KEY_MOD1))
     {
-        if(!GetView()->AreObjectsMarked())
+        if(GetView()->GetMarkedObjectList().GetMarkCount() == 0)
         {
             // select first object
             GetView()->UnmarkAllObj();
             GetView()->MarkNextObj(true);
 
             // ...and make it visible
-            if(GetView()->AreObjectsMarked())
+            if(GetView()->GetMarkedObjectList().GetMarkCount() != 0)
                 GetView()->MakeVisible(GetView()->GetAllMarkedRect(), 
*GetActiveWindow());
         }
     }
@@ -1253,7 +1253,7 @@ void DrawViewShell::FuSupport(SfxRequest& rReq)
         case SID_SIZE_OPTIMAL:  // BASIC
         {
             mbZoomOnPage = false;
-            if ( mpDrawView->AreObjectsMarked() )
+            if ( mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 )
             {
                 maMarkRect = mpDrawView->GetAllMarkedRect();
                 ::tools::Long nW = 
static_cast<::tools::Long>(maMarkRect.GetWidth()  * 1.03);
diff --git a/sd/source/ui/view/drviewsf.cxx b/sd/source/ui/view/drviewsf.cxx
index 0514adc8c1ea..e14995642f69 100644
--- a/sd/source/ui/view/drviewsf.cxx
+++ b/sd/source/ui/view/drviewsf.cxx
@@ -479,7 +479,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
                 SfxStyleSheet* pStyleSheet = mpDrawView->GetStyleSheet();
                 if( pStyleSheet )
                 {
-                    if( nSlotId != SID_STYLE_APPLY && 
!mpDrawView->AreObjectsMarked() )
+                    if( nSlotId != SID_STYLE_APPLY && 
mpDrawView->GetMarkedObjectList().GetMarkCount() == 0 )
                     {
                         SfxTemplateItem aTmpItem( nWhich, OUString() );
                         aAllSet.Put( aTmpItem );
@@ -581,7 +581,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
                     }
                     else if 
(static_cast<SfxStyleFamily>(pFamilyItem->GetValue()) == SfxStyleFamily::Para)
                     {
-                        if (!mpDrawView->AreObjectsMarked())
+                        if (mpDrawView->GetMarkedObjectList().GetMarkCount() 
== 0)
                         {
                             rSet.DisableItem(nWhich);
                         }
@@ -591,7 +591,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
                 // view state; an actual set family can not be considered
                 else
                 {
-                    if (!mpDrawView->AreObjectsMarked())
+                    if (mpDrawView->GetMarkedObjectList().GetMarkCount() == 0)
                     {
                         rSet.DisableItem(nWhich);
                     }
@@ -601,7 +601,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
 
             case SID_STYLE_UPDATE_BY_EXAMPLE:
             {
-                if (!mpDrawView->AreObjectsMarked())
+                if (mpDrawView->GetMarkedObjectList().GetMarkCount() == 0)
                 {
                     rSet.DisableItem(nWhich);
                 }
@@ -731,7 +731,7 @@ void DrawViewShell::GetAttrState( SfxItemSet& rSet )
 
     // if the view owns selected objects, corresponding items have to be
     // changed from SfxItemState::DEFAULT (_ON) to SfxItemState::DISABLED
-    if( mpDrawView->AreObjectsMarked() )
+    if( mpDrawView->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         SfxWhichIter aNewIter( *pSet );
         nWhich = aNewIter.FirstWhich();
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index f8013c3bcadd..2112cd62b744 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -242,7 +242,7 @@ void View::DoCut()
 
     if( pOLV )
         const_cast<OutlinerView*>(pOLV)->Cut();
-    else if( AreObjectsMarked() )
+    else if( GetMarkedObjectList().GetMarkCount() != 0 )
     {
         OUString aStr(SdResId(STR_UNDO_CUT));
 
@@ -259,7 +259,7 @@ void View::DoCopy()
 
     if( pOLV )
         const_cast<OutlinerView*>(pOLV)->Copy();
-    else if( AreObjectsMarked() )
+    else if( GetMarkedObjectList().GetMarkCount() != 0 )
     {
         BrkAction();
         CreateClipboardDataObject();
@@ -341,7 +341,7 @@ void View::DoPaste (::sd::Window* pWindow)
 
 void View::StartDrag( const Point& rStartPos, vcl::Window* pWindow )
 {
-    if (!AreObjectsMarked() || !IsAction() || !mpViewSh || !pWindow)
+    if (GetMarkedObjectList().GetMarkCount() == 0 || !IsAction() || !mpViewSh 
|| !pWindow)
         return;
 
     BrkAction();
diff --git a/sd/source/ui/view/sdview5.cxx b/sd/source/ui/view/sdview5.cxx
index c3ac066bc0ec..c593526189c2 100644
--- a/sd/source/ui/view/sdview5.cxx
+++ b/sd/source/ui/view/sdview5.cxx
@@ -61,7 +61,7 @@ SdrObject* View::GetSelectedSingleObject(SdPage const * pPage)
     if( pPage )
     {
         // first try selected shape
-        if ( AreObjectsMarked() )
+        if ( GetMarkedObjectList().GetMarkCount() != 0 )
         {
             const SdrMarkList& rMarkList = GetMarkedObjectList();
 
diff --git a/sd/source/ui/view/unmodpg.cxx b/sd/source/ui/view/unmodpg.cxx
index 4ca02f294269..8ed7837b79ec 100644
--- a/sd/source/ui/view/unmodpg.cxx
+++ b/sd/source/ui/view/unmodpg.cxx
@@ -92,7 +92,7 @@ void ModifyPageUndoAction::Undo()
     SdrViewIter::ForAllViews(mpPage,
         [] (SdrView* pView)
         {
-            if(pView->AreObjectsMarked())
+            if(pView->GetMarkedObjectList().GetMarkCount() != 0)
                 pView->UnmarkAll();
         });
 
@@ -136,7 +136,7 @@ void ModifyPageUndoAction::Redo()
     SdrViewIter::ForAllViews(mpPage,
         [] (SdrView* pView)
         {
-            if(pView->AreObjectsMarked())
+            if(pView->GetMarkedObjectList().GetMarkCount() != 0)
                 pView->UnmarkAll();
         });
 
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index cb76eaf99844..2bf5fafdfe44 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -66,7 +66,7 @@ void  ViewShell::GetMenuState( SfxItemSet &rSet )
 
         SdrView* pDrView = GetDrawView();
 
-        if( pDrView->AreObjectsMarked() )
+        if( pDrView->GetMarkedObjectList().GetMarkCount() != 0 )
         {
             SfxStyleSheet* pStyleSheet = pDrView->GetStyleSheet();
             if( pStyleSheet )
diff --git a/svx/source/dialog/graphctl.cxx b/svx/source/dialog/graphctl.cxx
index 34e411923464..31892b253b97 100644
--- a/svx/source/dialog/graphctl.cxx
+++ b/svx/source/dialog/graphctl.cxx
@@ -310,7 +310,7 @@ bool GraphCtrl::KeyInput( const KeyEvent& rKEvt )
                     pView->BrkAction();
                     bProc = true;
                 }
-                else if ( pView->AreObjectsMarked() )
+                else if ( pView->GetMarkedObjectList().GetMarkCount() != 0 )
                 {
                     pView->UnmarkAllObj();
                     bProc = true;
@@ -410,7 +410,7 @@ bool GraphCtrl::KeyInput( const KeyEvent& rKEvt )
                 nY = 0;
             }
 
-            if (pView->AreObjectsMarked() && !aCode.IsMod1() )
+            if (pView->GetMarkedObjectList().GetMarkCount() != 0 && 
!aCode.IsMod1() )
             {
                 if(aCode.IsMod2())
                 {
diff --git a/svx/source/engine3d/view3d.cxx b/svx/source/engine3d/view3d.cxx
index 55787cc4a2df..3507bc1972bd 100644
--- a/svx/source/engine3d/view3d.cxx
+++ b/svx/source/engine3d/view3d.cxx
@@ -812,7 +812,7 @@ void E3dView::ImpCreate3DObject(E3dScene* pScene, 
SdrObject* pObj, bool bExtrude
 
 void E3dView::ConvertMarkedObjTo3D(bool bExtrude, const basegfx::B2DPoint& 
rPnt1, const basegfx::B2DPoint& rPnt2)
 {
-    if(!AreObjectsMarked())
+    if(GetMarkedObjectList().GetMarkCount() == 0)
         return;
 
     // Create undo
@@ -1368,7 +1368,7 @@ void E3dView::Start3DCreation()
     SetMarkHandles(nullptr);
 
     //HMHif (bVis) ShowMarkHdl();
-    if (AreObjectsMarked()) MarkListHasChanged();
+    if (GetMarkedObjectList().GetMarkCount() != 0) MarkListHasChanged();
 
     // Show mirror polygon IMMEDIATELY
     const SdrHdlList &aHdlList = GetHdlList();
@@ -1424,7 +1424,7 @@ void E3dView::End3DCreation(bool 
bUseDefaultValuesForMirrorAxes)
 {
     ResetCreationActive();
 
-    if(!AreObjectsMarked())
+    if(GetMarkedObjectList().GetMarkCount() == 0)
         return;
 
     if(bUseDefaultValuesForMirrorAxes)
diff --git a/svx/source/svdraw/svddrgv.cxx b/svx/source/svdraw/svddrgv.cxx
index 0f41314f8c57..b7ae687d9d0c 100644
--- a/svx/source/svdraw/svddrgv.cxx
+++ b/svx/source/svdraw/svddrgv.cxx
@@ -711,7 +711,7 @@ bool SdrDragView::EndInsObjPoint(SdrCreateCmd eCmd)
 bool SdrDragView::IsInsGluePointPossible() const
 {
     bool bRet=false;
-    if (IsInsGluePointMode() && AreObjectsMarked())
+    if (IsInsGluePointMode() && GetMarkedObjectList().GetMarkCount() != 0)
     {
         if (GetMarkedObjectList().GetMarkCount()==1)
         {
diff --git a/svx/source/svdraw/svdedtv1.cxx b/svx/source/svdraw/svdedtv1.cxx
index 50f17849f164..0f9e703517fe 100644
--- a/svx/source/svdraw/svdedtv1.cxx
+++ b/svx/source/svdraw/svdedtv1.cxx
@@ -1061,7 +1061,7 @@ std::vector<sal_uInt16> GetAllCharPropIds(std::span< 
const SfxPoolItem* const >
 
 void SdrEditView::SetAttrToMarked(const SfxItemSet& rAttr, bool bReplaceAll)
 {
-    if (!AreObjectsMarked())
+    if (GetMarkedObjectList().GetMarkCount() == 0)
         return;
 
 #ifdef DBG_UTIL
@@ -1293,7 +1293,7 @@ SfxStyleSheet* SdrEditView::GetStyleSheetFromMarked() 
const
 
 void SdrEditView::SetStyleSheetToMarked(SfxStyleSheet* pStyleSheet, bool 
bDontRemoveHardAttr)
 {
-    if (!AreObjectsMarked())
+    if (GetMarkedObjectList().GetMarkCount() == 0)
         return;
 
     const bool bUndo = IsUndoEnabled();
@@ -1375,7 +1375,7 @@ SfxItemSet SdrEditView::GetGeoAttrFromMarked() const
             SID_ATTR_TRANSFORM_POS_X, SID_ATTR_TRANSFORM_ANGLE,
             SID_ATTR_TRANSFORM_PROTECT_POS, SID_ATTR_TRANSFORM_AUTOHEIGHT>);
 
-    if (AreObjectsMarked())
+    if (GetMarkedObjectList().GetMarkCount() != 0)
     {
         SfxItemSet aMarkAttr(GetAttrFromMarked(false)); // because of 
AutoGrowHeight and corner radius
         tools::Rectangle aRect(GetMarkedObjRect());
diff --git a/svx/source/svdraw/svdedtv2.cxx b/svx/source/svdraw/svdedtv2.cxx
index a5976f135478..72e7c4737860 100644
--- a/svx/source/svdraw/svdedtv2.cxx
+++ b/svx/source/svdraw/svdedtv2.cxx
@@ -993,7 +993,7 @@ void SdrEditView::DistributeMarkedObjects(sal_uInt16 SlotID)
 void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
 {
     // #i73441# check content
-    if(!AreObjectsMarked())
+    if(GetMarkedObjectList().GetMarkCount() == 0)
         return;
 
     SdrMarkList aRemove;
@@ -1019,7 +1019,7 @@ void SdrEditView::MergeMarkedObjects(SdrMergeMode eMode)
     // mechanisms. In a next step the polygon clipper will even be able to 
clip curves...
     // ConvertMarkedToPolyObj(true);
     ConvertMarkedToPathObj(true);
-    OSL_ENSURE(AreObjectsMarked(), "no more objects selected after 
preparations (!)");
+    OSL_ENSURE(GetMarkedObjectList().GetMarkCount() != 0, "no more objects 
selected after preparations (!)");
 
     for(size_t a=0; a<GetMarkedObjectList().GetMarkCount(); ++a)
     {
@@ -1781,7 +1781,7 @@ void SdrEditView::DismantleMarkedObjects(bool bMakeLines)
 
 void SdrEditView::GroupMarked()
 {
-    if (!AreObjectsMarked())
+    if (GetMarkedObjectList().GetMarkCount() == 0)
         return;
 
     GetMarkedObjectList().ForceSort();
@@ -2031,7 +2031,8 @@ rtl::Reference<SdrObject> 
SdrEditView::ImpConvertOneObj(SdrObject* pObj, bool bP
 
 void SdrEditView::ImpConvertTo(bool bPath, bool bLineToArea)
 {
-    if (!AreObjectsMarked())        return;
+    if (GetMarkedObjectList().GetMarkCount() == 0)
+        return;
 
     bool bMrkChg = false;
     const size_t nMarkCount=GetMarkedObjectList().GetMarkCount();
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index d077171b53ab..256345560b30 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -1584,7 +1584,7 @@ void SdrMarkView::SetDragMode(SdrDragMode eMode)
         ForceRefToMarked();
         SetMarkHandles(nullptr);
         {
-            if (AreObjectsMarked()) MarkListHasChanged();
+            if (GetMarkedObjectList().GetMarkCount() != 0) 
MarkListHasChanged();
         }
     }
 }
diff --git a/svx/source/svdraw/svdundo.cxx b/svx/source/svdraw/svdundo.cxx
index bec090c6339c..af55855405d1 100644
--- a/svx/source/svdraw/svdundo.cxx
+++ b/svx/source/svdraw/svdundo.cxx
@@ -144,7 +144,7 @@ bool SdrUndoGroup::CanSdrRepeat(SdrView& rView) const
     switch (eFunction)
     {
     case SdrRepeatFunc::NONE           :  return false;
-    case SdrRepeatFunc::Delete         :  return rView.AreObjectsMarked();
+    case SdrRepeatFunc::Delete         :  return 
rView.GetMarkedObjectList().GetMarkCount() != 0;
     case SdrRepeatFunc::CombinePolyPoly:  return rView.IsCombinePossible();
     case SdrRepeatFunc::CombineOnePoly :  return rView.IsCombinePossible(true);
     case SdrRepeatFunc::DismantlePolys :  return rView.IsDismantlePossible();
@@ -544,7 +544,7 @@ void SdrUndoMoveObj::SdrRepeat(SdrView& rView)
 
 bool SdrUndoMoveObj::CanSdrRepeat(SdrView& rView) const
 {
-    return rView.AreObjectsMarked();
+    return rView.GetMarkedObjectList().GetMarkCount() != 0;
 }
 
 OUString SdrUndoMoveObj::GetSdrRepeatComment() const
@@ -806,7 +806,7 @@ void SdrUndoDelObj::SdrRepeat(SdrView& rView)
 
 bool SdrUndoDelObj::CanSdrRepeat(SdrView& rView) const
 {
-    return rView.AreObjectsMarked();
+    return rView.GetMarkedObjectList().GetMarkCount() != 0;
 }
 
 OUString SdrUndoDelObj::GetSdrRepeatComment() const
@@ -1105,7 +1105,7 @@ OUString SdrUndoObjSetText::GetSdrRepeatComment() const
 
 void SdrUndoObjSetText::SdrRepeat(SdrView& rView)
 {
-    if (!(bNewTextAvailable && rView.AreObjectsMarked()))
+    if (!(bNewTextAvailable && rView.GetMarkedObjectList().GetMarkCount() != 
0))
         return;
 
     const SdrMarkList& rML=rView.GetMarkedObjectList();
@@ -1138,7 +1138,7 @@ void SdrUndoObjSetText::SdrRepeat(SdrView& rView)
 bool SdrUndoObjSetText::CanSdrRepeat(SdrView& rView) const
 {
     bool bOk = false;
-    if (bNewTextAvailable && rView.AreObjectsMarked()) {
+    if (bNewTextAvailable && rView.GetMarkedObjectList().GetMarkCount() != 0) {
         bOk=true;
     }
     return bOk;
diff --git a/svx/source/svdraw/svdview.cxx b/svx/source/svdraw/svdview.cxx
index ece2f48db3fd..a23dcc0c65ea 100644
--- a/svx/source/svdraw/svdview.cxx
+++ b/svx/source/svdraw/svdview.cxx
@@ -1201,7 +1201,7 @@ OUString SdrView::GetStatusText()
     }
     else if(IsMarkObj())
     {
-        if(AreObjectsMarked())
+        if(GetMarkedObjectList().GetMarkCount() != 0)
         {
             aStr = SvxResId(STR_ViewMarkMoreObjs);
         }
@@ -1274,7 +1274,7 @@ OUString SdrView::GetStatusText()
 
     if(aStr == STR_NOTHING)
     {
-        if (AreObjectsMarked()) {
+        if (GetMarkedObjectList().GetMarkCount() != 0) {
             aStr = ImpGetDescriptionString(STR_ViewMarked);
             if (IsGluePointEditMode()) {
                 if (HasMarkedGluePoints()) {
diff --git a/svx/source/svdraw/svdxcgv.cxx b/svx/source/svdraw/svdxcgv.cxx
index b8079ae9e5dd..696414b2108c 100644
--- a/svx/source/svdraw/svdxcgv.cxx
+++ b/svx/source/svdraw/svdxcgv.cxx
@@ -430,7 +430,7 @@ BitmapEx SdrExchangeView::GetMarkedObjBitmapEx(bool 
bNoVDevIfOneBmpMarked, const
 {
     BitmapEx aBmp;
 
-    if( AreObjectsMarked() )
+    if( GetMarkedObjectList().GetMarkCount() != 0 )
     {
         if(1 == GetMarkedObjectList().GetMarkCount())
         {
@@ -521,7 +521,7 @@ GDIMetaFile SdrExchangeView::GetMarkedObjMetaFile(bool 
bNoVDevIfOneMtfMarked) co
 {
     GDIMetaFile aMtf;
 
-    if( AreObjectsMarked() )
+    if( GetMarkedObjectList().GetMarkCount() != 0 )
     {
         tools::Rectangle   aBound( GetMarkedObjBoundRect() );
         Size        aBoundSize( aBound.GetWidth(), aBound.GetHeight() );
@@ -582,7 +582,7 @@ Graphic SdrExchangeView::GetAllMarkedGraphic() const
 {
     Graphic aRet;
 
-    if( AreObjectsMarked() )
+    if( GetMarkedObjectList().GetMarkCount() != 0 )
     {
         if( ( 1 == GetMarkedObjectList().GetMarkCount() ) && 
GetMarkedObjectList().GetMark( 0 ) )
             aRet = 
SdrExchangeView::GetObjGraphic(*GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj());
diff --git a/sw/source/core/frmedt/fefly1.cxx b/sw/source/core/frmedt/fefly1.cxx
index 2b25d21424e3..80c6fafcc3ff 100644
--- a/sw/source/core/frmedt/fefly1.cxx
+++ b/sw/source/core/frmedt/fefly1.cxx
@@ -261,7 +261,7 @@ void SwFEShell::SelectFlyFrame( SwFlyFrame& rFrame )
     if( rFrame.IsFlyInContentFrame() && rFrame.GetAnchorFrame() )
          rFrame.GetAnchorFrame()->SetCompletePaint();
 
-    if( pImpl->GetDrawView()->AreObjectsMarked() )
+    if( pImpl->GetDrawView()->GetMarkedObjectList().GetMarkCount() != 0 )
         pImpl->GetDrawView()->UnmarkAll();
 
     pImpl->GetDrawView()->MarkObj( rFrame.GetVirtDrawObj(),
diff --git a/sw/source/core/frmedt/feshview.cxx 
b/sw/source/core/frmedt/feshview.cxx
index f15fb3e2f3e6..5644769b1aaf 100644
--- a/sw/source/core/frmedt/feshview.cxx
+++ b/sw/source/core/frmedt/feshview.cxx
@@ -733,7 +733,7 @@ void SwFEShell::StartCropImage()
 void SwFEShell::BeginDrag( const Point* pPt, bool bIsShift)
 {
     SdrView *pView = Imp()->GetDrawView();
-    if ( pView && pView->AreObjectsMarked() )
+    if ( pView && pView->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         m_pChainFrom.reset();
         m_pChainTo.reset();
diff --git a/sw/source/core/frmedt/fews.cxx b/sw/source/core/frmedt/fews.cxx
index b748ecbe1122..f9f41eb0e76e 100644
--- a/sw/source/core/frmedt/fews.cxx
+++ b/sw/source/core/frmedt/fews.cxx
@@ -316,7 +316,7 @@ void SwFEShell::ShellGetFocus()
     {
         if (!comphelper::LibreOfficeKit::isActive())
             Imp()->GetDrawView()->showMarkHandles();
-        if ( Imp()->GetDrawView()->AreObjectsMarked() )
+        if ( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() != 0 )
             FrameNotify( this, FLY_DRAG_START );
     }
 }
@@ -325,7 +325,7 @@ void SwFEShell::ShellLoseFocus()
 {
     SwCursorShell::ShellLoseFocus();
 
-    if ( HasDrawView() && Imp()->GetDrawView()->AreObjectsMarked() )
+    if ( HasDrawView() && 
Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         if (!comphelper::LibreOfficeKit::isActive())
             Imp()->GetDrawView()->hideMarkHandles();
@@ -1336,7 +1336,7 @@ void SwFEShell::MoveObjectIfActive( 
svt::EmbeddedObjectRef&, const Point& )
 void SwFEShell::ToggleHeaderFooterEdit()
 {
     // Clear objects selection
-    if ( Imp()->GetDrawView()->AreObjectsMarked() )
+    if ( Imp()->GetDrawView()->GetMarkedObjectList().GetMarkCount() != 0 )
     {
         Imp()->GetDrawView()->UnmarkAll();
         ClearMark();
diff --git a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx 
b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
index 5cf2fb6edf04..6a865078af74 100644
--- a/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
+++ b/sw/source/uibase/dialog/SwSpellDialogChildWindow.cxx
@@ -683,7 +683,7 @@ void 
SwSpellDialogChildWindow::MakeTextSelection_Impl(SwWrtShell& rShell, ShellM
             else if ( rShell.HasSelection() || rView.IsDrawMode() )
             {
                 SdrView *pSdrView = rShell.GetDrawView();
-                if(pSdrView && pSdrView->AreObjectsMarked() &&
+                if(pSdrView && pSdrView->GetMarkedObjectList().GetMarkCount() 
!= 0 &&
                     pSdrView->GetHdlList().GetFocusHdl())
                 {
                     
const_cast<SdrHdlList&>(pSdrView->GetHdlList()).ResetFocusHdl();
diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index cf8031a527ae..b0d7adcf36c3 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -1843,7 +1843,7 @@ KEYINPUT_CHECKTABLE:
                     {
                         if(!pFlyFormat && SwKeyState::KeyToView != eFlyState &&
                             (rSh.GetSelectionType() & 
(SelectionType::DrawObject|SelectionType::DbForm))  &&
-                                rSh.GetDrawView()->AreObjectsMarked())
+                                
rSh.GetDrawView()->GetMarkedObjectList().GetMarkCount() != 0)
                             eKeyState = SwKeyState::Draw_Change;
 
                         if( pFlyFormat )
@@ -1863,7 +1863,7 @@ KEYINPUT_CHECKTABLE:
                     if ( ( pFlyFormat
                            && ( nSelectionType & 
(SelectionType::Frame|SelectionType::Ole|SelectionType::Graphic) ) )
                          || ( ( nSelectionType & 
(SelectionType::DrawObject|SelectionType::DbForm) )
-                              && rSh.GetDrawView()->AreObjectsMarked() ) )
+                              && 
rSh.GetDrawView()->GetMarkedObjectList().GetMarkCount() != 0 ) )
                     {
                         eKeyState = pFlyFormat ? SwKeyState::Fly_Change : 
SwKeyState::Draw_Change;
                         if (nSelectionType & SelectionType::DrawObject)
@@ -1936,7 +1936,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
                     if(SwKeyState::KeyToView != eFlyState)
                     {
                         if((nSelectionType & 
(SelectionType::DrawObject|SelectionType::DbForm))  &&
-                                rSh.GetDrawView()->AreObjectsMarked())
+                                
rSh.GetDrawView()->GetMarkedObjectList().GetMarkCount() != 0)
                             eKeyState = SwKeyState::Draw_Change;
                         else if(nSelectionType & 
(SelectionType::Frame|SelectionType::Ole|SelectionType::Graphic))
                             eKeyState = SwKeyState::Fly_Change;
@@ -2267,7 +2267,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
                         else if((rSh.GetSelectionType() &
                                     
(SelectionType::DrawObject|SelectionType::DbForm|
                                         
SelectionType::Frame|SelectionType::Ole|SelectionType::Graphic))  &&
-                                rSh.GetDrawView()->AreObjectsMarked())
+                                
rSh.GetDrawView()->GetMarkedObjectList().GetMarkCount() != 0)
                             eKeyState = SwKeyState::EnterDrawHandleMode;
                         else
                         {
@@ -2290,7 +2290,7 @@ KEYINPUT_CHECKTABLE_INSDEL:
                         }
                         else if((rSh.GetSelectionType() & 
(SelectionType::DrawObject|SelectionType::DbForm|
                                         
SelectionType::Frame|SelectionType::Ole|SelectionType::Graphic)) &&
-                                rSh.GetDrawView()->AreObjectsMarked())
+                                
rSh.GetDrawView()->GetMarkedObjectList().GetMarkCount() != 0)
                         {
                             eKeyState = SwKeyState::EnterDrawHandleMode;
                         }
@@ -4391,7 +4391,7 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
                 if ( m_bIsInMove || IsMinMove( m_aStartPos, aPixPt ) )
                 {
                     // event processing for resizing
-                    if (pSdrView && pSdrView->AreObjectsMarked())
+                    if (pSdrView && 
pSdrView->GetMarkedObjectList().GetMarkCount() != 0)
                     {
                         const Point aSttPt( PixelToLogic( m_aStartPos ) );
 
diff --git a/sw/source/uibase/shells/drawdlg.cxx 
b/sw/source/uibase/shells/drawdlg.cxx
index b778ea9b806e..028b77c7830a 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -67,7 +67,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
                 {
                     if (nResult == RET_OK)
                     {
-                        if (pView->AreObjectsMarked())
+                        if (pView->GetMarkedObjectList().GetMarkCount() != 0)
                         {
                             pSh->StartAction();
                             pView->SetAttributes(*pDlg->GetOutputItemSet());
@@ -90,7 +90,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
 
         case SID_MEASURE_DLG:
         {
-            bool bHasMarked = pView->AreObjectsMarked();
+            bool bHasMarked = pView->GetMarkedObjectList().GetMarkCount() != 0;
 
             SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
             ScopedVclPtr<SfxAbstractDialog> 
pDlg(pFact->CreateSfxDialog(rReq.GetFrameWeld(),
@@ -109,7 +109,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
 
         case SID_ATTRIBUTES_AREA:
         {
-            bool bHasMarked = pView->AreObjectsMarked();
+            bool bHasMarked = pView->GetMarkedObjectList().GetMarkCount() != 0;
 
             SvxAbstractDialogFactory* pFact = 
SvxAbstractDialogFactory::Create();
             VclPtr<AbstractSvxAreaTabDialog> 
pDlg(pFact->CreateSvxAreaTabDialog(rReq.GetFrameWeld(),
@@ -159,7 +159,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
 
         case SID_ATTRIBUTES_LINE:
         {
-            bool bHasMarked = pView->AreObjectsMarked();
+            bool bHasMarked = pView->GetMarkedObjectList().GetMarkCount() != 0;
 
             const SdrObject* pObj = nullptr;
             const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -258,7 +258,7 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest const & rReq)
 
     if (pArgs)
     {
-        if(pView->AreObjectsMarked())
+        if(pView->GetMarkedObjectList().GetMarkCount() != 0)
         {
             std::unique_ptr<SfxItemSet> pNewArgs = pArgs->Clone();
             lcl_convertStringArguments(pNewArgs);
@@ -337,7 +337,7 @@ void SwDrawShell::GetDrawAttrState(SfxItemSet& rSet)
 {
     SdrView* pSdrView = GetShell().GetDrawView();
 
-    if (pSdrView->AreObjectsMarked())
+    if (pSdrView->GetMarkedObjectList().GetMarkCount() != 0)
     {
         bool bDisable = Disable( rSet );
 
diff --git a/sw/source/uibase/shells/drwbassh.cxx 
b/sw/source/uibase/shells/drwbassh.cxx
index 3ddd29689adf..0e5409700ceb 100644
--- a/sw/source/uibase/shells/drwbassh.cxx
+++ b/sw/source/uibase/shells/drwbassh.cxx
@@ -118,7 +118,7 @@ void SwDrawBaseShell::Execute(SfxRequest& rReq)
     {
         case FN_DRAW_WRAP_DLG:
         {
-            if(pSdrView->AreObjectsMarked())
+            if(pSdrView->GetMarkedObjectList().GetMarkCount() != 0)
             {
                 if(!pArgs)
                 {
@@ -174,7 +174,7 @@ void SwDrawBaseShell::Execute(SfxRequest& rReq)
 
         case SID_ATTR_TRANSFORM:
         {
-            if(pSdrView->AreObjectsMarked())
+            if(pSdrView->GetMarkedObjectList().GetMarkCount() != 0)
             {
                 if(!pArgs)
                 {
diff --git a/sw/source/uibase/shells/drwtxtsh.cxx 
b/sw/source/uibase/shells/drwtxtsh.cxx
index eccfa7936f2c..784ff5b82804 100644
--- a/sw/source/uibase/shells/drwtxtsh.cxx
+++ b/sw/source/uibase/shells/drwtxtsh.cxx
@@ -449,7 +449,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
                     {
                         if (nResult == RET_OK)
                         {
-                            if (m_pSdrView->AreObjectsMarked())
+                            if 
(m_pSdrView->GetMarkedObjectList().GetMarkCount() != 0)
                             {
                                 
m_pSdrView->SetAttributes(*pDlg->GetOutputItemSet());
                                 xRequest->Done(*(pDlg->GetOutputItemSet()));
@@ -465,7 +465,7 @@ void SwDrawTextShell::ExecDraw(SfxRequest &rReq)
         case SID_TABLE_VERT_BOTTOM:
             {
                 sal_uInt16 nSId = rReq.GetSlot();
-                if (m_pSdrView->AreObjectsMarked())
+                if (m_pSdrView->GetMarkedObjectList().GetMarkCount() != 0)
                 {
                     SdrTextVertAdjust eTVA = SDRTEXTVERTADJUST_TOP;
                     if (nSId == SID_TABLE_VERT_CENTER)
diff --git a/sw/source/uibase/uiview/formatclipboard.cxx 
b/sw/source/uibase/uiview/formatclipboard.cxx
index 4c300797d41e..1878b3efc209 100644
--- a/sw/source/uibase/uiview/formatclipboard.cxx
+++ b/sw/source/uibase/uiview/formatclipboard.cxx
@@ -353,7 +353,7 @@ void SwFormatClipboard::Copy( SwWrtShell& rWrtShell, 
SfxItemPool& rPool, bool bP
         SdrView* pDrawView = rWrtShell.GetDrawView();
         if(pDrawView)
         {
-            if( pDrawView->AreObjectsMarked() )
+            if( pDrawView->GetMarkedObjectList().GetMarkCount() != 0 )
             {
                 pItemSet_TextAttr = std::make_unique<SfxItemSet>( 
pDrawView->GetAttrFromMarked(true/*bOnlyHardAttr*/) );
                 //remove attributes defining the type/data of custom shapes
diff --git a/sw/source/uibase/uiview/view2.cxx 
b/sw/source/uibase/uiview/view2.cxx
index 0ac3f7b1ba3e..db00d02b1933 100644
--- a/sw/source/uibase/uiview/view2.cxx
+++ b/sw/source/uibase/uiview/view2.cxx
@@ -1218,7 +1218,7 @@ void SwView::Execute(SfxRequest &rReq)
             else if ( m_pWrtShell->HasSelection() || IsDrawMode() )
             {
                 SdrView *pSdrView = m_pWrtShell->HasDrawView() ? 
m_pWrtShell->GetDrawView() : nullptr;
-                if(pSdrView && pSdrView->AreObjectsMarked() &&
+                if(pSdrView && pSdrView->GetMarkedObjectList().GetMarkCount() 
!= 0 &&
                     pSdrView->GetHdlList().GetFocusHdl())
                 {
                     
const_cast<SdrHdlList&>(pSdrView->GetHdlList()).ResetFocusHdl();

Reply via email to