summaryrefslogtreecommitdiff
path: root/sw/source/uibase
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2016-09-05 15:37:36 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2016-09-23 23:25:50 +0200
commitc540ae79e0916479bc92b2659ff834adcad34041 (patch)
tree991f0eff7e6082f464820cb1c40bde17f577e003 /sw/source/uibase
parent3c4dfb872d50413b605fb846dfdebd28947026e8 (diff)
MM don't crash on canceled SHELL documents
We show canceled documents, as long as there wasn't an error. Change-Id: I821f89bc9355df5b2223876ad52fee2a717e670a
Diffstat (limited to 'sw/source/uibase')
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 86e2d7e171ca..a9a6da81aaf8 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1589,14 +1589,15 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
lcl_PreparePrinterOptions( rMergeDescriptor.aPrintOptions, true, aOptions );
pTargetView->ExecPrint( aOptions, bIsMergeSilent, false/*bPrintAsync*/ );
}
-
- if( IsMergeOk() && bMT_SHELL )
- // leave docshell available for caller (e.g. MM wizard)
- rMergeDescriptor.pMailMergeConfigItem->SetTargetView( pTargetView );
- else
- xTargetDocShell->DoClose();
}
+ // we also show canceled documents, as long as there was no error
+ if( !IsMergeError() && bMT_SHELL )
+ // leave docshell available for caller (e.g. MM wizard)
+ rMergeDescriptor.pMailMergeConfigItem->SetTargetView( pTargetView );
+ else if( xTargetDocShell )
+ xTargetDocShell->DoClose();
+
rescheduleGui();
pProgressDlg.disposeAndClear();