diff options
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/customize/SvxConfigPageHelper.cxx | 10 | ||||
-rw-r--r-- | cui/source/customize/cfg.cxx | 4 | ||||
-rw-r--r-- | cui/source/inc/SvxConfigPageHelper.hxx | 1 |
3 files changed, 13 insertions, 2 deletions
diff --git a/cui/source/customize/SvxConfigPageHelper.cxx b/cui/source/customize/SvxConfigPageHelper.cxx index 18da75eb2c6e..9738b20c595f 100644 --- a/cui/source/customize/SvxConfigPageHelper.cxx +++ b/cui/source/customize/SvxConfigPageHelper.cxx @@ -297,6 +297,7 @@ bool SvxConfigPageHelper::GetMenuItemData( OUString& rCommandURL, OUString& rLabel, sal_uInt16& rType, + sal_Int32& rStyle, css::uno::Reference< css::container::XIndexAccess >& rSubMenu ) { try @@ -314,6 +315,10 @@ bool SvxConfigPageHelper::GetMenuItemData( { aProp[i].Value >>= rSubMenu; } + else if ( aProp[i].Name == ITEM_DESCRIPTOR_STYLE ) + { + aProp[i].Value >>= rStyle; + } else if ( aProp[i].Name == ITEM_DESCRIPTOR_LABEL ) { aProp[i].Value >>= rLabel; @@ -385,7 +390,7 @@ bool SvxConfigPageHelper::GetToolbarItemData( css::uno::Sequence< css::beans::PropertyValue > SvxConfigPageHelper::ConvertSvxConfigEntry( const SvxConfigEntry* pEntry ) { - css::uno::Sequence< css::beans::PropertyValue > aPropSeq( 3 ); + css::uno::Sequence< css::beans::PropertyValue > aPropSeq( 4 ); aPropSeq[0].Name = ITEM_DESCRIPTOR_COMMANDURL; aPropSeq[0].Value <<= pEntry->GetCommand(); @@ -406,6 +411,9 @@ css::uno::Sequence< css::beans::PropertyValue > SvxConfigPageHelper::ConvertSvxC aPropSeq[2].Value <<= pEntry->GetName(); } + aPropSeq[3].Name = ITEM_DESCRIPTOR_STYLE; + aPropSeq[3].Value <<= static_cast<sal_Int16>(pEntry->GetStyle()); + return aPropSeq; } diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 8420ada0049a..bb3769bd540b 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -471,9 +471,10 @@ bool SaveInData::LoadSubMenus( const uno::Reference< container::XIndexAccess >& OUString aLabel; sal_uInt16 nType( css::ui::ItemType::DEFAULT ); + sal_Int32 nStyle(0); bool bItem = SvxConfigPageHelper::GetMenuItemData( xMenuSettings, nIndex, - aCommandURL, aLabel, nType, xSubMenu ); + aCommandURL, aLabel, nType, nStyle, xSubMenu ); if ( bItem ) { @@ -530,6 +531,7 @@ bool SaveInData::LoadSubMenus( const uno::Reference< container::XIndexAccess >& SvxConfigEntry* pEntry = new SvxConfigEntry( aLabel, aCommandURL, xSubMenu.is(), /*bParentData*/false ); + pEntry->SetStyle( nStyle ); pEntry->SetUserDefined( bIsUserDefined ); if ( !bUseDefaultLabel ) pEntry->SetName( aLabel ); diff --git a/cui/source/inc/SvxConfigPageHelper.hxx b/cui/source/inc/SvxConfigPageHelper.hxx index 75f8373201f6..4d0596846bd6 100644 --- a/cui/source/inc/SvxConfigPageHelper.hxx +++ b/cui/source/inc/SvxConfigPageHelper.hxx @@ -65,6 +65,7 @@ public: OUString& rCommandURL, OUString& rLabel, sal_uInt16& rType, + sal_Int32& rStyle, css::uno::Reference< css::container::XIndexAccess >& rSubMenu ); static bool GetToolbarItemData( const css::uno::Reference< css::container::XIndexAccess >& rItemContainer, |