summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2017-04-21 13:06:10 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2017-04-23 19:50:15 +0300
commit1974711b215ae265b335bf592a4be3f31e15e237 (patch)
tree96c3ee17697a8a6426c6d2f19fa2df09f7213e15 /cui
parentfc613febe3b90260cb3a553311b7b438fb93f073 (diff)
Toolbars can't be nested
This is not supported by framework. Change-Id: I4afde5243130e1ec1ac5c3126d755331842601e5
Diffstat (limited to 'cui')
-rw-r--r--cui/source/customize/cfg.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 41ca29d8d4c5..1733de47707d 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -523,8 +523,7 @@ bool GetToolbarItemData(
OUString& rLabel,
sal_uInt16& rType,
bool& rIsVisible,
- sal_Int32& rStyle,
- uno::Reference< container::XIndexAccess >& rSubMenu )
+ sal_Int32& rStyle )
{
try
{
@@ -541,10 +540,6 @@ bool GetToolbarItemData(
{
aProp[i].Value >>= rStyle;
}
- else if ( aProp[i].Name == ITEM_DESCRIPTOR_CONTAINER )
- {
- aProp[i].Value >>= rSubMenu;
- }
else if ( aProp[i].Name == ITEM_DESCRIPTOR_LABEL )
{
aProp[i].Value >>= rLabel;
@@ -4273,7 +4268,6 @@ void ToolbarSaveInData::LoadToolbar(
for ( sal_Int32 nIndex = 0; nIndex < xToolbarSettings->getCount(); ++nIndex )
{
- uno::Reference< container::XIndexAccess > xSubMenu;
OUString aCommandURL;
OUString aLabel;
bool bIsVisible;
@@ -4282,7 +4276,7 @@ void ToolbarSaveInData::LoadToolbar(
sal_uInt16 nType( css::ui::ItemType::DEFAULT );
bool bItem = GetToolbarItemData( xToolbarSettings, nIndex, aCommandURL,
- aLabel, nType, bIsVisible, nStyle, xSubMenu );
+ aLabel, nType, bIsVisible, nStyle );
if ( bItem )
{
@@ -4322,20 +4316,16 @@ void ToolbarSaveInData::LoadToolbar(
}
SvxConfigEntry* pEntry = new SvxConfigEntry(
- aLabel, aCommandURL, xSubMenu.is() );
+ aLabel, aCommandURL, false );
pEntry->SetUserDefined( bIsUserDefined );
pEntry->SetVisible( bIsVisible );
+ pEntry->SetStyle( nStyle );
if ( !bUseDefaultLabel )
pEntry->SetName( aLabel );
- if ( !xSubMenu.is() )
- pEntry->SetStyle( nStyle );
pEntries->push_back( pEntry );
-
- if ( xSubMenu.is() )
- LoadToolbar( xSubMenu, pEntry );
}
else
{