summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/dbase/DIndexIter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity/source/drivers/dbase/DIndexIter.cxx')
-rw-r--r--connectivity/source/drivers/dbase/DIndexIter.cxx19
1 files changed, 9 insertions, 10 deletions
diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx
index 3c0318b4c36f..3f072f8172d1 100644
--- a/connectivity/source/drivers/dbase/DIndexIter.cxx
+++ b/connectivity/source/drivers/dbase/DIndexIter.cxx
@@ -30,7 +30,6 @@ using namespace connectivity::file;
OIndexIterator::~OIndexIterator()
{
- m_pIndex->release();
}
@@ -51,7 +50,7 @@ sal_uInt32 OIndexIterator::Find(bool bFirst)
if (bFirst)
{
- m_aRoot = m_pIndex->getRoot();
+ m_aRoot = m_xIndex->getRoot();
m_aCurLeaf.Clear();
}
@@ -62,7 +61,7 @@ sal_uInt32 OIndexIterator::Find(bool bFirst)
{
ONDXPage* pPage = m_aRoot;
while (pPage && !pPage->IsLeaf())
- pPage = pPage->GetChild(m_pIndex);
+ pPage = pPage->GetChild(m_xIndex.get());
m_aCurLeaf = pPage;
m_nCurNode = NODE_NOTFOUND;
@@ -108,8 +107,8 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey)
if (!pPage->IsLeaf())
{
// descend further
- ONDXPagePtr aPage = (i==0) ? pPage->GetChild(m_pIndex)
- : ((*pPage)[i-1]).GetChild(m_pIndex, pPage);
+ ONDXPagePtr aPage = (i==0) ? pPage->GetChild(m_xIndex.get())
+ : ((*pPage)[i-1]).GetChild(m_xIndex.get(), pPage);
pFoundKey = aPage.Is() ? GetFirstKey(aPage, rKey) : nullptr;
}
else if (i == pPage->Count())
@@ -144,7 +143,7 @@ sal_uInt32 OIndexIterator::GetCompare(bool bFirst)
case SQLFilterOperator::LESS:
case SQLFilterOperator::LESS_EQUAL:
while (pPage && !pPage->IsLeaf())
- pPage = pPage->GetChild(m_pIndex);
+ pPage = pPage->GetChild(m_xIndex.get());
m_aCurLeaf = pPage;
m_nCurNode = NODE_NOTFOUND;
@@ -206,7 +205,7 @@ sal_uInt32 OIndexIterator::GetLike(bool bFirst)
ONDXPage* pPage = m_aRoot;
while (pPage && !pPage->IsLeaf())
- pPage = pPage->GetChild(m_pIndex);
+ pPage = pPage->GetChild(m_xIndex.get());
m_aCurLeaf = pPage;
m_nCurNode = NODE_NOTFOUND;
@@ -225,7 +224,7 @@ sal_uInt32 OIndexIterator::GetNull(bool bFirst)
{
ONDXPage* pPage = m_aRoot;
while (pPage && !pPage->IsLeaf())
- pPage = pPage->GetChild(m_pIndex);
+ pPage = pPage->GetChild(m_xIndex.get());
m_aCurLeaf = pPage;
m_nCurNode = NODE_NOTFOUND;
@@ -274,7 +273,7 @@ ONDXKey* OIndexIterator::GetNextKey()
sal_uInt16 nPos = pParentPage->Search(pPage);
if (nPos != pParentPage->Count() - 1)
{ // page found
- pPage = (*pParentPage)[nPos+1].GetChild(m_pIndex,pParentPage);
+ pPage = (*pParentPage)[nPos+1].GetChild(m_xIndex.get(),pParentPage);
break;
}
}
@@ -283,7 +282,7 @@ ONDXKey* OIndexIterator::GetNextKey()
// now go on with leaf
while (pPage && !pPage->IsLeaf())
- pPage = pPage->GetChild(m_pIndex);
+ pPage = pPage->GetChild(m_xIndex.get());
m_aCurLeaf = pPage;
m_nCurNode = 0;