diff options
author | Kai Sommerfeld <kso@openoffice.org> | 2009-11-12 15:22:00 +0100 |
---|---|---|
committer | Kai Sommerfeld <kso@openoffice.org> | 2009-11-12 15:22:00 +0100 |
commit | 99bdd887a6141883878978bad9beb35e7b326cd1 (patch) | |
tree | d2f30266fdf4fa78a6b1ed49498a8f318019f889 /uui | |
parent | 19a645e9cd708856500063e741741bbe0da566b0 (diff) |
#i106830# WebDAV locking support for UCB
Diffstat (limited to 'uui')
-rw-r--r-- | uui/source/iahndl.cxx | 55 | ||||
-rw-r--r-- | uui/source/ids.hrc | 4 | ||||
-rw-r--r-- | uui/source/ids.src | 22 |
3 files changed, 81 insertions, 0 deletions
diff --git a/uui/source/iahndl.cxx b/uui/source/iahndl.cxx index 996fd24e531d..29f380b2a7a0 100644 --- a/uui/source/iahndl.cxx +++ b/uui/source/iahndl.cxx @@ -86,6 +86,9 @@ #include "com/sun/star/ucb/InteractiveAppException.hpp" #include "com/sun/star/ucb/InteractiveAugmentedIOException.hpp" #include "com/sun/star/ucb/InteractiveCHAOSException.hpp" +#include "com/sun/star/ucb/InteractiveLockingLockedException.hpp" +#include "com/sun/star/ucb/InteractiveLockingNotLockedException.hpp" +#include "com/sun/star/ucb/InteractiveLockingLockExpiredException.hpp" #include "com/sun/star/ucb/InteractiveNetworkConnectException.hpp" #include "com/sun/star/ucb/InteractiveNetworkException.hpp" #include "com/sun/star/ucb/InteractiveNetworkGeneralException.hpp" @@ -1105,6 +1108,58 @@ bool UUIInteractionHelper::handleMessageboxRequests( return true; } + star::ucb::InteractiveLockingLockedException aLLException; + if (aAnyRequest >>= aLLException) + { + ErrCode nErrorCode = aLLException.SelfOwned + ? ERRCODE_UUI_LOCKING_LOCKED_SELF : ERRCODE_UUI_LOCKING_LOCKED; + std::vector< rtl::OUString > aArguments; + aArguments.push_back( aLLException.Url ); + + handleErrorRequest( aLLException.Classification, + nErrorCode, + aArguments, + rRequest->getContinuations(), + bObtainErrorStringOnly, + bHasErrorString, + rErrorString ); + return true; + } + + star::ucb::InteractiveLockingNotLockedException aLNLException; + if (aAnyRequest >>= aLNLException) + { + ErrCode nErrorCode = ERRCODE_UUI_LOCKING_NOT_LOCKED; + std::vector< rtl::OUString > aArguments; + aArguments.push_back( aLNLException.Url ); + + handleErrorRequest( aLNLException.Classification, + nErrorCode, + aArguments, + rRequest->getContinuations(), + bObtainErrorStringOnly, + bHasErrorString, + rErrorString ); + return true; + } + + star::ucb::InteractiveLockingLockExpiredException aLLEException; + if (aAnyRequest >>= aLLEException) + { + ErrCode nErrorCode = ERRCODE_UUI_LOCKING_LOCK_EXPIRED; + std::vector< rtl::OUString > aArguments; + aArguments.push_back( aLLEException.Url ); + + handleErrorRequest( aLLEException.Classification, + nErrorCode, + aArguments, + rRequest->getContinuations(), + bObtainErrorStringOnly, + bHasErrorString, + rErrorString ); + return true; + } + return false; } diff --git a/uui/source/ids.hrc b/uui/source/ids.hrc index 08624a3dda4e..7259b8ba86e3 100644 --- a/uui/source/ids.hrc +++ b/uui/source/ids.hrc @@ -149,6 +149,10 @@ #define ERRCODE_UUI_CONFIGURATION_BACKENDMISSING_WITHRECOVER (ERRCODE_AREA_UUI + 56) #define ERRCODE_UUI_INVALID_XFORMS_SUBMISSION_DATA (ERRCODE_AREA_UUI + 57) #define ERRCODE_UUI_IO_MODULESIZEEXCEEDED (ERRCODE_AREA_UUI + 58) +#define ERRCODE_UUI_LOCKING_LOCKED (ERRCODE_AREA_UUI + 59) +#define ERRCODE_UUI_LOCKING_LOCKED_SELF (ERRCODE_AREA_UUI + 60) +#define ERRCODE_UUI_LOCKING_NOT_LOCKED (ERRCODE_AREA_UUI + 61) +#define ERRCODE_UUI_LOCKING_LOCK_EXPIRED (ERRCODE_AREA_UUI + 62) #define ERRCODE_AREA_UUI_UNKNOWNAUTH 25000 #define SSLWARN_TYPE_DOMAINMISMATCH 10 diff --git a/uui/source/ids.src b/uui/source/ids.src index fc82161bbb81..0d692a13fa71 100644 --- a/uui/source/ids.src +++ b/uui/source/ids.src @@ -1,3 +1,4 @@ + /************************************************************************* * * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. @@ -351,6 +352,27 @@ Resource RID_UUI_ERRHDL Text [ en-US ] = "The form contains invalid data. Do you still want to continue?"; }; + String (ERRCODE_UUI_LOCKING_LOCKED & ERRCODE_RES_MASK) + { + Text [ en-US ] = "The file $(ARG1) is locked by another user. Currently, another write access to this file cannot be granted."; + + }; + + String (ERRCODE_UUI_LOCKING_LOCKED_SELF & ERRCODE_RES_MASK) + { + Text [ en-US ] = "The file $(ARG1) is locked by yourself. Currently, another write access to this file cannot be granted."; + }; + + String (ERRCODE_UUI_LOCKING_NOT_LOCKED & ERRCODE_RES_MASK) + { + Text [ en-US ] = "The file $(ARG1) is currently not locked by yourself."; + }; + + String (ERRCODE_UUI_LOCKING_LOCK_EXPIRED & ERRCODE_RES_MASK) + { + Text [ en-US ] = "The previously obtained lock for file $(ARG1) has expired.\nThis can happen due to problems on the server managing the file lock. It cannot be guaranteed that write operations on this file will not overwrite changes done by other users!"; + }; + STRING (ERRCODE_UUI_UNKNOWNAUTH_UNTRUSTED) { Text [ en-US ] = "Unable to verify the identity of $(ARG1) site.\n\nBefore accepting this certificate, you should examine this site's certificate carefully. Are you willing to accept this certificate for the purpose of identifying the Web site $(ARG1)?"; |