From cf636b3f5b033d1f1bf511958df96391d81b04df Mon Sep 17 00:00:00 2001 From: Jim Raykowski Date: Wed, 10 Nov 2021 17:50:48 -0900 Subject: SwNavigator: account for footnotes separator line in initial count The separator line needs to be accounted for in the initial footnotes members count to be shown without delay on first footnote insert and on first display of the content tree when there are only footnotes, no endnotes, in the document and also for the last endnote to be shown without delay on first display of the content tree. Change-Id: I09a5ad8a0cb4463518a91d680741b49b572cadc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125019 Tested-by: Jenkins Reviewed-by: Jim Raykowski --- sw/source/uibase/utlui/content.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index f877617e13a5..f938d8e2617a 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -417,12 +417,14 @@ void SwContentType::Init(bool* pbInvalidateWindow) break; case ContentTypeId::FOOTNOTE: { - m_nMemberCount = 0; m_sTypeToken.clear(); m_bEdit = true; m_bDelete = false; const SwFootnoteIdxs& rFootnoteIdxs = m_pWrtShell->GetDoc()->GetFootnoteIdxs(); m_nMemberCount = rFootnoteIdxs.size(); + // account for the separator line + if (m_nMemberCount > 0) + m_nMemberCount++; } break; case ContentTypeId::BOOKMARK: -- cgit