cui/source/options/fontsubs.cxx | 4 cui/source/options/optfltr.cxx | 8 cui/source/options/optlingu.cxx | 2 cui/source/tabpages/autocdlg.cxx | 4 cui/source/tabpages/macroass.cxx | 2 dbaccess/source/ui/browser/dsEntriesNoExp.cxx | 2 dbaccess/source/ui/browser/unodatbr.cxx | 4 dbaccess/source/ui/control/listviewitems.cxx | 4 dbaccess/source/ui/control/tabletree.cxx | 2 dbaccess/source/ui/inc/listviewitems.hxx | 2 sc/source/ui/miscdlgs/acredlin.cxx | 4 sc/source/ui/miscdlgs/solveroptions.cxx | 4 sc/source/ui/xmlsource/xmlsourcedlg.cxx | 2 svtools/inc/svtools/svlbitm.hxx | 8 svtools/inc/svtools/treelist.hxx | 5 svtools/inc/svtools/treelistbox.hxx | 9 svtools/inc/svtools/treelistentry.hxx | 20 + svtools/source/contnr/svimpbox.cxx | 6 svtools/source/contnr/svlbitm.cxx | 8 svtools/source/contnr/svtabbx.cxx | 34 +- svtools/source/contnr/treelist.cxx | 14 - svtools/source/contnr/treelistbox.cxx | 17 - svtools/source/contnr/treelistentry.cxx | 114 +++++----- svx/source/dialog/checklbx.cxx | 2 svx/source/dialog/simptabl.cxx | 4 svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx | 4 sw/source/ui/index/cnttab.cxx | 2 sw/source/ui/utlui/content.cxx | 2 sw/source/ui/utlui/glbltree.cxx | 2 29 files changed, 168 insertions(+), 127 deletions(-)
New commits: commit a37c287ebe3a51d2deb99551d3aeeefead625373 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Thu Nov 15 19:28:23 2012 -0500 Now I can remove this ugly const_cast. Change-Id: Ifc4d0028d334bd6fa9dfdea86543b5eaf25313e0 diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx index 08cf7cc..fa85970 100644 --- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx +++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx @@ -42,7 +42,7 @@ bool isAttribute(const SvTreeListEntry& rEntry) OUString getXPath(const SvTreeListBox& rTree, const SvTreeListEntry& rEntry) { OUStringBuffer aBuf; - for (SvTreeListEntry* p = const_cast<SvTreeListEntry*>(&rEntry); p; p = rTree.GetParent(p)) + for (const SvTreeListEntry* p = &rEntry; p; p = rTree.GetParent(p)) { const SvLBoxItem* pItem = p->GetFirstItem(SV_ITEM_ID_LBOXSTRING); if (!pItem) commit 4c9b9b964066a166eb81bb86f02378b4c7dbb50b Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Thu Nov 15 16:31:49 2012 -0500 Make GetParent() const-correct. const method should return const pointer if it points to an object held internally & prefer taking const pointer as a method argument if possible. Change-Id: I4dc8c31d55aa0054ea6db521be9ad45fefef8d07 diff --git a/svtools/inc/svtools/treelist.hxx b/svtools/inc/svtools/treelist.hxx index 467dda9..79fbc1b 100644 --- a/svtools/inc/svtools/treelist.hxx +++ b/svtools/inc/svtools/treelist.hxx @@ -256,7 +256,10 @@ public: SvTreeListEntry* GetEntry( SvTreeListEntry* pParent, sal_uLong nPos ) const; SvTreeListEntry* GetEntry( sal_uLong nRootPos ) const; SvTreeListEntry* GetEntryAtAbsPos( sal_uLong nAbsPos ) const; - SvTreeListEntry* GetParent( SvTreeListEntry* pEntry ) const; + + const SvTreeListEntry* GetParent( const SvTreeListEntry* pEntry ) const; + SvTreeListEntry* GetParent( SvTreeListEntry* pEntry ); + SvTreeListEntry* GetRootLevelParent( SvTreeListEntry* pEntry ) const; const SvTreeListEntries& GetChildList( SvTreeListEntry* pParent ) const; SvTreeListEntries& GetChildList( SvTreeListEntry* pParent ); diff --git a/svtools/inc/svtools/treelistbox.hxx b/svtools/inc/svtools/treelistbox.hxx index 8ec235d..a7e05d3 100644 --- a/svtools/inc/svtools/treelistbox.hxx +++ b/svtools/inc/svtools/treelistbox.hxx @@ -399,7 +399,8 @@ public: void FillEntryPath( SvTreeListEntry* pEntry, ::std::deque< sal_Int32 >& _rPath ) const; using Window::GetParent; - SvTreeListEntry* GetParent( SvTreeListEntry* pEntry ) const; + const SvTreeListEntry* GetParent( const SvTreeListEntry* pEntry ) const; + SvTreeListEntry* GetParent( SvTreeListEntry* pEntry ) const; SvTreeListEntry* GetRootLevelParent(SvTreeListEntry* pEntry ) const; using Window::GetChildCount; diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx index 675c019..ed278f1 100644 --- a/svtools/source/contnr/treelist.cxx +++ b/svtools/source/contnr/treelist.cxx @@ -1855,11 +1855,19 @@ SvTreeListEntries& SvTreeList::GetChildList( SvTreeListEntry* pParent ) return pParent->maChildren; } -SvTreeListEntry* SvTreeList::GetParent( SvTreeListEntry* pEntry ) const +const SvTreeListEntry* SvTreeList::GetParent( const SvTreeListEntry* pEntry ) const +{ + const SvTreeListEntry* pParent = pEntry->pParent; + if (pParent == pRootItem) + pParent = NULL; + return pParent; +} + +SvTreeListEntry* SvTreeList::GetParent( SvTreeListEntry* pEntry ) { SvTreeListEntry* pParent = pEntry->pParent; - if ( pParent==pRootItem ) - pParent = 0; + if (pParent == pRootItem) + pParent = NULL; return pParent; } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 5cdff0c..167035b 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -938,6 +938,11 @@ void SvTreeListBox::FillEntryPath( SvTreeListEntry* pEntry, ::std::deque< sal_In } } +const SvTreeListEntry* SvTreeListBox::GetParent( const SvTreeListEntry* pEntry ) const +{ + return pModel->GetParent(pEntry); +} + SvTreeListEntry* SvTreeListBox::GetParent( SvTreeListEntry* pEntry ) const { return pModel->GetParent(pEntry); commit 03268613ea2f7b9a76fa87afb8fbd4c43840d062 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Thu Nov 15 15:59:48 2012 -0500 Store tree list entry items in ptr_vector & const correct-ness. Change-Id: I0e02b9ceb98f26a2b130ec978a992fcf889e718a diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index a0484e5..3c3279f 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -3476,8 +3476,8 @@ IMPL_LINK( SbaTableQueryBrowser, OnTreeEntryCompare, const SvSortData*, _pSortDa return COMPARE_EQUAL; } - SvLBoxString* pLeftTextItem = static_cast<SvLBoxString*>(pLHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); - SvLBoxString* pRightTextItem = static_cast<SvLBoxString*>(pRHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); + const SvLBoxString* pLeftTextItem = static_cast<const SvLBoxString*>(pLHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); + const SvLBoxString* pRightTextItem = static_cast<const SvLBoxString*>(pRHS->GetFirstItem(SV_ITEM_ID_LBOXSTRING)); OSL_ENSURE(pLeftTextItem && pRightTextItem, "SbaTableQueryBrowser::OnTreeEntryCompare: invalid text items!"); String sLeftText = pLeftTextItem->GetText(); diff --git a/svtools/inc/svtools/treelistbox.hxx b/svtools/inc/svtools/treelistbox.hxx index ce4bba1..8ec235d 100644 --- a/svtools/inc/svtools/treelistbox.hxx +++ b/svtools/inc/svtools/treelistbox.hxx @@ -835,7 +835,7 @@ inline SvViewDataItem* SvTreeListBox::GetViewDataItem( SvTreeListEntry* pEntry, (SvViewDataEntry*)SvListView::GetViewData(pEntry); DBG_ASSERT(pEntryData,"Entry not in View"); DBG_ASSERT(pEntryData->pItemData,"No ItemData"); - sal_uInt16 nItemPos = ((SvTreeListEntry*)pEntry)->GetPos( pItem ); + sal_uInt16 nItemPos = pEntry->GetPos(pItem); return (pEntryData->pItemData+nItemPos); } diff --git a/svtools/inc/svtools/treelistentry.hxx b/svtools/inc/svtools/treelistentry.hxx index 37a0ba1..7eb015c 100644 --- a/svtools/inc/svtools/treelistentry.hxx +++ b/svtools/inc/svtools/treelistentry.hxx @@ -32,7 +32,6 @@ #include "svtdllapi.h" #include "tools/solar.h" -#include <vector> #include <boost/ptr_container/ptr_vector.hpp> // Flags, die am Model haengen @@ -58,11 +57,13 @@ class SVT_DLLPUBLIC SvTreeListEntry friend class SvListView; friend class SvTreeListBox; + typedef boost::ptr_vector<SvLBoxItem> ItemsType; + SvTreeListEntry* pParent; SvTreeListEntries maChildren; sal_uLong nAbsPos; sal_uLong nListPos; - std::vector<SvLBoxItem*> aItems; + ItemsType maItems; void* pUserData; sal_uInt16 nEntryFlags; @@ -70,9 +71,10 @@ private: void ClearChildren(); void SetListPositions(); void InvalidateChildrensListPositions(); - void DeleteItems_Impl(); public: + static size_t ITEM_NOT_FOUND; + SvTreeListEntry(); SvTreeListEntry(const SvTreeListEntry& r); virtual ~SvTreeListEntry(); @@ -86,16 +88,18 @@ public: void Clone(SvTreeListEntry* pSource); - sal_uInt16 ItemCount() const; + size_t ItemCount() const; // DARF NUR GERUFEN WERDEN, WENN DER EINTRAG NOCH NICHT IM MODEL // EINGEFUEGT IST, DA SONST FUER DAS ITEM KEINE VIEW-ABHAENGIGEN // DATEN ALLOZIERT WERDEN! void AddItem( SvLBoxItem* pItem ); - void ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos ); - SvLBoxItem* GetItem( sal_uInt16 nPos ) const; - SvLBoxItem* GetFirstItem( sal_uInt16 nId ) const; - sal_uInt16 GetPos( SvLBoxItem* pItem ) const; + void ReplaceItem( SvLBoxItem* pNewItem, size_t nPos ); + const SvLBoxItem* GetItem( size_t nPos ) const; + SvLBoxItem* GetItem( size_t nPos ); + const SvLBoxItem* GetFirstItem( sal_uInt16 nId ) const; + SvLBoxItem* GetFirstItem( sal_uInt16 nId ); + size_t GetPos( const SvLBoxItem* pItem ) const; void* GetUserData() const; void SetUserData( void* pPtr ); void EnableChildrenOnDemand( bool bEnable=true ); diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index 5f90b8f..0614591 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -229,7 +229,7 @@ void SvImpLBox::CalcCellFocusRect( SvTreeListEntry* pEntry, Rectangle& rRect ) SvLBoxItem* pItem = pCursor->GetItem( nCurTabPos ); rRect.Left() = pView->GetTab( pCursor, pItem )->GetPos(); } - if ( pCursor->ItemCount() > ( nCurTabPos + 1 ) ) + if (pCursor->ItemCount() > static_cast<size_t>(nCurTabPos+1)) { SvLBoxItem* pNextItem = pCursor->GetItem( nCurTabPos + 1 ); long nRight = pView->GetTab( pCursor, pNextItem )->GetPos() - 1; diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index 8938104..929c429 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -375,7 +375,7 @@ String SvTabListBox::GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const SvTreeListEntry* pEntry = GetEntryOnPos( nPos ); DBG_ASSERT( pEntry, "SvTabListBox::GetCellText(): Invalid Entry" ); XubString aResult; - if ( pEntry && pEntry->ItemCount() > ( nCol + 1 ) ) + if (pEntry && pEntry->ItemCount() > static_cast<size_t>(nCol+1)) { const SvLBoxItem* pStr = pEntry->GetItem( nCol + 1 ); if (pStr && pStr->GetType() == SV_ITEM_ID_LBOXSTRING) diff --git a/svtools/source/contnr/treelistentry.cxx b/svtools/source/contnr/treelistentry.cxx index b6a5977..b98b24a 100644 --- a/svtools/source/contnr/treelistentry.cxx +++ b/svtools/source/contnr/treelistentry.cxx @@ -30,6 +30,10 @@ #include "svtools/treelist.hxx" #include "svtools/treelistbox.hxx" +#include <limits> + +size_t SvTreeListEntry::ITEM_NOT_FOUND = std::numeric_limits<size_t>::max(); + void SvTreeListEntry::ClearChildren() { maChildren.clear(); @@ -55,18 +59,6 @@ void SvTreeListEntry::InvalidateChildrensListPositions() nListPos |= 0x80000000; } -void SvTreeListEntry::DeleteItems_Impl() -{ - sal_uInt16 nCount = aItems.size(); - while( nCount ) - { - nCount--; - SvLBoxItem* pItem = aItems[ nCount ]; - delete pItem; - } - aItems.clear(); -} - SvTreeListEntry::SvTreeListEntry() : pParent(NULL), nAbsPos(0), @@ -93,7 +85,7 @@ SvTreeListEntry::~SvTreeListEntry() #endif maChildren.clear(); - DeleteItems_Impl(); + maItems.clear(); } bool SvTreeListEntry::HasChildren() const @@ -132,29 +124,28 @@ void SvTreeListEntry::Clone(SvTreeListEntry* pSource) nAbsPos = pSource->nAbsPos; SvLBoxItem* pNewItem; - DeleteItems_Impl(); - sal_uInt16 nCount = ((SvTreeListEntry*)pSource)->ItemCount(); - sal_uInt16 nCurPos = 0; - while( nCurPos < nCount ) + maItems.clear(); + ItemsType::iterator it = pSource->maItems.begin(), itEnd = pSource->maItems.end(); + for (; it != itEnd; ++it) { - SvLBoxItem* pItem = ((SvTreeListEntry*)pSource)->GetItem( nCurPos ); + SvLBoxItem* pItem = &(*it); pNewItem = pItem->Create(); - pNewItem->Clone( pItem ); - AddItem( pNewItem ); - nCurPos++; + pNewItem->Clone(pItem); + maItems.push_back(pNewItem); } - pUserData = ((SvTreeListEntry*)pSource)->GetUserData(); - nEntryFlags = ((SvTreeListEntry*)pSource)->nEntryFlags; + + pUserData = pSource->GetUserData(); + nEntryFlags = pSource->nEntryFlags; } -sal_uInt16 SvTreeListEntry::ItemCount() const +size_t SvTreeListEntry::ItemCount() const { - return (sal_uInt16)aItems.size(); + return maItems.size(); } void SvTreeListEntry::AddItem( SvLBoxItem* pItem ) { - aItems.push_back( pItem ); + maItems.push_back( pItem ); } void SvTreeListEntry::EnableChildrenOnDemand( bool bEnable ) @@ -165,41 +156,72 @@ void SvTreeListEntry::EnableChildrenOnDemand( bool bEnable ) nEntryFlags &= (~SV_ENTRYFLAG_CHILDREN_ON_DEMAND); } -void SvTreeListEntry::ReplaceItem( SvLBoxItem* pNewItem, sal_uInt16 nPos ) +void SvTreeListEntry::ReplaceItem( SvLBoxItem* pNewItem, size_t nPos ) { DBG_ASSERT(pNewItem,"ReplaceItem:No Item"); - SvLBoxItem* pOld = GetItem( nPos ); - if ( pOld ) + if (nPos >= maItems.size()) { - aItems[ nPos ] = pNewItem; - delete pOld; + // Out of bound. Bail out. + delete pNewItem; + return; } + + maItems.erase(maItems.begin()+nPos); + maItems.insert(maItems.begin()+nPos, pNewItem); } -SvLBoxItem* SvTreeListEntry::GetItem( sal_uInt16 nPos ) const +const SvLBoxItem* SvTreeListEntry::GetItem( size_t nPos ) const { - return aItems[nPos]; + return &maItems[nPos]; } -SvLBoxItem* SvTreeListEntry::GetFirstItem( sal_uInt16 nId ) const +SvLBoxItem* SvTreeListEntry::GetItem( size_t nPos ) { - sal_uInt16 nCount = aItems.size(); - sal_uInt16 nCur = 0; - SvLBoxItem* pItem; - while( nCur < nCount ) + return &maItems[nPos]; +} + +namespace { + +class FindByType : std::unary_function<SvLBoxItem, void> +{ + sal_uInt16 mnId; +public: + FindByType(sal_uInt16 nId) : mnId(nId) {} + bool operator() (const SvLBoxItem& rItem) const + { + return rItem.GetType() == mnId; + } +}; + +class FindByPointer : std::unary_function<SvLBoxItem, void> +{ + const SvLBoxItem* mpItem; +public: + FindByPointer(const SvLBoxItem* p) : mpItem(p) {} + bool operator() (const SvLBoxItem& rItem) const { - pItem = GetItem( nCur ); - if (pItem->GetType() == nId) - return pItem; - nCur++; + return &rItem == mpItem; } - return 0; +}; + +} + +const SvLBoxItem* SvTreeListEntry::GetFirstItem( sal_uInt16 nId ) const +{ + ItemsType::const_iterator it = std::find_if(maItems.begin(), maItems.end(), FindByType(nId)); + return it == maItems.end() ? NULL : &(*it); +} + +SvLBoxItem* SvTreeListEntry::GetFirstItem( sal_uInt16 nId ) +{ + ItemsType::iterator it = std::find_if(maItems.begin(), maItems.end(), FindByType(nId)); + return it == maItems.end() ? NULL : &(*it); } -sal_uInt16 SvTreeListEntry::GetPos( SvLBoxItem* pItem ) const +size_t SvTreeListEntry::GetPos( const SvLBoxItem* pItem ) const { - std::vector<SvLBoxItem*>::const_iterator it = std::find( aItems.begin(), aItems.end(), pItem ); - return it == aItems.end() ? USHRT_MAX : it - aItems.begin(); + ItemsType::const_iterator it = std::find_if(maItems.begin(), maItems.end(), FindByPointer(pItem)); + return it == maItems.end() ? ITEM_NOT_FOUND : std::distance(maItems.begin(), it); } void* SvTreeListEntry::GetUserData() const commit 9e92edb3589e2f7bfd46b542b5aaa07df8499a61 Author: Kohei Yoshida <kohei.yosh...@gmail.com> Date: Thu Nov 15 14:11:19 2012 -0500 Rename SvLBoxItem::IsA() to GetType(), and mark that const. Change-Id: I542835154e40b25d68fc3995d911810e26e30501 diff --git a/cui/source/options/fontsubs.cxx b/cui/source/options/fontsubs.cxx index edc27c6..e511a3f 100644 --- a/cui/source/options/fontsubs.cxx +++ b/cui/source/options/fontsubs.cxx @@ -505,7 +505,7 @@ void SvxFontSubstCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); DBG_ASSERT(pItem,"SetCheckButton:Item not found"); - if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) + if (pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { switch( eState ) { @@ -531,7 +531,7 @@ SvButtonState SvxFontSubstCheckListBox::GetCheckButtonState( SvTreeListEntry* pE SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); DBG_ASSERT(pItem,"GetChButnState:Item not found"); - if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) + if (pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); diff --git a/cui/source/options/optfltr.cxx b/cui/source/options/optfltr.cxx index eddd657..a6d12f7 100644 --- a/cui/source/options/optfltr.cxx +++ b/cui/source/options/optfltr.cxx @@ -209,7 +209,7 @@ sal_Bool OfaMSFilterTabPage2::FillItemSet( SfxItemSet& ) if( pEntry ) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem( nCol )); - if( pItem && ((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON ) + if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); bCheck = SV_BUTTON_CHECKED == @@ -267,7 +267,7 @@ void OfaMSFilterTabPage2::Reset( const SfxItemSet& ) if( pEntry ) { SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem( nCol )); - if( pItem && ((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON ) + if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { if( (rOpt.*pArr->FnIs)() ) pItem->SetStateChecked(); @@ -340,7 +340,7 @@ void OfaMSFilterTabPage2::MSFltrSimpleTable::SetCheckButtonState( SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); DBG_ASSERT(pItem,"SetCheckButton:Item not found"); - if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) + if (pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { switch( eState ) { @@ -367,7 +367,7 @@ SvButtonState OfaMSFilterTabPage2::MSFltrSimpleTable::GetCheckButtonState( SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); DBG_ASSERT(pItem,"GetChButnState:Item not found"); - if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) + if (pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); diff --git a/cui/source/options/optlingu.cxx b/cui/source/options/optlingu.cxx index 705bf0c..a81c354 100644 --- a/cui/source/options/optlingu.cxx +++ b/cui/source/options/optlingu.cxx @@ -268,7 +268,7 @@ static void lcl_SetCheckButton( SvTreeListEntry* pEntry, sal_Bool bCheck ) SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON)); DBG_ASSERT(pItem,"SetCheckButton:Item not found"); - if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) + if (pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { if (bCheck) pItem->SetStateChecked(); diff --git a/cui/source/tabpages/autocdlg.cxx b/cui/source/tabpages/autocdlg.cxx index bec34f5..5fd699a 100644 --- a/cui/source/tabpages/autocdlg.cxx +++ b/cui/source/tabpages/autocdlg.cxx @@ -794,7 +794,7 @@ void OfaACorrCheckListBox::SetCheckButtonState( SvTreeListEntry* pEntry, sal_uIn SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); DBG_ASSERT(pItem,"SetCheckButton:Item not found"); - if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) + if (pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { switch( eState ) { @@ -820,7 +820,7 @@ SvButtonState OfaACorrCheckListBox::GetCheckButtonState( SvTreeListEntry* pEntry SvLBoxButton* pItem = (SvLBoxButton*)(pEntry->GetItem(nCol + 1)); DBG_ASSERT(pItem,"GetChButnState:Item not found"); - if (((SvLBoxItem*)pItem)->IsA() == SV_ITEM_ID_LBOXBUTTON) + if (pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); diff --git a/cui/source/tabpages/macroass.cxx b/cui/source/tabpages/macroass.cxx index 576f390..513f436 100644 --- a/cui/source/tabpages/macroass.cxx +++ b/cui/source/tabpages/macroass.cxx @@ -424,7 +424,7 @@ void _SfxMacroTabPage::FillEvents() if( pE ) { SvLBoxString* pLItem = ( SvLBoxString* ) pE->GetItem( LB_MACROS_ITEMPOS ); - DBG_ASSERT( pLItem && SV_ITEM_ID_LBOXSTRING == pLItem->IsA(), "_SfxMacroTabPage::FillEvents(): no LBoxString" ); + DBG_ASSERT( pLItem && SV_ITEM_ID_LBOXSTRING == pLItem->GetType(), "_SfxMacroTabPage::FillEvents(): no LBoxString" ); String sOld( pLItem->GetText() ); String sNew; diff --git a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx index e425c55..275b90e 100644 --- a/dbaccess/source/ui/browser/dsEntriesNoExp.cxx +++ b/dbaccess/source/ui/browser/dsEntriesNoExp.cxx @@ -236,7 +236,7 @@ void SbaTableQueryBrowser::notifyHiContrastChanged() for (sal_uInt16 i=0;i<nCount;++i) { SvLBoxItem* pItem = pEntryLoop->GetItem(i); - if ( !pItem || ( pItem->IsA() != SV_ITEM_ID_LBOXCONTEXTBMP ) ) + if (!pItem || pItem->GetType() != SV_ITEM_ID_LBOXCONTEXTBMP) continue; SvLBoxContextBmp* pContextBitmapItem = static_cast< SvLBoxContextBmp* >( pItem ); diff --git a/dbaccess/source/ui/control/listviewitems.cxx b/dbaccess/source/ui/control/listviewitems.cxx index 07b2b0a..1d2cc2d 100644 --- a/dbaccess/source/ui/control/listviewitems.cxx +++ b/dbaccess/source/ui/control/listviewitems.cxx @@ -43,13 +43,11 @@ namespace dbaui pView->Pop(); } - //------------------------------------------------------------------------ - sal_uInt16 OBoldListboxString::IsA() + sal_uInt16 OBoldListboxString::GetType() const { return SV_ITEM_ID_BOLDLBSTRING; } - //------------------------------------------------------------------------ void OBoldListboxString::Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry ) { if (m_bEmphasized) diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index a2d4115..05c9856 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -124,7 +124,7 @@ void OTableTreeListBox::notifyHiContrastChanged() for (sal_uInt16 i=0;i<nCount;++i) { SvLBoxItem* pItem = pEntryLoop->GetItem(i); - if ( pItem && pItem->IsA() == SV_ITEM_ID_LBOXCONTEXTBMP) + if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXCONTEXTBMP) { SvLBoxContextBmp* pContextBitmapItem = static_cast< SvLBoxContextBmp* >( pItem ); diff --git a/dbaccess/source/ui/inc/listviewitems.hxx b/dbaccess/source/ui/inc/listviewitems.hxx index c9d076c..e14b421 100644 --- a/dbaccess/source/ui/inc/listviewitems.hxx +++ b/dbaccess/source/ui/inc/listviewitems.hxx @@ -43,7 +43,7 @@ namespace dbaui { } - virtual sal_uInt16 IsA(); + virtual sal_uInt16 GetType() const; virtual void Paint(const Point& rPos, SvTreeListBox& rDev, sal_uInt16 nFlags, SvTreeListEntry* pEntry); virtual void InitViewData( SvTreeListBox* pView,SvTreeListEntry* pEntry, SvViewDataItem* _pViewData); diff --git a/sc/source/ui/miscdlgs/acredlin.cxx b/sc/source/ui/miscdlgs/acredlin.cxx index dfc0f93..3ef75bb 100644 --- a/sc/source/ui/miscdlgs/acredlin.cxx +++ b/sc/source/ui/miscdlgs/acredlin.cxx @@ -1995,8 +1995,8 @@ IMPL_LINK( ScAcceptChgDlg, ColCompareHdl, SvSortData*, pSortData ) if(pLeftItem != NULL && pRightItem != NULL) { - sal_uInt16 nLeftKind=pLeftItem->IsA(); - sal_uInt16 nRightKind=pRightItem->IsA(); + sal_uInt16 nLeftKind = pLeftItem->GetType(); + sal_uInt16 nRightKind = pRightItem->GetType(); if(nRightKind == SV_ITEM_ID_LBOXSTRING && nLeftKind == SV_ITEM_ID_LBOXSTRING ) diff --git a/sc/source/ui/miscdlgs/solveroptions.cxx b/sc/source/ui/miscdlgs/solveroptions.cxx index f86808b..8160856 100644 --- a/sc/source/ui/miscdlgs/solveroptions.cxx +++ b/sc/source/ui/miscdlgs/solveroptions.cxx @@ -398,8 +398,8 @@ IMPL_LINK_NOARG(ScSolverOptionsDialog, SettingsSelHdl) if (pEntry) { SvLBoxItem* pItem = pEntry->GetFirstItem(SV_ITEM_ID_LBOXBUTTON); - if ( pItem && pItem->IsA() == SV_ITEM_ID_LBOXBUTTON ) - bCheckbox = sal_True; + if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) + bCheckbox = true; } maBtnEdit.Enable( !bCheckbox ); diff --git a/svtools/inc/svtools/svlbitm.hxx b/svtools/inc/svtools/svlbitm.hxx index a4e1d40..4b1ea59 100644 --- a/svtools/inc/svtools/svlbitm.hxx +++ b/svtools/inc/svtools/svlbitm.hxx @@ -122,7 +122,7 @@ public: SvLBoxString(SvTreeListEntry*, sal_uInt16 nFlags, const rtl::OUString& rStr); SvLBoxString(); virtual ~SvLBoxString(); - virtual sal_uInt16 IsA(); + virtual sal_uInt16 GetType() const; virtual void InitViewData(SvTreeListBox*, SvTreeListEntry*, SvViewDataItem*); rtl::OUString GetText() const { return maText; } void SetText( const rtl::OUString& rText ) { maText = rText; } @@ -137,7 +137,7 @@ class SvLBoxBmp : public SvLBoxItem public: SvLBoxBmp(); virtual ~SvLBoxBmp(); - virtual sal_uInt16 IsA(); + virtual sal_uInt16 GetType() const; virtual void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ); virtual void Paint( const Point&, SvTreeListBox& rView, sal_uInt16 nFlags,SvTreeListEntry* ); virtual SvLBoxItem* Create() const; @@ -171,7 +171,7 @@ public: SvLBoxButton(); virtual ~SvLBoxButton(); virtual void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ); - virtual sal_uInt16 IsA(); + virtual sal_uInt16 GetType() const; virtual sal_Bool ClickHdl(SvTreeListBox* pView, SvTreeListEntry* ); virtual void Paint( const Point&, SvTreeListBox& rView, sal_uInt16 nFlags,SvTreeListEntry* ); virtual SvLBoxItem* Create() const; @@ -229,7 +229,7 @@ public: sal_uInt16 nEntryFlagsBmp1); SvLBoxContextBmp(); virtual ~SvLBoxContextBmp(); - virtual sal_uInt16 IsA(); + virtual sal_uInt16 GetType() const; virtual void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ); virtual void Paint( const Point&, SvTreeListBox& rView, sal_uInt16 nFlags,SvTreeListEntry* ); virtual SvLBoxItem* Create() const; diff --git a/svtools/inc/svtools/treelistbox.hxx b/svtools/inc/svtools/treelistbox.hxx index 4ce8c41..ce4bba1 100644 --- a/svtools/inc/svtools/treelistbox.hxx +++ b/svtools/inc/svtools/treelistbox.hxx @@ -173,7 +173,7 @@ public: SvLBoxItem( SvTreeListEntry*, sal_uInt16 nFlags ); SvLBoxItem(); virtual ~SvLBoxItem(); - virtual sal_uInt16 IsA() = 0; + virtual sal_uInt16 GetType() const = 0; const Size& GetSize( SvTreeListBox* pView, SvTreeListEntry* pEntry ); const Size& GetSize( SvViewDataEntry* pData, sal_uInt16 nItemPos ) { @@ -211,7 +211,7 @@ public: // The DropTarget is 0 in that case #define SV_DRAGDROP_ENABLE_TOP (DragDropMode)0x0020 -#define SVLISTBOX_ID_LBOX 0 // for SvTreeListBox::IsA() +#define SVLISTBOX_ID_LBOX 0 // for SvTreeListBox::GetType() #define SVLBOX_IN_EDT 0x0001 #define SVLBOX_EDT_ENABLED 0x0002 diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx index e0d874d..5f90b8f 100644 --- a/svtools/source/contnr/svimpbox.cxx +++ b/svtools/source/contnr/svimpbox.cxx @@ -1885,7 +1885,7 @@ bool SvImpLBox::ButtonDownCheckCtrl( const MouseEvent& rMEvt, SvTreeListEntry* pEntry, long nY) { SvLBoxItem* pItem = pView->GetItem(pEntry,rMEvt.GetPosPixel().X(),&pActiveTab); - if( pItem && (pItem->IsA()==SV_ITEM_ID_LBOXBUTTON)) + if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { pActiveButton = (SvLBoxButton*)pItem; pActiveEntry = pEntry; @@ -3160,7 +3160,7 @@ bool SvImpLBox::RequestHelp( const HelpEvent& rHEvt ) // recalculate text rectangle SvLBoxTab* pTab; SvLBoxString* pItem = (SvLBoxString*)(pView->GetItem( pEntry, aPos.X(), &pTab )); - if( !pItem || pItem->IsA() != SV_ITEM_ID_LBOXSTRING ) + if (!pItem || pItem->GetType() != SV_ITEM_ID_LBOXSTRING) return false; aPos = GetEntryPosition( pEntry ); diff --git a/svtools/source/contnr/svlbitm.cxx b/svtools/source/contnr/svlbitm.cxx index b121411..314bc31 100644 --- a/svtools/source/contnr/svlbitm.cxx +++ b/svtools/source/contnr/svlbitm.cxx @@ -213,7 +213,7 @@ SvLBoxString::~SvLBoxString() DBG_DTOR(SvLBoxString,0); } -sal_uInt16 SvLBoxString::IsA() +sal_uInt16 SvLBoxString::GetType() const { DBG_CHKTHIS(SvLBoxString,0); return SV_ITEM_ID_LBOXSTRING; @@ -272,7 +272,7 @@ SvLBoxBmp::~SvLBoxBmp() DBG_DTOR(SvLBoxBmp,0); } -sal_uInt16 SvLBoxBmp::IsA() +sal_uInt16 SvLBoxBmp::GetType() const { DBG_CHKTHIS(SvLBoxBmp,0); return SV_ITEM_ID_LBOXBMP; @@ -338,7 +338,7 @@ SvLBoxButton::~SvLBoxButton() DBG_DTOR(SvLBoxButton,0); } -sal_uInt16 SvLBoxButton::IsA() +sal_uInt16 SvLBoxButton::GetType() const { DBG_CHKTHIS(SvLBoxButton,0); return SV_ITEM_ID_LBOXBUTTON; @@ -503,7 +503,7 @@ SvLBoxContextBmp::~SvLBoxContextBmp() DBG_DTOR(SvLBoxContextBmp,0); } -sal_uInt16 SvLBoxContextBmp::IsA() +sal_uInt16 SvLBoxContextBmp::GetType() const { DBG_CHKTHIS(SvLBoxContextBmp,0); return SV_ITEM_ID_LBOXCONTEXTBMP; diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx index ab3bf5c..8938104 100644 --- a/svtools/source/contnr/svtabbx.cxx +++ b/svtools/source/contnr/svtabbx.cxx @@ -279,19 +279,19 @@ String SvTabListBox::GetEntryText( SvTreeListEntry* pEntry, sal_uInt16 nCol ) co sal_uInt16 nCur = 0; while( nCur < nCount ) { - SvLBoxItem* pStr = pEntry->GetItem( nCur ); - if( pStr->IsA() == SV_ITEM_ID_LBOXSTRING ) + const SvLBoxItem* pStr = pEntry->GetItem( nCur ); + if (pStr->GetType() == SV_ITEM_ID_LBOXSTRING) { if( nCol == 0xffff ) { if( aResult.Len() ) aResult += '\t'; - aResult += static_cast<SvLBoxString*>( pStr )->GetText(); + aResult += static_cast<const SvLBoxString*>(pStr)->GetText(); } else { if( nCol == 0 ) - return static_cast<SvLBoxString*>( pStr )->GetText(); + return static_cast<const SvLBoxString*>(pStr)->GetText(); nCol--; } } @@ -334,7 +334,7 @@ void SvTabListBox::SetEntryText( const XubString& rStr, SvTreeListEntry* pEntry, while( nCur < nCount ) { SvLBoxItem* pStr = pEntry->GetItem( nCur ); - if( pStr && pStr->IsA() == SV_ITEM_ID_LBOXSTRING ) + if (pStr && pStr->GetType() == SV_ITEM_ID_LBOXSTRING) { if( nCol == 0xffff ) { @@ -377,9 +377,9 @@ String SvTabListBox::GetCellText( sal_uLong nPos, sal_uInt16 nCol ) const XubString aResult; if ( pEntry && pEntry->ItemCount() > ( nCol + 1 ) ) { - SvLBoxItem* pStr = pEntry->GetItem( nCol + 1 ); - if ( pStr && pStr->IsA() == SV_ITEM_ID_LBOXSTRING ) - aResult = static_cast< SvLBoxString* >( pStr )->GetText(); + const SvLBoxItem* pStr = pEntry->GetItem( nCol + 1 ); + if (pStr && pStr->GetType() == SV_ITEM_ID_LBOXSTRING) + aResult = static_cast<const SvLBoxString*>(pStr)->GetText(); } return aResult; } @@ -453,20 +453,20 @@ String SvTabListBox::GetTabEntryText( sal_uLong nPos, sal_uInt16 nCol ) const sal_uInt16 nCur = ( 0 == nCol && IsCellFocusEnabled() ) ? GetCurrentTabPos() : 0; while( nCur < nCount ) { - SvLBoxItem* pStr = pEntry->GetItem( nCur ); - if ( pStr->IsA() == SV_ITEM_ID_LBOXSTRING ) + const SvLBoxItem* pStr = pEntry->GetItem( nCur ); + if (pStr->GetType() == SV_ITEM_ID_LBOXSTRING) { if ( nCol == 0xffff ) { if ( aResult.Len() ) aResult += '\t'; - aResult += static_cast<SvLBoxString*>( pStr )->GetText(); + aResult += static_cast<const SvLBoxString*>(pStr)->GetText(); } else { if ( nCol == 0 ) { - String sRet = static_cast<SvLBoxString*>( pStr )->GetText(); + String sRet = static_cast<const SvLBoxString*>(pStr)->GetText(); if ( sRet.Len() == 0 ) sRet = SVT_RESSTR( STR_SVT_ACC_EMPTY_FIELD ); return sRet; @@ -621,7 +621,7 @@ sal_Bool SvHeaderTabListBox::IsItemChecked( SvTreeListEntry* pEntry, sal_uInt16 SvButtonState eState = SV_BUTTON_UNCHECKED; SvLBoxButton* pItem = (SvLBoxButton*)( pEntry->GetItem( nCol + 1 ) ); - if ( pItem && ( (SvLBoxItem*)pItem )->IsA() == SV_ITEM_ID_LBOXBUTTON ) + if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { sal_uInt16 nButtonFlags = pItem->GetButtonFlags(); eState = pCheckButtonData->ConvertToButtonState( nButtonFlags ); @@ -744,7 +744,7 @@ void SvHeaderTabListBox::RecalculateAccessibleChildren() sal_Bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, TriState& _rState ) { - sal_Bool bRet = sal_False; + bool bRet = false; SvTreeListEntry* pEntry = GetEntry( _nRow ); if ( pEntry ) { @@ -752,9 +752,9 @@ sal_Bool SvHeaderTabListBox::IsCellCheckBox( long _nRow, sal_uInt16 _nColumn, Tr if ( nItemCount > ( _nColumn + 1 ) ) { SvLBoxButton* pItem = (SvLBoxButton*)( pEntry->GetItem( _nColumn + 1 ) ); - if ( pItem && ( (SvLBoxItem*)pItem )->IsA() == SV_ITEM_ID_LBOXBUTTON ) + if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { - bRet = sal_True; + bRet = true; _rState = ( ( pItem->GetButtonFlags() & SV_ITEMSTATE_UNCHECKED ) == 0 ) ? STATE_CHECK : STATE_NOCHECK; } diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx index 5a2fea7..5cdff0c 100644 --- a/svtools/source/contnr/treelistbox.cxx +++ b/svtools/source/contnr/treelistbox.cxx @@ -1790,9 +1790,9 @@ String SvTreeListBox::SearchEntryText( SvTreeListEntry* pEntry ) const while( nCur < nCount ) { pItem = pEntry->GetItem( nCur ); - if ( pItem->IsA() == SV_ITEM_ID_LBOXSTRING && !static_cast<SvLBoxString*>( pItem )->GetText().isEmpty() ) + if (pItem->GetType() == SV_ITEM_ID_LBOXSTRING && !static_cast<const SvLBoxString*>(pItem)->GetText().isEmpty()) { - sRet = static_cast<SvLBoxString*>( pItem )->GetText(); + sRet = static_cast<const SvLBoxString*>(pItem)->GetText(); break; } nCur++; @@ -2757,7 +2757,7 @@ void SvTreeListBox::ImplEditEntry( SvTreeListEntry* pEntry ) for( sal_uInt16 i = 0 ; i < nCount ; i++ ) { SvLBoxItem* pTmpItem = pEntry->GetItem( i ); - if( pTmpItem->IsA() != SV_ITEM_ID_LBOXSTRING ) + if (pTmpItem->GetType() != SV_ITEM_ID_LBOXSTRING) continue; SvLBoxTab* pTab = GetTab( pEntry, pTmpItem ); @@ -3017,7 +3017,7 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT Wallpaper aWallpaper = GetBackground(); int bSelTab = nFlags & SV_LBOXTAB_SHOW_SELECTION; - sal_uInt16 nItemType = pItem->IsA(); + sal_uInt16 nItemType = pItem->GetType(); if ( pViewDataEntry->IsSelected() && bSelTab && !pViewDataEntry->IsCursored() ) { @@ -3097,9 +3097,9 @@ long SvTreeListBox::PaintEntry1(SvTreeListEntry* pEntry,long nLine,sal_uInt16 nT pItem->Paint( aEntryPos, *this, pViewDataEntry->GetFlags(), pEntry ); // division line between tabs - if( pNextTab && pItem->IsA() == SV_ITEM_ID_LBOXSTRING && + if (pNextTab && pItem->GetType() == SV_ITEM_ID_LBOXSTRING && // not at the right edge of the window! - aRect.Right() < nMaxRight ) + aRect.Right() < nMaxRight) { aRect.Left() = aRect.Right() - SV_TAB_BORDER; DrawRect( aRect ); diff --git a/svtools/source/contnr/treelistentry.cxx b/svtools/source/contnr/treelistentry.cxx index df6b5b7..b6a5977 100644 --- a/svtools/source/contnr/treelistentry.cxx +++ b/svtools/source/contnr/treelistentry.cxx @@ -189,7 +189,7 @@ SvLBoxItem* SvTreeListEntry::GetFirstItem( sal_uInt16 nId ) const while( nCur < nCount ) { pItem = GetItem( nCur ); - if( pItem->IsA() == nId ) + if (pItem->GetType() == nId) return pItem; nCur++; } diff --git a/svx/source/dialog/checklbx.cxx b/svx/source/dialog/checklbx.cxx index 92f4649..edbf96d 100644 --- a/svx/source/dialog/checklbx.cxx +++ b/svx/source/dialog/checklbx.cxx @@ -215,7 +215,7 @@ void SvxCheckListBox::MouseButtonDown( const MouseEvent& rMEvt ) sal_Bool bCheck = ( GetCheckButtonState( pEntry ) == SV_BUTTON_CHECKED ); SvLBoxItem* pItem = GetItem( pEntry, aPnt.X() ); - if ( pItem && pItem->IsA() == SV_ITEM_ID_LBOXBUTTON ) + if (pItem && pItem->GetType() == SV_ITEM_ID_LBOXBUTTON) { SvTreeListBox::MouseButtonDown( rMEvt ); Select( pEntry, sal_True ); diff --git a/svx/source/dialog/simptabl.cxx b/svx/source/dialog/simptabl.cxx index bee99c2..e99b1ff 100644 --- a/svx/source/dialog/simptabl.cxx +++ b/svx/source/dialog/simptabl.cxx @@ -451,8 +451,8 @@ StringCompare SvxSimpleTable::ColCompare(SvTreeListEntry* pLeft,SvTreeListEntry* if(pLeftItem != NULL && pRightItem != NULL) { - sal_uInt16 nLeftKind=pLeftItem->IsA(); - sal_uInt16 nRightKind=pRightItem->IsA(); + sal_uInt16 nLeftKind = pLeftItem->GetType(); + sal_uInt16 nRightKind = pRightItem->GetType(); if(nRightKind == SV_ITEM_ID_LBOXSTRING && nLeftKind == SV_ITEM_ID_LBOXSTRING ) diff --git a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx index 4158052..557b754 100644 --- a/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx +++ b/svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.cxx @@ -389,8 +389,8 @@ StringCompare DictionaryList::ColumnCompare( SvTreeListEntry* pLeft, SvTreeListE if(pLeftItem != NULL && pRightItem != NULL) { - sal_uInt16 nLeftKind=pLeftItem->IsA(); - sal_uInt16 nRightKind=pRightItem->IsA(); + sal_uInt16 nLeftKind = pLeftItem->GetType(); + sal_uInt16 nRightKind = pRightItem->GetType(); if(nRightKind == SV_ITEM_ID_LBOXSTRING && nLeftKind == SV_ITEM_ID_LBOXSTRING ) diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx index 383a805..aaffcb7 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -1813,7 +1813,7 @@ void SwIdxTreeListBox::RequestHelp( const HelpEvent& rHEvt ) { SvLBoxTab* pTab; SvLBoxItem* pItem = GetItem( pEntry, aPos.X(), &pTab ); - if( pItem && SV_ITEM_ID_LBOXSTRING == pItem->IsA()) + if (pItem && SV_ITEM_ID_LBOXSTRING == pItem->GetType()) { aPos = GetEntryPosition( pEntry ); diff --git a/sw/source/ui/utlui/content.cxx b/sw/source/ui/utlui/content.cxx index 78a749d..034393d 100644 --- a/sw/source/ui/utlui/content.cxx +++ b/sw/source/ui/utlui/content.cxx @@ -2540,7 +2540,7 @@ void SwContentTree::RequestHelp( const HelpEvent& rHEvt ) { SvLBoxTab* pTab; SvLBoxItem* pItem = GetItem( pEntry, aPos.X(), &pTab ); - if( pItem && SV_ITEM_ID_LBOXSTRING == pItem->IsA()) + if (pItem && SV_ITEM_ID_LBOXSTRING == pItem->GetType()) { aPos = GetEntryPosition( pEntry ); diff --git a/sw/source/ui/utlui/glbltree.cxx b/sw/source/ui/utlui/glbltree.cxx index 9985c42..7742a9a 100644 --- a/sw/source/ui/utlui/glbltree.cxx +++ b/sw/source/ui/utlui/glbltree.cxx @@ -475,7 +475,7 @@ void SwGlobalTree::RequestHelp( const HelpEvent& rHEvt ) bParent = sal_False; SvLBoxTab* pTab; SvLBoxItem* pItem = GetItem( pEntry, aPos.X(), &pTab ); - if(pItem && SV_ITEM_ID_LBOXSTRING == pItem->IsA()) + if (pItem && SV_ITEM_ID_LBOXSTRING == pItem->GetType()) { const SwSection* pSect = pCont->GetSection(); String sEntry = pSect->GetLinkFileName().GetToken(0, sfx2::cTokenSeperator); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits