summaryrefslogtreecommitdiff
path: root/desktop/source/app/cmdlineargs.cxx
diff options
context:
space:
mode:
authorCarsten Driesner <cd@openoffice.org>2010-05-11 14:09:54 +0200
committerCarsten Driesner <cd@openoffice.org>2010-05-11 14:09:54 +0200
commit54f620054762e148e76c0727a57643ebc7d8c5bb (patch)
tree455e654edf2ba259af3b18e5bb04b34782a74e78 /desktop/source/app/cmdlineargs.cxx
parent4c700c32a3f70c1d5ebe636fdd52f79feefe0d14 (diff)
parent515792c312abc929b4616c757b8eaced67718d10 (diff)
fwk139: Rebase to DEV300m77
Diffstat (limited to 'desktop/source/app/cmdlineargs.cxx')
-rw-r--r--desktop/source/app/cmdlineargs.cxx97
1 files changed, 67 insertions, 30 deletions
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 1f3e7dfcb9fde..0625191ee2ea3 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -227,7 +227,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bViewEvent = sal_False;
bStartEvent = sal_False;
bDisplaySpec = sal_False;
- }
+ }
else if ( aArgStr.EqualsIgnoreCaseAscii( "-view" ))
{
// open in viewmode
@@ -239,31 +239,43 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
bViewEvent = sal_True;
bStartEvent = sal_False;
bDisplaySpec = sal_False;
- }
+ }
else if ( aArgStr.EqualsIgnoreCaseAscii( "-show" ))
{
- // open in viewmode
- bOpenEvent = sal_False;
- bViewEvent = sal_False;
- bStartEvent = sal_True;
- bPrintEvent = sal_False;
- bPrintToEvent = sal_False;
- bForceNewEvent = sal_False;
- bForceOpenEvent = sal_False;
- bDisplaySpec = sal_False;
+ // open in viewmode
+ bOpenEvent = sal_False;
+ bViewEvent = sal_False;
+ bStartEvent = sal_True;
+ bPrintEvent = sal_False;
+ bPrintToEvent = sal_False;
+ bForceNewEvent = sal_False;
+ bForceOpenEvent = sal_False;
+ bDisplaySpec = sal_False;
}
else if ( aArgStr.EqualsIgnoreCaseAscii( "-display" ))
{
- // open in viewmode
- bOpenEvent = sal_False;
- bPrintEvent = sal_False;
- bForceOpenEvent = sal_False;
- bPrintToEvent = sal_False;
- bForceNewEvent = sal_False;
- bViewEvent = sal_False;
- bStartEvent = sal_False;
- bDisplaySpec = sal_True;
+ // set display
+ bOpenEvent = sal_False;
+ bPrintEvent = sal_False;
+ bForceOpenEvent = sal_False;
+ bPrintToEvent = sal_False;
+ bForceNewEvent = sal_False;
+ bViewEvent = sal_False;
+ bStartEvent = sal_False;
+ bDisplaySpec = sal_True;
+ }
+ else if ( aArgStr.EqualsIgnoreCaseAscii( "-language" ))
+ {
+ bOpenEvent = sal_False;
+ bPrintEvent = sal_False;
+ bForceOpenEvent = sal_False;
+ bPrintToEvent = sal_False;
+ bForceNewEvent = sal_False;
+ bViewEvent = sal_False;
+ bStartEvent = sal_False;
+ bDisplaySpec = sal_False;
}
+
#ifdef MACOSX
/* #i84053# ignore -psn on Mac
Platform dependent #ifdef here is ugly, however this is currently
@@ -272,15 +284,15 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier )
*/
else if ( aArgStr.CompareToAscii( "-psn", 4 ) == COMPARE_EQUAL )
{
- // finder argument from MacOSX
- bOpenEvent = sal_False;
- bPrintEvent = sal_False;
- bForceOpenEvent = sal_False;
- bPrintToEvent = sal_False;
- bForceNewEvent = sal_False;
- bViewEvent = sal_False;
- bStartEvent = sal_False;
- bDisplaySpec = sal_False;
+ // finder argument from MacOSX
+ bOpenEvent = sal_False;
+ bPrintEvent = sal_False;
+ bForceOpenEvent = sal_False;
+ bPrintToEvent = sal_False;
+ bForceNewEvent = sal_False;
+ bViewEvent = sal_False;
+ bStartEvent = sal_False;
+ bDisplaySpec = sal_False;
}
#endif
}
@@ -387,6 +399,13 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
#if defined(WNT) || defined(OS2) || defined(QUARTZ)
SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_True );
#endif
+ SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_False );
+ return sal_True;
+ }
+ else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-quickstart=no" )))
+ {
+ SetBoolParam_Impl( CMD_BOOLPARAM_NOQUICKSTART, sal_True );
+ SetBoolParam_Impl( CMD_BOOLPARAM_QUICKSTART, sal_False );
return sal_True;
}
else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-terminate_after_init" )) == sal_True )
@@ -502,7 +521,12 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
}
else if ( aArgStr.Copy(0, 9).EqualsIgnoreCaseAscii( "-version=" ))
{
- AddStringListParam_Impl( CMD_STRINGPARAM_VERSION, aArgStr.Copy( 15 ) );
+ AddStringListParam_Impl( CMD_STRINGPARAM_VERSION, aArgStr.Copy( 9 ) );
+ return sal_True;
+ }
+ else if ( aArgStr.Copy(0, 10).EqualsIgnoreCaseAscii( "-language=" ))
+ {
+ AddStringListParam_Impl( CMD_STRINGPARAM_LANGUAGE, aArgStr.Copy( 10 ) );
return sal_True;
}
else if ( aArg.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "-writer" )) == sal_True )
@@ -645,6 +669,12 @@ sal_Bool CommandLineArgs::IsQuickstart() const
return m_aBoolParams[ CMD_BOOLPARAM_QUICKSTART ];
}
+sal_Bool CommandLineArgs::IsNoQuickstart() const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+ return m_aBoolParams[ CMD_BOOLPARAM_NOQUICKSTART ];
+}
+
sal_Bool CommandLineArgs::IsTerminateAfterInit() const
{
osl::MutexGuard aMutexGuard( m_aMutex );
@@ -845,6 +875,13 @@ sal_Bool CommandLineArgs::GetPrinterName( ::rtl::OUString& rPara ) const
return m_aStrSetParams[ CMD_STRINGPARAM_PRINTERNAME ];
}
+sal_Bool CommandLineArgs::GetLanguage( ::rtl::OUString& rPara ) const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+ rPara = m_aStrParams[ CMD_STRINGPARAM_LANGUAGE ];
+ return m_aStrSetParams[ CMD_STRINGPARAM_LANGUAGE ];
+}
+
sal_Bool CommandLineArgs::IsEmpty() const
{
osl::MutexGuard aMutexGuard( m_aMutex );