Kaydet (Commit) ef6bcef0 authored tarafından Jan Holesovsky's avatar Jan Holesovsky

Merge commit 'ooo/OOO330_m7'

...@@ -1179,6 +1179,10 @@ bool MenuSaveInData::LoadSubMenus( ...@@ -1179,6 +1179,10 @@ bool MenuSaveInData::LoadSubMenus(
{ {
SvxEntries* pEntries = pParentData->GetEntries(); SvxEntries* pEntries = pParentData->GetEntries();
// Don't access non existing menu configuration!
if ( !xMenuSettings.is() )
return true;
for ( sal_Int32 nIndex = 0; nIndex < xMenuSettings->getCount(); nIndex++ ) for ( sal_Int32 nIndex = 0; nIndex < xMenuSettings->getCount(); nIndex++ )
{ {
uno::Reference< container::XIndexAccess > xSubMenu; uno::Reference< container::XIndexAccess > xSubMenu;
...@@ -2594,6 +2598,8 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox ) ...@@ -2594,6 +2598,8 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox )
SvxConfigEntry* pMenuData = GetTopLevelSelection(); SvxConfigEntry* pMenuData = GetTopLevelSelection();
PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu(); PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu();
if ( pMenuData )
{
pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() ); pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() );
pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() ); pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() );
pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() ); pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() );
...@@ -2606,6 +2612,7 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox ) ...@@ -2606,6 +2612,7 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox )
SvxConfigEntry* pEntry = *iter; SvxConfigEntry* pEntry = *iter;
InsertEntryIntoUI( pEntry ); InsertEntryIntoUI( pEntry );
} }
}
UpdateButtonStates(); UpdateButtonStates();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment