sw/source/core/layout/ftnfrm.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-)
New commits: commit cb2988a2d1df537d72999d0cc3d0106820c3578d Author: Bayram Çiçek <[email protected]> AuthorDate: Tue May 13 17:26:59 2025 +0300 Commit: Bayram Çiçek <[email protected]> CommitDate: Mon May 19 16:48:28 2025 +0200 tdf#166205: decrease the page height to 5% to fit header & footer if DocumentSettingId::TAB_OVER_SPACING compatibility flag is set. - if a doc created in MSO Word and opened in LO Writer, header&footer for the first page were not visible - for some documents. - this change make them visible now. Signed-off-by: Bayram Çiçek <[email protected]> Change-Id: If4548949514eb319a6b1e3af5799d266f53ec753 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185261 Reviewed-by: Caolán McNamara <[email protected]> Tested-by: Jenkins (cherry picked from commit 43e49a34a5e581194eff38a5e51fda85cfa5a446) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185534 Tested-by: Jenkins CollaboraOffice <[email protected]> diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx index 1c6b221cf511..6a64c7d484d5 100644 --- a/sw/source/core/layout/ftnfrm.cxx +++ b/sw/source/core/layout/ftnfrm.cxx @@ -2668,7 +2668,17 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const nRet += nTmp; } else - nRet -= aRectFnSet.GetHeight(pPg->getFramePrintArea())/5; + { + assert(pPg); + + const SwDoc* pDoc = GetFormat()->GetDoc(); + const IDocumentSettingAccess& rIDSA = pDoc->getIDocumentSettingAccess(); + + if (rIDSA.get(DocumentSettingId::TAB_OVER_SPACING)) + nRet -= aRectFnSet.GetHeight(pPg->getFramePrintArea()) / 20; + else + nRet -= aRectFnSet.GetHeight(pPg->getFramePrintArea()) / 5; + } if( nRet < 0 ) nRet = 0; }
