summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-09-03 14:31:58 +0200
committerKurt Zenker <kz@openoffice.org>2010-09-03 14:31:58 +0200
commit109c2197d582f84509e11290caf4ca73ab0da104 (patch)
treefa67fd7e6687d461f8225637c05bb1011627a2e1
parent6b843cd7c3efd3b1e7654f2e6e8f2a5902059068 (diff)
parent65221b651bed8d6741238d634b1d5b741a373dfc (diff)
CWS-TOOLING: integrate CWS fwk155
Notes
split repo tag: components_ooo/OOO330_m7
-rw-r--r--cui/source/customize/cfg.cxx27
1 files changed, 17 insertions, 10 deletions
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index d9f730e0224f..022cc1cfb72c 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1177,7 +1177,11 @@ 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++ )
{
@@ -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();