From cba9bce6936c31aa836763a4dd147ac3db2013bc Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Tue, 5 Sep 2017 17:24:05 +0200 Subject: tdf#108572 revoke connection if mail-merge is cancelled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Idca4969af8043f7dbc54f4a63b99e92155ef1585 Reviewed-on: https://gerrit.libreoffice.org/41949 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit ba368643e6a0c5ac7a7b7ea8d72899d60b2a8331) Reviewed-on: https://gerrit.libreoffice.org/42044 Reviewed-by: Andras Timar Tested-by: Andras Timar --- sw/source/uibase/app/apphdl.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sw/source/uibase/app') diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx index 5abd1de7c9fa..0b029e6e5a04 100644 --- a/sw/source/uibase/app/apphdl.cxx +++ b/sw/source/uibase/app/apphdl.cxx @@ -489,6 +489,8 @@ void SwMailMergeWizardExecutor::ExecutionFinished() if (xMMConfig) xMMConfig->Commit(); + SwDBManager::CommitLastRegistrations(); + // release/destroy asynchronously Application::PostUserEvent( LINK( this, SwMailMergeWizardExecutor, DestroyDialogHdl ) ); } @@ -661,6 +663,12 @@ IMPL_LINK_NOARG(SwMailMergeWizardExecutor, CancelHdl, void*, void) xMMConfig->Commit(); } + // Revoke created connections + SwDoc* pDoc = m_pView->GetDocShell()->GetDoc(); + SwDBManager* pDbManager = pDoc->GetDBManager(); + if (pDbManager) + pDbManager->RevokeLastRegistrations(); + m_pWizard.disposeAndClear(); release(); } -- cgit