summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-07-02 17:23:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-07-03 08:16:19 +0200
commit904c97bbdf4c76709dbcacb11292668b98a9efd8 (patch)
tree42855fdaf74aca15c6674836a8f603d22aa87744
parentbb1d5780226bb1b9156580972eea9aa849178742 (diff)
move SvTreeList::*Sibling to SvTreeListEntry
since they don't depend on SvTreeList at all Change-Id: If48c83976a95943e5cfa92490d68f74281cf4b5f Reviewed-on: https://gerrit.libreoffice.org/56819 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--accessibility/source/extended/accessiblelistbox.cxx2
-rw-r--r--basctl/source/basicide/bastype2.cxx4
-rw-r--r--cui/source/customize/cfg.cxx4
-rw-r--r--cui/source/customize/cfgutil.cxx8
-rw-r--r--cui/source/customize/eventdlg.cxx2
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx2
-rw-r--r--cui/source/dialogs/scriptdlg.cxx6
-rw-r--r--cui/source/options/optaboutconfig.cxx2
-rw-r--r--dbaccess/source/ui/app/AppDetailPageHelper.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx14
-rw-r--r--dbaccess/source/ui/control/marktree.cxx11
-rw-r--r--dbaccess/source/ui/control/tabletree.cxx2
-rw-r--r--dbaccess/source/ui/dlg/tablespage.cxx4
-rw-r--r--include/svtools/treelist.hxx3
-rw-r--r--include/svtools/treelistbox.hxx2
-rw-r--r--include/svtools/treelistentry.hxx4
-rw-r--r--reportdesign/source/ui/dlg/Navigator.cxx2
-rw-r--r--sc/source/ui/cctrl/checklistmenu.cxx8
-rw-r--r--sc/source/ui/miscdlgs/conflictsdlg.cxx4
-rw-r--r--sc/source/ui/navipi/content.cxx6
-rw-r--r--sc/source/ui/xmlsource/xmlsourcedlg.cxx4
-rw-r--r--sd/source/ui/animations/CustomAnimationList.cxx2
-rw-r--r--sd/source/ui/dlg/sdtreelb.cxx2
-rw-r--r--sfx2/source/appl/newhelp.cxx2
-rw-r--r--sfx2/source/dialog/templdlg.cxx2
-rw-r--r--svtools/source/contnr/foldertree.cxx2
-rw-r--r--svtools/source/contnr/svimpbox.cxx12
-rw-r--r--svtools/source/contnr/treelist.cxx38
-rw-r--r--svtools/source/contnr/treelistbox.cxx14
-rw-r--r--svtools/source/contnr/treelistentry.cxx25
-rw-r--r--svtools/source/uno/treecontrolpeer.cxx4
-rw-r--r--svx/source/form/navigatortree.cxx2
-rw-r--r--sw/source/uibase/utlui/content.cxx2
33 files changed, 90 insertions, 113 deletions
diff --git a/accessibility/source/extended/accessiblelistbox.cxx b/accessibility/source/extended/accessiblelistbox.cxx
index bd5c81129a1c..0f194f0d404a 100644
--- a/accessibility/source/extended/accessiblelistbox.cxx
+++ b/accessibility/source/extended/accessiblelistbox.cxx
@@ -265,7 +265,7 @@ namespace accessibility
while (pEntryChild)
{
RemoveChildEntries(pEntryChild);
- pEntryChild = SvTreeListBox::NextSibling(pEntryChild);
+ pEntryChild = pEntryChild->NextSibling();
}
}
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 5d3071bd7e5f..5997980df2ea 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -506,7 +506,7 @@ SvTreeListEntry* TreeListBox::ImpFindEntry( SvTreeListEntry* pParent, const OUSt
if ( rText == GetEntryText( pEntry ) )
return pEntry;
- pEntry = pParent ? NextSibling( pEntry ) : GetEntry( ++nRootPos );
+ pEntry = pParent ? pEntry->NextSibling() : GetEntry( ++nRootPos );
}
return nullptr;
}
@@ -625,7 +625,7 @@ SvTreeListEntry* TreeListBox::FindEntry( SvTreeListEntry* pParent, const OUStrin
if ( ( pBasicEntry->GetType() == eType ) && ( rText == GetEntryText( pEntry ) ) )
return pEntry;
- pEntry = pParent ? NextSibling( pEntry ) : GetEntry( ++nRootPos );
+ pEntry = pParent ? pEntry->NextSibling() : GetEntry( ++nRootPos );
}
return nullptr;
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 63d19ebdd808..44784ae283f5 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -1823,12 +1823,12 @@ void SvxConfigPage::MoveEntry( bool bMoveUp )
{
// Move Up is just a Move Down with the source and target reversed
pTargetEntry = pSourceEntry;
- pSourceEntry = SvTreeListBox::PrevSibling( pTargetEntry );
+ pSourceEntry = pTargetEntry->PrevSibling();
pToSelect = pTargetEntry;
}
else
{
- pTargetEntry = SvTreeListBox::NextSibling( pSourceEntry );
+ pTargetEntry = pSourceEntry->NextSibling();
pToSelect = pSourceEntry;
}
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 5dc7153f1c94..1907bae13dee 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -1116,13 +1116,13 @@ void SfxConfigGroupListBox::SelectMacro( const OUString& rBasic,
pMethod = pFunctionListBox->Next( pMethod );
}
}
- pMod = NextSibling( pMod );
+ pMod = pMod->NextSibling();
}
}
- pLib = NextSibling( pLib );
+ pLib = pLib->NextSibling();
}
}
- pEntry = NextSibling( pEntry );
+ pEntry = pEntry->NextSibling();
}
}
@@ -1261,7 +1261,7 @@ IMPL_LINK( SvxScriptSelectorDialog, ClickHdl, Button *, pButton, void )
{
// Select the next entry in the list if possible
SvTreeListEntry* current = m_pCommands->FirstSelected();
- SvTreeListEntry* next = SvTreeListBox::NextSibling( current );
+ SvTreeListEntry* next = current->NextSibling();
if ( next != nullptr )
{
diff --git a/cui/source/customize/eventdlg.cxx b/cui/source/customize/eventdlg.cxx
index f3892aadbb0c..5c1f1c31ac0c 100644
--- a/cui/source/customize/eventdlg.cxx
+++ b/cui/source/customize/eventdlg.cxx
@@ -111,7 +111,7 @@ void SvxEventConfigPage::dispose()
OUString const * pEventName = static_cast<OUString const *>(pE->GetUserData());
delete pEventName;
pE->SetUserData(nullptr);
- pE = SvTreeListBox::NextSibling( pE );
+ pE = pE->NextSibling();
}
m_pSaveInListBox.clear();
SvxMacroTabPage_::dispose();
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index d05d4fb5efe0..f629f349271e 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -219,7 +219,7 @@ namespace
}
break;
}
- pEntry = SvTreeListBox::NextSibling(pEntry);
+ pEntry = pEntry->NextSibling();
}
}
}
diff --git a/cui/source/dialogs/scriptdlg.cxx b/cui/source/dialogs/scriptdlg.cxx
index 91fa1b76a815..12ff8b2236ef 100644
--- a/cui/source/dialogs/scriptdlg.cxx
+++ b/cui/source/dialogs/scriptdlg.cxx
@@ -125,7 +125,7 @@ void SFTreeListBox::deleteTree( SvTreeListEntry* pEntry )
pEntry = FirstChild( pEntry );
while ( pEntry )
{
- SvTreeListEntry* pNextEntry = NextSibling( pEntry );
+ SvTreeListEntry* pNextEntry = pEntry->NextSibling();
deleteTree( pEntry );
GetModel()->Remove( pEntry );
pEntry = pNextEntry;
@@ -141,7 +141,7 @@ void SFTreeListBox::deleteAllTree()
{
while ( pEntry )
{
- SvTreeListEntry* pNextEntry = NextSibling( pEntry ) ;
+ SvTreeListEntry* pNextEntry = pEntry->NextSibling();
deleteTree( pEntry );
GetModel()->Remove( pEntry );
pEntry = pNextEntry;
@@ -1154,7 +1154,7 @@ void SvxScriptOrgDialog::RestorePreviousSelection()
pEntry = pTmpEntry;
break;
}
- pTmpEntry = SvTreeListBox::NextSibling( pTmpEntry );
+ pTmpEntry = pTmpEntry->NextSibling();
}
if ( !pTmpEntry )
break;
diff --git a/cui/source/options/optaboutconfig.cxx b/cui/source/options/optaboutconfig.cxx
index 32f7a010447e..cb4cd323a4fc 100644
--- a/cui/source/options/optaboutconfig.cxx
+++ b/cui/source/options/optaboutconfig.cxx
@@ -875,7 +875,7 @@ void CuiAboutConfigTabPage::InsertEntry( SvTreeListEntry *pEntry)
OUString sParentName = sPath.copy(prevIndex+1, index - prevIndex - 1);
bool hasEntry = false;
- for(pParentEntry = m_pPrefBox->FirstChild(pGrandParentEntry); pParentEntry != nullptr; pParentEntry = SvTreeListBox::NextSibling(pParentEntry))
+ for(pParentEntry = m_pPrefBox->FirstChild(pGrandParentEntry); pParentEntry != nullptr; pParentEntry = pParentEntry->NextSibling())
if(static_cast< SvLBoxString& >(pParentEntry->GetItem(1)).GetText() == sParentName)
{
hasEntry = true;
diff --git a/dbaccess/source/ui/app/AppDetailPageHelper.cxx b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
index 3c02548df87f..7216fc949575 100644
--- a/dbaccess/source/ui/app/AppDetailPageHelper.cxx
+++ b/dbaccess/source/ui/app/AppDetailPageHelper.cxx
@@ -116,7 +116,7 @@ namespace
}
}
else
- pEntry = SvTreeListBox::NextSibling(pEntry);
+ pEntry = pEntry->NextSibling();
}
return pReturn;
}
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index ade472fe704a..44fcb8688a07 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -1369,7 +1369,7 @@ void SAL_CALL SbaTableQueryBrowser::disposing( const css::lang::EventObject& _rS
break;
}
- pDSLoop = SvTreeList::NextSibling(pDSLoop);
+ pDSLoop = pDSLoop->NextSibling();
}
}
else
@@ -2697,7 +2697,7 @@ SvTreeListEntry* SbaTableQueryBrowser::getEntryFromContainer(const Reference<XNa
if ( pTablesData && pTablesData->xContainer == _rxNameAccess )
break;
- pDSLoop = SvTreeList::NextSibling(pDSLoop);
+ pDSLoop = pDSLoop->NextSibling();
pContainer = nullptr;
}
return pContainer;
@@ -2789,7 +2789,7 @@ void SAL_CALL SbaTableQueryBrowser::elementRemoved( const ContainerEvent& _rEven
m_pTreeModel->Remove(pChild);
break;
}
- pChild = SvTreeList::NextSibling(pChild);
+ pChild = pChild->NextSibling();
}
}
@@ -2854,7 +2854,7 @@ void SAL_CALL SbaTableQueryBrowser::elementReplaced( const ContainerEvent& _rEve
}
break;
}
- pChild = SvTreeList::NextSibling(pChild);
+ pChild = pChild->NextSibling();
}
}
@@ -2921,7 +2921,7 @@ void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry, bool _bDi
unloadAndCleanup(_bDisposeConnection);
// collapse the query/table container
- for (SvTreeListEntry* pContainers = m_pTreeModel->FirstChild(_pDSEntry); pContainers; pContainers = SvTreeList::NextSibling(pContainers))
+ for (SvTreeListEntry* pContainers = m_pTreeModel->FirstChild(_pDSEntry); pContainers; pContainers = pContainers->NextSibling())
{
SvTreeListEntry* pElements = m_pTreeModel->FirstChild(pContainers);
if ( pElements )
@@ -2931,7 +2931,7 @@ void SbaTableQueryBrowser::closeConnection(SvTreeListEntry* _pDSEntry, bool _bDi
for (; pElements; )
{
SvTreeListEntry* pRemove = pElements;
- pElements = SvTreeList::NextSibling(pElements);
+ pElements = pElements->NextSibling();
DBTreeListUserData* pData = static_cast<DBTreeListUserData*>(pRemove->GetUserData());
pRemove->SetUserData(nullptr);
delete pData;
@@ -3700,7 +3700,7 @@ void SbaTableQueryBrowser::impl_cleanupDataSourceEntry( const OUString& _rDataSo
if ( m_pTreeView->getListBox().GetEntryText( pDataSourceEntry ) == _rDataSourceName )
break;
- pDataSourceEntry = SvTreeList::NextSibling( pDataSourceEntry );
+ pDataSourceEntry = pDataSourceEntry->NextSibling();
}
OSL_ENSURE( pDataSourceEntry, "SbaTableQueryBrowser::impl_cleanupDataSourceEntry: do not know this data source!" );
diff --git a/dbaccess/source/ui/control/marktree.cxx b/dbaccess/source/ui/control/marktree.cxx
index 1893985aa6fa..073ce1586d2e 100644
--- a/dbaccess/source/ui/control/marktree.cxx
+++ b/dbaccess/source/ui/control/marktree.cxx
@@ -18,6 +18,7 @@
*/
#include <marktree.hxx>
+#include <svtools/treelistentry.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
@@ -114,7 +115,7 @@ SvButtonState OMarkableTreeListBox::implDetermineState(SvTreeListEntry* _pEntry)
++nCheckedChildren;
++nChildrenOverall;
- pChildLoop = SvTreeList::NextSibling(pChildLoop);
+ pChildLoop = pChildLoop->NextSibling();
}
if (pChildLoop)
@@ -128,7 +129,7 @@ SvButtonState OMarkableTreeListBox::implDetermineState(SvTreeListEntry* _pEntry)
while (pChildLoop)
{
implDetermineState(pChildLoop);
- pChildLoop = SvTreeList::NextSibling(pChildLoop);
+ pChildLoop = pChildLoop->NextSibling();
}
}
else
@@ -157,7 +158,7 @@ void OMarkableTreeListBox::CheckButtons()
while (pEntry)
{
implDetermineState(pEntry);
- pEntry = SvTreeList::NextSibling(pEntry);
+ pEntry = pEntry->NextSibling();
}
}
@@ -173,7 +174,7 @@ void OMarkableTreeListBox::checkedButton_noBroadcast(SvTreeListEntry* _pEntry)
if (GetModel()->HasChildren(_pEntry)) // if it has children, check those too
{
SvTreeListEntry* pChildEntry = GetModel()->Next(_pEntry);
- SvTreeListEntry* pSiblingEntry = SvTreeList::NextSibling(_pEntry);
+ SvTreeListEntry* pSiblingEntry = _pEntry->NextSibling();
while(pChildEntry && pChildEntry != pSiblingEntry)
{
SetCheckButtonState(pChildEntry, eState);
@@ -188,7 +189,7 @@ void OMarkableTreeListBox::checkedButton_noBroadcast(SvTreeListEntry* _pEntry)
if(GetModel()->HasChildren(pEntry)) // if it has children, check those too
{
SvTreeListEntry* pChildEntry = GetModel()->Next(pEntry);
- SvTreeListEntry* pSiblingEntry = SvTreeList::NextSibling(pEntry);
+ SvTreeListEntry* pSiblingEntry = pEntry->NextSibling();
while(pChildEntry && pChildEntry != pSiblingEntry)
{
SetCheckButtonState(pChildEntry,eState);
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx
index a285b7f9675a..f9c21a7c8f45 100644
--- a/dbaccess/source/ui/control/tabletree.cxx
+++ b/dbaccess/source/ui/control/tabletree.cxx
@@ -368,7 +368,7 @@ void OTableTreeListBox::implEmphasize(SvTreeListEntry* _pEntry, bool _bChecked,
{
if (GetModel()->HasChildren(pChildLoop))
implEmphasize(pChildLoop, false, true, false);
- pChildLoop = NextSibling(pChildLoop);
+ pChildLoop = pChildLoop->NextSibling();
}
}
diff --git a/dbaccess/source/ui/dlg/tablespage.cxx b/dbaccess/source/ui/dlg/tablespage.cxx
index 2f4b76e46db6..431db3828481 100644
--- a/dbaccess/source/ui/dlg/tablespage.cxx
+++ b/dbaccess/source/ui/dlg/tablespage.cxx
@@ -357,7 +357,7 @@ namespace dbaui
{
m_pTablesList->Expand(pExpand);
pExpand = m_pTablesList->FirstChild(pExpand);
- if (pExpand && SvTreeList::NextSibling(pExpand))
+ if (pExpand && pExpand->NextSibling())
pExpand = nullptr;
}
@@ -526,7 +526,7 @@ namespace dbaui
SvTreeListEntry* pReturn = nullptr;
if (_pEntry)
{
- pReturn = SvTreeList::NextSibling(_pEntry);
+ pReturn = _pEntry->NextSibling();
if (!pReturn)
pReturn = implNextSibling(m_pTablesList->GetParent(_pEntry));
}
diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx
index 7027db593da2..c246a5610ad8 100644
--- a/include/svtools/treelist.hxx
+++ b/include/svtools/treelist.hxx
@@ -159,9 +159,6 @@ public:
SvTreeListEntry* Last() const;
SvTreeListEntry* FirstChild( SvTreeListEntry* pParent ) const;
- static SvTreeListEntry* NextSibling( SvTreeListEntry* pEntry );
- static SvTreeListEntry* PrevSibling( SvTreeListEntry* pEntry );
- static SvTreeListEntry* LastSibling( SvTreeListEntry* pEntry );
sal_uLong Insert( SvTreeListEntry* pEntry,SvTreeListEntry* pPar,sal_uLong nPos = TREELIST_APPEND);
sal_uLong Insert( SvTreeListEntry* pEntry,sal_uLong nRootPos = TREELIST_APPEND )
diff --git a/include/svtools/treelistbox.hxx b/include/svtools/treelistbox.hxx
index 83c7b83f0490..b29908debe4a 100644
--- a/include/svtools/treelistbox.hxx
+++ b/include/svtools/treelistbox.hxx
@@ -365,8 +365,6 @@ public:
}
SvTreeListEntry* FirstChild( SvTreeListEntry* pParent ) const;
- static SvTreeListEntry* NextSibling( SvTreeListEntry* pEntry );
- static SvTreeListEntry* PrevSibling( SvTreeListEntry* pEntry );
bool CopySelection( SvTreeListBox* pSource, SvTreeListEntry* pTarget );
bool MoveSelectionCopyFallbackPossible( SvTreeListBox* pSource, SvTreeListEntry* pTarget, bool bAllowCopyFallback );
diff --git a/include/svtools/treelistentry.hxx b/include/svtools/treelistentry.hxx
index 899e3f8bbc96..303ebb55d643 100644
--- a/include/svtools/treelistentry.hxx
+++ b/include/svtools/treelistentry.hxx
@@ -112,6 +112,10 @@ public:
void SetBackColor( const Color& aColor ) { maBackColor = aColor; }
const Color& GetBackColor() const { return maBackColor; }
SvTreeListEntry* GetParent() const { return pParent; }
+
+ SvTreeListEntry* NextSibling() const;
+ SvTreeListEntry* PrevSibling() const;
+ SvTreeListEntry* LastSibling() const;
};
#endif
diff --git a/reportdesign/source/ui/dlg/Navigator.cxx b/reportdesign/source/ui/dlg/Navigator.cxx
index 79ceeb9da8c3..f960e8236b1b 100644
--- a/reportdesign/source/ui/dlg/Navigator.cxx
+++ b/reportdesign/source/ui/dlg/Navigator.cxx
@@ -759,7 +759,7 @@ void NavigatorTree::removeEntry(SvTreeListEntry* _pEntry,bool _bRemove)
while( pChild )
{
removeEntry(pChild,false);
- pChild = NextSibling(pChild);
+ pChild = pChild->NextSibling();
}
delete static_cast<UserData*>(_pEntry->GetUserData());
if ( _bRemove )
diff --git a/sc/source/ui/cctrl/checklistmenu.cxx b/sc/source/ui/cctrl/checklistmenu.cxx
index 15fdb0df0777..9f0cacfc0176 100644
--- a/sc/source/ui/cctrl/checklistmenu.cxx
+++ b/sc/source/ui/cctrl/checklistmenu.cxx
@@ -1625,7 +1625,7 @@ SvTreeListEntry* ScCheckListBox::FindEntry( SvTreeListEntry* pParent, const OUSt
if ( sNode == GetEntryText( pEntry ) )
return pEntry;
- pEntry = pParent ? NextSibling( pEntry ) : GetEntry( ++nRootPos );
+ pEntry = pParent ? pEntry->NextSibling() : GetEntry( ++nRootPos );
}
return nullptr;
}
@@ -1711,7 +1711,7 @@ void ScCheckListBox::CheckAllChildren( SvTreeListEntry* pParent, bool bCheck )
while ( pEntry )
{
CheckAllChildren( pEntry, bCheck );
- pEntry = NextSibling( pEntry );
+ pEntry = pEntry->NextSibling();
}
}
@@ -1739,7 +1739,7 @@ void ScCheckListBox::CheckEntry( SvTreeListEntry* pParent, bool bCheck )
bChildChecked = true;
break;
}
- pChild = NextSibling( pChild );
+ pChild = pChild->NextSibling();
}
SetCheckButtonState( pAncestor, bChildChecked ? SvButtonState::Checked : SvButtonState::Unchecked );
pAncestor = GetParent(pAncestor);
@@ -1807,7 +1807,7 @@ void ScCheckListBox::CountCheckedEntries( SvTreeListEntry* pParent, sal_uLong& n
while ( pEntry )
{
CountCheckedEntries( pEntry, nCount );
- pEntry = NextSibling( pEntry );
+ pEntry = pEntry->NextSibling();
}
}
diff --git a/sc/source/ui/miscdlgs/conflictsdlg.cxx b/sc/source/ui/miscdlgs/conflictsdlg.cxx
index 6520573b2eac..0664058641bb 100644
--- a/sc/source/ui/miscdlgs/conflictsdlg.cxx
+++ b/sc/source/ui/miscdlgs/conflictsdlg.cxx
@@ -525,7 +525,7 @@ void ScConflictsDlg::HandleListBoxSelection( bool bSelectHandle )
{
m_pLbConflicts->Select( pEntry );
}
- pEntry = SvTreeListBox::NextSibling( pEntry );
+ pEntry = pEntry->NextSibling();
}
}
}
@@ -633,7 +633,7 @@ void ScConflictsDlg::KeepAllHandler( bool bMine )
while ( pRootEntry )
{
SetConflictAction( pRootEntry, eConflictAction );
- pRootEntry = SvTreeListBox::NextSibling( pRootEntry );
+ pRootEntry = pRootEntry->NextSibling();
}
m_pLbConflicts->SetUpdateMode( false );
m_pLbConflicts->Clear();
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index f5308dfacba3..f3f9b3a74064 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -333,7 +333,7 @@ void ScContentTree::GetEntryIndexes( ScContentId& rnRootIndex, sal_uLong& rnChil
rnChildIndex = nEntry;
bFound = true; // exit the while loop
}
- pIterEntry = NextSibling( pIterEntry );
+ pIterEntry = pIterEntry->NextSibling();
++nEntry;
}
@@ -1138,7 +1138,7 @@ bool ScContentTree::NoteStringsChanged()
if (lcl_NoteString(*pNote) != GetEntryText(pEntry))
return true;
- pEntry = NextSibling(pEntry);
+ pEntry = pEntry->NextSibling();
}
return pEntry != nullptr;
@@ -1184,7 +1184,7 @@ bool ScContentTree::DrawNamesChanged( ScContentId nType )
if ( ScDrawLayer::GetVisibleName( pObject ) != GetEntryText(pEntry) )
bEqual = false;
- pEntry = NextSibling( pEntry );
+ pEntry = pEntry->NextSibling();
}
}
pObject = aIter.Next();
diff --git a/sc/source/ui/xmlsource/xmlsourcedlg.cxx b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
index 7350ad76f7c6..fc5b3f067241 100644
--- a/sc/source/ui/xmlsource/xmlsourcedlg.cxx
+++ b/sc/source/ui/xmlsource/xmlsourcedlg.cxx
@@ -337,7 +337,7 @@ void ScXMLSourceDlg::DefaultElementSelected(SvTreeListEntry& rEntry)
{
// Only an element with no child elements (leaf element) can be linked.
bool bHasChild = false;
- for (SvTreeListEntry* pChild = mpLbTree->FirstChild(&rEntry); pChild; pChild = SvTreeListBox::NextSibling(pChild))
+ for (SvTreeListEntry* pChild = mpLbTree->FirstChild(&rEntry); pChild; pChild = pChild->NextSibling())
{
ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*pChild);
OSL_ASSERT(pUserData);
@@ -482,7 +482,7 @@ bool ScXMLSourceDlg::IsParentDirty(SvTreeListEntry* pEntry) const
bool ScXMLSourceDlg::IsChildrenDirty(SvTreeListEntry* pEntry) const
{
- for (SvTreeListEntry* pChild = mpLbTree->FirstChild(pEntry); pChild; pChild = SvTreeListBox::NextSibling(pChild))
+ for (SvTreeListEntry* pChild = mpLbTree->FirstChild(pEntry); pChild; pChild = pChild->NextSibling())
{
ScOrcusXMLTreeParam::EntryData* pUserData = ScOrcusXMLTreeParam::getUserData(*pChild);
OSL_ASSERT(pUserData);
diff --git a/sd/source/ui/animations/CustomAnimationList.cxx b/sd/source/ui/animations/CustomAnimationList.cxx
index 11d54bbe04f7..d759a36a6737 100644
--- a/sd/source/ui/animations/CustomAnimationList.cxx
+++ b/sd/source/ui/animations/CustomAnimationList.cxx
@@ -862,7 +862,7 @@ EffectSequence CustomAnimationList::getSelection() const
aSelection.push_back( pChildEffect );
}
- pChild = dynamic_cast< CustomAnimationListEntry* >( NextSibling( pChild ) );
+ pChild = dynamic_cast< CustomAnimationListEntry* >( pChild->NextSibling() );
}
}
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index 1dce1f187321..99f8d334081d 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -316,7 +316,7 @@ void SdPageObjsTLB::SaveExpandedTreeItemState(SvTreeListEntry* pEntry, std::vect
SvTreeListEntry* pChildEntry = FirstChild(pListEntry);
SaveExpandedTreeItemState(pChildEntry, vectTreeItem);
}
- pListEntry = NextSibling(pListEntry);
+ pListEntry = pListEntry->NextSibling();
}
}
}
diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx
index 2d3c73a8d493..c7bd7f9300ea 100644
--- a/sfx2/source/appl/newhelp.cxx
+++ b/sfx2/source/appl/newhelp.cxx
@@ -336,7 +336,7 @@ void ContentListBox_Impl::ClearChildren( SvTreeListEntry* pParent )
{
ClearChildren( pEntry );
delete static_cast<ContentEntry_Impl*>(pEntry->GetUserData());
- pEntry = NextSibling( pEntry );
+ pEntry = pEntry->NextSibling();
}
}
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 02e92bca8069..118389f77427 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -449,7 +449,7 @@ TriState StyleTreeListBox_Impl::NotifyMoving(SvTreeListEntry* pTarget,
for(SvTreeListEntry *pTmpEntry=FirstChild(pTarget);
pTmpEntry && pCollator->compareString(
GetEntryText(pTmpEntry),GetEntryText(pEntry)) < 0;
- pTmpEntry=NextSibling(pTmpEntry),lPos++) ;
+ pTmpEntry=pTmpEntry->NextSibling(),lPos++) ;
return bRet ? TRISTATE_INDET : TRISTATE_FALSE;
}
diff --git a/svtools/source/contnr/foldertree.cxx b/svtools/source/contnr/foldertree.cxx
index 0384b0a47693..438b764ac949 100644
--- a/svtools/source/contnr/foldertree.cxx
+++ b/svtools/source/contnr/foldertree.cxx
@@ -146,7 +146,7 @@ void FolderTree::SetTreePath( OUString const & sUrl )
}
else
{
- pEntry = NextSibling( pEntry );
+ pEntry = pEntry->NextSibling();
}
}
else
diff --git a/svtools/source/contnr/svimpbox.cxx b/svtools/source/contnr/svimpbox.cxx
index 24e735a11a0e..6f7d0f23720a 100644
--- a/svtools/source/contnr/svimpbox.cxx
+++ b/svtools/source/contnr/svimpbox.cxx
@@ -1076,7 +1076,7 @@ void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext)
pChild = pView->FirstChild( pEntry );
DBG_ASSERT(pChild,"Child?");
- pChild = SvTreeList::LastSibling( pChild );
+ pChild = pChild->LastSibling();
nDistance = static_cast<sal_uInt16>(pView->GetVisiblePos(pChild) - pView->GetVisiblePos(pEntry));
aPos2 = aPos1;
aPos2.AdjustY(nDistance * nEntryHeight );
@@ -1116,7 +1116,7 @@ void SvImpLBox::DrawNet(vcl::RenderContext& rRenderContext)
aPos1.AdjustX( -(pView->GetIndent()) );
aPos1.setY( GetEntryLine( pEntry ) );
aPos1.AdjustY(nEntryHeightDIV2 );
- pChild = SvTreeList::LastSibling( pEntry );
+ pChild = pEntry->LastSibling();
aPos2.setX( aPos1.X() );
aPos2.setY( GetEntryLine( pChild ) );
aPos2.AdjustY(nEntryHeightDIV2 );
@@ -1650,7 +1650,7 @@ void SvImpLBox::RemovingEntry( SvTreeListEntry* pEntry )
pView->Select( pCursor, false );
ShowCursor( false ); // focus rectangle gone
// NextSibling, because we also delete the children of the cursor
- pTemp = SvTreeListBox::NextSibling( pCursor );
+ pTemp = pCursor->NextSibling();
if( !pTemp )
pTemp = pView->PrevVisible(pCursor);
@@ -1658,7 +1658,7 @@ void SvImpLBox::RemovingEntry( SvTreeListEntry* pEntry )
}
if( pStartEntry && pStartEntry == pEntry )
{
- pTemp = SvTreeListBox::NextSibling( pStartEntry );
+ pTemp = pStartEntry->NextSibling();
if( !pTemp )
pTemp = pView->PrevVisible(pStartEntry);
pStartEntry = pTemp;
@@ -1749,9 +1749,9 @@ void SvImpLBox::MovingEntry( SvTreeListEntry* pEntry )
}
else
{
- pNew = SvTreeList::NextSibling( pEntry );
+ pNew = pEntry->NextSibling();
if( !pNew )
- pNew = SvTreeList::PrevSibling( pEntry );
+ pNew = pEntry->PrevSibling();
}
pStartEntry = pNew;
}
diff --git a/svtools/source/contnr/treelist.cxx b/svtools/source/contnr/treelist.cxx
index 2b1f3eff5a3e..e4d66eec25e0 100644
--- a/svtools/source/contnr/treelist.cxx
+++ b/svtools/source/contnr/treelist.cxx
@@ -805,44 +805,6 @@ SvTreeListEntry* SvTreeList::FirstChild( SvTreeListEntry* pParent ) const
return pResult;
}
-SvTreeListEntry* SvTreeList::NextSibling( SvTreeListEntry* pEntry )
-{
- DBG_ASSERT(pEntry,"Entry?");
- if( !pEntry )
- return nullptr;
-
- SvTreeListEntries& rList = pEntry->pParent->m_Children;
- sal_uLong nPos = pEntry->GetChildListPos();
- nPos++;
- return (nPos < rList.size()) ? rList[nPos].get() : nullptr;
-}
-
-SvTreeListEntry* SvTreeList::PrevSibling( SvTreeListEntry* pEntry )
-{
- DBG_ASSERT(pEntry,"Entry?");
- if( !pEntry )
- return nullptr;
-
- SvTreeListEntries& rList = pEntry->pParent->m_Children;
- sal_uLong nPos = pEntry->GetChildListPos();
- if ( nPos == 0 )
- return nullptr;
- nPos--;
- pEntry = rList[nPos].get();
- return pEntry;
-}
-
-
-SvTreeListEntry* SvTreeList::LastSibling( SvTreeListEntry* pEntry )
-{
- DBG_ASSERT(pEntry,"LastSibling:Entry?");
- if( !pEntry )
- return nullptr;
-
- SvTreeListEntries& rChildren = pEntry->pParent->m_Children;
- return (rChildren.empty()) ? nullptr : rChildren.back().get();
-}
-
SvTreeListEntry* SvTreeList::NextSelected( const SvListView* pView, SvTreeListEntry* pEntry ) const
{
DBG_ASSERT(pView&&pEntry,"NextSel:View/Entry?");
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index c236e432e227..8338033e2263 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -530,16 +530,6 @@ SvTreeListEntry* SvTreeListBox::FirstChild( SvTreeListEntry* pParent ) const
return pModel->FirstChild(pParent);
}
-SvTreeListEntry* SvTreeListBox::NextSibling( SvTreeListEntry* pEntry )
-{
- return SvTreeList::NextSibling(pEntry);
-}
-
-SvTreeListEntry* SvTreeListBox::PrevSibling( SvTreeListEntry* pEntry )
-{
- return SvTreeList::PrevSibling(pEntry);
-}
-
// return: all entries copied
bool SvTreeListBox::CopySelection( SvTreeListBox* pSource, SvTreeListEntry* pTarget )
{
@@ -967,7 +957,7 @@ const void* SvTreeListBox::NextSearchEntry( const void* _pCurrentSearchEntry, OU
&& !IsExpanded( pEntry )
)
{
- pEntry = NextSibling( pEntry );
+ pEntry = pEntry->NextSibling();
}
else
{
@@ -3179,7 +3169,7 @@ void SvTreeListBox::SetAlternatingRowColors( bool bEnable )
if( IsExpanded( pEntry ) )
pNextEntry = pModel->FirstChild( pEntry );
else
- pNextEntry = SvTreeList::NextSibling( pEntry );
+ pNextEntry = pEntry->NextSibling();
if( !pNextEntry )
pEntry = pModel->Next( pEntry );
diff --git a/svtools/source/contnr/treelistentry.cxx b/svtools/source/contnr/treelistentry.cxx
index bbf8a49a11c9..708aaae1d116 100644
--- a/svtools/source/contnr/treelistentry.cxx
+++ b/svtools/source/contnr/treelistentry.cxx
@@ -213,4 +213,29 @@ void SvTreeListEntry::SetFlags( SvTLEntryFlags nFlags )
nEntryFlags = nFlags;
}
+SvTreeListEntry* SvTreeListEntry::NextSibling() const
+{
+ SvTreeListEntries& rList = pParent->m_Children;
+ sal_uLong nPos = GetChildListPos();
+ nPos++;
+ return (nPos < rList.size()) ? rList[nPos].get() : nullptr;
+}
+
+SvTreeListEntry* SvTreeListEntry::PrevSibling() const
+{
+ SvTreeListEntries& rList = pParent->m_Children;
+ sal_uLong nPos = GetChildListPos();
+ if ( nPos == 0 )
+ return nullptr;
+ nPos--;
+ return rList[nPos].get();
+}
+
+
+SvTreeListEntry* SvTreeListEntry::LastSibling() const
+{
+ SvTreeListEntries& rChildren = pParent->m_Children;
+ return (rChildren.empty()) ? nullptr : rChildren.back().get();
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index b481ebfb7025..37434a04eaad 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -1055,13 +1055,13 @@ void TreeControlPeer::updateChildNodes( UnoTreeListBoxImpl const & rTree, const
updateEntry( pCurrentChild );
}
- pCurrentChild = dynamic_cast< UnoTreeListEntry* >( SvTreeListBox::NextSibling( pCurrentChild ) );
+ pCurrentChild = dynamic_cast< UnoTreeListEntry* >( pCurrentChild->NextSibling() );
}
// check if we have entries without nodes left, we need to remove them
while( pCurrentChild )
{
- UnoTreeListEntry* pNextChild = dynamic_cast< UnoTreeListEntry* >( SvTreeListBox::NextSibling( pCurrentChild ) );
+ UnoTreeListEntry* pNextChild = dynamic_cast< UnoTreeListEntry* >( pCurrentChild->NextSibling() );
rTree.GetModel()->Remove( pCurrentChild );
pCurrentChild = pNextChild;
}
diff --git a/svx/source/form/navigatortree.cxx b/svx/source/form/navigatortree.cxx
index 8f8101410bf5..cd44e5f8c502 100644
--- a/svx/source/form/navigatortree.cxx
+++ b/svx/source/form/navigatortree.cxx
@@ -212,7 +212,7 @@ namespace svxform
if (m_pRootEntry)
{
SvTreeListEntry* pFirst = FirstChild(m_pRootEntry);
- if (pFirst && !NextSibling(pFirst))
+ if (pFirst && !pFirst->NextSibling())
Expand(pFirst);
}
}
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx
index 645469eb143f..c92b39bca0b4 100644
--- a/sw/source/uibase/utlui/content.cxx
+++ b/sw/source/uibase/utlui/content.cxx
@@ -1165,7 +1165,7 @@ sal_Int8 SwContentTree::ExecuteDrop( const ExecuteDropEvent& rEvt )
while( pChildEntry )
{
pEntry = pChildEntry;
- pChildEntry = NextSibling( pChildEntry );
+ pChildEntry = pChildEntry->NextSibling();
}
}
pTargetEntry = pEntry;