diff options
author | jp <jp@openoffice.org> | 2001-08-30 07:59:09 +0000 |
---|---|---|
committer | jp <jp@openoffice.org> | 2001-08-30 07:59:09 +0000 |
commit | 6eeebaf5dc656e2d8f6cf5f74c05f9cc70204ccc (patch) | |
tree | 1851ffed5f34b8feb45971e1dc8b6547ed97b73e /svx/source/tbxctrls/lboxctrl.cxx | |
parent | 21a69f4a98dac8e70ba26dc53f90569f76cc9099 (diff) |
Bug #91728#: use list instead of string from the SfxStringListItem
Diffstat (limited to 'svx/source/tbxctrls/lboxctrl.cxx')
-rw-r--r-- | svx/source/tbxctrls/lboxctrl.cxx | 26 |
1 files changed, 12 insertions, 14 deletions
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index 9c4f1e4ebeb1..b0498226ae8e 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: lboxctrl.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: tl $ $Date: 2001-04-25 13:49:46 $ + * last change: $Author: jp $ $Date: 2001-08-30 08:59:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -334,12 +334,11 @@ SfxPopupWindow* SvxUndoControl::CreatePopupWindow() rListBox.SetSelectHdl( LINK( this, SvxUndoControl, SelectHdl ) ); SfxStringListItem &rItem = *(SfxStringListItem *) pState; - String aStrList( rItem.GetString() ); - xub_StrLen nCount = aStrList.GetTokenCount( '\n' ); - xub_StrLen nIdx = 0; - DBG_ASSERT( nCount > 0, "no undo actions available" ); - for (xub_StrLen i = 0; i < nCount; ++i) - rListBox.InsertEntry( aStrList.GetToken( 0, '\n', nIdx ) ); + const List* pLst = rItem.GetList(); + DBG_ASSERT( pLst, "no undo actions available" ); + if( pLst ) + for( long nI = 0, nEnd = pLst->Count(); nI < nEnd; ++nI ) + rListBox.InsertEntry( *((String*)pLst->GetObject( nI )) ); rListBox.SelectEntryPos( 0 ); Impl_SetInfo( 1 ); @@ -408,12 +407,11 @@ SfxPopupWindow* SvxRedoControl::CreatePopupWindow() rListBox.SetSelectHdl( LINK( this, SvxRedoControl, SelectHdl ) ); SfxStringListItem &rItem = *(SfxStringListItem *) pState; - String aStrList( rItem.GetString() ); - xub_StrLen nCount = aStrList.GetTokenCount( '\n' ); - xub_StrLen nIdx = 0; - DBG_ASSERT( nCount > 0, "no undo actions available" ); - for (xub_StrLen i = 0; i < nCount; ++i) - rListBox.InsertEntry( aStrList.GetToken( 0, '\n', nIdx ) ); + const List* pLst = rItem.GetList(); + DBG_ASSERT( pLst, "no redo actions available" ); + if( pLst ) + for( long nI = 0, nEnd = pLst->Count(); nI < nEnd; ++nI ) + rListBox.InsertEntry( *((String*)pLst->GetObject( nI )) ); rListBox.SelectEntryPos( 0 ); Impl_SetInfo( 1 ); |