[Libreoffice-commits] core.git: sw/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Apr 1 14:34:50 UTC 2020


 sw/source/ui/dbui/mmlayoutpage.cxx |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 960c12bc7e64f70288385545a1555cebf315d534
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Apr 1 14:48:36 2020 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Apr 1 16:34:11 2020 +0200

    Resolves: tdf#131767 explicitly get the odt filter
    
    instead of using CXML which might return either the desired writer8 odt filter
    or the StarOffice_XML__Writer filter which both have CXML set as userdata
    
    Change-Id: I3da7e7ee9a0069642c09766e8778bcaf247a4575
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91491
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/ui/dbui/mmlayoutpage.cxx b/sw/source/ui/dbui/mmlayoutpage.cxx
index d98509fa6a45..3984af74545c 100644
--- a/sw/source/ui/dbui/mmlayoutpage.cxx
+++ b/sw/source/ui/dbui/mmlayoutpage.cxx
@@ -30,6 +30,7 @@
 #include <view.hxx>
 #include <swundo.hxx>
 #include <sfx2/docfilt.hxx>
+#include <sfx2/fcontnr.hxx>
 #include <svtools/unitconv.hxx>
 #include <com/sun/star/view/XViewSettingsSupplier.hpp>
 #include <com/sun/star/view/DocumentZoomType.hpp>
@@ -83,9 +84,10 @@ SwMailMergeLayoutPage::SwMailMergeLayoutPage(weld::Container* pPage, SwMailMerge
     , m_xDownPB(m_xBuilder->weld_button("down"))
     , m_xZoomLB(m_xBuilder->weld_combo_box("zoom"))
 {
-    std::shared_ptr<const SfxFilter> pSfxFlt = SwIoSystem::GetFilterOfFormat(
-            FILTER_XML,
-            SwDocShell::Factory().GetFilterContainer() );
+    std::shared_ptr<const SfxFilter> pSfxFlt =
+            SwDocShell::Factory().GetFilterContainer()->
+            GetFilter4FilterName("writer8");
+
     //save the current document into a temporary file
     {
         //temp file needs its own block


More information about the Libreoffice-commits mailing list