diff options
-rw-r--r-- | svx/source/tbxctrls/lboxctrl.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index b5ed93d008b7..def01cd52812 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -302,13 +302,10 @@ void SvxUndoRedoControl::StateChanged( if ( pState && pState->ISA( SfxStringListItem ) ) { SfxStringListItem &rItem = *(SfxStringListItem *)pState; - const List* pLst = rItem.GetList(); - DBG_ASSERT( pLst, "no undo actions available" ); - if ( pLst ) - { - for( long nI = 0, nEnd = pLst->Count(); nI < nEnd; ++nI ) - aUndoRedoList.push_back( rtl::OUString( *(String *)pLst->GetObject( nI ))); - } + + const std::vector<String> &aLst = rItem.GetList(); + for( long nI = 0, nEnd = aLst.size(); nI < nEnd; ++nI ) + aUndoRedoList.push_back( rtl::OUString( aLst[nI] )); } } } |