summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-12-28 12:10:34 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-03-18 09:13:56 +0100
commit2881c93eeeb4f60af1f0b73c4e6d651702fa9826 (patch)
tree165b71a4da41e0ac6f977273e8b83b2ba751eb35 /sw
parent9b27093374277ccb69df7416c801eea3b35f31c2 (diff)
mailmerge: Disable printing / email when they are not available.
Change-Id: Id6ad5c5b5fa8ce3d39ca07da1430fd5aad1bc3c7
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/app/apphdl.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index 9ea3a8449365..4e2987f3e38d 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -232,8 +232,15 @@ void SwModule::StateOther(SfxItemSet &rSet)
{
SwView* pView = ::GetActiveView();
SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
- if (!pConfigItem)
+
+ // #i51949# hide e-Mail option if e-Mail is not supported
+ // #i63267# printing might be disabled
+ if (!pConfigItem ||
+ (nWhich == FN_MAILMERGE_PRINT_DOCUMENTS && Application::GetSettings().GetMiscSettings().GetDisablePrinting()) ||
+ (nWhich == FN_MAILMERGE_EMAIL_DOCUMENTS && !pConfigItem->IsMailAvailable()))
+ {
rSet.DisableItem(nWhich);
+ }
}
break;
default: