Blob Blame History Raw
From 3f408f8d848c191654cd3f2ead95975b3a3cc933 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Szymon=20K=C5=82os?= <szymon.klos@collabora.com>
Date: Thu, 31 Jan 2019 11:32:27 +0100
Subject: [PATCH] tdf#122198 don't remove db after close
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Change-Id: Ib652174148e6997c1aabe0251a62612f28243d6e
Reviewed-on: https://gerrit.libreoffice.org/67200
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Tested-by: Szymon Kłos <szymon.klos@collabora.com>
(cherry picked from commit a4ac1a93b540ae22dd317d88b5c3da8a7678db24)
Reviewed-on: https://gerrit.libreoffice.org/72277
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Jenkins
---
 sw/source/core/doc/doc.cxx | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 5ed49270e5df..d5c49b0515b6 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -488,6 +488,8 @@ void SwDoc::ChgDBData(const SwDBData& rNewData)
     {
         maDBData = rNewData;
         getIDocumentState().SetModified();
+        if (m_pDBManager)
+            m_pDBManager->CommitLastRegistrations();
     }
     getIDocumentFieldsAccess().GetSysFieldType(SwFieldIds::DatabaseName)->UpdateFields();
 }
-- 
2.21.0