summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app/docsh.cxx
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-10-22 11:32:09 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2019-10-23 12:17:00 +0200
commitec0a3db0cbb5413d10e70c9843e679bbf2327c15 (patch)
treeb014c4a8d600fa2e7ee50b01f2ec80df34e57772 /sw/source/uibase/app/docsh.cxx
parent942d1d2ea59bf4605f2c464a6b29c967fa9f8de8 (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 'sw/source/uibase/app/docsh.cxx')
-rw-r--r--sw/source/uibase/app/docsh.cxx6
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index d9b49fc7789b..08cdb0ca6245 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -1062,7 +1062,7 @@ void SwDocShell::GetState(SfxItemSet& rSet)
case FN_OUTLINE_TO_IMPRESS:
{
SvtModuleOptions aMOpt;
- if ( !aMOpt.IsImpress() )
+ if ( !aMOpt.IsImpress() || GetViewShell()->isExportLocked() )
rSet.DisableItem( nWhich );
}
[[fallthrough]];
@@ -1084,12 +1084,12 @@ void SwDocShell::GetState(SfxItemSet& rSet)
break;
case FN_NEW_GLOBAL_DOC:
- if ( dynamic_cast< const SwGlobalDocShell *>( this ) != nullptr )
+ if ( dynamic_cast< const SwGlobalDocShell *>( this ) != nullptr || GetViewShell()->isExportLocked() )
rSet.DisableItem( nWhich );
break;
case FN_NEW_HTML_DOC:
- if( dynamic_cast< const SwWebDocShell *>( this ) != nullptr )
+ if( dynamic_cast< const SwWebDocShell *>( this ) != nullptr || GetViewShell()->isExportLocked() )
rSet.DisableItem( nWhich );
break;