diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-02-01 18:09:59 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-02-01 18:09:59 +0000 |
commit | 15cae24d6c4d24fc810c51bd0c82c4973e0cbc01 (patch) | |
tree | 204c43cdffacbfeab77861b674044d84c0a4bbf1 /sot/source | |
parent | be089e5c15f4db767441d815ce9da8b96c0678b4 (diff) |
INTEGRATION: CWS mav19 (1.4.18); FILE MERGED
2006/01/13 13:27:50 mav 1.4.18.1: #130174# wrap exception
Diffstat (limited to 'sot/source')
-rw-r--r-- | sot/source/unoolestorage/xolesimplestorage.cxx | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx index 0a04435a3ecd..92670ba1c061 100644 --- a/sot/source/unoolestorage/xolesimplestorage.cxx +++ b/sot/source/unoolestorage/xolesimplestorage.cxx @@ -4,9 +4,9 @@ * * $RCSfile: xolesimplestorage.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: obo $ $Date: 2006-01-20 09:57:54 $ + * last change: $Author: kz $ $Date: 2006-02-01 19:09:59 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -54,6 +54,8 @@ #include <unotools/ucbstreamhelper.hxx> +#include <cppuhelper/exc_hlp.hxx> + #include <storinfo.hxx> #include "xolesimplestorage.hxx" @@ -377,7 +379,19 @@ void SAL_CALL OLESimpleStorage::replaceByName( const ::rtl::OUString& aName, con throw lang::DisposedException(); removeByName( aName ); - insertByName( aName, aElement ); + + try + { + insertByName( aName, aElement ); + } + catch( container::ElementExistException& ) + { + uno::Any aCaught( ::cppu::getCaughtException() ); + + throw lang::WrappedTargetException( ::rtl::OUString::createFromAscii( "Can't copy raw stream" ), + uno::Reference< uno::XInterface >(), + aCaught ); + } } // -------------------------------------------------------------------------------- |