summaryrefslogtreecommitdiff
path: root/desktop
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2005-02-16 15:37:36 +0000
committerVladimir Glazounov <vg@openoffice.org>2005-02-16 15:37:36 +0000
commit562a3b115c9a83f299e2c38b25775efca6b680d6 (patch)
tree676aa64674cf2630f26f48f2c15ae52f23ecf8f2 /desktop
parent6f8a7fb20af312dbc661c40196a9df787de8a992 (diff)
INTEGRATION: CWS perform01 (1.24.98); FILE MERGED
2005/02/07 17:07:51 mt 1.24.98.1: #i42222# Don't start with empty writer if only -accept is used
Diffstat (limited to 'desktop')
-rw-r--r--desktop/source/app/cmdlineargs.cxx14
1 files changed, 12 insertions, 2 deletions
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 6435dd88c055..889837053cc0 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: cmdlineargs.cxx,v $
*
- * $Revision: 1.24 $
+ * $Revision: 1.25 $
*
- * last change: $Author: hr $ $Date: 2004-08-02 14:39:15 $
+ * last change: $Author: vg $ $Date: 2005-02-16 16:37:36 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -158,6 +158,7 @@ void CommandLineArgs::ParseCommandLine_String( const ::rtl::OUString& aCmdLineSt
sal_Bool bForceNewEvent = sal_False;
sal_Bool bDisplaySpec = sal_False;
+ m_nArgumentCount = 0;
m_bEmpty = (aCmdLineString.getLength()<1);
sal_Int32 nIndex = 0;
@@ -168,6 +169,7 @@ void CommandLineArgs::ParseCommandLine_String( const ::rtl::OUString& aCmdLineSt
if ( aArg.getLength() > 0 )
{
+ m_nArgumentCount++;
if ( !InterpretCommandLineParameter( aArg ))
{
if ( aArgStr.GetChar(0) == '-' )
@@ -527,6 +529,7 @@ void CommandLineArgs::ResetParamValues()
for ( i = 0; i < CMD_STRINGPARAM_COUNT; i++ )
m_aStrSetParams[i] = sal_False;
m_bEmpty = sal_True;
+ m_nArgumentCount = 0;
}
sal_Bool CommandLineArgs::GetBoolParam( BoolParam eParam ) const
@@ -850,4 +853,11 @@ sal_Bool CommandLineArgs::IsEmpty() const
return m_bEmpty;
}
+sal_Bool CommandLineArgs::IsEmptyOrAcceptOnly() const
+{
+ osl::MutexGuard aMutexGuard( m_aMutex );
+
+ return m_bEmpty || ( ( m_nArgumentCount == 1 ) && ( m_aStrParams[ CMD_STRINGPARAM_ACCEPT ].getLength() ) );
+}
+
} // namespace desktop