summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2014-07-29 14:26:40 +0200
committerJan-Marek Glogowski <glogow@fbihome.de>2014-09-30 09:49:00 +0200
commited4dccedea55582daf4d21e93eeee9169b717023 (patch)
tree420cb153712fe145adc7c0241c495533306e6032
parent2c5177113dc1ec700ae8c4f4768f296bea017c49 (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> (cherry picked from commit 2916dfdb2361e68a6bbbcb0b0e9e114e052cb6d5) Conflicts: sw/source/uibase/dbui/dbmgr.cxx
-rw-r--r--sw/source/ui/dbui/dbmgr.cxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/sw/source/ui/dbui/dbmgr.cxx b/sw/source/ui/dbui/dbmgr.cxx
index 6760574be49b..9d4c05a784e7 100644
--- a/sw/source/ui/dbui/dbmgr.cxx
+++ b/sw/source/ui/dbui/dbmgr.cxx
@@ -850,8 +850,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() );