sw/source/core/crsr/crsrsh.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 595b42b686b33bbba0eeba1740277b5f6e0f5433
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Wed May 17 14:49:55 2023 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri May 19 11:42:08 2023 +0200

    tdf#155346 sw: fix crash from changing modal mode
    
    When closing the dialog, UpdateCursor() creates a table cursor for
    ExtendedSelectedAll() because mbSelectAll isn't set.
    
    1  SwShellTableCursor::SwShellTableCursor
    2  SwCursorShell::UpdateCursor
    3  SwCursorShell::ShowCursor
    4  SwView::ShowCursor
    5  SfxViewFrame::Enable
    6  SfxViewFrame::Notify
    7  SfxBroadcaster::Broadcast
    8  SfxObjectShell::SetModalMode_Impl
    9  SfxViewFrame::SetModalMode
    
    (regression from commit d81379db730a163c5ff75d4f3a3cddbd7b5eddda)
    
    Change-Id: Ie73f8e42f764f8041288eb0850721a530d106a0e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151880
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx
index dd78a45cbacb..aacc4da647b5 100644
--- a/sw/source/core/crsr/crsrsh.cxx
+++ b/sw/source/core/crsr/crsrsh.cxx
@@ -2674,6 +2674,8 @@ void SwCursorShell::ShowCursor()
     if( m_bBasicHideCursor )
         return;
 
+    comphelper::FlagRestorationGuard g(mbSelectAll, StartsWith_() != 
StartsWith::None && ExtendedSelectedAll());
+
     m_bSVCursorVis = true;
     m_pCurrentCursor->SetShowTextInputFieldOverlay( true );
     m_pCurrentCursor->SetShowContentControlOverlay(true);

Reply via email to