From 671290e8054366997e512572b2e4e38efbf95f80 Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Mon, 15 Jul 2024 14:33:32 -0400 Subject: [PATCH] Revert "tdf#159013 writerfilter: link to the correct first-page header" This reverts commit 25.2 358ac0da827f908ce312c6d392a3d9102f36428e. which was backported to 24.8 Although this patch made the situation "better than it was" for most cases, it will inevitably make some documents worse. Ultimately, this approach is wrong. See tdf#158977's 158977_linkNonEmptyFirst.docx. We can't only copy from the styles that "express" a H/F (and UNO doesn't let us copy from styles that hide it). A COPY appropach would need to ALWAYS import every header/footer into a dedicated "header/footer repository" page style, and every page style would need to copy its "expressed" headers/footers from the repository to its page style. That would mean our copy procedure would need to be very robust, and all of this is way too big for a bug-fixer like me to consider. I don't want to be the one on the hook expected to fix it properly. Change-Id: I2af4a03a219daabf186473839ba444ff9797ec2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170530 Tested-by: Jenkins Reviewed-by: Justin Luth --- sw/qa/core/header_footer/HeaderFooterTest.cxx | 13 ------------- .../data/tdf1159013_firstHeaderCopy.docx | Bin 15136 -> 0 bytes .../writerfilter/dmapper/DomainMapper_Impl.cxx | 10 ---------- .../writerfilter/dmapper/DomainMapper_Impl.hxx | 12 ------------ sw/source/writerfilter/dmapper/PropertyMap.cxx | 6 ++---- 5 files changed, 2 insertions(+), 39 deletions(-) delete mode 100644 sw/qa/core/header_footer/data/tdf1159013_firstHeaderCopy.docx diff --git a/sw/qa/core/header_footer/HeaderFooterTest.cxx b/sw/qa/core/header_footer/HeaderFooterTest.cxx index 763012652c7c..acfd77f1270e 100644 --- a/sw/qa/core/header_footer/HeaderFooterTest.cxx +++ b/sw/qa/core/header_footer/HeaderFooterTest.cxx @@ -525,19 +525,6 @@ CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf145998_firstHeader) CPPUNIT_ASSERT_EQUAL(u"Normal Header"_ustr, parseDump("/root/page[2]/header/txt"_ostr)); } -CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testTdf1159013_firstHeaderCopy) -{ - // given a document with a first-header-section, a non-first-section, then a first-link-section - createSwDoc("tdf1159013_firstHeaderCopy.docx"); - saveAndReload(u"Office Open XML Text"_ustr); - - // Sanity check - always good to test when dealing with page styles and breaks. - CPPUNIT_ASSERT_EQUAL(5, getPages()); - - // This was copying the non-first-section header instead of "linking" to the first - CPPUNIT_ASSERT_EQUAL(u"First Page header"_ustr, parseDump("/root/page[5]/header/txt"_ostr)); -} - CPPUNIT_TEST_FIXTURE(HeaderFooterTest, testEvenPageOddPageFooter_Import) { // Related tdf#135216 diff --git a/sw/qa/core/header_footer/data/tdf1159013_firstHeaderCopy.docx b/sw/qa/core/header_footer/data/tdf1159013_firstHeaderCopy.docx deleted file mode 100644 index fa2c84cbe4cde9ef3ec28cdab7139e39ca49da91..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 15136 zcmeHu1zR1A(O01`l#Kxugz7yy6-4FJ3bz<}$DIy$(S zJGdFDc{`cA>N9xR+Y#qOf>Y-Lz(MW*@AzLl1HI}a3O!6HZDbe7302h2BVZ)c_0WWp z#bT(IrjEE#y^U>4A}`tUs-!|8=+v8NG&OrQuWk9#`R3GXgTrTA^$_abNqw<)EYH~6 zbnr;dj)auvE&!epW6=sR;}8)>Ta*D(nHG&1Wb&OTDGt$WLeh}ey*{4TX!KS&GXzb= z*&tndF>xg<@`6j!u;ZKXwY(Lf2g)$y+`Ar;i-eGJJ92X9G%Jy)Y0#Q{ayb}W=Vw+d$3dT%q+EpF4J7XX*2oku$>*(rZ;Wl91k*YxPP01K zZPH7^;BIn+Bv)($KRXIn=5z|e+NM{LH>VX%LT~?w6~umQ$i;ITPR1gBA5xj$q^|dA zaOLGFGp|`6A(ej7#V;eq5M+!mFAxBw|L|zS1l*=8&=m!c!@`3++R(+^&Xtkj=jZ=< z^8aG@{oAcazh9Dp5Jm_+gIY5l^y6HDBb{1UmCExZJ%R{MI|lPa8ZBJxXfGgcQCc$C z{k}J%IGYiaG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2_g@#{AJCH<=q^LOdrYxVw;#s}rL ze@XwXa_@KP->ba-k|uurhxG3?U%#vPJ)8cQibtG3RQx@+{=4|^nZ3WnD+&G(|1Hn= zyN2KMTz_fUB>Zy#|CIImUC;09O@Hahr}_^)KLhda!v9G<{}KfNra?sr|3yT97yq3I z{G}j-<&VDqgBJWQ|DU+=moxy7!uGfB|3DEXStyW${9IK-2K0b@O!DU@4Z!~c4_u-; diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx index 5e01071bfa62..a6bbf5302f89 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx +++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.cxx @@ -3993,16 +3993,6 @@ void DomainMapper_Impl::PopPageHeaderFooter(PagePartType ePagePartType, PageType if (pSectionContext) { pSectionContext->clearHeaderFooterLinkToPrevious(ePagePartType, eType); - - // remember most recent "first page" header/footer so follow sections can "link" to them - if (eType == PageType::FIRST) - { - if (ePagePartType == PagePartType::Header) - m_pLastFirstHeader = pSectionContext->GetPageStyle(*this); - else if (ePagePartType == PagePartType::Footer) - m_pLastFirstFooter = pSectionContext->GetPageStyle(*this); - } - m_HeaderFooterSeen.emplace(ePagePartType, eType); } diff --git a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx index 86df252b8ff9..9ab2e6f789f8 100644 --- a/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx +++ b/sw/source/writerfilter/dmapper/DomainMapper_Impl.hxx @@ -617,8 +617,6 @@ private: PropertyMapPtr m_pTopContext; tools::SvRef m_pLastSectionContext; - rtl::Reference m_pLastFirstHeader; // last page style with different first header - rtl::Reference m_pLastFirstFooter; // last page style with different first footer PropertyMapPtr m_pLastCharacterContext; ::std::vector m_aCurrentTabStops; @@ -718,16 +716,6 @@ public: return m_pLastSectionContext.get( ); } - const rtl::Reference& GetLastFirstHeader() const - { - return m_pLastFirstHeader; - } - - const rtl::Reference& GetLastFirstFooter() const - { - return m_pLastFirstFooter; - } - css::uno::Reference const & GetPageStyles(); OUString GetUnusedPageStyleName(); css::uno::Reference const & GetCharacterStyles(); diff --git a/sw/source/writerfilter/dmapper/PropertyMap.cxx b/sw/source/writerfilter/dmapper/PropertyMap.cxx index 76e195eeb486..ea840aa6b536 100644 --- a/sw/source/writerfilter/dmapper/PropertyMap.cxx +++ b/sw/source/writerfilter/dmapper/PropertyMap.cxx @@ -1064,8 +1064,7 @@ void copyHeaderFooter(const DomainMapper_Impl& rDM_Impl, if (bCopyLeftHeader && bEvenAndOdd) copyHeaderFooterTextProperty(xPreviousStyle, xStyle, PROP_HEADER_TEXT_LEFT); if (bCopyFirstHeader && bTitlePage) - copyHeaderFooterTextProperty(rDM_Impl.GetLastFirstHeader(), xStyle, - PROP_HEADER_TEXT_FIRST); + copyHeaderFooterTextProperty(xPreviousStyle, xStyle, PROP_HEADER_TEXT_FIRST); } if (bPreviousHasFooter && bCopyFooter) @@ -1075,8 +1074,7 @@ void copyHeaderFooter(const DomainMapper_Impl& rDM_Impl, if (bCopyLeftFooter && bEvenAndOdd) copyHeaderFooterTextProperty(xPreviousStyle, xStyle, PROP_FOOTER_TEXT_LEFT); if (bCopyFirstFooter && bTitlePage) - copyHeaderFooterTextProperty(rDM_Impl.GetLastFirstFooter(), xStyle, - PROP_FOOTER_TEXT_FIRST); + copyHeaderFooterTextProperty(xPreviousStyle, xStyle, PROP_FOOTER_TEXT_FIRST); } xStyle->setPropertyValue(sHeaderIsOn, uno::Any(bPreviousHasHeader || bHasHeader));