diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-01-11 12:46:33 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-01-11 12:46:33 -0500 |
commit | 86df5e193288093b7168c696dcdcdd8b551d2e88 (patch) | |
tree | cea130863c8f71f26350a1a089906767dfbcadbd /desktop | |
parent | f52db3c55b191ee9ea17dfa03ea33527aac491d9 (diff) |
Add deprecation warning on -foo style command line options.
Diffstat (limited to 'desktop')
-rw-r--r-- | desktop/scripts/soffice.sh | 2 | ||||
-rw-r--r-- | desktop/source/app/cmdlineargs.cxx | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh index a38cf280a29e..cf80892efbd9 100644 --- a/desktop/scripts/soffice.sh +++ b/desktop/scripts/soffice.sh @@ -98,7 +98,7 @@ done # test for availability of the fast external splash for arg in $@; do case "$arg" in - --nologo|-nologo|--no-oosplash|-no-oosplash|--version|--help|-help|-h|-\?) + --nologo|-nologo|--no-oosplash|-no-oosplash|--version|-version|--help|-help|-h|-\?) no_oosplash=y ;; esac diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx index fa64117f3ba9..2d342fd4e700 100644 --- a/desktop/source/app/cmdlineargs.cxx +++ b/desktop/source/app/cmdlineargs.cxx @@ -41,6 +41,8 @@ #include <svl/documentlockfile.hxx> +#include <cstdio> + using namespace rtl; using namespace com::sun::star::lang; using namespace com::sun::star::uri; @@ -391,6 +393,8 @@ sal_Bool CommandLineArgs::InterpretCommandLineParameter( const ::rtl::OUString& } else if (aArg.toChar() == '-') { + const sal_Char* s = rtl::OUStringToOString(aArg, RTL_TEXTENCODING_UTF8).getStr(); + fprintf(stderr, "Warning: %s is deprecated. Use -%s instead.\n", s, s); oArg = ::rtl::OUString(aArg.getStr()+1, aArg.getLength()-1); } else |