[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - 4 commits - external/libgpg-error solenv/flatpak-manifest.in sw/qa sw/source translations writerfilter/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Feb 11 13:46:13 UTC 2019


 external/libgpg-error/ExternalPackage_libgpg-error.mk    |    2 -
 external/libgpg-error/UnpackedTarball_libgpg-error.mk    |    1 
 external/libgpg-error/libgpgerror-bundled-soname.patch.1 |   22 +++++++++++++
 solenv/flatpak-manifest.in                               |   18 ++++++----
 sw/qa/extras/ooxmlexport/data/tdf121867.odt              |binary
 sw/qa/extras/ooxmlexport/ooxmlexport13.cxx               |   11 ++++++
 sw/source/filter/ww8/docxexport.cxx                      |   22 ++++++++++++-
 translations                                             |    2 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx        |    4 +-
 writerfilter/source/dmapper/SettingsTable.cxx            |   25 +++++++++++++++
 writerfilter/source/dmapper/SettingsTable.hxx            |    3 +
 11 files changed, 99 insertions(+), 11 deletions(-)

New commits:
commit ad32ff8f41e452156a2d16119b60542de11b42c8
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Feb 4 21:35:53 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Feb 11 14:44:20 2019 +0100

    tdf#121867 DOCX filter: handle page width zoom
    
    And other non-fixed zoom types, similar to how DOC does it.
    
    (cherry picked from commit 209f2fe0304114409434a3bf5f1e08c6613d83c0)
    
    Conflicts:
            sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
    
    Change-Id: Ie84340b4e662d2329b5d3918900adfd0c3e9b8e9
    Reviewed-on: https://gerrit.libreoffice.org/67388
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/qa/extras/ooxmlexport/data/tdf121867.odt b/sw/qa/extras/ooxmlexport/data/tdf121867.odt
new file mode 100644
index 000000000000..361121d23b61
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf121867.odt differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
index b3d0a219c5cc..c45bf3e936db 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport13.cxx
@@ -18,6 +18,8 @@
 #include <sfx2/docfilt.hxx>
 #include <svx/xfillit0.hxx>
 
+#include <editsh.hxx>
+
 class Test : public SwModelTestBase
 {
 public:
@@ -50,6 +52,15 @@ DECLARE_OOXMLEXPORT_TEST(testTdf121374_sectionHF2, "tdf121374_sectionHF2.doc")
     CPPUNIT_ASSERT( xHeaderText->getString().startsWith("virkamatka-anomus") );
 }
 
+DECLARE_OOXMLEXPORT_TEST(testTdf121867, "tdf121867.odt")
+{
+    SwXTextDocument* pTextDoc = dynamic_cast<SwXTextDocument*>(mxComponent.get());
+    SwEditShell* pEditShell = pTextDoc->GetDocShell()->GetEditShell();
+    // Without the accompanying fix in place, this test would have failed with
+    // 'Expected: 3; Actual  : 0', i.e. page width zoom was lost on export.
+    CPPUNIT_ASSERT_EQUAL(SvxZoomType::PAGEWIDTH, pEditShell->GetViewOptions()->GetZoomType());
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index f7048a2ae909..a3329d536265 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -934,8 +934,28 @@ void DocxExport::WriteSettings()
     // Zoom
     if (pViewShell)
     {
+        rtl::Reference<sax_fastparser::FastAttributeList> pAttributeList(
+            sax_fastparser::FastSerializerHelper::createAttrList());
+
+        switch (pViewShell->GetViewOptions()->GetZoomType())
+        {
+            case SvxZoomType::WHOLEPAGE:
+                pAttributeList->add(FSNS(XML_w, XML_val), "fullPage");
+                break;
+            case SvxZoomType::PAGEWIDTH:
+                pAttributeList->add(FSNS(XML_w, XML_val), "bestFit");
+                break;
+            case SvxZoomType::OPTIMAL:
+                pAttributeList->add(FSNS(XML_w, XML_val), "textFit");
+                break;
+            default:
+                break;
+        }
+
         OString aZoom(OString::number(pViewShell->GetViewOptions()->GetZoom()));
-        pFS->singleElementNS(XML_w, XML_zoom, FSNS(XML_w, XML_percent), aZoom.getStr(), FSEND);
+        pAttributeList->add(FSNS(XML_w, XML_percent), aZoom);
+        sax_fastparser::XFastAttributeListRef xAttributeList(pAttributeList.get());
+        pFS->singleElementNS(XML_w, XML_zoom, xAttributeList);
     }
 
     // Display Background Shape
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 46ff7984ad35..5c0e8148406f 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5807,7 +5807,9 @@ void DomainMapper_Impl::ApplySettingsTable()
                 {
                     aViewProps.emplace_back("ZoomFactor", -1, uno::makeAny(m_pSettingsTable->GetZoomFactor()), beans::PropertyState_DIRECT_VALUE);
                     aViewProps.emplace_back("VisibleBottom", -1, uno::makeAny(sal_Int32(0)), beans::PropertyState_DIRECT_VALUE);
-                    aViewProps.emplace_back("ZoomType", -1, uno::makeAny(sal_Int16(0)), beans::PropertyState_DIRECT_VALUE);
+                    aViewProps.emplace_back("ZoomType", -1,
+                                            uno::makeAny(m_pSettingsTable->GetZoomType()),
+                                            beans::PropertyState_DIRECT_VALUE);
                 }
                 uno::Reference<container::XIndexContainer> xBox = document::IndexedPropertyValues::create(m_xComponentContext);
                 xBox->insertByIndex(sal_Int32(0), uno::makeAny(comphelper::containerToSequence(aViewProps)));
diff --git a/writerfilter/source/dmapper/SettingsTable.cxx b/writerfilter/source/dmapper/SettingsTable.cxx
index 12c26049b139..2216e69b78ba 100644
--- a/writerfilter/source/dmapper/SettingsTable.cxx
+++ b/writerfilter/source/dmapper/SettingsTable.cxx
@@ -22,6 +22,7 @@
 #include <vector>
 
 #include <rtl/ustring.hxx>
+#include <sfx2/zoomitem.hxx>
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/beans/XPropertyState.hpp>
 #include <com/sun/star/container/XNameContainer.hpp>
@@ -36,6 +37,24 @@
 using namespace com::sun::star;
 
 namespace writerfilter {
+namespace
+{
+/// Maps OOXML <w:zoom w:val="..."> to SvxZoomType.
+sal_Int16 lcl_GetZoomType(Id nType)
+{
+    switch (nType)
+    {
+        case NS_ooxml::LN_Value_doc_ST_Zoom_fullPage:
+            return sal_Int16(SvxZoomType::WHOLEPAGE);
+        case NS_ooxml::LN_Value_doc_ST_Zoom_bestFit:
+            return sal_Int16(SvxZoomType::PAGEWIDTH);
+        case NS_ooxml::LN_Value_doc_ST_Zoom_textFit:
+            return sal_Int16(SvxZoomType::OPTIMAL);
+    }
+
+    return sal_Int16(SvxZoomType::PERCENT);
+}
+}
 
 namespace dmapper
 {
@@ -221,6 +240,7 @@ struct SettingsTable_Impl
     bool                m_bRecordChanges;
     bool                m_bLinkStyles;
     sal_Int16           m_nZoomFactor;
+    sal_Int16 m_nZoomType = 0;
     Id                  m_nView;
     bool                m_bEvenAndOddHeaders;
     bool                m_bUsePrinterMetrics;
@@ -292,6 +312,9 @@ void SettingsTable::lcl_attribute(Id nName, Value & val)
     case NS_ooxml::LN_CT_Zoom_percent:
         m_pImpl->m_nZoomFactor = nIntValue;
     break;
+    case NS_ooxml::LN_CT_Zoom_val:
+        m_pImpl->m_nZoomType = lcl_GetZoomType(nIntValue);
+        break;
     case NS_ooxml::LN_CT_Language_val:
         m_pImpl->m_pThemeFontLangProps[0].Name = "val";
         m_pImpl->m_pThemeFontLangProps[0].Value <<= sStringValue;
@@ -503,6 +526,8 @@ sal_Int16 SettingsTable::GetZoomFactor() const
     return m_pImpl->m_nZoomFactor;
 }
 
+sal_Int16 SettingsTable::GetZoomType() const { return m_pImpl->m_nZoomType; }
+
 Id SettingsTable::GetView() const
 {
     return m_pImpl->m_nView;
diff --git a/writerfilter/source/dmapper/SettingsTable.hxx b/writerfilter/source/dmapper/SettingsTable.hxx
index edffff67cfeb..7d539336f78e 100644
--- a/writerfilter/source/dmapper/SettingsTable.hxx
+++ b/writerfilter/source/dmapper/SettingsTable.hxx
@@ -57,6 +57,9 @@ class SettingsTable : public LoggedProperties, public LoggedTable
     /// What's the zoom factor set in percents?
     sal_Int16 GetZoomFactor() const;
 
+    /// Gets the type of the zoom.
+    sal_Int16 GetZoomType() const;
+
     /// What's the requested view? E.g. "web".
     Id GetView() const;
 
commit efd737d316a0a8619353033e8de7040b3083664b
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Mon Jan 28 14:31:12 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Feb 11 14:44:01 2019 +0100

    libgpg-error: use custom soname and symbol version
    
    The hope is that this should allow both system's libgpg-error.so.0 and
    LO's bundled libgpg-error-lo.so.0 to be loaded by soffice.bin without
    unintended hilarity.
    
    Change-Id: I94498097a847b9756de86051798cb4ce022f6c83
    Reviewed-on: https://gerrit.libreoffice.org/67012
    Tested-by: Jenkins
    Reviewed-by: Thorsten Behrens <Thorsten.Behrens at CIB.de>
    (cherry picked from commit 87873a682f0d0c3173ac815385484fa9ea92b883)
    Reviewed-on: https://gerrit.libreoffice.org/67675
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/external/libgpg-error/ExternalPackage_libgpg-error.mk b/external/libgpg-error/ExternalPackage_libgpg-error.mk
index a7c04ff9c900..3afd218eef9e 100644
--- a/external/libgpg-error/ExternalPackage_libgpg-error.mk
+++ b/external/libgpg-error/ExternalPackage_libgpg-error.mk
@@ -15,7 +15,7 @@ ifneq ($(DISABLE_DYNLOADING),TRUE)
 
 ifeq ($(OS),LINUX)
 
-$(eval $(call gb_ExternalPackage_add_file,libgpg-error,$(LIBO_LIB_FOLDER)/libgpg-error.so.0,src/.libs/libgpg-error.so.0.22.0))
+$(eval $(call gb_ExternalPackage_add_file,libgpg-error,$(LIBO_LIB_FOLDER)/libgpg-error-lo.so.0,src/.libs/libgpg-error-lo.so.0.22.0))
 
 else ifeq ($(OS),MACOSX)
 
diff --git a/external/libgpg-error/UnpackedTarball_libgpg-error.mk b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
index ad2145a96aa7..753f29716e2f 100644
--- a/external/libgpg-error/UnpackedTarball_libgpg-error.mk
+++ b/external/libgpg-error/UnpackedTarball_libgpg-error.mk
@@ -20,6 +20,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,libgpg-error, \
 	$(if $(filter MSC,$(COM)),external/libgpg-error/w32-disable-dllinit.patch.1) \
 	external/libgpg-error/w32-build-fixes-4.patch \
 	external/libgpg-error/clang-cl.patch \
+	$(if $(filter LINUX,$(OS)),external/libgpg-error/libgpgerror-bundled-soname.patch.1) \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/external/libgpg-error/libgpgerror-bundled-soname.patch.1 b/external/libgpg-error/libgpgerror-bundled-soname.patch.1
new file mode 100644
index 000000000000..4f927def368a
--- /dev/null
+++ b/external/libgpg-error/libgpgerror-bundled-soname.patch.1
@@ -0,0 +1,22 @@
+--- libgpg-error/src/Makefile.in.orig	2019-01-28 14:11:10.518425440 +0100
++++ libgpg-error/src/Makefile.in	2019-01-28 14:11:16.901414229 +0100
+@@ -540,7 +540,7 @@
+ @HAVE_LD_VERSION_SCRIPT_TRUE at libgpg_error_vers_opt = -Wl,--version-script=$(srcdir)/gpg-error.vers
+ libgpg_error_la_LDFLAGS = \
+   $(no_undefined) $(export_symbols) $(libgpg_error_vers_opt) \
+-  $(extra_ltoptions) -version-info \
++  $(extra_ltoptions) -release lo -version-info \
+   @LIBGPG_ERROR_LT_CURRENT@:@LIBGPG_ERROR_LT_REVISION@:@LIBGPG_ERROR_LT_AGE@
+ 
+ libgpg_error_la_SOURCES = gettext.h $(arch_sources) \
+--- libgpg-error/src/gpg-error.vers.orig	2019-01-28 14:08:11.413740011 +0100
++++ libgpg-error/src/gpg-error.vers	2019-01-28 14:08:34.172700037 +0100
+@@ -20,7 +20,7 @@
+ #       visibility.h and gpg-error.def.in as well.
+ 
+ 
+-GPG_ERROR_1.0 {
++GPG_ERROR_LIBREOFFICE {
+   global:
+     gpg_strerror;
+     gpg_strerror_r;
commit 227f96375277b8eff784d41e38e9222f366bf288
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Feb 11 10:29:57 2019 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Feb 11 14:43:36 2019 +0100

    Merge in Flatpak improvements
    
    ...from <https://github.com/flathub/org.libreoffice.LibreOffice/>:
    
    commit 35de93fdcbfc7c7f6972812535e832f1405658cb
    Merge: b397586 06020ec
    Author: stbergmann <sbergman at redhat.com>
    Date:   Mon Feb 11 10:18:24 2019 +0100
    
        Merge pull request #70 from Erick555/patch-1
    
        Update gvfs to 1.38.1; apache-ant to 1.10.5
    
    commit 06020ec8be69c8c2d22265c7066c2b838d231400
    Author: Erick555 <37542552+Erick555 at users.noreply.github.com>
    Date:   Sat Feb 9 21:24:57 2019 +0100
    
        Update apache-ant to 1.10.5
    
    commit 7c0a9d3fcd5988bc955bf5d67aa3249d45727bb4
    Author: Erick555 <37542552+Erick555 at users.noreply.github.com>
    Date:   Sat Feb 9 21:19:16 2019 +0100
    
        Update gvfs to 1.38.1
    
        * use meson as autotools support was removed.
    
        * use same config options as gnome runtime does:
        https://gitlab.gnome.org/GNOME/gnome-build-meta/blob/gnome-3-30/elements/sdk/gvfs.bst#L17
    
    Change-Id: Ib4314ea49220bcac01fafb600065e41b434c395b
    Reviewed-on: https://gerrit.libreoffice.org/67672
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    (cherry picked from commit 4c6a70cab642fa83faf9344052c7ed1543ea49aa)
    Reviewed-on: https://gerrit.libreoffice.org/67680
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index d1cae8285ba0..47c1ee5119c2 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -17,14 +17,18 @@
         },
         {
             "name": "gvfs",
-            "cleanup": [ "/libexec/*", "/share/dbus-1/services/*", "/share/gvfs/mounts" ],
-            "config-opts": [ "--disable-hal", "--disable-gdu", "--disable-gcr", "--disable-obexftp",
-                             "--disable-avahi", "--disable-documentation", "--disable-admin" ],
+            "buildsystem": "meson",
+            "config-opts": [ "-Dsystemduserunitdir=no", "-Dtmpfilesdir=no", "-Dinstalled_tests=true",
+            "-Ddbus_service_dir=/usr/share/dbus-1/services", "-Dadmin=false", "-Dafc=false", "-Dafp=false",
+            "-Darchive=false", "-Dcdda=false", "-Ddnssd=false", "-Dgoa=false", "-Dgoogle=false",
+            "-Dgphoto2=false", "-Dhttp=false", "-Dmtp=false", "-Dnfs=false", "-Dsftp=false", "-Dsmb=false",
+            "-Dudisks2=false", "-Dbluray=false", "-Dfuse=false", "-Dgcr=false", "-Dgcrypt=false",
+            "-Dgudev=false", "-Dkeyring=false", "-Dlogind=false", "-Dlibusb=false" ],
             "sources": [
                 {
                     "type": "archive",
-                    "url": "https://download.gnome.org/sources/gvfs/1.36/gvfs-1.36.1.tar.xz",
-                    "sha256": "3840dff386c2c8a445337bea4ade0eb71339efaff8602767659fa2896792f026"
+                    "url": "https://download.gnome.org/sources/gvfs/1.38/gvfs-1.38.1.tar.xz",
+                    "sha256": "ed136a842c996d25c835da405c4775c77106b46470e75bdc242bdd59ec0d61a0"
                 }
             ]
         },
@@ -39,8 +43,8 @@
                 },
                 {
                     "type": "archive",
-                    "url": "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.2-bin.tar.xz",
-                    "sha256": "361c8ad2ed8341416e323e7c28af10a8297170a80fdffba294a5c2031527bb6c",
+                    "url": "https://archive.apache.org/dist/ant/binaries/apache-ant-1.10.5-bin.tar.xz",
+                    "sha256": "cebb705dbbe26a41d359b8be08ec066caba4e8686670070ce44bbf2b57ae113f",
                     "dest": "ant"
                 },
                 {
commit 6a67cf0fd858bde3c2271902e11bebf437c09366
Author:     Christian Lohmaier <lohmaier+LibreOffice at googlemail.com>
AuthorDate: Mon Feb 11 14:35:05 2019 +0100
Commit:     Gerrit Code Review <gerrit at gerrit.libreoffice.org>
CommitDate: Mon Feb 11 14:42:48 2019 +0100

    Update git submodules
    
    * Update translations from branch 'libreoffice-6-2'
      - update translations for 6.2.1 rc1
    
        and force-fix errors using pocheck
    
        Change-Id: I8c2eef44bfe4298c619fc9f9b4b3bd22f3403b39

diff --git a/translations b/translations
index 218e3d459819..8a6968bdab66 160000
--- a/translations
+++ b/translations
@@ -1 +1 @@
-Subproject commit 218e3d45981900e330100bacb74f5483af499282
+Subproject commit 8a6968bdab66c790fee6ec6d7d949473830bdd56


More information about the Libreoffice-commits mailing list