diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-10-07 15:07:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-07 15:11:04 +0100 |
commit | c65aa43e254b956fe23a94624f0b8e99d88e9ec1 (patch) | |
tree | 8e5405b59b3f8e5403683d9b2070508c13a6bde3 /desktop | |
parent | 7ba7a974f6d9f4b265e72b8e91c5a175bc3a3b14 (diff) |
afl-eventtesting: it has learned to open the file dialog
but the system dialogs are not under our control
Change-Id: Icb4029b2447e8cddbe4e48137fdefc377ef50414
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/app.cxx | 4 | ||||
-rw-r--r-- | desktop/source/app/cmdlineargs.cxx | 6 | ||||
-rw-r--r-- | desktop/source/app/cmdlineargs.hxx | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index e2ede5538cf8..58567e99fad5 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1474,7 +1474,7 @@ int Desktop::Main() } } - if ( rCmdLineArgs.IsHeadless() ) + if ( rCmdLineArgs.IsHeadless() || rCmdLineArgs.IsEventTesting() ) { // Ensure that we use not the system file dialogs as // headless mode relies on Application::EnableHeadlessMode() @@ -1645,7 +1645,7 @@ int Desktop::doShutdown() delete pResMgr, pResMgr = NULL; // Restore old value const CommandLineArgs& rCmdLineArgs = GetCommandLineArgs(); - if ( rCmdLineArgs.IsHeadless() ) + if ( rCmdLineArgs.IsHeadless() || rCmdLineArgs.IsEventTesting() ) SvtMiscOptions().SetUseSystemFileDialog( pExecGlobals->bUseSystemFileDialog ); OUString pidfileName = rCmdLineArgs.GetPidfileName(); diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index a388f7d5cd50..f6bd390f8c5e 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -185,6 +185,10 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) { setHeadless(); } + else if ( oArg == "eventtesting" ) + { + m_eventtesting = true; + } else if ( oArg == "cat" ) { m_textcat = true; @@ -494,7 +498,6 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) // vcl/unx/generic/app/sm.cxx: oArg != "session=" && #endif - oArg != "eventtesting" && //ignore additional legacy options that don't do anything anymore oArg != "nocrashreport" && m_unknown.isEmpty()) @@ -599,6 +602,7 @@ void CommandLineArgs::InitParamValues() m_invisible = false; m_headless = false; #endif + m_eventtesting = false; m_quickstart = false; m_noquickstart = false; m_terminateafterinit = false; diff --git a/desktop/source/app/cmdlineargs.hxx b/desktop/source/app/cmdlineargs.hxx index fe8ea8b6fbaa..c0b1f35ceaeb 100644 --- a/desktop/source/app/cmdlineargs.hxx +++ b/desktop/source/app/cmdlineargs.hxx @@ -61,6 +61,7 @@ class CommandLineArgs: private boost::noncopyable bool IsNoRestore() const { return m_norestore;} bool IsNoDefault() const { return m_nodefault;} bool IsHeadless() const { return m_headless;} + bool IsEventTesting() const { return m_eventtesting;} bool IsQuickstart() const { return m_quickstart;} bool IsNoQuickstart() const { return m_noquickstart;} bool IsTerminateAfterInit() const { return m_terminateafterinit;} @@ -123,6 +124,7 @@ class CommandLineArgs: private boost::noncopyable bool m_invisible; bool m_norestore; bool m_headless; + bool m_eventtesting; bool m_quickstart; bool m_noquickstart; bool m_terminateafterinit; |