diff options
author | Malte Timmermann <mt@openoffice.org> | 2002-11-22 13:35:10 +0000 |
---|---|---|
committer | Malte Timmermann <mt@openoffice.org> | 2002-11-22 13:35:10 +0000 |
commit | eada287f0fa19932445b4a967dc258577a4c904e (patch) | |
tree | bf721d6941047cf664775259bd530546d1122d03 | |
parent | bc30fd8541a770867dfbf7b98503722f43077ad9 (diff) |
#105491# events for listbox and combobox: added/removed
-rw-r--r-- | vcl/source/control/combobox.cxx | 8 | ||||
-rw-r--r-- | vcl/source/control/lstbox.cxx | 9 |
2 files changed, 13 insertions, 4 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index beeb54b2710c..729ff5b09729 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: combobox.cxx,v $ * - * $Revision: 1.20 $ + * $Revision: 1.21 $ * - * last change: $Author: mt $ $Date: 2002-11-01 09:01:04 $ + * last change: $Author: mt $ $Date: 2002-11-22 14:35:10 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -926,6 +926,7 @@ USHORT ComboBox::InsertEntry( const XubString& rStr, USHORT nPos ) { USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr ); nRealPos -= mpImplLB->GetEntryList()->GetMRUCount(); + CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) nRealPos ); return nRealPos; } @@ -935,6 +936,7 @@ USHORT ComboBox::InsertEntry( const XubString& rStr, const Image& rImage, USHORT { USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage ); nRealPos -= mpImplLB->GetEntryList()->GetMRUCount(); + CallEventListeners( VCLEVENT_COMBOBOX_ITEMADDED, (void*) nRealPos ); return nRealPos; } @@ -950,6 +952,7 @@ void ComboBox::RemoveEntry( const XubString& rStr ) void ComboBox::RemoveEntry( USHORT nPos ) { mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); + CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) nPos ); } // ----------------------------------------------------------------------- @@ -957,6 +960,7 @@ void ComboBox::RemoveEntry( USHORT nPos ) void ComboBox::Clear() { mpImplLB->Clear(); + CallEventListeners( VCLEVENT_COMBOBOX_ITEMREMOVED, (void*) (-1) ); } // ----------------------------------------------------------------------- diff --git a/vcl/source/control/lstbox.cxx b/vcl/source/control/lstbox.cxx index 5161cdd99520..5cb980935634 100644 --- a/vcl/source/control/lstbox.cxx +++ b/vcl/source/control/lstbox.cxx @@ -2,9 +2,9 @@ * * $RCSfile: lstbox.cxx,v $ * - * $Revision: 1.17 $ + * $Revision: 1.18 $ * - * last change: $Author: mt $ $Date: 2002-11-01 09:01:04 $ + * last change: $Author: mt $ $Date: 2002-11-22 14:35:09 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -848,6 +848,7 @@ void ListBox::Clear() mpImplWin->SetImage( aImage ); mpImplWin->Invalidate(); } + CallEventListeners( VCLEVENT_LISTBOX_ITEMREMOVED, (void*) (-1) ); } // ----------------------------------------------------------------------- @@ -871,6 +872,7 @@ USHORT ListBox::InsertEntry( const XubString& rStr, USHORT nPos ) { USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr ); nRealPos -= mpImplLB->GetEntryList()->GetMRUCount(); + CallEventListeners( VCLEVENT_LISTBOX_ITEMADDED, (void*) nRealPos ); return nRealPos; } @@ -880,6 +882,7 @@ USHORT ListBox::InsertEntry( const Image& rImage, USHORT nPos ) { USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rImage ); nRealPos -= mpImplLB->GetEntryList()->GetMRUCount(); + CallEventListeners( VCLEVENT_LISTBOX_ITEMADDED, (void*) nRealPos ); return nRealPos; } @@ -889,6 +892,7 @@ USHORT ListBox::InsertEntry( const XubString& rStr, const Image& rImage, USHORT { USHORT nRealPos = mpImplLB->InsertEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount(), rStr, rImage ); nRealPos -= mpImplLB->GetEntryList()->GetMRUCount(); + CallEventListeners( VCLEVENT_LISTBOX_ITEMADDED, (void*) nRealPos ); return nRealPos; } @@ -904,6 +908,7 @@ void ListBox::RemoveEntry( const XubString& rStr ) void ListBox::RemoveEntry( USHORT nPos ) { mpImplLB->RemoveEntry( nPos + mpImplLB->GetEntryList()->GetMRUCount() ); + CallEventListeners( VCLEVENT_LISTBOX_ITEMREMOVED, (void*) nPos ); } // ----------------------------------------------------------------------- |