[libreoffice/f17] Resolves: rhbz#868953 Calc: open HTML documents from file dialog

Eike Rathke erack at fedoraproject.org
Wed Oct 24 13:49:19 UTC 2012


commit 6cce6fc238b82dc664c07f6b1ec286d0a5f6399b
Author: Eike Rathke <erack at redhat.com>
Date:   Wed Oct 24 15:47:50 2012 +0200

    Resolves: rhbz#868953 Calc: open HTML documents from file dialog

 ...-fdo-45084-When-the-caller-specifies-filt.patch |   76 ++++++++++++++++++++
 libreoffice.spec                                   |    7 ++-
 2 files changed, 82 insertions(+), 1 deletions(-)
---
diff --git a/0001-rhbz-868953-fdo-45084-When-the-caller-specifies-filt.patch b/0001-rhbz-868953-fdo-45084-When-the-caller-specifies-filt.patch
new file mode 100644
index 0000000..2e149e5
--- /dev/null
+++ b/0001-rhbz-868953-fdo-45084-When-the-caller-specifies-filt.patch
@@ -0,0 +1,76 @@
+From dc9b4a29f1928fabcd4094942d32bc5985091838 Mon Sep 17 00:00:00 2001
+Message-Id: <dc9b4a29f1928fabcd4094942d32bc5985091838.1351006472.git.erack at redhat.com>
+From: Kohei Yoshida <kohei.yoshida at gmail.com>
+Date: Tue, 22 May 2012 12:55:22 -0400
+Subject: [PATCH] rhbz#868953 fdo#45084 When the caller specifies filter type,
+ stick to it
+MIME-Version: 1.0
+Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
+
+This is a multi-part message in MIME format.
+--------------erAck-patch-parts
+Content-Type: text/plain; charset=UTF-8; format=fixed
+Content-Transfer-Encoding: 8bit
+
+
+and don't overwrite it.
+
+(cherry picked from commit 552bebe6fa27fa58d07d87283a4b24e6052ab3d4)
+
+Conflicts:
+
+	filter/source/config/cache/typedetection.cxx
+
+Change-Id: I35a3efc506bbcc33ea4c3d2466929f8227dae102
+Signed-off-by: Eike Rathke <erack at redhat.com>
+---
+ filter/source/config/cache/typedetection.cxx |   19 ++++++++++++-------
+ 1 files changed, 12 insertions(+), 7 deletions(-)
+
+
+--------------erAck-patch-parts
+Content-Type: text/x-patch; name="0001-rhbz-868953-fdo-45084-When-the-caller-specifies-filt.patch"
+Content-Transfer-Encoding: 8bit
+Content-Disposition: attachment; filename="0001-rhbz-868953-fdo-45084-When-the-caller-specifies-filt.patch"
+
+diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
+index 25b3742..5b73b89 100644
+--- a/filter/source/config/cache/typedetection.cxx
++++ b/filter/source/config/cache/typedetection.cxx
+@@ -143,9 +143,18 @@ TypeDetection::~TypeDetection()
+     css::uno::Reference< css::util::XURLTransformer > xParser(m_xSMGR->createInstance(SERVICE_URLTRANSFORMER), css::uno::UNO_QUERY);
+     xParser->parseStrict(aURL);
+ 
+-    //*******************************************
+-    // preselected filter, type or document service?
+-    // use it as first "flat" detected type later!
++    rtl::OUString aSelectedFilter = stlDescriptor.getUnpackedValueOrDefault(
++        comphelper::MediaDescriptor::PROP_FILTERNAME(), rtl::OUString());
++    if (!aSelectedFilter.isEmpty())
++    {
++        // Caller specified the filter type.  Honor it.  Just get the default
++        // type for that filter, and bail out.
++        if (impl_validateAndSetFilterOnDescriptor(stlDescriptor, aSelectedFilter))
++            return stlDescriptor[comphelper::MediaDescriptor::PROP_TYPENAME()].get<rtl::OUString>();
++    }
++
++    // preselected type or document service? use it as first "flat" detected
++    // type later!
+     FlatDetection lFlatTypes;
+     impl_getPreselection(aURL, stlDescriptor, lFlatTypes);
+ 
+@@ -690,10 +699,6 @@ void TypeDetection::impl_getPreselection(const css::util::URL&                aP
+     if (sSelectedType.getLength())
+         impl_getPreselectionForType(sSelectedType, aParsedURL, rFlatTypes);
+ 
+-    ::rtl::OUString sSelectedFilter = rDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_FILTERNAME(), ::rtl::OUString());
+-    if (sSelectedFilter.getLength())
+-        impl_getPreselectionForFilter(sSelectedFilter, aParsedURL, rFlatTypes);
+-
+     ::rtl::OUString sSelectedDoc = rDescriptor.getUnpackedValueOrDefault(::comphelper::MediaDescriptor::PROP_DOCUMENTSERVICE(), ::rtl::OUString());
+     if (sSelectedDoc.getLength())
+         impl_getPreselectionForDocumentService(sSelectedDoc, aParsedURL, rFlatTypes);
+
+--------------erAck-patch-parts--
+
+
diff --git a/libreoffice.spec b/libreoffice.spec
index 125f3b3..98a0ee6 100644
--- a/libreoffice.spec
+++ b/libreoffice.spec
@@ -35,7 +35,7 @@ Summary:        Free Software Productivity Suite
 Name:           libreoffice
 Epoch:          1
 Version:        %{libo_version}.2
-Release:        3%{?dist}
+Release:        4%{?dist}
 License:        (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and Artistic
 Group:          Applications/Productivity
 URL:            http://www.documentfoundation.org/develop
@@ -163,6 +163,7 @@ Patch45: 0001-rhbz-820283-fdo-55462-sw-better-fix-for-DOCX-table-i.patch
 Patch46: 0004-rhbz-827695-sw-prevent-crashes-after-incomplete-prin.patch
 Patch47: 0001-fdo-49819-fdo-54609-Do-not-consider-timestamp-differ.patch
 Patch48: 0001-Resolves-rhbz-868479-fdo-56281-doubled-in-German-ok-.patch
+Patch49: 0001-rhbz-868953-fdo-45084-When-the-caller-specifies-filt.patch
 
 %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib(1))")}
 %define instdir %{_libdir}
@@ -1041,6 +1042,7 @@ mv -f redhat.soc extras/source/palettes/standard.soc
 %patch46 -p1 -b .rhbz-827695-sw-prevent-crashes-after-incomplete-prin.patch
 %patch47 -p1 -b .fdo-49819-fdo-54609-Do-not-consider-timestamp-differ.patch
 %patch48 -p1 -b .rhbz-868479-fdo-56281-doubled-in-German-ok-.patch
+%patch49 -p1 -b .rhbz-868953-fdo-45084-When-the-caller-specifies-filt.patch
 
 # TODO: check this
 # these are horribly incomplete--empty translations and copied english
@@ -2327,6 +2329,9 @@ update-desktop-database %{_datadir}/applications &> /dev/null || :
 %endif
 
 %changelog
+* Wed Oct 24 2012 Eike Rathke <erack at redhat.com> - 1:3.5.7.2-4
+- Resolves: rhbz#868953 Calc: open HTML documents from file dialog
+
 * Mon Oct 22 2012 Caolán McNamara <caolanm at redhat.com> - 1:3.5.7.2-3
 - Resolves: rhbz#868479 guard against duplicated ~ in OK/Cancel
 


More information about the scm-commits mailing list