sw/source/uibase/utlui/content.cxx | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-)
New commits: commit a78190da867864485b5d0a91238616bd4090b5b5 Author: Jim Raykowski <rayk...@gmail.com> AuthorDate: Tue Sep 21 23:08:16 2021 -0800 Commit: Jim Raykowski <rayk...@gmail.com> CommitDate: Sat Sep 25 23:16:03 2021 +0200 tdf#143268 Fix slow response after Navigator fills table members when document has many tables Change-Id: Iccf34700a3f09420f3dc3519b04351c53d1d59b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122416 Tested-by: Jenkins Reviewed-by: Jim Raykowski <rayk...@gmail.com> diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 583ccd958ce7..d7e6015fb9e9 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -97,6 +97,8 @@ #include <fldmgr.hxx> #include <docufld.hxx> +#include <frameformats.hxx> + #define CTYPE_CNT 0 #define CTYPE_CTT 1 @@ -658,9 +660,17 @@ void SwContentType::FillMemberList(bool* pbLevelOrVisibilityChanged) OSL_ENSURE(m_nMemberCount == nCount, "MemberCount differs"); Point aNullPt; m_nMemberCount = nCount; - for(size_t i = 0; i < m_nMemberCount; ++i) + const SwFrameFormats* pFrameFormats = m_pWrtShell->GetDoc()->GetTableFrameFormats(); + SwAutoFormatGetDocNode aGetHt(&m_pWrtShell->GetNodes()); + for(size_t n = 0, i = 0; i < m_nMemberCount + n; ++i) { - const SwFrameFormat& rTableFormat = m_pWrtShell->GetTableFrameFormat(i, true); + const SwTableFormat& rTableFormat = + *static_cast<SwTableFormat*>(pFrameFormats->GetFormat(i)); + if (rTableFormat.GetInfo(aGetHt)) // skip deleted tables + { + n++; + continue; + } const OUString& sTableName( rTableFormat.GetName() ); SwContent* pCnt = new SwContent(this, sTableName,