sw/source/ui/misc/bookmark.cxx | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 5e85d816db0e6c4bf31bdfa84faf0507f277e617
Author: Michael Stahl <[email protected]>
AuthorDate: Thu Jan 30 18:36:42 2025 +0100
Commit: Adolfo Jayme Barrientos <[email protected]>
CommitDate: Fri Jan 31 11:47:28 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 <[email protected]>
(cherry picked from commit 163ddd7a841fc4ee2b4a79a5ec5e5635bcc0cbc2)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180983
Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
diff --git a/sw/source/ui/misc/bookmark.cxx b/sw/source/ui/misc/bookmark.cxx
index 6f882bad5d15..de6e41195b12 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 (IDocumentMarkAccess::const_iterator_t 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();
}