diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-01-03 22:05:41 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-01-03 22:06:57 -0500 |
commit | d88c67e65a315e445401cdbe29b775ee0b307572 (patch) | |
tree | b6c8c83b24d3f20b9f332dbf5aa76e762f9eb240 /desktop | |
parent | 3e91299aa19d23d0b9e1b3caf77d757d89854675 (diff) |
Fixed coding style & updated the cmdline help to promote --foo style args.
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/source/app/cmdlineargs.cxx | 11 | ||||
-rw-r--r-- | desktop/source/app/cmdlinehelp.cxx | 52 |
2 files changed, 34 insertions, 29 deletions
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index 847ecdb7cac3..39c7a596193d 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -405,11 +405,16 @@ void CommandLineArgs::SetBoolParam_Impl( BoolParam eParam, sal_Bool bValue ) sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& aArg, ::rtl::OUString& oArg ) { - if (aArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("--"))) { + if (aArg.matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("--"))) + { oArg = ::rtl::OUString(aArg.getStr()+2, aArg.getLength()-2); - } else if (aArg.toChar() == '-') { + } + else if (aArg.toChar() == '-') + { oArg = ::rtl::OUString(aArg.getStr()+1, aArg.getLength()-1); - } else { + } + else + { return sal_False; } diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx index 9f9b9f722902..1ec327fe8de3 100644 --- a/desktop/source/app/cmdlinehelp.cxx +++ b/desktop/source/app/cmdlinehelp.cxx @@ -61,23 +61,23 @@ namespace desktop "\n"\ "Options:\n"; const char *aCmdLineHelp_left = - "-minimized \n"\ - "-invisible \n"\ - "-norestore \n"\ - "-quickstart \n"\ - "-nologo \n"\ - "-nolockcheck \n"\ - "-nodefault \n"\ - "-headless \n"\ - "-help/-h/-? \n"\ - "-writer \n"\ - "-calc \n"\ - "-draw \n"\ - "-impress \n"\ - "-base \n"\ - "-math \n"\ - "-global \n"\ - "-web \n"\ + "--minimized \n"\ + "--invisible \n"\ + "--norestore \n"\ + "--quickstart \n"\ + "--nologo \n"\ + "--nolockcheck \n"\ + "--nodefault \n"\ + "--headless \n"\ + "--help/-h/-? \n"\ + "--writer \n"\ + "--calc \n"\ + "--draw \n"\ + "--impress \n"\ + "--base \n"\ + "--math \n"\ + "--global \n"\ + "--web \n"\ "-o \n"\ "-n \n"; const char *aCmdLineHelp_right = @@ -101,31 +101,31 @@ namespace desktop "open documents regardless whether they are templates or not.\n"\ "always open documents as new files (use as template).\n"; const char *aCmdLineHelp_bottom = - "-display <display>\n"\ + "--display <display>\n"\ " Specify X-Display to use in Unix/X11 versions.\n" "-p <documents...>\n"\ " print the specified documents on the default printer.\n"\ - "-pt <printer> <documents...>\n"\ + "--pt <printer> <documents...>\n"\ " print the specified documents on the specified printer.\n"\ - "-view <documents...>\n"\ + "--view <documents...>\n"\ " open the specified documents in viewer-(readonly-)mode.\n"\ - "-show <presentation>\n"\ + "--show <presentation>\n"\ " open the specified presentation and start it immediately\n"\ - "-accept=<accept-string>\n"\ + "--accept=<accept-string>\n"\ " Specify an UNO connect-string to create an UNO acceptor through which\n"\ " other programs can connect to access the API\n"\ - "-unaccept=<accept-string>\n"\ + "--unaccept=<accept-string>\n"\ " Close an acceptor that was created with -accept=<accept-string>\n"\ " Use -unnaccept=all to close all open acceptors\n"\ - "-infilter=<filter>\n"\ + "--infilter=<filter>\n"\ " Force an input filter type if possible\n"\ " Eg. -infilter=\"Calc Office Open XML\"\n"\ - "-convert-to output_file_extension[:output_filter_name] [-outdir ouput_dir] files\n"\ + "--convert-to output_file_extension[:output_filter_name] [-outdir ouput_dir] files\n"\ " Batch convert files.\n"\ " If -outdir is not specified then current working dir is used as output_dir.\n"\ " Eg. -convert-to pdf *.doc\n"\ " -convert-to pdf:writer_pdf_Export -outdir /home/user *.doc\n"\ - "-print-to-file [-printer-name printer_name] [-outdir ouput_dir] files\n"\ + "--print-to-file [-printer-name printer_name] [-outdir ouput_dir] files\n"\ " Batch print files to file.\n"\ " If -outdir is not specified then current working dir is used as output_dir.\n"\ " Eg. -print-to-file *.doc\n"\ |