summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-08-11 17:19:00 +0300
committerTor Lillqvist <tml@iki.fi>2013-08-18 21:11:15 +0300
commite939dfb359761bae395122c1adf68222709da36e (patch)
tree92d835f362b389fbdd421bcf84eaaea7051663be /desktop
parentca538f48e866b4eb69b498786d9030639cfe2ebd (diff)
Add a --nstemporarydirectory switch for potential use when sandboxed
Intentionally very brutally just exit after printing out what NSTemporaryDirectory() returns, as this is for use only in unit testing, so that makefiles can learn the app-specific sandboxed temp dir. Change-Id: I96fba1399ffc43b09fe317c1b9db5af76432f4e0
Diffstat (limited to 'desktop')
-rw-r--r--desktop/Library_sofficeapp.mk12
-rw-r--r--desktop/source/app/cmdlineargs.cxx13
2 files changed, 25 insertions, 0 deletions
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 451c1d88233e..017947655ebc 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -50,6 +50,18 @@ $(eval $(call gb_Library_use_libraries,sofficeapp,\
$(gb_UWINAPI) \
))
+ifeq ($(OS),MACOSX)
+
+$(eval $(call gb_Library_add_cxxflags,sofficeapp,\
+ $(gb_OBJCXXFLAGS) \
+))
+
+$(eval $(call gb_Library_use_system_darwin_frameworks,sofficeapp,\
+ Foundation \
+))
+
+endif
+
ifeq ($(OS),IOS)
$(eval $(call gb_Library_add_cflags,sofficeapp,\
$(gb_OBJCFLAGS) \
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index f363f17616f9..a2a1cd10d9e6 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -19,6 +19,12 @@
#include <config_features.h>
+#if HAVE_FEATURE_MACOSX_SANDBOX
+#include <premac.h>
+#include <Foundation/Foundation.h>
+#include <postmac.h>
+#endif
+
#include <cmdlineargs.hxx>
#include <vcl/svapp.hxx>
#include <rtl/uri.hxx>
@@ -502,6 +508,13 @@ bool CommandLineArgs::InterpretCommandLineParameter( const OUString& aArg, OUStr
return true;
}
#endif
+#if HAVE_FEATURE_MACOSX_SANDBOX
+ else if ( oArg == "nstemporarydirectory" )
+ {
+ printf("%s\n", [NSTemporaryDirectory() UTF8String]);
+ exit(0);
+ }
+#endif
#ifdef WIN32
/* fdo#57203 ignore -Embedding on Windows
when LibreOffice is launched by COM+