sw/source/uibase/utlui/content.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 1441b4e83337fe2389eaae146b43a8e7c036a85d
Author:     Jim Raykowski <rayk...@gmail.com>
AuthorDate: Sun Oct 31 22:48:42 2021 -0800
Commit:     Jim Raykowski <rayk...@gmail.com>
CommitDate: Tue Nov 2 19:20:54 2021 +0100

    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 <rayk...@gmail.com>

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)

Reply via email to