summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx17
1 files changed, 5 insertions, 12 deletions
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index 71864ead9beb..80bfebd68a61 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -1766,17 +1766,11 @@ void SwWW8ImplReader::RegisterNumFormatOnStyle(sal_uInt16 nStyle)
rStyleInf.maWordLR.reset(ItemGet<SvxLRSpaceItem>(*rStyleInf.m_pFormat, RES_LR_SPACE).Clone());
// Phase 2: refresh StyleDef after reading all Lists
- SwNumRule* pNmRule = nullptr;
- const sal_uInt16 nLFO = rStyleInf.m_nLFOIndex;
- const sal_uInt8 nLevel = rStyleInf.m_nListLevel;
- if (
- (USHRT_MAX > nLFO) &&
- (WW8ListManager::nMaxLevel > nLevel)
- )
+ if (rStyleInf.m_nLFOIndex < USHRT_MAX && rStyleInf.m_nListLevel < WW8ListManager::nMaxLevel)
{
std::vector<sal_uInt8> aParaSprms;
- pNmRule = m_xLstManager->GetNumRuleForActivation(nLFO, nLevel,
- aParaSprms);
+ SwNumRule* pNmRule = m_xLstManager->GetNumRuleForActivation(
+ rStyleInf.m_nLFOIndex, rStyleInf.m_nListLevel, aParaSprms);
if (pNmRule != nullptr)
{
@@ -1791,11 +1785,10 @@ void SwWW8ImplReader::RegisterNumFormatOnStyle(sal_uInt16 nStyle)
SwNumRuleItem(pNmRule->GetName()));
rStyleInf.m_bHasStyNumRule = true;
}
+
+ SetStyleIndent(rStyleInf, pNmRule->Get(rStyleInf.m_nListLevel));
}
}
-
- if (pNmRule)
- SetStyleIndent(rStyleInf, pNmRule->Get(nLevel));
}
void SwWW8ImplReader::RegisterNumFormatOnTextNode(sal_uInt16 nCurrentLFO,