sw/source/uibase/dbui/dbmgr.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
New commits: commit 2916dfdb2361e68a6bbbcb0b0e9e114e052cb6d5 Author: Jan-Marek Glogowski <glo...@fbihome.de> Date: Tue Jul 29 14:26:40 2014 +0200 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.michael...@canonical.com> Tested-by: Björn Michaelsen <bjoern.michael...@canonical.com> diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index cf6683d..d89ffaf 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() );
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits