connectivity/source/drivers/dbase/dindexnode.cxx | 13 +++++++++++++ connectivity/source/inc/dbase/dindexnode.hxx | 2 ++ 2 files changed, 15 insertions(+)
New commits: commit faa6455995966e41653204779d055b885b27fc4c Author: Noel Grandin <n...@peralex.com> Date: Fri Oct 10 12:02:32 2014 +0200 add copy constructor for ONDXPagePtr class which I forgot in commit a0a919d2b541c415ad9b81d2ee91895bf106e9bb "remove SvRefBase::QueryDelete" Change-Id: Ib52b9cb58451abd62f75d7376b069bf6aef550b2 diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx index fe20627..f1fb068 100644 --- a/connectivity/source/drivers/dbase/dindexnode.cxx +++ b/connectivity/source/drivers/dbase/dindexnode.cxx @@ -835,6 +835,19 @@ ONDXPagePtr::ONDXPagePtr(ONDXPage* pRefPage) nPagePos = pRefPage->GetPagePos(); } +ONDXPagePtr& ONDXPagePtr::operator=(ONDXPagePtr const & rOther) +{ + if (rOther.mpPage != 0) { + rOther.mpPage->AddNextRef(); + } + ONDXPage * pOldObj = mpPage; + mpPage = rOther.mpPage; + if (pOldObj != 0) { + pOldObj->ReleaseRef(); + } + return *this; +} + static sal_uInt32 nValue; SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage) diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx index 791df02..b321635 100644 --- a/connectivity/source/inc/dbase/dindexnode.hxx +++ b/connectivity/source/inc/dbase/dindexnode.hxx @@ -94,6 +94,7 @@ namespace connectivity ONDXPage* mpPage; sal_uInt32 nPagePos; // Position in the index file + public: ONDXPagePtr(sal_uInt32 nPos = 0) : mpPage(0), nPagePos(nPos) {} ONDXPagePtr(const ONDXPagePtr& rRef); @@ -107,6 +108,7 @@ namespace connectivity ONDXPage * operator ->() const { assert(mpPage != 0); return mpPage; } bool Is() const { return mpPage != 0; } inline void Clear(); + ONDXPagePtr& operator=(const ONDXPagePtr& rRef); }; // Index Page _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits