diff options
author | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-10-22 11:32:09 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2019-10-23 12:17:00 +0200 |
commit | ec0a3db0cbb5413d10e70c9843e679bbf2327c15 (patch) | |
tree | b014c4a8d600fa2e7ee50b01f2ec80df34e57772 /sd | |
parent | 942d1d2ea59bf4605f2c464a6b29c967fa9f8de8 (diff) |
Add document-level option to lock down file export
Setting this option will disable any export command
(File->Export*, File->Send*, graphic/chart export context menu,
save as, mailmerge wizard, ...)
Change-Id: I07a2a3b9179b494ac839e7d1e407194600679aa1
Reviewed-on: https://gerrit.libreoffice.org/81316
Tested-by: Jenkins
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/sdi/_drvwsh.sdi | 1 | ||||
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 3 | ||||
-rw-r--r-- | sd/source/ui/view/drviewsj.cxx | 5 |
3 files changed, 9 insertions, 0 deletions
diff --git a/sd/sdi/_drvwsh.sdi b/sd/sdi/_drvwsh.sdi index b49088f395c0..6a30f87e9b59 100644 --- a/sd/sdi/_drvwsh.sdi +++ b/sd/sdi/_drvwsh.sdi @@ -2785,6 +2785,7 @@ interface DrawView SID_PRESENTATION_MINIMIZER [ ExecMethod = FuTemporary ; + StateMethod = GetMenuState ; ] SID_GO_TO_NEXT_PAGE [ diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index e405a987fc84..7372d2327ff0 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -1596,6 +1596,9 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) rSet.DisableItem(SID_SAVE_BACKGROUND); } + if (GetViewShell()->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 80882a93394e..ee65cb87fa94 100644 --- a/sd/source/ui/view/drviewsj.cxx +++ b/sd/source/ui/view/drviewsj.cxx @@ -508,6 +508,11 @@ void DrawViewShell::GetMenuStateSel( SfxItemSet &rSet ) rSet.DisableItem(SID_COPY); rSet.DisableItem(SID_CUT); } + if(GetViewShell()->isExportLocked()) + { + rSet.DisableItem(SID_SAVE_GRAPHIC); + rSet.DisableItem(SID_EXTERNAL_EDIT); + } } } // end of namespace sd |