diff options
author | Maxim Monastirsky <momonasmon@gmail.com> | 2014-08-31 21:39:10 +0300 |
---|---|---|
committer | Maxim Monastirsky <momonasmon@gmail.com> | 2014-10-24 11:45:02 +0300 |
commit | 312d903b8ec1805da91f7af367ba18cfe63313a3 (patch) | |
tree | 952f0bd54a1c17619ba978bbf72e087da9907c74 /svx | |
parent | d9dde5e57262e2fb91636ca5d1ee91cdb647ba05 (diff) |
Register the item type based on the SID
Change-Id: If954191b71daf52c4f49fb7638e583cd0a2c97a5
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/tbcontrl.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index 293d8a050991..3f90933b8810 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -2536,8 +2536,10 @@ SfxToolBoxControl* SvxColorToolBoxControl::CreateImpl( sal_uInt16 nSlotId, sal_u void SvxColorToolBoxControl::RegisterControl(sal_uInt16 nSlotId, SfxModule *pMod) { - SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(SvxColorItem), nSlotId ) ); - SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(XLineColorItem), nSlotId ) ); + if ( nSlotId == SID_ATTR_LINE_COLOR ) + SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(XLineColorItem), nSlotId ) ); + else + SfxToolBoxControl::RegisterToolBoxControl( pMod, new SfxTbxCtrlFactory( SvxColorToolBoxControl::CreateImpl, TYPE(SvxColorItem), nSlotId ) ); } // class SvxFrameToolBoxControl -------------------------------------------- |