summaryrefslogtreecommitdiff
path: root/writerfilter
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.com>2020-05-11 21:08:35 +0200
committerAndras Timar <andras.timar@collabora.com>2020-05-20 16:06:50 +0200
commite77ed8957be12c37a9e0131b1478f808c23d41c6 (patch)
tree65a3cf52a4de78b777ec651c91ea145612cd2006 /writerfilter
parentd733c26a16c48828e5442712551b8c43fa857506 (diff)
tdf#127778 DOCX import: fix unexpected heading on non-first page ...
... when the first page has a heading Regression from commit 17e51f427b3f0cec74ac8e0a1b3f51189006ae6f (DOCX import: first page header should always set default headers as well, 2014-11-21), the problem is around how to split a first + follow page style on import, and then do the opposite on export. This is described using a single section in OOXML, but Writer has 2 page styles for this (unlike in case of the DOC filter). This means the header margin has to be taken from one of these page styles. The above commit tweaked the import, so the follow page style has the wanted header margin, but this leads to incorrect layout. Fix the problem by tweaking the export instead: it has random access to the doc model, so it can take the header margin from the first page style if needed, and then the import side can be reverted, leading to correct layout. Also remove some leftover debug code in test/, which was added in commit 5352d45dd4a04f8f02cf7f6ad4169126d3b3586a (convert AnimationImport to fast-parser APIs, 2020-02-18). (cherry picked from commit 51534ac2b9747975945acb6a1e1ba5cc6d73f5c2) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport6.cxx Change-Id: I4bbf7271f3a437e8432399bd1e32e9d24190a501 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94193 Tested-by: Jenkins Reviewed-by: Xisco FaulĂ­ <xiscofauli@libreoffice.org>
Diffstat (limited to 'writerfilter')
-rw-r--r--writerfilter/source/dmapper/PropertyMap.cxx9
1 files changed, 0 insertions, 9 deletions
diff --git a/writerfilter/source/dmapper/PropertyMap.cxx b/writerfilter/source/dmapper/PropertyMap.cxx
index 2d085b5775dd..ef5ac73ac4af 100644
--- a/writerfilter/source/dmapper/PropertyMap.cxx
+++ b/writerfilter/source/dmapper/PropertyMap.cxx
@@ -928,15 +928,6 @@ void SectionPropertyMap::CopyLastHeaderFooter( bool bFirstPage, DomainMapper_Imp
void SectionPropertyMap::PrepareHeaderFooterProperties( bool bFirstPage )
{
bool bCopyFirstToFollow = bFirstPage && m_bTitlePage && m_aFollowPageStyle.is();
- if (bCopyFirstToFollow)
- {
- // This is a first page and has a follow style, then enable the
- // header/footer there as well to be consistent.
- if (HasHeader(/*bFirstPage=*/true))
- m_aFollowPageStyle->setPropertyValue("HeaderIsOn", uno::makeAny(true));
- if (HasFooter(/*bFirstPage=*/true))
- m_aFollowPageStyle->setPropertyValue("FooterIsOn", uno::makeAny(true));
- }
sal_Int32 nTopMargin = m_nTopMargin;
sal_Int32 nHeaderTop = m_nHeaderTop;