summaryrefslogtreecommitdiff
path: root/sw/source/ui/misc/outline.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-17 10:55:12 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2024-09-17 20:31:54 +0200
commit848ff3ffadf6f366ca952af15e6b770ad6a167dc (patch)
tree19ae2fb5bc9d9fe1c2de36b7066651b91d95f672 /sw/source/ui/misc/outline.cxx
parent0fda9371ce530d1c79e6eb404afd7127371f7975 (diff)
cid#1607992 silence Overflowed constant
Change-Id: Ib5ceaa4f8f42c897dba8f941e4b094d9f522b3bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173555 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'sw/source/ui/misc/outline.cxx')
-rw-r--r--sw/source/ui/misc/outline.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/ui/misc/outline.cxx b/sw/source/ui/misc/outline.cxx
index 2249dba318b0..92bfbbeaab88 100644
--- a/sw/source/ui/misc/outline.cxx
+++ b/sw/source/ui/misc/outline.cxx
@@ -276,9 +276,9 @@ IMPL_LINK(SwOutlineTabDialog, MenuSelectHdl, const OUString&, rIdent, void)
return;
}
- if( nLevelNo-- )
+ if (nLevelNo > 0)
{
- const SwNumRulesWithName *pRules = m_pChapterNumRules->GetRules( nLevelNo );
+ const SwNumRulesWithName *pRules = m_pChapterNumRules->GetRules(nLevelNo - 1);
if( pRules )
{
pRules->ResetNumRule(m_rWrtSh, *m_xNumRule);