diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2017-05-23 20:49:48 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2017-05-24 01:06:48 +0200 |
commit | 687c3b49976ef0eb079853f7bffd63d25bff05c7 (patch) | |
tree | faf95611b38122c9e694cd55ba2152d73cb35dee /svx | |
parent | b8a1797e1511bdee779112f09b1e64098591b9fe (diff) |
tdf#107008 Pass char style names to NBOTypeMgrBase
Change-Id: I26db31b8f9db968aa33b92a4abe917ac20cd5844
Reviewed-on: https://gerrit.libreoffice.org/37963
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/sidebar/nbdtmg.cxx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/svx/source/sidebar/nbdtmg.cxx b/svx/source/sidebar/nbdtmg.cxx index 686fcf2c6510..7dac15f83f22 100644 --- a/svx/source/sidebar/nbdtmg.cxx +++ b/svx/source/sidebar/nbdtmg.cxx @@ -147,12 +147,14 @@ void NBOTypeMgrBase::SetItems(const SfxItemSet* pArg) { if ( pSet ) { SfxAllItemSet aSet(*pSet); + const SfxStringItem* pBulletCharFmt = aSet.GetItem<SfxStringItem>(SID_BULLET_CHAR_FMT, false); + if (pBulletCharFmt) + aBulletCharFmtName = pBulletCharFmt->GetValue(); - if ( pBulletCharFmt ) - { - aNumCharFmtName = pBulletCharFmt->GetValue(); - } + const SfxStringItem* pNumCharFmt = aSet.GetItem<SfxStringItem>(SID_NUM_CHAR_FMT, false); + if (pNumCharFmt) + aNumCharFmtName = pNumCharFmt->GetValue(); const SfxPoolItem* pItem; SfxItemState eState = pSet->GetItemState(SID_ATTR_NUMBERING_RULE, false, &pItem); @@ -380,7 +382,7 @@ void BulletsTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 const vcl::Font& rActBulletFont = pActualBullets[nIndex]->aFont; sal_uInt16 nMask = 1; - OUString sBulletCharFormatName = GetBulCharFmtName(); + OUString sBulletCharFormatName = GetBulletCharFmtName(); for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++) { if(mLevel & nMask) @@ -557,7 +559,7 @@ void NumberingTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uIn SvxNumType eNewType = _pSet->pNumSetting->nNumberType; sal_uInt16 nMask = 1; - OUString sNumCharFmtName = GetBulCharFmtName(); + OUString sNumCharFmtName = GetNumCharFmtName(); for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++) { if(mLevel & nMask) @@ -824,7 +826,6 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 NumSettingsArr_Impl *pNumSettingsArr=pItemArr->pNumSettingsArr; NumSettings_Impl* pLevelSettings = nullptr; - OUString sBulletCharFormatName = GetBulCharFmtName(); for(sal_uInt16 i = 0; i < aNum.GetLevelCount(); i++) { if(pNumSettingsArr->size() > i) @@ -886,7 +887,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 } aFmt.SetBulletChar(cChar); - aFmt.SetCharFormatName( sBulletCharFormatName ); + aFmt.SetCharFormatName( GetBulletCharFmtName() ); if (isResetSize) aFmt.SetBulletRelSize(45); }else if ((aFmt.GetNumberingType()&(~LINK_TOKEN)) == SVX_NUM_BITMAP ) { if (pLevelSettings->pBrushItem) { @@ -905,7 +906,7 @@ void OutlineTypeMgr::ApplyNumRule(SvxNumRule& aNum, sal_uInt16 nIndex, sal_uInt1 } else { aFmt.SetIncludeUpperLevels(sal::static_int_cast< sal_uInt8 >(0 != nUpperLevelOrChar ? aNum.GetLevelCount() : 0)); - aFmt.SetCharFormatName(sBulletCharFormatName); + aFmt.SetCharFormatName(GetNumCharFmtName()); if (isResetSize) aFmt.SetBulletRelSize(100); } if(pNumSettingsArr->size() > i) { |