diff options
Diffstat (limited to 'svx/source/form/filtnav.cxx')
-rw-r--r-- | svx/source/form/filtnav.cxx | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 7c1f1ee9924d..f48413ed54bd 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -1629,24 +1629,21 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt ) aSelectList.clear(); } - PopupMenu aContextMenu(SVX_RES(RID_FM_FILTER_MENU)); + ScopedVclPtrInstance<PopupMenu> aContextMenu(SVX_RES(RID_FM_FILTER_MENU)); // every condition could be deleted except the first one if its the only one - aContextMenu.EnableItem( SID_FM_DELETE, !aSelectList.empty() ); + aContextMenu->EnableItem( SID_FM_DELETE, !aSelectList.empty() ); bool bEdit = dynamic_cast<FmFilterItem*>( static_cast<FmFilterData*>(pClicked->GetUserData()) ) != nullptr && IsSelected(pClicked) && GetSelectionCount() == 1; - aContextMenu.EnableItem( SID_FM_FILTER_EDIT, - bEdit ); - aContextMenu.EnableItem( SID_FM_FILTER_IS_NULL, - bEdit ); - aContextMenu.EnableItem( SID_FM_FILTER_IS_NOT_NULL, - bEdit ); + aContextMenu->EnableItem( SID_FM_FILTER_EDIT, bEdit ); + aContextMenu->EnableItem( SID_FM_FILTER_IS_NULL, bEdit ); + aContextMenu->EnableItem( SID_FM_FILTER_IS_NOT_NULL, bEdit ); - aContextMenu.RemoveDisabledEntries(true, true); - sal_uInt16 nSlotId = aContextMenu.Execute( this, aWhere ); + aContextMenu->RemoveDisabledEntries(true, true); + sal_uInt16 nSlotId = aContextMenu->Execute( this, aWhere ); switch( nSlotId ) { case SID_FM_FILTER_EDIT: |