summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2014-07-29 14:26:40 +0200
committerBjörn Michaelsen <bjoern.michaelsen@canonical.com>2014-09-24 15:59:55 +0000
commit2916dfdb2361e68a6bbbcb0b0e9e114e052cb6d5 (patch)
tree192a023c4f0f0cf109024339754cc50efd23e622 /sw
parent86d05eea4578c58be8e4b7b8f3a365238bf22e02 (diff)
MM: detect save error based on the return value
There is actually GetError() and GetErrorCode(). While the error code can also be a warning, which isn't reported by GetError(), this detects the error based on the DoSaveAs return value (actually I got warnings in case of save failures in my MM unit tests). Change-Id: I3db749c798ad80336ee7ada9eaa71177e8ffb248 Reviewed-on: https://gerrit.libreoffice.org/11456 Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com> Tested-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index cf6683dfc46b..d89ffaf1bc71 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -815,8 +815,7 @@ static void lcl_SaveDoc( SfxObjectShell *xTargetDocShell,
SfxMedium* pDstMed = new SfxMedium(
aTempFileURL.GetMainURL( INetURLObject::NO_DECODE ),
STREAM_STD_READWRITE );
- xTargetDocShell->DoSaveAs( *pDstMed );
- if( xTargetDocShell->GetError() )
+ if( !xTargetDocShell->DoSaveAs( *pDstMed ) )
SAL_WARN( "sw.mailmerge", "Error saving: " << aTempFile->GetURL() );
else
SAL_INFO( "sw.mailmerge", "Saved doc as: " << aTempFile->GetURL() );