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 /sw | |
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 'sw')
-rw-r--r-- | sw/source/uibase/shells/txtnum.cxx | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/sw/source/uibase/shells/txtnum.cxx b/sw/source/uibase/shells/txtnum.cxx index 2ba5ff26dfd3..2e19f7816ac7 100644 --- a/sw/source/uibase/shells/txtnum.cxx +++ b/sw/source/uibase/shells/txtnum.cxx @@ -31,9 +31,11 @@ #include "view.hxx" #include "viewopt.hxx" #include "wdocsh.hxx" +#include "poolfmt.hxx" #include "textsh.hxx" #include "uiitems.hxx" #include "swabstdlg.hxx" +#include "SwStyleNameMapper.hxx" #include <globals.hrc> #include <sfx2/tabdlg.hxx> #include <svx/nbdtmg.hxx> @@ -278,9 +280,16 @@ void SwTextShell::ExecSetNumber(SfxRequest &rReq) SvxNumRule aNewSvxNumRule = pNumRuleAtCurrentSelection != nullptr ? pNumRuleAtCurrentSelection->MakeSvxNumRule() : aNewNumRule.MakeSvxNumRule(); - // set unit attribute to NB Manager - SfxItemSet aSet( GetPool(), SID_ATTR_NUMBERING_RULE, SID_PARAM_CUR_NUM_LEVEL, 0 ); - aSet.Put( SvxNumBulletItem( aNewSvxNumRule ) ); + + OUString aNumCharFormat, aBulletCharFormat; + SwStyleNameMapper::FillUIName( RES_POOLCHR_NUM_LEVEL, aNumCharFormat ); + SwStyleNameMapper::FillUIName( RES_POOLCHR_BUL_LEVEL, aBulletCharFormat ); + + SfxAllItemSet aSet( GetPool() ); + aSet.Put( SfxStringItem( SID_NUM_CHAR_FMT, aNumCharFormat ) ); + aSet.Put( SfxStringItem( SID_BULLET_CHAR_FMT, aBulletCharFormat ) ); + aSet.Put( SvxNumBulletItem( aNewSvxNumRule, SID_ATTR_NUMBERING_RULE ) ); + pNBOTypeMgr->SetItems( &aSet ); pNBOTypeMgr->ApplyNumRule( aNewSvxNumRule, nChoosenItemIdx - 1, nActNumLvl ); |