summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviews4.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-11-27 15:29:00 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2024-11-27 17:23:49 +0100
commitaea7c6a01301a368e47a54cc85408bd9f34ace5a (patch)
tree31f09d0cc6625a0a54116166842f62a45fdbb66e /sd/source/ui/view/drviews4.cxx
parent4f7cdf40ded90d392331d45bab5adfc0986fe8e8 (diff)
sd: Drop unnecessary non-zero check
The second part of the condition already makes sure that the mark count is non-zero. Change-Id: I174bfc2ff3112616a63dda64f4435cd3d235343c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177424 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'sd/source/ui/view/drviews4.cxx')
-rw-r--r--sd/source/ui/view/drviews4.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 6db20f982c80..55204c760178 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -646,8 +646,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
{
// is something selected?
const SdrMarkList& rMarkList(mpDrawView->GetMarkedObjectList());
- if (rMarkList.GetMarkCount() != 0 &&
- rMarkList.GetMarkCount() == 1 )
+ if (rMarkList.GetMarkCount() == 1)
{
pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
if( HasCurrentFunction(SID_BEZIER_EDIT) && (dynamic_cast< SdrPathObj * >( pObj ) != nullptr ) )
@@ -788,8 +787,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
}
// multiple selection
- else if (rMarkList.GetMarkCount() != 0 &&
- rMarkList.GetMarkCount() > 1 )
+ else if (rMarkList.GetMarkCount() > 1)
{
aPopupId = "multiselect";
}
@@ -822,7 +820,7 @@ void DrawViewShell::Command(const CommandEvent& rCEvt, ::sd::Window* pWin)
const SdrMarkList& rMarkList(mpDrawView->GetMarkedObjectList());
//middle of the bounding rect if something is marked
- if( rMarkList.GetMarkCount() != 0 && rMarkList.GetMarkCount() >= 1 )
+ if (rMarkList.GetMarkCount() >= 1)
{
::tools::Rectangle aMarkRect;
rMarkList.TakeBoundRect(nullptr,aMarkRect);