summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-09-21 14:49:11 +0300
committerTor Lillqvist <tml@collabora.com>2014-10-20 16:29:45 +0300
commit99e5f079bd1ff679f02d7a25e12c9ff68b591bbf (patch)
treea36800df5e2a4d77b96793fe1a95ed1ed024e027 /sfx2
parentf330a2a496390750b7aacdc6c089f8b636c7078f (diff)
Disable the email sending menu entries when sandboxed on OS X
The way we send email doesn't work anyway in a sandboxed app on OS X anyway. If we want to offer the functionality, we need to implement it in an OS X -specific way, perhaps using the Scripting Target functionality of Mail.app. What we need, to be really "native" in this regards on OS X, would be to have a "share" functionality that would in addition to sharing through email offer AirDrop, Facebook, Twitter etc. Like Apple's own apps. Quite possibly there are system APIs that automate much of that. But they probably require your app to be more "native" in other ways, too, like using NSDocument etc. Later... Change-Id: Id1424377b7d493d4ec696f3242dae55a2a67dfc7 (cherry picked from commit 6bc38d2758c3535ed32bfe0bd2a475b7938f6fc1)
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/viewsh.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index c8b8eb7e26fe..1882f08601b9 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <svl/stritem.hxx>
#include <svl/eitem.hxx>
#include <svl/whiter.hxx>
@@ -784,6 +786,16 @@ void SfxViewShell::GetState_Impl( SfxItemSet &rSet )
{
switch ( nSID )
{
+#if HAVE_FEATURE_MACOSX_SANDBOX
+ case SID_BLUETOOTH_SENDDOC:
+ case SID_MAIL_SENDDOC:
+ case SID_MAIL_SENDDOCASFORMAT:
+ case SID_MAIL_SENDDOCASMS:
+ case SID_MAIL_SENDDOCASOOO:
+ case SID_MAIL_SENDDOCASPDF:
+ rSet.DisableItem(nSID);
+ break;
+#endif
// Printer functions
case SID_PRINTDOC:
case SID_PRINTDOCDIRECT: