summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Raykowski <raykowj@gmail.com>2021-10-31 22:48:42 -0800
committerJim Raykowski <raykowj@gmail.com>2021-11-02 19:20:54 +0100
commit1441b4e83337fe2389eaae146b43a8e7c036a85d (patch)
tree6646e06d77f73bb8cce6ccf62ca756a27802c27e
parentae6f7eecfc62442584473034853539706b03f7af (diff)
SwNavigator: correct outline level comparison used in determining
outline content type member count Outline content type member count can be less than the number of outline nodes in the document model if the outline level setting is less than outline level maximum, MAXLEVEL. Currently, the outline node count is incorrectly compared to the outline level maximum in determining the outline content type member count. The member count is compared against the old member count to determine if the member array needs to be cleared and filled when a member in the array is wanted by a call to the GetMember function. This patch changes the outline level maximum to be compared to the set outline level. Change-Id: Ie1348575becbbc14446b417bcd568f158330cf9a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124537 Tested-by: Jenkins Reviewed-by: Jim Raykowski <raykowj@gmail.com>
-rw-r--r--sw/source/uibase/utlui/content.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index f6f56c9bfb26..8d5df012b844 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -353,7 +353,7 @@ void SwContentType::Init(bool* pbInvalidateWindow)
{
m_sTypeToken = "outline";
m_nMemberCount = m_pWrtShell->getIDocumentOutlineNodesAccess()->getOutlineNodesCount();
- if (m_nMemberCount < MAXLEVEL)
+ if (m_nOutlineLevel < MAXLEVEL)
{
const size_t nOutlineCount = m_nMemberCount;
for(size_t j = 0; j < nOutlineCount; ++j)