sw/source/uibase/docvw/edtwin.cxx |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

New commits:
commit f425c0aab6e33b8029bf7e87ac9b10b4b4489ac9
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Fri May 26 14:47:58 2023 +0100
Commit:     Caolán McNamara <caolan.mcnam...@collabora.com>
CommitDate: Tue May 30 21:08:01 2023 +0200

    Related: tdf#155507 Only need this invalidate if using header/footer 
controls
    
    which is implied from the IsUseHeaderFooterMenu option
    
    Change-Id: I0f9a32ed1a3e0e5e277c33c45206757d133d92e2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152311
    Tested-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>

diff --git a/sw/source/uibase/docvw/edtwin.cxx 
b/sw/source/uibase/docvw/edtwin.cxx
index 09e5b01c7758..7564385f19a9 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -2965,9 +2965,9 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
 
             if ( !bActive )
             {
-                // When in Hide-Whitespace mode, we don't want header
-                // and footer controls.
-                if (!rSh.GetViewOptions()->IsHideWhitespaceMode())
+                // HeaderFooter menu implies header/footer controls, so only 
do this with IsUseHeaderFooterMenu enabled.
+                // But, additionally, when in Hide-Whitespace mode, we don't 
want those controls.
+                if (rSh.GetViewOptions()->IsUseHeaderFooterMenu() && 
!rSh.GetViewOptions()->IsHideWhitespaceMode())
                 {
                     SwPaM aPam(*rSh.GetCurrentShellCursor().GetPoint());
                     const bool bWasInHeader = 
aPam.GetPoint()->GetNode().FindHeaderStartNode() != nullptr;
@@ -2992,7 +2992,7 @@ void SwEditWin::MouseButtonDown(const MouseEvent& _rMEvt)
                         // if the cursor cannot be positioned on-screen, then 
the user would need to scroll back again to use the control.
                         // This should only be done for the footer. The cursor 
can always be re-positioned near the header. tdf#134023.
                         if ( eControl == FrameControlType::Footer && 
!bSeparatorWasVisible
-                             && rSh.GetViewOptions()->IsUseHeaderFooterMenu() 
&& !Application::IsHeadlessModeEnabled() )
+                             && !Application::IsHeadlessModeEnabled() )
                             return;
                     }
                 }

Reply via email to