sw/source/core/layout/ftnfrm.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 6991accc738b3e6d333eaa5a9922af4a2bc67fa2
Author:     Bayram Çiçek <bayram.ci...@collabora.com>
AuthorDate: Tue May 13 17:26:59 2025 +0300
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Fri May 16 18:03:15 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 <bayram.ci...@collabora.com>
    Change-Id: If4548949514eb319a6b1e3af5799d266f53ec753
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185261
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit 43e49a34a5e581194eff38a5e51fda85cfa5a446)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/185423
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>

diff --git a/sw/source/core/layout/ftnfrm.cxx b/sw/source/core/layout/ftnfrm.cxx
index 4e35abc9d43d..7a3188b55f7f 100644
--- a/sw/source/core/layout/ftnfrm.cxx
+++ b/sw/source/core/layout/ftnfrm.cxx
@@ -2714,7 +2714,14 @@ SwTwips SwFootnoteBossFrame::GetVarSpace() const
         else
         {
             assert(pPg);
-            nRet -= aRectFnSet.GetHeight(pPg->getFramePrintArea())/5;
+
+            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;

Reply via email to