summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-01-03 17:16:26 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-01-04 10:45:35 +0100
commit9be88e7281aea0b4b65c9d0da85ca617f58b925c (patch)
treef8593292260f10c1056b64e48a3de12734e94e95 /sw/source
parentcb628728a33a3c6092ab929def747252ecec428c (diff)
ofz#4914 Undefined-shift
Change-Id: Ie1accb0de3af652877c37ec15fe319378567431c Reviewed-on: https://gerrit.libreoffice.org/47337 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index e82e241f6725..95356895f1aa 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -2785,11 +2785,17 @@ void SwWW8ImplReader::Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLe
if (m_pAktColl != nullptr)
{
SwWW8StyInf* pSI = GetStyle(m_nAktColl);
- if (pSI != nullptr)
+ if (pSI && pSI->m_bColl && pSI->m_pFormat)
{
pSI->mnWW8OutlineLevel =
static_cast< sal_uInt8 >( ( (pData && nLen >= 1) ? *pData : 0 ) );
- NewAttr( SfxUInt16Item( RES_PARATR_OUTLINELEVEL, SwWW8StyInf::WW8OutlineLevelToOutlinelevel( pSI->mnWW8OutlineLevel ) ) );
+ auto nLevel = SwWW8StyInf::WW8OutlineLevelToOutlinelevel(pSI->mnWW8OutlineLevel);
+ if (nLevel == 0)
+ {
+ SwTextFormatColl* pTextFormatColl = static_cast<SwTextFormatColl*>(pSI->m_pFormat);
+ pTextFormatColl->DeleteAssignmentToListLevelOfOutlineStyle();
+ }
+ NewAttr(SfxUInt16Item(RES_PARATR_OUTLINELEVEL, nLevel));
}
}
else if (m_pPaM != nullptr)