summaryrefslogtreecommitdiff
path: root/desktop/source/app/cmdlineargs.cxx
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej.hunt@collabora.com>2014-07-25 20:56:18 +0200
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2014-12-04 12:23:01 +0100
commit6ee3c10947cdee2ba2113f0e683b8147076f129b (patch)
tree0af3d9f9bc72a84e5cdbb58c3dbc008fd7e46f75 /desktop/source/app/cmdlineargs.cxx
parent40f7990037dd70b6b2885635052d19ea5d52dc51 (diff)
Don't fail on --protector.
If we have any "unknown" command line arguments Desktop init will fail, however our LOK Tiled Rendering test uses Desktop (via soffice_main). (Other unit tests don't use soffice_main hence this check never comes into play.) It looks like it's most reliable simply to ignore --protector here, rather than try to filter it out elsewhere (which is difficult as it is passed to osl via SAL_IMPLEMENT_MAIN). Change-Id: I95d047892851ba2cf9edd2e26bacc6efa0320f71
Diffstat (limited to 'desktop/source/app/cmdlineargs.cxx')
-rw-r--r--desktop/source/app/cmdlineargs.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 2cecabcc0fb3..d3271fd46c30 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -259,6 +259,18 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
{
m_helpmath = true;
}
+ else if ( oArg == "protector" )
+ {
+ // Not relevant for us here, but can be used in unit tests.
+ // Usually unit tests would not end up here, but e.g. the
+ // LOK Tiled Rendering tests end up running a full soffice
+ // process, and we can't bail on the use of --protector.
+
+ // We specifically need to consume the following 2 arguments
+ // for --protector
+ assert( supplier.next( &aArg ) );
+ assert( supplier.next( &aArg ) );
+ }
else if ( oArg == "version" )
{
m_version = true;