configure.ac | 2 +- include/vcl/svapp.hxx | 6 +++++- svx/source/gengal/gengal.cxx | 5 ++++- vcl/source/app/svapp.cxx | 13 +++++++++++++ vcl/source/app/svmain.cxx | 2 +- 5 files changed, 24 insertions(+), 4 deletions(-)
New commits: commit 4877a2304334909e8597b719e98144a1140e23ee Author: Michael Meeks <[email protected]> Date: Tue Jun 4 18:29:42 2013 +0100 vcl: add a console-only mode to avoid problems on Mac for gengal. Change-Id: Ie5332330e6f398c3cd7e58df9b12fac121f5426f diff --git a/configure.ac b/configure.ac index 6cc40bc..6462857 100644 --- a/configure.ac +++ b/configure.ac @@ -2233,7 +2233,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 ffe228e..1ee4c7d 100644 --- a/include/vcl/svapp.hxx +++ b/include/vcl/svapp.hxx @@ -318,8 +318,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 6b0ffac..0f68d83 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 8b3d149..de64b94 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 e6ac094..21a351b 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(); _______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
