diff options
author | Vladimir Glazounov <vg@openoffice.org> | 2003-06-04 09:19:35 +0000 |
---|---|---|
committer | Vladimir Glazounov <vg@openoffice.org> | 2003-06-04 09:19:35 +0000 |
commit | b64cf3a0fe306dcdef6e47abde5b53a70ace0cdb (patch) | |
tree | 4de51902ffeae4ebdba0cd01a75f631035fb9ee0 /configmgr | |
parent | 54dbebf7e052ed59c81422fbf5b9e6414f50e7cc (diff) |
INTEGRATION: CWS reg006 (1.3.10); FILE MERGED
2003/05/23 11:43:08 jb 1.3.10.1: #109455# Wrap IllegalAccessException (which e.g. occurs when importing with overwrite=false to a non-empty layer. Note: Wrapping into MalformedDataException would be more appropriate, but the LocalDataImporter service expects WrappedTargetExceptions only.
Diffstat (limited to 'configmgr')
-rw-r--r-- | configmgr/source/backend/importmergehandler.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/configmgr/source/backend/importmergehandler.cxx b/configmgr/source/backend/importmergehandler.cxx index 78b85baf529e..03e2dcd83181 100644 --- a/configmgr/source/backend/importmergehandler.cxx +++ b/configmgr/source/backend/importmergehandler.cxx @@ -2,9 +2,9 @@ * * $RCSfile: importmergehandler.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: rt $ $Date: 2003-04-17 13:15:01 $ + * last change: $Author: vg $ $Date: 2003-06-04 10:19:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -216,7 +216,15 @@ void SAL_CALL ImportMergeHandler::endLayer( ) throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException) { if (isStarted()) + try + { getOutputHandler()->endUpdate(); + } + catch (lang::IllegalAccessException & iae) + { + OUString const sMsg(RTL_CONSTASCII_USTRINGPARAM("ImportHandler - no write access to layer: ")); + throw lang::WrappedTargetException(sMsg.concat(iae.Message),*this,uno::makeAny(iae)); + } BasicImportHandler::endLayer(); @@ -228,9 +236,15 @@ void SAL_CALL ImportMergeHandler::overrideNode( const OUString& aName, sal_Int16 throw (MalformedDataException, lang::WrappedTargetException, uno::RuntimeException) { if (!isStarted() && startComponent(aName)) + try { (m_xOutputHandler = createOutputHandler())->startUpdate( ); } + catch (lang::IllegalAccessException & iae) + { + OUString const sMsg(RTL_CONSTASCII_USTRINGPARAM("ImportHandler - no write access to layer: ")); + throw lang::WrappedTargetException(sMsg.concat(iae.Message),*this,uno::makeAny(iae)); + } OSL_ENSURE(!bClear,"'clear' operation not supported properly on import"); |