diff options
author | Michael Stahl <michael.stahl@allotropia.de> | 2025-01-30 18:36:42 +0100 |
---|---|---|
committer | Michael Stahl <michael.stahl@allotropia.de> | 2025-01-31 10:54:46 +0100 |
commit | 163ddd7a841fc4ee2b4a79a5ec5e5635bcc0cbc2 (patch) | |
tree | fe91d42b793ff4e57f7ab909f8ac0945ab112541 | |
parent | 7cd00ca413da8d29f54749c04493e85937a2fa38 (diff) |
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.stahl@allotropia.de>
-rw-r--r-- | sw/source/ui/misc/bookmark.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
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(); } |