summaryrefslogtreecommitdiff
path: root/sd/source
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-04-08 08:54:21 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2020-04-09 11:14:15 +0200
commit65404e2c72ea2d5d3f6c074121005b8b9369e7fb (patch)
tree15eeeb5b634c461611893dbe3b49d689ef71f5c4 /sd/source
parent40d83914d43f60a196dfabddea0b52e2046b333a (diff)
Move is*Locked methods to object shell
They depend on the model, not the view. Follow-up to 523922ee9d033fd304d2b50a72b76853ddcfbcdf Change-Id: I429bc25b8dd4f04ebf62eddd5ef455b5161e925d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91867 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd/source')
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx2
-rw-r--r--sd/source/ui/view/drviews7.cxx4
-rw-r--r--sd/source/ui/view/drviewsj.cxx5
-rw-r--r--sd/source/ui/view/outlnvsh.cxx2
4 files changed, 7 insertions, 6 deletions
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 0f421b7f99ba..27febd5dde42 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -763,7 +763,7 @@ void SlotManager::GetClipboardState ( SfxItemSet& rSet)
}
ViewShellBase* pBase = mrSlideSorter.GetViewShellBase();
- if (pBase && pBase->isContentExtractionLocked())
+ if (pBase && pBase->GetObjectShell()->isContentExtractionLocked())
{
rSet.DisableItem(SID_COPY);
rSet.DisableItem(SID_CUT);
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx
index e1ea9d36287e..693d0bd1a8dc 100644
--- a/sd/source/ui/view/drviews7.cxx
+++ b/sd/source/ui/view/drviews7.cxx
@@ -915,7 +915,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
if (pOlView)
{
- if (pOlView->GetSelected().isEmpty() || GetViewShell()->isContentExtractionLocked())
+ if (pOlView->GetSelected().isEmpty() || GetObjectShell()->isContentExtractionLocked())
{
rSet.DisableItem( SID_CUT );
rSet.DisableItem( SID_COPY );
@@ -1585,7 +1585,7 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet )
rSet.DisableItem(SID_SAVE_BACKGROUND);
}
- if (GetViewShell()->isExportLocked())
+ if (GetObjectShell()->isExportLocked())
rSet.DisableItem(SID_PRESENTATION_MINIMIZER);
GetModeSwitchingMenuState (rSet);
diff --git a/sd/source/ui/view/drviewsj.cxx b/sd/source/ui/view/drviewsj.cxx
index ee65cb87fa94..772cf4a48ddb 100644
--- a/sd/source/ui/view/drviewsj.cxx
+++ b/sd/source/ui/view/drviewsj.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/embed/EmbedMisc.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>
#include <com/sun/star/presentation/ClickAction.hpp>
+#include <sfx2/objsh.hxx>
#include <svx/svxids.hrc>
#include <svx/sdmetitm.hxx>
#include <editeng/flditem.hxx>
@@ -503,12 +504,12 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet )
rSet.DisableItem (SID_OBJECT_SHEAR);
}
- if (GetViewShell()->isContentExtractionLocked())
+ if (GetObjectShell()->isContentExtractionLocked())
{
rSet.DisableItem(SID_COPY);
rSet.DisableItem(SID_CUT);
}
- if(GetViewShell()->isExportLocked())
+ if(GetObjectShell()->isExportLocked())
{
rSet.DisableItem(SID_SAVE_GRAPHIC);
rSet.DisableItem(SID_EXTERNAL_EDIT);
diff --git a/sd/source/ui/view/outlnvsh.cxx b/sd/source/ui/view/outlnvsh.cxx
index cf594e1f9e85..2c7dcdfdba83 100644
--- a/sd/source/ui/view/outlnvsh.cxx
+++ b/sd/source/ui/view/outlnvsh.cxx
@@ -885,7 +885,7 @@ void OutlineViewShell::GetMenuState( SfxItemSet &rSet )
}
if (!pOlView->GetViewByWindow(GetActiveWindow())->HasSelection()
- || GetViewShell()->isContentExtractionLocked())
+ || GetObjectShell()->isContentExtractionLocked())
{
rSet.DisableItem(SID_CUT);
rSet.DisableItem(SID_COPY);