download.lst | 4 ++-- sw/qa/extras/ooxmlexport/ooxmlexport19.cxx | 17 +++++++++++++++++ sw/qa/extras/ooxmlimport/ooxmlimport2.cxx | 20 -------------------- sw/source/filter/ww8/docxattributeoutput.cxx | 9 +++++++++ 4 files changed, 28 insertions(+), 22 deletions(-)
New commits: commit fca3052a08f0eb6ffe161c0eb3bb7ef8548351f2 Author: Justin Luth <[email protected]> AuthorDate: Wed Jun 18 16:16:35 2025 -0400 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Jul 3 18:54:07 2025 +0200 tdf#161521 tdf#166305 docx export: fix page margins when mirrorMargins This patch is basically Oliver's original work that he reverted in tdf#165083. His problem was that he trusted Sections().CurrentSectionInfo() to be accurate in this context. I substituted m_pCurrentPageDesc. make CppunitTest_sw_ooxmlexport19 CPPUNIT_TEST_NAME=testTdf153196 Change-Id: Iedce7b6460664301f65f3ce2cf0a97c4e26194d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186696 Reviewed-by: Justin Luth <[email protected]> Tested-by: Jenkins (cherry picked from commit a4e7d0028efb8fa07d0877aff81fb406f9464fb4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186719 Reviewed-by: Xisco Fauli <[email protected]> diff --git a/sw/qa/extras/ooxmlimport/data/A019_min.docx b/sw/qa/extras/ooxmlexport/data/A019_min.docx similarity index 100% rename from sw/qa/extras/ooxmlimport/data/A019_min.docx rename to sw/qa/extras/ooxmlexport/data/A019_min.docx diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx index ef8da13a9f15..1e5552b7a4b5 100644 --- a/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx +++ b/sw/qa/extras/ooxmlexport/ooxmlexport19.cxx @@ -1280,6 +1280,23 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf148952_2010) CPPUNIT_ASSERT_EQUAL(u"Black"_ustr, title); } +DECLARE_OOXMLEXPORT_TEST(testTdf153196, "A019_min.docx") +{ + uno::Reference<beans::XPropertySet> xPageStyle; + getStyles("PageStyles")->getByName("Converted1") >>= xPageStyle; + sal_Int32 nLeftMargin{}; + xPageStyle->getPropertyValue("LeftMargin") >>= nLeftMargin; + // Without the accompanying fix in place, this test would have failed with: + // - Expected: 4265 + // - Actual : 0 + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4265), nLeftMargin); + sal_Int32 nRightMargin{}; + xPageStyle->getPropertyValue("RightMargin") >>= nRightMargin; + // - Expected: 0 + // - Actual : 4265 + CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), nRightMargin); +} + CPPUNIT_PLUGIN_IMPLEMENT(); /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx index 38ac0159960c..9e5daa6dab96 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport2.cxx @@ -1333,26 +1333,6 @@ CPPUNIT_TEST_FIXTURE(Test, testTdf154370) CPPUNIT_ASSERT_EQUAL(beans::PropertyState_DIRECT_VALUE, ePropertyState); } } - -CPPUNIT_TEST_FIXTURE(Test, testTdf153196) -{ - createSwDoc("A019_min.docx"); - - uno::Reference<beans::XPropertySet> xPageStyle; - getStyles("PageStyles")->getByName("Converted1") >>= xPageStyle; - sal_Int32 nLeftMargin{}; - xPageStyle->getPropertyValue("LeftMargin") >>= nLeftMargin; - // Without the accompanying fix in place, this test would have failed with: - // - Expected: 4265 - // - Actual : 0 - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(4265), nLeftMargin); - sal_Int32 nRightMargin{}; - xPageStyle->getPropertyValue("RightMargin") >>= nRightMargin; - // - Expected: 0 - // - Actual : 4265 - CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), nRightMargin); -} - // tests should only be added to ooxmlIMPORT *if* they fail round-tripping in ooxmlEXPORT } // end of anonymous namespace diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 466961e899ce..a50349ae4e1e 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -9530,6 +9530,15 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace ) m_pageMargins.nLeft += sal::static_int_cast<sal_uInt16>(rLRSpace.ResolveLeft({})); m_pageMargins.nRight += sal::static_int_cast<sal_uInt16>(rLRSpace.ResolveRight({})); + + // if page layout is 'left' then left/right margin may need to be exchanged + // as it is exported as mirrored layout starting with even page + if (m_rExport.isMirroredMargin() + && UseOnPage::Left == (m_rExport.m_pCurrentPageDesc->ReadUseOn() & UseOnPage::All)) + { + std::swap(m_pageMargins.nLeft, m_pageMargins.nRight); + } + sal_uInt16 nGutter = rLRSpace.GetGutterMargin(); AddToAttrList( m_pSectionSpacingAttrList, commit 22f305abd226adabaf3340bbf8d286b904460b12 Author: Xisco Fauli <[email protected]> AuthorDate: Thu Jul 3 14:02:46 2025 +0200 Commit: Xisco Fauli <[email protected]> CommitDate: Thu Jul 3 18:53:52 2025 +0200 openssl: upgrade to 3.0.17 Downloaded from https://github.com/openssl/openssl/releases/download/openssl-3.0.17/openssl-3.0.17.tar.gz Change-Id: I2b796bc9c6917ecc92032d011ef7a3c4bd266c81 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187326 Reviewed-by: Xisco Fauli <[email protected]> Tested-by: Jenkins (cherry picked from commit e0e04ab7eb742b373fadd252c8de17f48177fef8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/187334 diff --git a/download.lst b/download.lst index c61fd986bb25..6d13ae0fc2ba 100644 --- a/download.lst +++ b/download.lst @@ -549,8 +549,8 @@ OPENLDAP_TARBALL := openldap-2.6.10.tgz # three static lines # so that git cherry-pick # will not run into conflicts -OPENSSL_SHA256SUM := 57e03c50feab5d31b152af2b764f10379aecd8ee92f16c985983ce4a99f7ef86 -OPENSSL_TARBALL := openssl-3.0.16.tar.gz +OPENSSL_SHA256SUM := dfdd77e4ea1b57ff3a6dbde6b0bdc3f31db5ac99e7fdd4eaf9e1fbb6ec2db8ce +OPENSSL_TARBALL := openssl-3.0.17.tar.gz # three static lines # so that git cherry-pick # will not run into conflicts
