From fe8ec3f3f09aae165c854294ad52d6870e70ef8e Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Fri, 30 Sep 2016 17:46:38 +0300 Subject: [PATCH] n#780843 revert part of docx testcase revert testcase for commit 211916f86585cb4f6258eb30e0474e4c21cd37f1 On import, it is impossible to know where automatic end-of-pages will be, so it cannot be known that all the content before the page-break will be on the first page. Removing this testcase because Writer does not have the capability to dynamically assign headers/footers to continuous break sections. This test worked on this particular document, but not on generic documents. Replacing it with a version of the document with more text before the continuous break, which produces the exact opposite footer results. Change-Id: If660edd47b4eb19798f79babe65c37e1a9848739 Reviewed-on: https://gerrit.libreoffice.org/29408 Tested-by: Jenkins Reviewed-by: Miklos Vajna --- .../ooxmlimport/data/inheritFirstHeader.docx | Bin 0 -> 15002 bytes sw/qa/extras/ooxmlimport/data/n780843b.docx | Bin 0 -> 13623 bytes sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 52 ++++++++++++------ writerfilter/source/dmapper/PropertyMap.cxx | 12 ++-- 4 files changed, 40 insertions(+), 24 deletions(-) create mode 100644 sw/qa/extras/ooxmlimport/data/inheritFirstHeader.docx create mode 100644 sw/qa/extras/ooxmlimport/data/n780843b.docx diff --git a/sw/qa/extras/ooxmlimport/data/inheritFirstHeader.docx b/sw/qa/extras/ooxmlimport/data/inheritFirstHeader.docx new file mode 100644 index 0000000000000000000000000000000000000000..e3d7d20a2d236d9da6518f3f2fb61857b8483aee GIT binary patch literal 15002 zcmeIZRdgIlwgp;ZW@ct~iP2)Rn3>UHX31h^W+qFvShmF$Gg-{cWHG;T-|6WdPp|jh z|GoKS=E@pNv z2CAM8X3l!d9=0~5g^=L1`2cXx^Z$4KFCKxOlwtX9R#fp@sVC8GCYfbyII`ph1Y+58 zv3r1t!eV$&)A7O4Sq7zTa6st?0{4WGq2p5 zv;|R*QSdksh6Dm6xTQdgq>Fnk{w3{mFtzu2HBg0Z8_UB`nBOJ)0!vvc97EoExjNg0 z_+U7%7j>;i$`+xqhibl==k_CqU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wY#Ys;Zw)^tx&?{^&)sgvqx z)Q)ZjdUL5`W--UZ*(Xi{1aj0Q%vXGMG3qg5rL0$&!{bBWc>5|5?0e0Q&MrLI886K) z5qnh31o?k@IU&ZCfB7JA4>RAaFsc3_>^)gMjF(&1PgUne9><5&=8Vw3AN?& zr&;|>!sVIjowGNH9hr#z{dpw`I2;a39k ze=#j6}N4oSG&>79btr>;1y8RK5eCGfyF_VG}8T~fk+ zB0HqWkcWQN=2Al(>7dKNtHS*Ql5BY`io98}KQ!OzNlM}5b~8})D~zL!sGQc<#T(i^ ztV>Bqh00z^mbcMRi15;5ET4pvghKE7}*1@(rq&qMlY;07qh>vZ5+u=v};>0u4)2x~VM42zJl|xzTEh z1!+5yj;=FT`~rm^1q8w}PeWS;6`p0~C43vd>Ohr9@|7jf@KKFJ;Q3c(=Z(|rKMo)h3XNVM4F0um0|w3nDh>SeS+qZN^|#wUoJ>=c z{Z9e^dG_URSimGG(fiv;nBRf_c_85Lz-tgC;{WYApZ;g9~{fy@xOEb{=!d#0{%am{~HtVcl7U6wZG8DAl}s9(0>ruenUa3>WT3y`zM$&S-x~jeiSj%8clyd-XgKVDp?@c{{4V16jl;i0OcDM| z#NW3Oe~15G?)nR^L;WxKZ^f_QCH!7P`b&Zo&A%j=gHC7uyQ1_v{y(c4f1v?@8(IM1 z-|pbg8prSO-?PKN1e`GZ`TqaT6@Lf+r}Oy>3IGfP|JL@uT#=$I6v(cAxhYh@1IRQZ JIe&foe*oD@f9n7M literal 0 HcmV?d00001 diff --git a/sw/qa/extras/ooxmlimport/data/n780843b.docx b/sw/qa/extras/ooxmlimport/data/n780843b.docx new file mode 100644 index 0000000000000000000000000000000000000000..2ba9ab2c6f0f6584d7d54e53c2cc8c5e8d798c65 GIT binary patch literal 13623 zcmeHuRajivwsqky!QI_mf(3VXcL)S`cXxNUpuvK>Ly!<8XmAS@9^7uF@9C57oc{iY z|Mi~zP_+uyn6=iFJ?EZll#(n2BnAK)01E&BNC6gU*?@2`0Du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175pSE~1w2~zL zg?TZsS{SHcygXxi%9x=@EzPVa_H4DUOUA$SD7jO~QkImHt|ggnL_ruu`-@Ska>P1Aob z9pt^JAVS$+Xbg5PYQ`ouf4J|*QNj!(Zht@HFDm=T=!d#(2_VZ1m2FsMfG(1QttnM9M3V>hWj$ zRE4-Xe!8P*E&`W49ai}|`nqKgtz~%8)mEMfwL)7RN(f4&(Q`q6Zi0j6@E(q?t)YQ& zt^g@2#G0?1ZCJH?$F%+7-C+3hl*wsAx{-40lLXNYcuIA*pPCJY3C-Nh?rwZH1ii6( zq>@NmVLz58ziE7q#(jgCurwRj1$d9Xi;RrCYn5u)h|Jo32%~!q3hhp#kofV)=1We3 zN4kvB54x;_NgCL4g~$>g5sKl#fn?lkG85hPw2e?P8d!ecoHe2dx%i%!Hz6~NPW*}# z+Sioel&(HhcnIK|qMOPw&jNVKJD=ZBbaF>fD{+wTOWo2yA`9X@g_ZbI_z|N`NxraC zeEYcZi=+((&Iqau{`qGXf5zOO@Bi?l3nkgV3-~+F`%mD{_g)A9;4iH2-+_N8zy1}t z13H8Je^Ft7m-IWc@s})RxPRa|{to}0lJg6`0HR9%v5>zJbbiPG&H(v^F9*>F{=om0 z5Ar+wce=qZxECn0{{8j;A|L#Y{{6iC7y1VMZ|FZx&woe%e&YKJ?F>2q{^PrUKmYw* z#P7ZKUn2Mk{w3nCo%i42zc xPara = getParagraph(3); + uno::Reference< text::XTextRange > xPara = getParagraph(1); OUString aStyleName = getProperty(xPara, "PageStyleName"); - uno::Reference xPageStyle(getStyles("PageStyles")->getByName(aStyleName), uno::UNO_QUERY); - uno::Reference xFooter = getProperty< uno::Reference >(xPageStyle, "FooterText"); - CPPUNIT_ASSERT_EQUAL(OUString("shown footer"), xFooter->getString()); - - xPara = getParagraph(1); - aStyleName = getProperty(xPara, "PageStyleName"); CPPUNIT_ASSERT_EQUAL(OUString("First Page"), aStyleName); //tdf64372 this document should only have one page break (2 pages, not 3) @@ -1000,6 +983,39 @@ DECLARE_OOXMLIMPORT_TEST(testN780843, "n780843.docx") CPPUNIT_ASSERT_EQUAL(sal_Int16(2), xCursor->getPage()); } +DECLARE_OOXMLIMPORT_TEST(testN780843b, "n780843b.docx") +{ + // Same document as testN780843 except there is more text before the continuous break. Now the opposite footer results should happen. + uno::Reference< text::XTextRange > xPara = getParagraph(3); + OUString aStyleName = getProperty(xPara, "PageStyleName"); + uno::Reference xPageStyle(getStyles("PageStyles")->getByName(aStyleName), uno::UNO_QUERY); + uno::Reference xFooterText = getProperty< uno::Reference >(xPageStyle, "FooterText"); + CPPUNIT_ASSERT_EQUAL( OUString("hidden footer"), xFooterText->getString() ); +} + +DECLARE_OOXMLIMPORT_TEST(testInheritFirstHeader,"inheritFirstHeader.docx") +{ +// First page headers always link to last used first header, never to a follow header + uno::Reference xModel(mxComponent, uno::UNO_QUERY); + uno::Reference xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY); + uno::Reference xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); + + xCursor->jumpToLastPage(); + OUString sPageStyleName = getProperty( xCursor, "PageStyleName" ); + uno::Reference xHeaderText = getProperty< uno::Reference >(getStyles("PageStyles")->getByName(sPageStyleName), "HeaderText"); + CPPUNIT_ASSERT_EQUAL( OUString("Last Header"), xHeaderText->getString() ); + + xCursor->jumpToPreviousPage(); + sPageStyleName = getProperty( xCursor, "PageStyleName" ); + xHeaderText = getProperty< uno::Reference >(getStyles("PageStyles")->getByName(sPageStyleName), "HeaderText"); + CPPUNIT_ASSERT_EQUAL( OUString("First Header"), xHeaderText->getString() ); + + xCursor->jumpToPreviousPage(); + sPageStyleName = getProperty( xCursor, "PageStyleName" ); + xHeaderText = getProperty< uno::Reference >(getStyles("PageStyles")->getByName(sPageStyleName), "HeaderText"); + CPPUNIT_ASSERT_EQUAL( OUString("Follow Header"), xHeaderText->getString() ); +} + DECLARE_OOXMLIMPORT_TEST(testShadow, "imgshadow.docx") { /* diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx index 6a07e9d3c250..03198f349d4f 100644 --- a/writerfilter/source/dmapper/PropertyMap.cxx +++ b/writerfilter/source/dmapper/PropertyMap.cxx @@ -1114,19 +1114,19 @@ throw ( css::beans::UnknownPropertyException, ApplyProperties_( m_aFollowPageStyle ); } - if( pLastContext && m_sFirstPageStyleName.isEmpty() ) - m_sFirstPageStyleName = pLastContext->GetPageStyleName( /*bFirst=*/true ); + // FirstPageStyle may only be inherited if it will not be used or re-linked to a different follow + if( !m_bTitlePage && pLastContext && m_sFirstPageStyleName.isEmpty() ) + m_sFirstPageStyleName = pLastContext->GetPageStyleName( /*bFirst=*/true ); else { HandleMarginsHeaderFooter( /*bFirst=*/true, rDM_Impl ); GetPageStyle( xPageStyles, xTextFactory, /*bFirst=*/true ); if( rDM_Impl.IsNewDoc() && m_aFirstPageStyle.is() ) ApplyProperties_( m_aFirstPageStyle ); - } - GetPageStyle( xPageStyles, xTextFactory, /*bFirst=*/true ); - // Chain m_aFollowPageStyle to be after m_aFirstPageStyle - m_aFirstPageStyle->setPropertyValue( "FollowStyle", uno::makeAny(m_sFollowPageStyleName) ); + // Chain m_aFollowPageStyle to be after m_aFirstPageStyle + m_aFirstPageStyle->setPropertyValue( "FollowStyle", uno::makeAny(m_sFollowPageStyleName) ); + } } void SectionPropertyMap::CloseSectionGroup( DomainMapper_Impl& rDM_Impl )