[Libreoffice-commits] .: 2 commits - desktop/source

Andras Timar timar at kemper.freedesktop.org
Mon Jan 9 08:03:36 PST 2012


 desktop/source/app/cmdlineargs.cxx |    3 ++-
 desktop/source/app/cmdlinehelp.cxx |   26 +++++++++++++-------------
 2 files changed, 15 insertions(+), 14 deletions(-)

New commits:
commit b0cb633d6e3369936a63501933f47f291a4760b7
Author: Andras Timar <atimar at suse.com>
Date:   Mon Jan 9 16:43:06 2012 +0100

    don't warn for -h/-?/-o/-n command line switches

diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index e217e17..a139020 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -421,7 +421,8 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString&
     }
     else if (aArg.toChar() == '-')
     {
-        bDeprecated = true;
+        if ( aArg.getLength() > 2 ) // -h, -o, -n, -? are still valid
+            bDeprecated = true;
         oArg = ::rtl::OUString(aArg.getStr()+1, aArg.getLength()-1);
     }
     else
commit 5371a528926cc257f84d9d36751b5447a80511fb
Author: Andras Timar <atimar at suse.com>
Date:   Mon Jan 9 16:36:02 2012 +0100

    fix switches (--) and typos

diff --git a/desktop/source/app/cmdlinehelp.cxx b/desktop/source/app/cmdlinehelp.cxx
index f7e4660..dd1cbfc 100644
--- a/desktop/source/app/cmdlinehelp.cxx
+++ b/desktop/source/app/cmdlinehelp.cxx
@@ -79,8 +79,8 @@ namespace desktop
         "--math         \n"\
         "--global       \n"\
         "--web          \n"\
-        "-o            \n"\
-        "-n            \n";
+        "-o             \n"\
+        "-n             \n";
     const char *aCmdLineHelp_right =
         "keep startup bitmap minimized.\n"\
         "no startup screen, no default document and no UI.\n"\
@@ -117,21 +117,21 @@ namespace desktop
         "      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"\
-        "      Close an acceptor that was created with -accept=<accept-string>\n"\
-        "      Use -unnaccept=all to close all open acceptors\n"\
+        "      Close an acceptor that was created with --accept=<accept-string>\n"\
+        "      Use --unnaccept=all to close all open acceptors\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"\
+        "      Eg. --infilter=\"Calc Office Open XML\"\n"\
+        "--convert-to output_file_extension[:output_filter_name] [--outdir output_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"\
+        "      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 output_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"\
-        "          -print-to-file -printer-name nasty_lowres_printer -outdir /home/user *.doc\n"\
+        "      If --outdir is not specified then current working dir is used as output_dir.\n"\
+        "      Eg. --print-to-file *.doc\n"\
+        "          --print-to-file --printer-name nasty_lowres_printer --outdir /home/user *.doc\n"\
         "\nRemaining arguments will be treated as filenames or URLs of documents to open.\n\n";
 
     void ReplaceStringHookProc( UniString& rStr );


More information about the Libreoffice-commits mailing list