summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/dbase
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-24 11:02:42 +0200
committerNoel Grandin <noel@peralex.com>2016-05-24 11:02:42 +0200
commit95d20a3799998b9816bd2e8aebdbc96c61cead3e (patch)
tree8206ecc848631432cb8b027d5e780483734f808a /connectivity/source/drivers/dbase
parent3caf31b05d7bbf3d50a1bbda6c8b95982cb5c2b5 (diff)
Revert "remove some manual ref-counting"
until I have a better understanding of the UNO reference counting. This reverts commit 111de438ea3e512a541281dc0716cc728ea8d152.
Diffstat (limited to 'connectivity/source/drivers/dbase')
-rw-r--r--connectivity/source/drivers/dbase/DIndexIter.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/connectivity/source/drivers/dbase/DIndexIter.cxx b/connectivity/source/drivers/dbase/DIndexIter.cxx
index 3f072f8172d1..3c0318b4c36f 100644
--- a/connectivity/source/drivers/dbase/DIndexIter.cxx
+++ b/connectivity/source/drivers/dbase/DIndexIter.cxx
@@ -30,6 +30,7 @@ using namespace connectivity::file;
OIndexIterator::~OIndexIterator()
{
+ m_pIndex->release();
}
@@ -50,7 +51,7 @@ sal_uInt32 OIndexIterator::Find(bool bFirst)
if (bFirst)
{
- m_aRoot = m_xIndex->getRoot();
+ m_aRoot = m_pIndex->getRoot();
m_aCurLeaf.Clear();
}
@@ -61,7 +62,7 @@ sal_uInt32 OIndexIterator::Find(bool bFirst)
{
ONDXPage* pPage = m_aRoot;
while (pPage && !pPage->IsLeaf())
- pPage = pPage->GetChild(m_xIndex.get());
+ pPage = pPage->GetChild(m_pIndex);
m_aCurLeaf = pPage;
m_nCurNode = NODE_NOTFOUND;
@@ -107,8 +108,8 @@ ONDXKey* OIndexIterator::GetFirstKey(ONDXPage* pPage, const OOperand& rKey)
if (!pPage->IsLeaf())
{
// descend further
- ONDXPagePtr aPage = (i==0) ? pPage->GetChild(m_xIndex.get())
- : ((*pPage)[i-1]).GetChild(m_xIndex.get(), pPage);
+ ONDXPagePtr aPage = (i==0) ? pPage->GetChild(m_pIndex)
+ : ((*pPage)[i-1]).GetChild(m_pIndex, pPage);
pFoundKey = aPage.Is() ? GetFirstKey(aPage, rKey) : nullptr;
}
else if (i == pPage->Count())
@@ -143,7 +144,7 @@ sal_uInt32 OIndexIterator::GetCompare(bool bFirst)
case SQLFilterOperator::LESS:
case SQLFilterOperator::LESS_EQUAL:
while (pPage && !pPage->IsLeaf())
- pPage = pPage->GetChild(m_xIndex.get());
+ pPage = pPage->GetChild(m_pIndex);
m_aCurLeaf = pPage;
m_nCurNode = NODE_NOTFOUND;
@@ -205,7 +206,7 @@ sal_uInt32 OIndexIterator::GetLike(bool bFirst)
ONDXPage* pPage = m_aRoot;
while (pPage && !pPage->IsLeaf())
- pPage = pPage->GetChild(m_xIndex.get());
+ pPage = pPage->GetChild(m_pIndex);
m_aCurLeaf = pPage;
m_nCurNode = NODE_NOTFOUND;
@@ -224,7 +225,7 @@ sal_uInt32 OIndexIterator::GetNull(bool bFirst)
{
ONDXPage* pPage = m_aRoot;
while (pPage && !pPage->IsLeaf())
- pPage = pPage->GetChild(m_xIndex.get());
+ pPage = pPage->GetChild(m_pIndex);
m_aCurLeaf = pPage;
m_nCurNode = NODE_NOTFOUND;
@@ -273,7 +274,7 @@ ONDXKey* OIndexIterator::GetNextKey()
sal_uInt16 nPos = pParentPage->Search(pPage);
if (nPos != pParentPage->Count() - 1)
{ // page found
- pPage = (*pParentPage)[nPos+1].GetChild(m_xIndex.get(),pParentPage);
+ pPage = (*pParentPage)[nPos+1].GetChild(m_pIndex,pParentPage);
break;
}
}
@@ -282,7 +283,7 @@ ONDXKey* OIndexIterator::GetNextKey()
// now go on with leaf
while (pPage && !pPage->IsLeaf())
- pPage = pPage->GetChild(m_xIndex.get());
+ pPage = pPage->GetChild(m_pIndex);
m_aCurLeaf = pPage;
m_nCurNode = 0;