diff options
Diffstat (limited to 'desktop/source/app/sofficemain.cxx')
-rwxr-xr-x | desktop/source/app/sofficemain.cxx | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx index 9463b51c9fb1..37b9c924d067 100755 --- a/desktop/source/app/sofficemain.cxx +++ b/desktop/source/app/sofficemain.cxx @@ -60,22 +60,25 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main() // handle --version and --help already here, otherwise they would be handled // after VCL initialization that might fail if $DISPLAY is not set const desktop::CommandLineArgs& rCmdLineArgs = aDesktop.GetCommandLineArgs(); + rtl::OUString aUnknown( rCmdLineArgs.GetUnknown() ); + if ( !aUnknown.isEmpty() ) + { + desktop::Desktop::InitApplicationServiceManager(); + desktop::displayCmdlineHelp( aUnknown ); + return EXIT_FAILURE; + } if ( rCmdLineArgs.IsHelp() ) { desktop::Desktop::InitApplicationServiceManager(); - desktop::displayCmdlineHelp(); + desktop::displayCmdlineHelp( rtl::OUString() ); return EXIT_SUCCESS; } - else if ( rCmdLineArgs.IsVersion() ) + if ( rCmdLineArgs.IsVersion() ) { desktop::Desktop::InitApplicationServiceManager(); desktop::displayVersion(); return EXIT_SUCCESS; } - else if ( rCmdLineArgs.HasUnknown() ) - { - return EXIT_FAILURE; - } #endif return SVMain(); #if defined ANDROID |