From aa2be9ca7536c46a718e6af193cacede68bc8d6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Tue, 27 Mar 2012 15:26:41 +0100 Subject: [PATCH] merge in command line checking patch --- ...omplain-about-soffice-command-line-o.patch | 42 +++++++++++++++++++ libreoffice.spec | 2 + 2 files changed, 44 insertions(+) create mode 100644 0001-desktop-do-not-complain-about-soffice-command-line-o.patch diff --git a/0001-desktop-do-not-complain-about-soffice-command-line-o.patch b/0001-desktop-do-not-complain-about-soffice-command-line-o.patch new file mode 100644 index 0000000..552b2d3 --- /dev/null +++ b/0001-desktop-do-not-complain-about-soffice-command-line-o.patch @@ -0,0 +1,42 @@ +From db21197de4383f75718190072171adab15e64a00 Mon Sep 17 00:00:00 2001 +From: Michael Stahl +Date: Thu, 8 Mar 2012 15:49:52 +0100 +Subject: [PATCH] desktop: do not complain about soffice command line options: + +These are handled in the soffice wrapper script, but that is too stupid +to be able to filter these out, so just ignore them in soffice.bin. + +(regression from 4efbd87e31e7488dfcdd1d07ff979f1f59b8b1f1) + +Also, print errors on stderr. +--- + desktop/source/app/cmdlineargs.cxx | 10 ++++++++-- + 1 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx +index 5ae86ab..0bc6312 100644 +--- a/desktop/source/app/cmdlineargs.cxx ++++ b/desktop/source/app/cmdlineargs.cxx +@@ -306,10 +306,17 @@ void CommandLineArgs::ParseCommandLine_Impl( Supplier& supplier ) + } + #if defined UNX + else ++ // because it's impossible to filter these options that ++ // are handled in the soffice shell script with the ++ // primitive tools that /bin/sh offers, ignore them here ++ if (!oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("backtrace")) && ++ !oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("strace")) && ++ !oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("nocrashreport")) && ++ !oArg.equalsIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM("valgrind"))) + { +- printf("Unknown option %s\n", ++ fprintf(stderr, "Unknown option %s\n", + rtl::OUStringToOString(aArg, osl_getThreadTextEncoding()).getStr()); +- printf("Run 'soffice --help' to see a full list of available command line options.\n"); ++ fprintf(stderr, "Run 'soffice --help' to see a full list of available command line options.\n"); + SetBoolParam_Impl( CMD_BOOLPARAM_UNKNOWN, sal_True ); + } + #endif +-- +1.7.7.6 + diff --git a/libreoffice.spec b/libreoffice.spec index 74cfc57..6ea1735 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -140,6 +140,7 @@ Patch23: 0001-Resolves-rhbz-799525-put-flat-odf-mimetypes-in-xsltf.patch Patch24: 0001-Resolves-rhbz-800272-complain-about-unknown-command-.patch Patch26: 0001-fix-setting-of-paper-tray-from-print-dialog-fdo-4393.patch Patch27: 0001-Resolves-rhbz-806663-SlideshowImpl-can-outlive-SdMod.patch +Patch28: 0001-desktop-do-not-complain-about-soffice-command-line-o.patch %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")} %define instdir %{_libdir} @@ -991,6 +992,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc %patch24 -p1 -b .rhbz-800272-complain-about-unknown-command-.patch %patch26 -p1 -b .fix-setting-of-paper-tray-from-print-dialog-fdo-4393.patch %patch27 -p1 -b .rhbz-806663-SlideshowImpl-can-outlive-SdMod.patch +%patch28 -p1 -b .do-not-complain-about-soffice-command-line-o.patch # TODO: check this # these are horribly incomplete--empty translations and copied english