[Libreoffice-commits] .: desktop/scripts desktop/source
Kohei Yoshida
kohei at kemper.freedesktop.org
Tue Jan 11 09:46:51 PST 2011
desktop/scripts/soffice.sh | 2 +-
desktop/source/app/cmdlineargs.cxx | 4 ++++
2 files changed, 5 insertions(+), 1 deletion(-)
New commits:
commit 27f122771e503687a717cb2205e2c8619ade295f
Author: Kohei Yoshida <kyoshida at novell.com>
Date: Tue Jan 11 12:46:33 2011 -0500
Add deprecation warning on -foo style command line options.
diff --git a/desktop/scripts/soffice.sh b/desktop/scripts/soffice.sh
index ef52370..515c320 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 b4ede8b..8735544 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
More information about the Libreoffice-commits
mailing list