diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2017-09-25 19:04:05 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2017-09-27 10:26:07 +0200 |
commit | 79a425900e31bda83cde1bee150c1234931cb8bd (patch) | |
tree | 660f6c3c783311458d2a7939d839490d5bd22b04 | |
parent | 98a912d1f1217f4b7e83ed7162a2ece6372191f0 (diff) |
tdf#112634 Don't remove embedded database before close
Change-Id: Iaa60160d40b0f7b5dceba319bc3813d124c34cc1
Reviewed-on: https://gerrit.libreoffice.org/42762
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r-- | sw/source/core/doc/docnew.cxx | 1 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index 86e5085692c8..8fa20bd5df18 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -524,6 +524,7 @@ SwDoc::~SwDoc() // Remove the revoke listener here first, so that we don't remove the data source from the document. mpDBManager->releaseRevokeListener(); SwDBManager::RevokeDataSource(maDBData.sDataSource); + SwDBManager::RevokeDataSource(mpDBManager->getEmbeddedName()); } else if (!mpDBManager->getEmbeddedName().isEmpty()) { diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 1c3d6a56679f..483ffd686a0e 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -3221,7 +3221,7 @@ void SwDBManager::CommitLastRegistrations() { for (auto aIt = m_aUncommitedRegistrations.begin(); aIt != m_aUncommitedRegistrations.end();) { - if (aIt->first == m_pDoc->GetDocShell()) + if (aIt->first == m_pDoc->GetDocShell() || aIt->first == nullptr) { m_aNotUsedConnections.push_back(aIt->second); aIt = m_aUncommitedRegistrations.erase(aIt); |