sw/source/ui/misc/bookmark.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 163ddd7a841fc4ee2b4a79a5ec5e5635bcc0cbc2
Author:     Michael Stahl <michael.st...@allotropia.de>
AuthorDate: Thu Jan 30 18:36:42 2025 +0100
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Jan 31 10:54:46 2025 +0100

    tdf#158221 sw: fix performance disaster in SwInsertBookmarkDlg
    
    Moving the shell cursor without Start/EndAction results in formatting
    and repainting for every bookmark :(
    
    (regression from commit aa6ec3f79607478213272283b7eb17ec2116173c)
    
    Change-Id: I2eb77a7a6aa48a1f218957245d75399bddb594ff
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180965
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index decf3ea80324..f2e8b09427e4 100644
--- a/sw/source/ui/misc/bookmark.cxx
+++ b/sw/source/ui/misc/bookmark.cxx
@@ -348,6 +348,7 @@ void SwInsertBookmarkDlg::PopulateTable()
     m_aTableBookmarks.clear();
     m_xBookmarksBox->clear();
 
+    m_rSh.StartAllAction();
     IDocumentMarkAccess* const pMarkAccess = m_rSh.getIDocumentMarkAccess();
     for (auto ppBookmark = pMarkAccess->getBookmarksBegin();
          ppBookmark != pMarkAccess->getBookmarksEnd(); ++ppBookmark)
@@ -358,6 +359,7 @@ void SwInsertBookmarkDlg::PopulateTable()
             m_aTableBookmarks.emplace_back(*ppBookmark, 
(*ppBookmark)->GetName());
         }
     }
+    m_rSh.EndAllAction();
     m_nLastBookmarksCount = pMarkAccess->getBookmarksCount();
 }
 

Reply via email to