diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-24 11:02:42 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2016-05-24 11:02:42 +0200 |
commit | 95d20a3799998b9816bd2e8aebdbc96c61cead3e (patch) | |
tree | 8206ecc848631432cb8b027d5e780483734f808a /connectivity/source/drivers/mork | |
parent | 3caf31b05d7bbf3d50a1bbda6c8b95982cb5c2b5 (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/mork')
-rw-r--r-- | connectivity/source/drivers/mork/MConnection.cxx | 7 | ||||
-rw-r--r-- | connectivity/source/drivers/mork/MConnection.hxx | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/connectivity/source/drivers/mork/MConnection.cxx b/connectivity/source/drivers/mork/MConnection.cxx index 84722b594564..633f84e3011f 100644 --- a/connectivity/source/drivers/mork/MConnection.cxx +++ b/connectivity/source/drivers/mork/MConnection.cxx @@ -40,9 +40,10 @@ static const int defaultScope = 0x80; OConnection::OConnection(MorkDriver* _pDriver) :OSubComponent<OConnection, OConnection_BASE>(static_cast<cppu::OWeakObject*>(_pDriver), this) - ,m_xDriver(_pDriver) + ,m_pDriver(_pDriver) ,m_aColumnAlias( _pDriver->getFactory() ) { + m_pDriver->acquire(); m_pBook = new MorkParser(); m_pHistory = new MorkParser(); } @@ -51,6 +52,8 @@ OConnection::~OConnection() { if(!isClosed()) close(); + m_pDriver->release(); + m_pDriver = nullptr; delete m_pBook; delete m_pHistory; } @@ -109,7 +112,7 @@ void OConnection::construct(const OUString& url,const Sequence< PropertyValue >& // production? if (unittestIndex == -1) { - OUString path = m_xDriver->getProfilePath(); + OUString path = m_pDriver->getProfilePath(); SAL_INFO("connectivity.mork", "ProfilePath: " << path); abook = path + "/abook.mab"; history = path + "/history.mab"; diff --git a/connectivity/source/drivers/mork/MConnection.hxx b/connectivity/source/drivers/mork/MConnection.hxx index e573d057aafd..3654b6926085 100644 --- a/connectivity/source/drivers/mork/MConnection.hxx +++ b/connectivity/source/drivers/mork/MConnection.hxx @@ -37,7 +37,7 @@ namespace connectivity // Data attributes - css::uno::Reference<MorkDriver> m_xDriver; // Pointer to the owning + MorkDriver* m_pDriver; // Pointer to the owning // driver object OColumnAlias m_aColumnAlias; // Mork Parser (abook) @@ -52,7 +52,7 @@ namespace connectivity explicit OConnection(MorkDriver* const driver); virtual ~OConnection(); - const css::uno::Reference<MorkDriver>& getDriver() {return m_xDriver;}; + MorkDriver* getDriver() {return m_pDriver;}; MorkParser* getMorkParser(const OString& t) {return t == "CollectedAddressBook" ? m_pHistory : m_pBook;}; // OComponentHelper |