summaryrefslogtreecommitdiff
path: root/sw/source/core/doc
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2017-09-16 17:01:08 +0200
committerAndras Timar <andras.timar@collabora.com>2017-09-18 22:37:13 +0200
commite63edbb765169da8d4aca09adfff904891cebe98 (patch)
treec8068d705ed9d7f3e8a8e08e9419840da11a7f6a /sw/source/core/doc
parent60d15ebbc75c224d016316c7a1a6acf93804d359 (diff)
tdf#108572 remove connection also if not saved
Change-Id: Iddce37c3ad187f4a5572cb3cc2362535134c28e8 Reviewed-on: https://gerrit.libreoffice.org/42357 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 29bd193146b40cf90bda5db04b136987f3c7c94d) Reviewed-on: https://gerrit.libreoffice.org/42369 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'sw/source/core/doc')
-rw-r--r--sw/source/core/doc/docnew.cxx7
1 files changed, 7 insertions, 0 deletions
diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
index f665c032ccf1..d20203002e16 100644
--- a/sw/source/core/doc/docnew.cxx
+++ b/sw/source/core/doc/docnew.cxx
@@ -531,6 +531,13 @@ SwDoc::~SwDoc()
mpDBManager->releaseRevokeListener();
SwDBManager::RevokeDataSource(maDBData.sDataSource);
}
+ else if (!mpDBManager->getEmbeddedName().isEmpty())
+ {
+ // Remove the revoke listener here first, so that we don't remove the data source from the document.
+ mpDBManager->releaseRevokeListener();
+ // Remove connections which was committed but not used.
+ mpDBManager->RevokeNotUsedConnections();
+ }
DELETEZ( mpDBManager );
#endif