Kaydet (Commit) 65221b65 authored tarafından Mikhail Voytenko's avatar Mikhail Voytenko

fwk155: #i107615# integrate the patch from CD

üst 35602785
...@@ -1177,7 +1177,11 @@ bool MenuSaveInData::LoadSubMenus( ...@@ -1177,7 +1177,11 @@ bool MenuSaveInData::LoadSubMenus(
const OUString& rBaseTitle, const OUString& rBaseTitle,
SvxConfigEntry* pParentData ) SvxConfigEntry* pParentData )
{ {
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++ )
{ {
...@@ -2594,17 +2598,20 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox ) ...@@ -2594,17 +2598,20 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox )
SvxConfigEntry* pMenuData = GetTopLevelSelection(); SvxConfigEntry* pMenuData = GetTopLevelSelection();
PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu(); PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu();
pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() ); if ( pMenuData )
pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() ); {
pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() ); pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() );
pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() );
pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() );
SvxEntries* pEntries = pMenuData->GetEntries(); SvxEntries* pEntries = pMenuData->GetEntries();
SvxEntries::const_iterator iter = pEntries->begin(); SvxEntries::const_iterator iter = pEntries->begin();
for ( ; iter != pEntries->end(); iter++ ) for ( ; iter != pEntries->end(); iter++ )
{ {
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