diff options
author | Mikhail Voitenko <mav@openoffice.org> | 2002-10-25 08:04:33 +0000 |
---|---|---|
committer | Mikhail Voitenko <mav@openoffice.org> | 2002-10-25 08:04:33 +0000 |
commit | 568ff4d682a383a4a2b7a3a73fef220290d3b9f7 (patch) | |
tree | 4508a5bcfe214a75e1cb16c2ac439b272d723782 /uui/source | |
parent | 72e4012d831d0c675e4da88954f5e4db9f374e1b (diff) |
#102386# handle NameClashException
Diffstat (limited to 'uui/source')
-rw-r--r-- | uui/source/iahndl.cxx | 27 | ||||
-rw-r--r-- | uui/source/ids.hrc | 5 |
2 files changed, 28 insertions, 4 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index be2be1143081..de564c08c986 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -2,9 +2,9 @@ * * $RCSfile: iahndl.cxx,v $ * - * $Revision: 1.33 $ + * $Revision: 1.34 $ * - * last change: $Author: mav $ $Date: 2002-09-25 10:45:00 $ + * last change: $Author: mav $ $Date: 2002-10-25 09:04:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -160,6 +160,9 @@ #ifndef _COM_SUN_STAR_UCB_INTERACTIVEAPPEXCEPTION_HPP_ #include "com/sun/star/ucb/InteractiveAppException.hpp" #endif +#ifndef _COM_SUN_STAR_UCB_NAMECLASHEXCEPTION_HPP_ +#include "com/sun/star/ucb/NameClashException.hpp" +#endif #ifndef _COM_SUN_STAR_UCB_XINTERACTIONCOOKIEHANDLING_HPP_ #include "com/sun/star/ucb/XInteractionCookieHandling.hpp" #endif @@ -575,6 +578,26 @@ UUIInteractionHandler::handle( return; } + star::ucb::NameClashException aNCException; + if (aAnyRequest >>= aNCException) + { + ErrCode nErrorCode = ERRCODE_UUI_IO_TARGETALREADYEXISTS; + std::vector< rtl::OUString > aArguments; + + if( aNCException.Name.getLength() ) + { + nErrorCode = ERRCODE_UUI_IO_ALREADYEXISTS; + aArguments.push_back( aNCException.Name ); + } + + handleErrorRequest( aNCException.Classification, + nErrorCode, + aArguments, + rRequest->getContinuations()); + + return; + } + star::ucb::InteractiveIOException aIoException; if (aAnyRequest >>= aIoException) { diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc index 3b3ff5455207..ed50fdce02e5 100644 --- a/uui/source/ids.hrc +++ b/uui/source/ids.hrc @@ -2,9 +2,9 @@ * * $RCSfile: ids.hrc,v $ * - * $Revision: 1.14 $ + * $Revision: 1.15 $ * - * last change: $Author: as $ $Date: 2001-11-08 12:07:41 $ + * last change: $Author: mav $ $Date: 2002-10-25 09:04:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -137,6 +137,7 @@ #define ERRCODE_UUI_IO_NOTREADY_VOLUME_REMOVABLE (ERRCODE_AREA_UUI + 46) #define ERRCODE_UUI_WRONGMEDIUM (ERRCODE_AREA_UUI + 47) #define ERRCODE_UUI_IO_CANTCREATE_NONAME (ERRCODE_AREA_UUI + 48) +#define ERRCODE_UUI_IO_TARGETALREADYEXISTS (ERRCODE_AREA_UUI + 49) #define HID_DLG_LOGIN (HID_UUI_START + 0) #define HID_DLG_COOKIES (HID_UUI_START + 1) |