[Libreoffice-commits] core.git: Branch 'distro/cib/libreoffice-6-1' - dbaccess/source

Xisco Fauli (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 5 12:14:20 UTC 2019


 dbaccess/source/core/api/TableDeco.cxx |    2 +-
 dbaccess/source/core/inc/TableDeco.hxx |    7 ++++---
 2 files changed, 5 insertions(+), 4 deletions(-)

New commits:
commit 9dcfca99d53eff4f10de648bf9f8d30ddab7a0b7
Author:     Xisco Fauli <xiscofauli at libreoffice.org>
AuthorDate: Wed May 29 11:19:57 2019 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Wed Jun 5 14:13:38 2019 +0200

    tdf#114596 dbaccess: fix mysterious dataloss bug (part 2)
    
    Same problem as in 96ae2a3300811897c24cccb20f8c2faf382483df
    
    Regression from 497e40ad03c27837978551ba15491c3fb2a0bf53
    
    Change-Id: I00e7bf3559e688e7fbc5429ace2b5c18221c9890
    Reviewed-on: https://gerrit.libreoffice.org/73146
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    Tested-by: Jenkins
    (cherry picked from commit 58f121ef2e680697e10453add43bab9b771d153a)
    Reviewed-on: https://gerrit.libreoffice.org/73153
    (cherry picked from commit ebae54a6fde07a08e0b666b56dbd654691e5c416)
    Reviewed-on: https://gerrit.libreoffice.org/73543
    Tested-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/dbaccess/source/core/api/TableDeco.cxx b/dbaccess/source/core/api/TableDeco.cxx
index a57883ba2ba2..c80f6974be9e 100644
--- a/dbaccess/source/core/api/TableDeco.cxx
+++ b/dbaccess/source/core/api/TableDeco.cxx
@@ -553,7 +553,7 @@ void ODBTableDecorator::refreshColumns()
         OContainerMediator* pMediator = new OContainerMediator( pCol, m_xColumnDefinitions );
         m_xColumnMediator = pMediator;
         pCol->setMediator( pMediator );
-        m_pColumns = pCol;
+        m_pColumns.reset(pCol);
     }
     else
         m_pColumns->reFill(aVector);
diff --git a/dbaccess/source/core/inc/TableDeco.hxx b/dbaccess/source/core/inc/TableDeco.hxx
index 5a964e79401d..52d6fb05e0bb 100644
--- a/dbaccess/source/core/inc/TableDeco.hxx
+++ b/dbaccess/source/core/inc/TableDeco.hxx
@@ -71,10 +71,11 @@ namespace dbaccess
         css::uno::Reference< css::sdbc::XDatabaseMetaData >       m_xMetaData;
         css::uno::Reference< css::util::XNumberFormatsSupplier >  m_xNumberFormats;
 
-    // <properties>
+        // <properties>
         mutable sal_Int32                                         m_nPrivileges;
-    // </properties>
-        rtl::Reference<::connectivity::sdbcx::OCollection>       m_pColumns;
+        // </properties>
+        // note: this thing uses the ref-count of "this", see OCollection::acquire()!
+        std::unique_ptr<::connectivity::sdbcx::OCollection>       m_pColumns;
 
         // IColumnFactory
         virtual OColumn*    createColumn(const OUString& _rName) const override;


More information about the Libreoffice-commits mailing list