diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-10-15 16:42:43 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2012-10-19 11:45:36 +0200 |
commit | dad00b3cab73575f027406ee0118c74d7fe8645b (patch) | |
tree | 33eff2f498a4cd0f137593255c5b800c20be652f /dbaccess/source/ui | |
parent | 293fd587f4836bd3358abb77ec06066f92fe18cc (diff) |
Remove direct reference to SvListEntry outside svtools.
Not all instances are removed, however... Some are used in virtual
method signatures, which will take a little more effort to fix.
Change-Id: Ib30e6bbef5f27f970e6e19291501f7a09d94e0ab
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r-- | dbaccess/source/ui/control/dbtreelistbox.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/dbtreelistbox.hxx | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx index d73a435fe9e5..94f0bc25e49a 100644 --- a/dbaccess/source/ui/control/dbtreelistbox.cxx +++ b/dbaccess/source/ui/control/dbtreelistbox.cxx @@ -217,13 +217,14 @@ void DBTreeListBox::ModelHasEntryInvalidated( SvListEntry* _pEntry ) { SvTreeListBox::ModelHasEntryInvalidated( _pEntry ); - if ( m_aSelectedEntries.find( _pEntry ) != m_aSelectedEntries.end() ) + SvLBoxEntry* pLBEntry = static_cast<SvLBoxEntry*>(_pEntry); + if (m_aSelectedEntries.find(pLBEntry) != m_aSelectedEntries.end()) { - SvLBoxItem* pTextItem = static_cast< SvLBoxEntry* >( _pEntry )->GetFirstItem( SV_ITEM_ID_BOLDLBSTRING ); + SvLBoxItem* pTextItem = pLBEntry->GetFirstItem(SV_ITEM_ID_BOLDLBSTRING); if ( pTextItem && !static_cast< OBoldListboxString* >( pTextItem )->isEmphasized() ) { implStopSelectionTimer(); - m_aSelectedEntries.erase( _pEntry ); + m_aSelectedEntries.erase(pLBEntry); // ehm - why? } } @@ -232,10 +233,11 @@ void DBTreeListBox::ModelHasEntryInvalidated( SvListEntry* _pEntry ) void DBTreeListBox::ModelHasRemoved( SvListEntry* _pEntry ) { SvTreeListBox::ModelHasRemoved(_pEntry); - if ( m_aSelectedEntries.find( _pEntry ) != m_aSelectedEntries.end() ) + SvLBoxEntry* pLBEntry = static_cast<SvLBoxEntry*>(_pEntry); + if (m_aSelectedEntries.find(pLBEntry) != m_aSelectedEntries.end()) { implStopSelectionTimer(); - m_aSelectedEntries.erase( _pEntry ); + m_aSelectedEntries.erase(pLBEntry); } } diff --git a/dbaccess/source/ui/inc/dbtreelistbox.hxx b/dbaccess/source/ui/inc/dbtreelistbox.hxx index f5948baee4cd..77ee4e95a6a8 100644 --- a/dbaccess/source/ui/inc/dbtreelistbox.hxx +++ b/dbaccess/source/ui/inc/dbtreelistbox.hxx @@ -56,7 +56,7 @@ namespace dbaui OScrollHelper m_aScrollHelper; Timer m_aTimer; // is needed for table updates Point m_aMousePos; - ::std::set< SvListEntry* > m_aSelectedEntries; + std::set<SvLBoxEntry*> m_aSelectedEntries; SvLBoxEntry* m_pDragedEntry; IControlActionListener* m_pActionListener; IContextMenuProvider* |