diff options
author | Carsten Driesner <cd@openoffice.org> | 2002-10-21 04:36:19 +0000 |
---|---|---|
committer | Carsten Driesner <cd@openoffice.org> | 2002-10-21 04:36:19 +0000 |
commit | 7f943ee7d20d45d85cc62df5d602f029aa74675a (patch) | |
tree | 58514eb1aa0eba24481417e44a151cfe0cb782b6 /desktop | |
parent | 31c7b4b7f43aea4bf98af601174378088f9ab8ff (diff) |
#104152# Use Office dialogs to support headless mode
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index aa3d8713ef10..a004ec7ef95a 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -2,9 +2,9 @@ * * $RCSfile: app.cxx,v $ * - * $Revision: 1.95 $ + * $Revision: 1.96 $ * - * last change: $Author: cd $ $Date: 2002-10-18 06:44:15 $ + * last change: $Author: cd $ $Date: 2002-10-21 05:36:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -231,6 +231,9 @@ #ifndef INCLUDED_SVTOOLS_INTERNALOPTIONS_HXX #include <svtools/internaloptions.hxx> #endif +#ifndef INCLUDED_SVTOOLS_MISCOPT_HXX +#include <svtools/miscopt.hxx> +#endif #ifndef _UNOTOOLS_TEMPFILE_HXX #include <unotools/tempfile.hxx> #endif @@ -1535,6 +1538,18 @@ void Desktop::Main() #endif { + sal_Bool bUseSystemFileDialog; + if ( pCmdLineArgs->IsHeadless() ) + { + // Ensure that we use not the system file dialogs as + // headless mode relies on Application::EnableHeadlessMode() + // which does only work for VCL dialogs!! + SvtMiscOptions aMiscOptions; + + bUseSystemFileDialog = aMiscOptions.UseSystemFileDialog(); + aMiscOptions.SetUseSystemFileDialog( sal_False ); + } + Application::SetSystemWindowMode( SYSTEMWINDOW_MODE_DIALOG ); InitTestToolLib(); @@ -1625,6 +1640,10 @@ void Desktop::Main() RTL_LOGFILE_CONTEXT_TRACE( aLog, "call ::Application::Execute" ); Execute(); + // Restore old value + if ( pCmdLineArgs->IsHeadless() ) + SvtMiscOptions().SetUseSystemFileDialog( bUseSystemFileDialog ); + // remove temp directory removeTemporaryDirectory(); |