diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-11-19 14:22:25 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-11-19 17:10:46 +0100 |
commit | c471e148e210b7a71d0d5cf877e873350fe05bf7 (patch) | |
tree | 45fcf469dd5ed59d97c683dea03b99435df786a6 /desktop | |
parent | cc8f8ae55f681755f5da3bf64e4c30bb713f0383 (diff) |
String function clean-up
Change-Id: I0bb807748f67af3ee1210c6df649bc8ae506e090
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/cmdlineargs.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 55027f4315a0..30417a78c3c1 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -165,7 +165,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) OUString oArg; if ( !InterpretCommandLineParameter( aArg, oArg )) { - if ( aArg.toChar() == '-' ) + if ( aArg.startsWith("-") ) { // handle this argument as an option if ( aArg.equalsIgnoreAsciiCase("-n")) @@ -296,7 +296,7 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) !oArg.equalsIgnoreAsciiCase("valgrind") && // for X Session Management, handled in // vcl/unx/generic/app/sm.cxx: - !oArg.match("session=") && + !oArg.startsWith("session=") && #endif //ignore additional legacy options that don't do anything anymore !oArg.equalsIgnoreAsciiCase("nocrashreport") && @@ -388,11 +388,11 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) bool CommandLineArgs::InterpretCommandLineParameter( const OUString& aArg, OUString& oArg ) { bool bDeprecated = false; - if (aArg.matchIgnoreAsciiCase("--")) + if (aArg.startsWith("--")) { oArg = OUString(aArg.getStr()+2, aArg.getLength()-2); } - else if (aArg.toChar() == '-') + else if (aArg.startsWith("-")) { if ( aArg.getLength() > 2 ) // -h, -o, -n, -? are still valid bDeprecated = true; @@ -491,7 +491,7 @@ bool CommandLineArgs::InterpretCommandLineParameter( const OUString& aArg, OUStr { m_version = true; } - else if ( oArg.matchIgnoreAsciiCase("splash-pipe=") ) + else if ( oArg.startsWithIgnoreAsciiCase("splash-pipe=") ) { m_splashpipe = true; } @@ -501,7 +501,7 @@ bool CommandLineArgs::InterpretCommandLineParameter( const OUString& aArg, OUStr the only platform dependent parameter. Should more appear we should find a better solution */ - else if ( aArg.match("-psn") ) + else if ( aArg.startsWith("-psn") ) { return true; } @@ -522,23 +522,23 @@ bool CommandLineArgs::InterpretCommandLineParameter( const OUString& aArg, OUStr return true; } #endif - else if ( oArg.matchIgnoreAsciiCase("infilter=")) + else if ( oArg.startsWithIgnoreAsciiCase("infilter=")) { m_infilter.push_back(oArg.copy(RTL_CONSTASCII_LENGTH("infilter="))); } - else if ( oArg.matchIgnoreAsciiCase("accept=")) + else if ( oArg.startsWithIgnoreAsciiCase("accept=")) { m_accept.push_back(oArg.copy(RTL_CONSTASCII_LENGTH("accept="))); } - else if ( oArg.matchIgnoreAsciiCase("unaccept=")) + else if ( oArg.startsWithIgnoreAsciiCase("unaccept=")) { m_unaccept.push_back(oArg.copy(RTL_CONSTASCII_LENGTH("unaccept="))); } - else if ( oArg.matchIgnoreAsciiCase("language=")) + else if ( oArg.startsWithIgnoreAsciiCase("language=")) { m_language = oArg.copy(RTL_CONSTASCII_LENGTH("language=")); } - else if ( oArg.matchIgnoreAsciiCase("pidfile=")) + else if ( oArg.startsWithIgnoreAsciiCase("pidfile=")) { m_pidfile = oArg.copy(RTL_CONSTASCII_LENGTH("pidfile=")); } |