summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meeks <michael.meeks@suse.com>2013-06-04 18:29:42 +0100
committerMichael Meeks <michael.meeks@suse.com>2013-06-04 20:51:05 +0100
commitdf5a73a9e3d44dd8a0af8c61552cdc14ca83bf2d (patch)
tree1f9935ebf2b7fe06cafb1ecb652e20aff1f7265a
parent34c1b7bdd0bca4753f66a7d17ef46647a64a319e (diff)
vcl: add a console-only mode to avoid problems on Mac for gengal.
Change-Id: Ie5332330e6f398c3cd7e58df9b12fac121f5426f
-rw-r--r--configure.ac2
-rw-r--r--include/vcl/svapp.hxx6
-rw-r--r--svx/source/gengal/gengal.cxx5
-rw-r--r--vcl/source/app/svapp.cxx13
-rw-r--r--vcl/source/app/svmain.cxx2
5 files changed, 24 insertions, 4 deletions
diff --git a/configure.ac b/configure.ac
index 251ee50a0989..1676298fae44 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2244,7 +2244,7 @@ if test -n "${with_galleries}"; then
AC_MSG_ERROR([unknown value --with-galleries=$with_galleries])
fi
else
- if test $_os != iOS -a $_os != Android -a $_os != Darwin; then
+ if test $_os != iOS -a $_os != Android; then
WITH_GALLERY_BUILD=YES
AC_MSG_RESULT([internal src images for desktop])
else
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index c182a0bdc93f..c67a1890e7fd 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -308,8 +308,12 @@ public:
static void EnableHeadlessMode( bool dialogsAreFatal );
static sal_Bool IsHeadlessModeEnabled();
+ /// check command line arguments for --headless
static bool IsHeadlessModeRequested();
- ///< check command line arguments for --headless
+ /// used to disable Mac specific app init that requires an app bundle
+ static void EnableConsoleOnly();
+ /// used to see if Mac specific app init has been disabled
+ static bool IsConsoleOnly();
static void ShowNativeErrorBox(const String& sTitle ,
const String& sMessage);
diff --git a/svx/source/gengal/gengal.cxx b/svx/source/gengal/gengal.cxx
index 6b0ffac7ca5b..0f68d830e2ff 100644
--- a/svx/source/gengal/gengal.cxx
+++ b/svx/source/gengal/gengal.cxx
@@ -44,7 +44,9 @@ class GalApp : public Application
bool mbInBuildTree;
bool mbRelativeURLs;
public:
- GalApp() : mbInBuildTree( false ), mbRelativeURLs( false ) {}
+ GalApp() : mbInBuildTree( false ), mbRelativeURLs( false )
+ {
+ }
virtual int Main();
protected:
@@ -254,6 +256,7 @@ void GalApp::DeInit()
void vclmain::createApplication()
{
+ Application::EnableConsoleOnly();
static GalApp aGalApp;
}
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index ac2d4c80fe03..8fdbfaa79458 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1769,6 +1769,19 @@ bool Application::IsHeadlessModeRequested()
return false;
}
+static bool bConsoleOnly = false;
+
+bool Application::IsConsoleOnly()
+{
+ return bConsoleOnly;
+}
+
+void Application::EnableConsoleOnly()
+{
+ bConsoleOnly = true;
+}
+
+
// -----------------------------------------------------------------------
void Application::ShowNativeErrorBox(const String& sTitle ,
diff --git a/vcl/source/app/svmain.cxx b/vcl/source/app/svmain.cxx
index e6ac094f7b6d..21a351bad4f1 100644
--- a/vcl/source/app/svmain.cxx
+++ b/vcl/source/app/svmain.cxx
@@ -192,7 +192,7 @@ int SVMain()
extern sal_Bool ImplSVMainHook( int* );
int nRet;
- if( ImplSVMainHook( &nRet ) )
+ if( !Application::IsConsoleOnly() && ImplSVMainHook( &nRet ) )
return nRet;
else
return ImplSVMain();