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
This commit is contained in:
Kohei Yoshida
2012-10-15 16:42:43 -04:00
parent 293fd587f4
commit dad00b3cab
3 changed files with 10 additions and 8 deletions

View File

@@ -1841,10 +1841,10 @@ void OfaTreeOptionsDialog::ResizeTreeLB( void )
SvLBoxTreeList* pTreeList = aTreeLB.GetModel(); SvLBoxTreeList* pTreeList = aTreeLB.GetModel();
DBG_ASSERT( pTreeList, "-OfaTreeOptionsDialog::ResizeTreeLB(): no model, no cookies!" ); DBG_ASSERT( pTreeList, "-OfaTreeOptionsDialog::ResizeTreeLB(): no model, no cookies!" );
SvListEntry* pEntry = pTreeList->First(); SvLBoxEntry* pEntry = pTreeList->First();
while( pEntry ) while( pEntry )
{ {
long n = aTreeLB.GetTextWidth( aTreeLB.GetEntryText( static_cast< SvLBoxEntry* >( pEntry ) ) ); long n = aTreeLB.GetTextWidth(aTreeLB.GetEntryText(pEntry));
n += ((nDepth == 0) ? nIndent0 : nIndent1); n += ((nDepth == 0) ? nIndent0 : nIndent1);
if( n > nDelta ) if( n > nDelta )

View File

@@ -217,13 +217,14 @@ void DBTreeListBox::ModelHasEntryInvalidated( SvListEntry* _pEntry )
{ {
SvTreeListBox::ModelHasEntryInvalidated( _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() ) if ( pTextItem && !static_cast< OBoldListboxString* >( pTextItem )->isEmphasized() )
{ {
implStopSelectionTimer(); implStopSelectionTimer();
m_aSelectedEntries.erase( _pEntry ); m_aSelectedEntries.erase(pLBEntry);
// ehm - why? // ehm - why?
} }
} }
@@ -232,10 +233,11 @@ void DBTreeListBox::ModelHasEntryInvalidated( SvListEntry* _pEntry )
void DBTreeListBox::ModelHasRemoved( SvListEntry* _pEntry ) void DBTreeListBox::ModelHasRemoved( SvListEntry* _pEntry )
{ {
SvTreeListBox::ModelHasRemoved(_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(); implStopSelectionTimer();
m_aSelectedEntries.erase( _pEntry ); m_aSelectedEntries.erase(pLBEntry);
} }
} }

View File

@@ -56,7 +56,7 @@ namespace dbaui
OScrollHelper m_aScrollHelper; OScrollHelper m_aScrollHelper;
Timer m_aTimer; // is needed for table updates Timer m_aTimer; // is needed for table updates
Point m_aMousePos; Point m_aMousePos;
::std::set< SvListEntry* > m_aSelectedEntries; std::set<SvLBoxEntry*> m_aSelectedEntries;
SvLBoxEntry* m_pDragedEntry; SvLBoxEntry* m_pDragedEntry;
IControlActionListener* m_pActionListener; IControlActionListener* m_pActionListener;
IContextMenuProvider* IContextMenuProvider*