summaryrefslogtreecommitdiff
path: root/sd/source/ui
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-05-29 13:49:41 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2024-05-30 08:44:37 +0200
commit322a6ca8f912513f69747a68fe5497ee6b643293 (patch)
tree21c616c42d9596e535ae8ed3e757b6ccfb38f42c /sd/source/ui
parent2d362fab91fb70fbe7026c1e96452fe06fa5736e (diff)
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 <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sd/source/ui')
-rw-r--r--sd/source/ui/dlg/tpaction.cxx2
-rw-r--r--sd/source/ui/func/fuconstr.cxx4
-rw-r--r--sd/source/ui/func/fucopy.cxx2
-rw-r--r--sd/source/ui/func/fudraw.cxx12
-rw-r--r--sd/source/ui/func/fuediglu.cxx2
-rw-r--r--sd/source/ui/func/fuformatpaintbrush.cxx2
-rw-r--r--sd/source/ui/func/fuinsert.cxx2
-rw-r--r--sd/source/ui/func/fuline.cxx2
-rw-r--r--sd/source/ui/func/fupoor.cxx4
-rw-r--r--sd/source/ui/func/fusel.cxx2
-rw-r--r--sd/source/ui/func/futempl.cxx2
-rw-r--r--sd/source/ui/func/futext.cxx8
-rw-r--r--sd/source/ui/func/futhes.cxx2
-rw-r--r--sd/source/ui/func/futransf.cxx2
-rw-r--r--sd/source/ui/view/Outliner.cxx4
-rw-r--r--sd/source/ui/view/drbezob.cxx2
-rw-r--r--sd/source/ui/view/drviews1.cxx4
-rw-r--r--sd/source/ui/view/drviews2.cxx2
-rw-r--r--sd/source/ui/view/drviews3.cxx4
-rw-r--r--sd/source/ui/view/drviews4.cxx6
-rw-r--r--sd/source/ui/view/drviews7.cxx6
-rw-r--r--sd/source/ui/view/drviews8.cxx2
-rw-r--r--sd/source/ui/view/drviews9.cxx2
-rw-r--r--sd/source/ui/view/drviewsa.cxx2
-rw-r--r--sd/source/ui/view/drviewse.cxx6
-rw-r--r--sd/source/ui/view/drviewsf.cxx10
-rw-r--r--sd/source/ui/view/sdview2.cxx6
-rw-r--r--sd/source/ui/view/sdview5.cxx2
-rw-r--r--sd/source/ui/view/unmodpg.cxx4
-rw-r--r--sd/source/ui/view/viewshe3.cxx2
30 files changed, 56 insertions, 56 deletions
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 )