diff options
author | Kurt Zenker <kz@openoffice.org> | 2004-05-18 13:16:17 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2004-05-18 13:16:17 +0000 |
commit | 92ea3d92606cf67204a48409709efb47ada09d13 (patch) | |
tree | 7bc4bd71c0d3c74c3f1ca17475a6e9454b23f514 /svx | |
parent | 463a5f03df02d77bc159ceab788eddc7ef50e793 (diff) |
INTEGRATION: CWS swundo01 (1.18.48); FILE MERGED
2004/01/08 14:29:50 hbrinkm 1.18.48.1: #111827#
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/tbxctrls/lboxctrl.cxx | 24 |
1 files changed, 13 insertions, 11 deletions
diff --git a/svx/source/tbxctrls/lboxctrl.cxx b/svx/source/tbxctrls/lboxctrl.cxx index 58fc1ffd164d..c770b718dbfb 100644 --- a/svx/source/tbxctrls/lboxctrl.cxx +++ b/svx/source/tbxctrls/lboxctrl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: lboxctrl.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: rt $ $Date: 2003-12-01 18:15:41 $ + * last change: $Author: kz $ $Date: 2004-05-18 14:16:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -129,9 +129,6 @@ class SvxPopupWindowListBox : public SfxPopupWindow BOOL bUserSel; // disallow copy-constructor and assignment-operator - SvxPopupWindowListBox(const int& ); - SvxPopupWindowListBox & operator = (const int& ); - SvxPopupWindowListBox( USHORT nSlotId, ToolBox& rTbx, USHORT nTbxItemId ); @@ -279,6 +276,17 @@ IMPL_LINK( SvxListBoxControl, PopupModeEndHdl, void *, EMPTYARG ) void SvxListBoxControl::Impl_SetInfo( USHORT nCount ) { DBG_ASSERT( pPopupWin, "NULL pointer, PopupWindow missing" ); + + ListBox &rListBox = pPopupWin->GetListBox(); + + USHORT nId; + if (nCount == 1) + nId = SID_UNDO == GetId() ? RID_SVXSTR_NUM_UNDO_ACTION : RID_SVXSTR_NUM_REDO_ACTION; + else + nId = SID_UNDO == GetId() ? RID_SVXSTR_NUM_UNDO_ACTIONS : RID_SVXSTR_NUM_REDO_ACTIONS; + + aActionStr = String(SVX_RES(nId)); + String aText( aActionStr ); aText.SearchAndReplaceAllAscii( "$(ARG1)", String::CreateFromInt32( nCount ) ); pPopupWin->GetInfo().SetText( aText ); @@ -342,9 +350,6 @@ SfxPopupWindow* SvxUndoRedoControl::CreatePopupWindow() rListBox.InsertEntry( *((String*)pLst->GetObject( nI )) ); rListBox.SelectEntryPos( 0 ); - aActionStr = String( SVX_RES( SID_UNDO == nId - ? RID_SVXSTR_NUM_UNDO_ACTIONS - : RID_SVXSTR_NUM_REDO_ACTIONS ) ); Impl_SetInfo( rListBox.GetSelectEntryCount() ); @@ -355,6 +360,3 @@ SfxPopupWindow* SvxUndoRedoControl::CreatePopupWindow() } return pPopupWin; } - - - |