summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2021-11-10 17:50:48 -0900
committerJim Raykowski <raykowj@gmail.com>2021-11-11 07:00:25 +0100
commitcf636b3f5b033d1f1bf511958df96391d81b04df (patch)
treedfebc14b809d9a6d656737ce052dfa62c80a67b7
parentSwNavigator: use stored root-type setting for both Navigator types (diff)
downloadcore-cf636b3f5b033d1f1bf511958df96391d81b04df.tar.gz
core-cf636b3f5b033d1f1bf511958df96391d81b04df.zip
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 <raykowj@gmail.com>
-rw-r--r--sw/source/uibase/utlui/content.cxx4
1 files changed, 3 insertions, 1 deletions
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: