diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-12-01 17:30:38 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2009-12-01 17:30:38 +0000 |
commit | b5d79ba0c2c3a07331406eb0f3bbb3d40986320f (patch) | |
tree | 316e92b8935ce9711ca450c054511b9a0bca764f /sw/source/ui/dbui/mmoutputpage.cxx | |
parent | eb1e977a36bfeebf17c57a167238c610c74be783 (diff) | |
parent | 5edc2d8ffaf658b05e4b044e44bd360697c3d08c (diff) |
chartshapes: merge with DEV300 m50
Diffstat (limited to 'sw/source/ui/dbui/mmoutputpage.cxx')
-rw-r--r-- | sw/source/ui/dbui/mmoutputpage.cxx | 40 |
1 files changed, 38 insertions, 2 deletions
diff --git a/sw/source/ui/dbui/mmoutputpage.cxx b/sw/source/ui/dbui/mmoutputpage.cxx index 4a5884a9daeb..64fd024fab57 100644 --- a/sw/source/ui/dbui/mmoutputpage.cxx +++ b/sw/source/ui/dbui/mmoutputpage.cxx @@ -55,6 +55,8 @@ #include <svx/langitem.hxx> #include <svtools/itemset.hxx> #include <svtools/stritem.hxx> +#include <svtools/ehdl.hxx> +#include <svtools/sfxecode.hxx> #include <vcl/msgbox.hxx> #include <sfx2/dinfdlg.hxx> #include <sfx2/printer.hxx> @@ -752,7 +754,24 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) pValues[0].Value <<= ::rtl::OUString(sFilter); uno::Reference< frame::XStorable > xStore( pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY); - xStore->storeToURL( sPath, aValues ); + sal_uInt32 nErrorCode = ERRCODE_NONE; + try + { + xStore->storeToURL( sPath, aValues ); + } + catch( task::ErrorCodeIOException& aErrorEx ) + { + nErrorCode = (sal_uInt32)aErrorEx.ErrCode; + } + catch( Exception& ) + { + nErrorCode = ERRCODE_IO_GENERAL; + } + if( nErrorCode != ERRCODE_NONE ) + { + SfxErrorContext aEc(ERRCTX_SFX_SAVEASDOC, pTargetView->GetDocShell()->GetTitle()); + ErrorHandler::HandleError( nErrorCode ); + } } else { @@ -787,7 +806,24 @@ IMPL_LINK(SwMailMergeOutputPage, SaveOutputHdl_Impl, PushButton*, pButton) pValues[0].Value <<= ::rtl::OUString(pSfxFlt->GetFilterName()); uno::Reference< frame::XStorable > xStore( pTargetView->GetDocShell()->GetModel(), uno::UNO_QUERY); - xStore->storeToURL( sTargetTempURL, aValues ); + sal_uInt32 nErrorCode = ERRCODE_NONE; + try + { + xStore->storeToURL( sTargetTempURL, aValues ); + } + catch( task::ErrorCodeIOException& aErrorEx ) + { + nErrorCode = (sal_uInt32)aErrorEx.ErrCode; + } + catch( Exception& ) + { + nErrorCode = ERRCODE_IO_GENERAL; + } + if( nErrorCode != ERRCODE_NONE ) + { + SfxErrorContext aEc(ERRCTX_SFX_SAVEASDOC, pTargetView->GetDocShell()->GetTitle()); + ErrorHandler::HandleError( nErrorCode ); + } SwView* pSourceView = rConfigItem.GetSourceView(); PrintMonitor aSaveMonitor(this, PrintMonitor::MONITOR_TYPE_SAVE); |