summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8par.cxx
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2021-06-23 09:21:32 +0200
committerJustin Luth <justin_luth@sil.org>2021-06-24 19:21:24 +0200
commit8bfa14e831f31f372b98d7283fa4abc73bcb5532 (patch)
treebbc3223c39f32d5eb234c0daf6f198062aa60f1c /sw/source/filter/ww8/ww8par.cxx
parentf446a203fa2897bab8ae7686c948a8bf060675c6 (diff)
tdf#104239 doc import: accept outlineLvl0 == (listLvl = MAXLEVEL)
If listLvl is undefined, it is treated as level 0, so when testing that outlineLvl is equal to listLvl, then consider MAXLEVEL to be equivalent to zero. The opposite is not true. An undefined outlineLvl is not considered to be level 0. This doesn't fix bug 104239, but it is one step in the right direction. Two unit tests followed this path, (transparent-text.doc and tdf80635_pageLeft.doc) but neither one sets a numbering style, so they don't make good unit tests. Change-Id: I62cd7f5500fcd6dc06327900c33f12c129610a04 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117745 Tested-by: Jenkins Reviewed-by: Justin Luth <justin_luth@sil.org>
Diffstat (limited to 'sw/source/filter/ww8/ww8par.cxx')
-rw-r--r--sw/source/filter/ww8/ww8par.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 9721a3f8cf4d..d4c2ddc62cd6 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -6004,9 +6004,10 @@ void SwWW8ImplReader::SetOutlineStyles()
continue;
}
+ const sal_uInt8 nLvl = pStyleInf->m_nListLevel == MAXLEVEL ? 0 : pStyleInf->m_nListLevel;
if (m_pChosenWW8OutlineStyle != nullptr
&& pStyleInf->mnWW8OutlineLevel < WW8ListManager::nMaxLevel
- && pStyleInf->mnWW8OutlineLevel == pStyleInf->m_nListLevel)
+ && pStyleInf->mnWW8OutlineLevel == nLvl)
{
// LibreOffice's Chapter Numbering only works when outlineLevel == listLevel
const SwNumFormat& rRule