summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells/drawsh.cxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-01-14 10:09:40 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2025-01-15 10:09:50 +0100
commit1367092fa695456c430b5d1a63dd890382b58ccf (patch)
tree2f9656140bcdc241017019f6c38730fe5811e05d /sw/source/uibase/shells/drawsh.cxx
parent4e35cf055d3074beaef7bf573fafefe4adb2a37e (diff)
sw: Rename SwFEShell::{IsObjSelected -> GetSelectedObjCount}
The method returns the number of selected objects, not just a bool indicating whether any (or a particular) object is selected, other than the SwFEShell::IsObjSelected variant that takes a `const SdrObject&` param. Rename the method to make that clearer. Change-Id: I30afec5322d2e6f1d31e5bc0ca6c252faa1fb4d8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180223 Reviewed-by: Michael Weghorn <m.weghorn@posteo.de> Tested-by: Jenkins
Diffstat (limited to 'sw/source/uibase/shells/drawsh.cxx')
-rw-r--r--sw/source/uibase/shells/drawsh.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index e66d3e98021f..fa9e71964a5a 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -188,7 +188,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
switch (nSlotId)
{
case SID_OBJECT_ROTATE:
- if (rSh.IsObjSelected() && pSdrView->IsRotateAllowed())
+ if (rSh.GetSelectedObjCount() && pSdrView->IsRotateAllowed())
{
if (GetView().IsDrawRotate())
rSh.SetDragMode(SdrDragMode::Move);
@@ -239,7 +239,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
break;
case SID_OBJECT_HELL:
- if (rSh.IsObjSelected())
+ if (rSh.GetSelectedObjCount())
{
rSh.StartUndo( SwUndoId::START );
SetWrapMode(FN_FRAME_WRAPTHRU_TRANSP);
@@ -250,7 +250,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
break;
case SID_OBJECT_HEAVEN:
- if (rSh.IsObjSelected())
+ if (rSh.GetSelectedObjCount())
{
rSh.StartUndo( SwUndoId::START );
SetWrapMode(FN_FRAME_WRAPTHRU);
@@ -261,7 +261,7 @@ void SwDrawShell::Execute(SfxRequest &rReq)
break;
case FN_TOOL_HIERARCHIE:
- if (rSh.IsObjSelected())
+ if (rSh.GetSelectedObjCount())
{
rSh.StartUndo( SwUndoId::START );
if (rSh.GetLayerId() == SdrLayerID(0))
@@ -417,17 +417,17 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
switch( nWhich )
{
case SID_OBJECT_HELL:
- if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(0) || bProtected )
+ if ( !rSh.GetSelectedObjCount() || rSh.GetLayerId() == SdrLayerID(0) || bProtected )
rSet.DisableItem( nWhich );
break;
case SID_OBJECT_HEAVEN:
- if ( !rSh.IsObjSelected() || rSh.GetLayerId() == SdrLayerID(1) || bProtected )
+ if ( !rSh.GetSelectedObjCount() || rSh.GetLayerId() == SdrLayerID(1) || bProtected )
rSet.DisableItem( nWhich );
break;
case FN_TOOL_HIERARCHIE:
- if ( !rSh.IsObjSelected() || bProtected )
+ if ( !rSh.GetSelectedObjCount() || bProtected )
rSet.DisableItem( nWhich );
break;