sw/source/core/layout/paintfrm.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit cf234d0e546046cf481ed080bc5f6984a8aba36a
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Mar 11 11:21:14 2024 +0000
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Tue Mar 12 08:31:20 2024 +0100

    Draw indicators for header/footer when cursor is inside one
    
    continue to not draw it for the main body text as per:
    https://github.com/CollaboraOnline/online/issues/3491
    
    but give an indication when the cursor is inside the header/footer:
    https://github.com/CollaboraOnline/online/issues/5298
    
    Change-Id: I500806fe44c131585ea4292536908261660ae20a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164653
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com>
    Reviewed-by: Miklos Vajna <vmik...@collabora.com>

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 5f4292ad836d..9023bddab04a 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -7011,12 +7011,12 @@ static void lcl_RefreshLine( const SwLayoutFrame *pLay,
     }
 }
 
-static std::vector<basegfx::B2DPolygon> 
lcl_CreatePageAreaDelimiterPolygons(const SwRect& rRect)
+static std::vector<basegfx::B2DPolygon> 
lcl_CreatePageAreaDelimiterPolygons(const SwRect& rRect, bool bHeaderFooter)
 {
     std::vector<basegfx::B2DPolygon> aPolygons;
 
     // Hide text boundaries by default - cool#3491
-    if (comphelper::LibreOfficeKit::isActive())
+    if (!bHeaderFooter && !comphelper::LibreOfficeKit::isActive())
         return aPolygons;
 
     double nLineLength = 200.0; // in Twips
@@ -7135,7 +7135,7 @@ std::vector<basegfx::B2DPolygon> 
SwPageFrame::GetSubsidiaryLinesPolygons(const S
         return aPolygons;
 
     if (!rViewShell.GetViewOptions()->IsViewMetaChars())
-        aPolygons = lcl_CreatePageAreaDelimiterPolygons(aArea);
+        aPolygons = lcl_CreatePageAreaDelimiterPolygons(aArea, false /* body 
*/);
     else
         aPolygons = lcl_CreateRectangleDelimiterPolygons(aArea);
 
@@ -7264,7 +7264,7 @@ std::vector<basegfx::B2DPolygon> 
SwHeadFootFrame::GetSubsidiaryLinesPolygons(con
     SwRect aArea( getFramePrintArea() );
     aArea.Pos() += getFrameArea().Pos();
     if (!rViewShell.GetViewOptions()->IsViewMetaChars( ))
-        aPolygons = lcl_CreatePageAreaDelimiterPolygons(aArea);
+        aPolygons = lcl_CreatePageAreaDelimiterPolygons(aArea, true /* 
header/footer*/);
     else
         aPolygons = lcl_CreateRectangleDelimiterPolygons(aArea);
 

Reply via email to