diff options
Diffstat (limited to 'svx/source/form/filtnav.cxx')
-rw-r--r-- | svx/source/form/filtnav.cxx | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/svx/source/form/filtnav.cxx b/svx/source/form/filtnav.cxx index 4cde508a406a..7dd1032b9555 100644 --- a/svx/source/form/filtnav.cxx +++ b/svx/source/form/filtnav.cxx @@ -873,7 +873,7 @@ void FmFilterModel::Remove( const ::std::vector<FmFilterData*>::iterator& rPos ) FmFilterData* pData = *rPos; pData->GetParent()->GetChildren().erase( rPos ); - // notify the view, this will remove the actual SvLBoxEntry + // notify the view, this will remove the actual SvTreeListEntry FmFilterRemovedHint aRemoveHint( pData ); Broadcast( aRemoveHint ); @@ -1038,16 +1038,16 @@ void FmFilterModel::EnsureEmptyFilterRows( FmParentData& _rItem ) class FmFilterItemsString : public SvLBoxString { public: - FmFilterItemsString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr ) + FmFilterItemsString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr ) :SvLBoxString(pEntry,nFlags,rStr){} - virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); - virtual void InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData); + virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry); + virtual void InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData); }; const int nxDBmp = 12; //------------------------------------------------------------------------ -void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* pEntry ) +void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvTreeListEntry* pEntry ) { FmFilterItems* pRow = (FmFilterItems*)pEntry->GetUserData(); FmFormItem* pForm = (FmFormItem*)pRow->GetParent(); @@ -1080,7 +1080,7 @@ void FmFilterItemsString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt } //------------------------------------------------------------------------ -void FmFilterItemsString::InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData) +void FmFilterItemsString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData) { if( !pViewData ) pViewData = pView->GetViewDataItem( pEntry, this ); @@ -1098,21 +1098,21 @@ class FmFilterString : public SvLBoxString UniString m_aName; public: - FmFilterString( SvLBoxEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr, const UniString& aName) + FmFilterString( SvTreeListEntry* pEntry, sal_uInt16 nFlags, const XubString& rStr, const UniString& aName) :SvLBoxString(pEntry,nFlags,rStr) ,m_aName(aName) { m_aName.AppendAscii(": "); } - virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvLBoxEntry* pEntry); - virtual void InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData); + virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry); + virtual void InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData); }; const int nxD = 4; //------------------------------------------------------------------------ -void FmFilterString::InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvViewDataItem* pViewData) +void FmFilterString::InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* pViewData) { if( !pViewData ) pViewData = pView->GetViewDataItem( pEntry, this ); @@ -1129,7 +1129,7 @@ void FmFilterString::InitViewData( SvTreeListBox* pView,SvLBoxEntry* pEntry, SvV } //------------------------------------------------------------------------ -void FmFilterString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvLBoxEntry* /*pEntry*/ ) +void FmFilterString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 /*nFlags*/, SvTreeListEntry* /*pEntry*/ ) { Font aOldFont( rDev.GetFont()); Font aFont( aOldFont ); @@ -1193,7 +1193,7 @@ void FmFilterNavigator::UpdateContent(const Reference< XIndexAccess > & xControl m_pModel->Update(xControllers, xCurrent); // expand the filters for the current controller - SvLBoxEntry* pEntry = FindEntry(m_pModel->GetCurrentForm()); + SvTreeListEntry* pEntry = FindEntry(m_pModel->GetCurrentForm()); if (pEntry && !IsExpanded(pEntry)) { SelectAll(sal_False); @@ -1212,7 +1212,7 @@ void FmFilterNavigator::UpdateContent(const Reference< XIndexAccess > & xControl } //------------------------------------------------------------------------ -sal_Bool FmFilterNavigator::EditingEntry( SvLBoxEntry* pEntry, Selection& rSelection ) +sal_Bool FmFilterNavigator::EditingEntry( SvTreeListEntry* pEntry, Selection& rSelection ) { m_pEditingCurrently = pEntry; if (!SvTreeListBox::EditingEntry( pEntry, rSelection )) @@ -1222,7 +1222,7 @@ sal_Bool FmFilterNavigator::EditingEntry( SvLBoxEntry* pEntry, Selection& rSelec } //------------------------------------------------------------------------ -sal_Bool FmFilterNavigator::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUString& rNewText ) +sal_Bool FmFilterNavigator::EditedEntry( SvTreeListEntry* pEntry, const rtl::OUString& rNewText ) { DBG_ASSERT(pEntry == m_pEditingCurrently, "FmFilterNavigator::EditedEntry: suspicious entry!"); m_pEditingCurrently = NULL; @@ -1269,7 +1269,7 @@ sal_Bool FmFilterNavigator::EditedEntry( SvLBoxEntry* pEntry, const rtl::OUStrin } //------------------------------------------------------------------------ -IMPL_LINK( FmFilterNavigator, OnRemove, SvLBoxEntry*, pEntry ) +IMPL_LINK( FmFilterNavigator, OnRemove, SvTreeListEntry*, pEntry ) { // now remove the entry m_pModel->Remove((FmFilterData*) pEntry->GetUserData()); @@ -1294,7 +1294,7 @@ IMPL_LINK_NOARG(FmFilterNavigator, OnDropActionTimer) break; case DA_EXPANDNODE: { - SvLBoxEntry* pToExpand = GetEntry(m_aTimerTriggered); + SvTreeListEntry* pToExpand = GetEntry(m_aTimerTriggered); if (pToExpand && (GetChildCount(pToExpand) > 0) && !IsExpanded(pToExpand)) // tja, eigentlich muesste ich noch testen, ob die Node nicht schon expandiert ist, aber ich // habe dazu weder in den Basisklassen noch im Model eine Methode gefunden ... @@ -1341,7 +1341,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) } else { // is it an entry whith children, and not yet expanded? - SvLBoxEntry* pDropppedOn = GetEntry(aDropPos); + SvTreeListEntry* pDropppedOn = GetEntry(aDropPos); if (pDropppedOn && (GetChildCount(pDropppedOn) > 0) && !IsExpanded(pDropppedOn)) { // -> aufklappen @@ -1379,7 +1379,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) if (!FindEntry(m_aControlExchange->getFormItem())) return DND_ACTION_NONE; - SvLBoxEntry* pDropTarget = GetEntry(aDropPos); + SvTreeListEntry* pDropTarget = GetEntry(aDropPos); if (!pDropTarget) return DND_ACTION_NONE; @@ -1405,7 +1405,7 @@ sal_Int8 FmFilterNavigator::AcceptDrop( const AcceptDropEvent& rEvt ) // ----------------------------------------------------------------------------- namespace { - FmFilterItems* getTargetItems(SvLBoxEntry* _pTarget) + FmFilterItems* getTargetItems(SvTreeListEntry* _pTarget) { FmFilterData* pData = static_cast<FmFilterData*>(_pTarget->GetUserData()); FmFilterItems* pTargetItems = pData->ISA(FmFilterItems) @@ -1429,14 +1429,14 @@ sal_Int8 FmFilterNavigator::ExecuteDrop( const ExecuteDropEvent& rEvt ) // das Ziel des Drop sowie einige Daten darueber Point aDropPos = rEvt.maPosPixel; - SvLBoxEntry* pDropTarget = GetEntry( aDropPos ); + SvTreeListEntry* pDropTarget = GetEntry( aDropPos ); if (!pDropTarget) return DND_ACTION_NONE; // search the container where to add the items FmFilterItems* pTargetItems = getTargetItems(pDropTarget); SelectAll(sal_False); - SvLBoxEntry* pEntry = FindEntry(pTargetItems); + SvTreeListEntry* pEntry = FindEntry(pTargetItems); Select(pEntry, sal_True); SetCurEntry(pEntry); @@ -1446,7 +1446,7 @@ sal_Int8 FmFilterNavigator::ExecuteDrop( const ExecuteDropEvent& rEvt ) } //------------------------------------------------------------------------ -void FmFilterNavigator::InitEntry(SvLBoxEntry* pEntry, +void FmFilterNavigator::InitEntry(SvTreeListEntry* pEntry, const XubString& rStr, const Image& rImg1, const Image& rImg2, @@ -1465,7 +1465,7 @@ void FmFilterNavigator::InitEntry(SvLBoxEntry* pEntry, } //------------------------------------------------------------------------ -sal_Bool FmFilterNavigator::Select( SvLBoxEntry* pEntry, sal_Bool bSelect ) +sal_Bool FmFilterNavigator::Select( SvTreeListEntry* pEntry, sal_Bool bSelect ) { if (bSelect == IsSelected(pEntry)) // das passiert manchmal, ich glaube, die Basisklasse geht zu sehr auf Nummer sicher ;) return sal_True; @@ -1519,23 +1519,23 @@ void FmFilterNavigator::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) else if( rHint.ISA(FmFilterTextChangedHint) ) { FmFilterTextChangedHint* pHint = (FmFilterTextChangedHint*)&rHint; - SvLBoxEntry* pEntry = FindEntry(pHint->GetData()); + SvTreeListEntry* pEntry = FindEntry(pHint->GetData()); if (pEntry) SetEntryText( pEntry, pHint->GetData()->GetText()); } else if( rHint.ISA(FmFilterCurrentChangedHint) ) { // invalidate the entries - for (SvLBoxEntry* pEntry = First(); pEntry != NULL; + for (SvTreeListEntry* pEntry = First(); pEntry != NULL; pEntry = Next(pEntry)) GetModel()->InvalidateEntry( pEntry ); } } //------------------------------------------------------------------------ -SvLBoxEntry* FmFilterNavigator::FindEntry(const FmFilterData* pItem) const +SvTreeListEntry* FmFilterNavigator::FindEntry(const FmFilterData* pItem) const { - SvLBoxEntry* pEntry = NULL; + SvTreeListEntry* pEntry = NULL; if (pItem) { for (pEntry = First(); pEntry != NULL; pEntry = Next( pEntry )) @@ -1554,7 +1554,7 @@ void FmFilterNavigator::Insert(FmFilterData* pItem, sal_uLong nPos) const FmParentData* pParent = pItem->GetParent() ? pItem->GetParent() : GetFilterModel(); // insert the item - SvLBoxEntry* pParentEntry = FindEntry( pParent ); + SvTreeListEntry* pParentEntry = FindEntry( pParent ); InsertEntry( pItem->GetText(), pItem->GetImage(), pItem->GetImage(), pParentEntry, sal_False, nPos, pItem ); if ( pParentEntry ) Expand( pParentEntry ); @@ -1564,7 +1564,7 @@ void FmFilterNavigator::Insert(FmFilterData* pItem, sal_uLong nPos) void FmFilterNavigator::Remove(FmFilterData* pItem) { // der Entry zu den Daten - SvLBoxEntry* pEntry = FindEntry(pItem); + SvTreeListEntry* pEntry = FindEntry(pItem); if (pEntry == m_pEditingCurrently) // cancel editing @@ -1581,7 +1581,7 @@ FmFormItem* FmFilterNavigator::getSelectedFilterItems(::std::vector<FmFilterItem sal_Bool bHandled = sal_True; sal_Bool bFoundSomething = sal_False; - for (SvLBoxEntry* pEntry = FirstSelected(); + for (SvTreeListEntry* pEntry = FirstSelected(); bHandled && pEntry != NULL; pEntry = NextSelected(pEntry)) { @@ -1665,7 +1665,7 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt ) { // die Stelle, an der geklickt wurde Point aWhere; - SvLBoxEntry* pClicked = NULL; + SvTreeListEntry* pClicked = NULL; if (rEvt.IsMouseEvent()) { aWhere = rEvt.GetMousePosPixel(); @@ -1689,7 +1689,7 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt ) } ::std::vector<FmFilterData*> aSelectList; - for (SvLBoxEntry* pEntry = FirstSelected(); + for (SvTreeListEntry* pEntry = FirstSelected(); pEntry != NULL; pEntry = NextSelected(pEntry)) { @@ -1758,9 +1758,9 @@ void FmFilterNavigator::Command( const CommandEvent& rEvt ) SvTreeListBox::Command( rEvt ); } // ----------------------------------------------------------------------------- -SvLBoxEntry* FmFilterNavigator::getNextEntry(SvLBoxEntry* _pStartWith) +SvTreeListEntry* FmFilterNavigator::getNextEntry(SvTreeListEntry* _pStartWith) { - SvLBoxEntry* pEntry = _pStartWith ? _pStartWith : LastSelected(); + SvTreeListEntry* pEntry = _pStartWith ? _pStartWith : LastSelected(); pEntry = Next(pEntry); // we need the next filter entry while( pEntry && GetChildCount( pEntry ) == 0 && pEntry != Last() ) @@ -1768,9 +1768,9 @@ SvLBoxEntry* FmFilterNavigator::getNextEntry(SvLBoxEntry* _pStartWith) return pEntry; } // ----------------------------------------------------------------------------- -SvLBoxEntry* FmFilterNavigator::getPrevEntry(SvLBoxEntry* _pStartWith) +SvTreeListEntry* FmFilterNavigator::getPrevEntry(SvTreeListEntry* _pStartWith) { - SvLBoxEntry* pEntry = _pStartWith ? _pStartWith : FirstSelected(); + SvTreeListEntry* pEntry = _pStartWith ? _pStartWith : FirstSelected(); pEntry = Prev(pEntry); // check if the previous entry is a filter, if so get the next prev if ( pEntry && GetChildCount( pEntry ) != 0 ) @@ -1799,11 +1799,11 @@ void FmFilterNavigator::KeyInput(const KeyEvent& rKEvt) if ( !getSelectedFilterItems( aItemList ) ) break; - ::std::mem_fun1_t<SvLBoxEntry*,FmFilterNavigator,SvLBoxEntry*> getter = ::std::mem_fun(&FmFilterNavigator::getNextEntry); + ::std::mem_fun1_t<SvTreeListEntry*,FmFilterNavigator,SvTreeListEntry*> getter = ::std::mem_fun(&FmFilterNavigator::getNextEntry); if ( rKeyCode.GetCode() == KEY_UP ) getter = ::std::mem_fun(&FmFilterNavigator::getPrevEntry); - SvLBoxEntry* pTarget = getter( this, NULL ); + SvTreeListEntry* pTarget = getter( this, NULL ); if ( !pTarget ) break; @@ -1871,8 +1871,8 @@ void FmFilterNavigator::DeleteSelection() { // to avoid the deletion of an entry twice (e.g. deletion of a parent and afterward // the deletion of it's child, i have to shrink the selecton list - ::std::vector<SvLBoxEntry*> aEntryList; - for (SvLBoxEntry* pEntry = FirstSelected(); + ::std::vector<SvTreeListEntry*> aEntryList; + for (SvTreeListEntry* pEntry = FirstSelected(); pEntry != NULL; pEntry = NextSelected(pEntry)) { @@ -1888,7 +1888,7 @@ void FmFilterNavigator::DeleteSelection() // Remove the selection SelectAll(sal_False); - for (::std::vector<SvLBoxEntry*>::reverse_iterator i = aEntryList.rbegin(); + for (::std::vector<SvTreeListEntry*>::reverse_iterator i = aEntryList.rbegin(); // link problems with operator == i.base() != aEntryList.rend().base(); ++i) { |