diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-09-12 12:21:14 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-12 13:09:05 +0100 |
commit | 463bf0870ade53e5dee3b95605f2c1d9898ca410 (patch) | |
tree | f3807bff629db261d3de31151a2782eb582ec652 /cui | |
parent | 57482ed493ee26f808caa76def9e759218e0c27b (diff) |
CID#736167 unlikely out of bounds
Change-Id: Ib20864bdcc7760258a19f80325003a14b3c362a3
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/numpages.cxx | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx index 8233636ac5c4..9353dcdfa0b6 100644 --- a/cui/source/tabpages/numpages.cxx +++ b/cui/source/tabpages/numpages.cxx @@ -1446,10 +1446,26 @@ void SvxNumOptionsTabPage::InitControls() aNumFmtArr[i] = 0; nMask <<= 1 ; - } SwitchNumberType(bShowBullet ? 1 : bShowBitmap ? 2 : 0); - CheckForStartValue_Impl(aNumFmtArr[nLvl]->GetNumberingType()); + + sal_uInt16 nNumberingType; + if (nLvl != USHRT_MAX) + nNumberingType = aNumFmtArr[nLvl]->GetNumberingType(); + else + { + nNumberingType = SVX_NUM_NUMBER_NONE; + bAllLevel = false; + bSameAdjust = false; + bSameBulRelSize = false; + bSameBulColor = false; + bSameStart = false; + bSamePrefix = false; + bSameSuffix = false; + } + + CheckForStartValue_Impl(nNumberingType); + if(bShowBitmap) { if(!bSameVOrient || eFirstOrient == text::VertOrientation::NONE) @@ -1473,7 +1489,7 @@ void SvxNumOptionsTabPage::InitControls() if(bSameType) { - sal_uInt16 nLBData = (sal_uInt16) aNumFmtArr[nLvl]->GetNumberingType(); + sal_uInt16 nLBData = nNumberingType; m_pFmtLB->SelectEntryPos(m_pFmtLB->GetEntryPos( (void*)sal::static_int_cast<sal_uIntPtr>( nLBData ) )); } else |