summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/layout/data/tdf134472.odtbin0 -> 13403 bytes
-rw-r--r--sw/qa/extras/layout/layout.cxx8
-rw-r--r--sw/source/core/layout/flowfrm.cxx5
3 files changed, 12 insertions, 1 deletions
diff --git a/sw/qa/extras/layout/data/tdf134472.odt b/sw/qa/extras/layout/data/tdf134472.odt
new file mode 100644
index 000000000000..a50c99c87622
--- /dev/null
+++ b/sw/qa/extras/layout/data/tdf134472.odt
Binary files differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index 774b495b31e8..62a94a242a37 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -470,6 +470,14 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInBody)
}
}
+CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf134272)
+{
+ SwDoc* pDoc = createDoc("tdf134472.odt");
+ CPPUNIT_ASSERT(pDoc);
+ xmlDocPtr pXmlDoc = parseLayoutDump();
+ assertXPath(pXmlDoc, "/root/page[1]/header/txt[2]/infos/bounds", "height", "843");
+}
+
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInHeader)
{
loadURL("private:factory/swriter", nullptr);
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 466e0e1855bc..6d83406583a7 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -1697,7 +1697,10 @@ SwTwips SwFlowFrame::CalcLowerSpace( const SwBorderAttrs* _pAttrs ) const
}
// tdf#128195 Consider para spacing below last paragraph in header
- if (!m_rThis.IsInFly() && m_rThis.FindFooterOrHeader() && !GetFollow() && !m_rThis.GetIndNext())
+ bool bHasSpacingBelowPara = m_rThis.GetUpper()->GetFormat()->getIDocumentSettingAccess().get(
+ DocumentSettingId::HEADER_SPACING_BELOW_LAST_PARA);
+ if (bHasSpacingBelowPara && !m_rThis.IsInFly() && m_rThis.FindFooterOrHeader() && !GetFollow()
+ && !m_rThis.GetIndNext())
nLowerSpace += _pAttrs->GetULSpace().GetLower() + _pAttrs->CalcLineSpacing();
return nLowerSpace;