diff options
author | Kurt Zenker <kz@openoffice.org> | 2010-09-03 14:31:58 +0200 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2010-09-03 14:31:58 +0200 |
commit | e8b8fec48b3ad2464b6ce6744e419190efeb45b3 (patch) | |
tree | e8c428ff8ae088dc6a58ec09a37c5d053d38a1a3 | |
parent | b221612dc355d7c219819db42207437eb4fe5fe5 (diff) | |
parent | 86d169e89f39d3ddb7bac7f50d2adb1bb7e7d087 (diff) |
CWS-TOOLING: integrate CWS fwk155ooo/OOO330_m7
-rw-r--r-- | cui/source/customize/cfg.cxx | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx index 211deeffb..d2d13820b 100644 --- a/cui/source/customize/cfg.cxx +++ b/cui/source/customize/cfg.cxx @@ -1177,8 +1177,12 @@ bool MenuSaveInData::LoadSubMenus( const OUString& rBaseTitle, 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++ ) { uno::Reference< container::XIndexAccess > xSubMenu; @@ -2594,17 +2598,20 @@ IMPL_LINK( SvxMenuConfigPage, SelectMenu, ListBox *, pBox ) SvxConfigEntry* pMenuData = GetTopLevelSelection(); PopupMenu* pPopup = aModifyTopLevelButton.GetPopupMenu(); - pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() ); - pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() ); - pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() ); + if ( pMenuData ) + { + pPopup->EnableItem( ID_DELETE, pMenuData->IsDeletable() ); + pPopup->EnableItem( ID_RENAME, pMenuData->IsRenamable() ); + pPopup->EnableItem( ID_MOVE, pMenuData->IsMovable() ); - SvxEntries* pEntries = pMenuData->GetEntries(); - SvxEntries::const_iterator iter = pEntries->begin(); + SvxEntries* pEntries = pMenuData->GetEntries(); + SvxEntries::const_iterator iter = pEntries->begin(); - for ( ; iter != pEntries->end(); iter++ ) - { - SvxConfigEntry* pEntry = *iter; - InsertEntryIntoUI( pEntry ); + for ( ; iter != pEntries->end(); iter++ ) + { + SvxConfigEntry* pEntry = *iter; + InsertEntryIntoUI( pEntry ); + } } UpdateButtonStates(); |