1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir #include "com/sun/star/beans/PropertyValue.hpp"
29*cdf0e10cSrcweir #include "com/sun/star/task/XInteractionRequest.hpp"
30*cdf0e10cSrcweir #include "com/sun/star/ucb/InteractiveAugmentedIOException.hpp"
31*cdf0e10cSrcweir 
32*cdf0e10cSrcweir #include "ids.hrc"
33*cdf0e10cSrcweir 
34*cdf0e10cSrcweir #include "iahndl.hxx"
35*cdf0e10cSrcweir 
36*cdf0e10cSrcweir using namespace com::sun::star;
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir namespace {
39*cdf0e10cSrcweir 
40*cdf0e10cSrcweir bool
41*cdf0e10cSrcweir getStringRequestArgument(uno::Sequence< uno::Any > const & rArguments,
42*cdf0e10cSrcweir                          rtl::OUString const & rKey,
43*cdf0e10cSrcweir                          rtl::OUString * pValue)
44*cdf0e10cSrcweir     SAL_THROW(())
45*cdf0e10cSrcweir {
46*cdf0e10cSrcweir     for (sal_Int32 i = 0; i < rArguments.getLength(); ++i)
47*cdf0e10cSrcweir     {
48*cdf0e10cSrcweir         beans::PropertyValue aProperty;
49*cdf0e10cSrcweir         if ((rArguments[i] >>= aProperty) && aProperty.Name == rKey)
50*cdf0e10cSrcweir         {
51*cdf0e10cSrcweir             rtl::OUString aValue;
52*cdf0e10cSrcweir             if (aProperty.Value >>= aValue)
53*cdf0e10cSrcweir             {
54*cdf0e10cSrcweir                 if (pValue)
55*cdf0e10cSrcweir                     *pValue = aValue;
56*cdf0e10cSrcweir                 return true;
57*cdf0e10cSrcweir             }
58*cdf0e10cSrcweir         }
59*cdf0e10cSrcweir     }
60*cdf0e10cSrcweir     return false;
61*cdf0e10cSrcweir }
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir bool
64*cdf0e10cSrcweir getBoolRequestArgument(uno::Sequence< uno::Any > const & rArguments,
65*cdf0e10cSrcweir                        rtl::OUString const & rKey,
66*cdf0e10cSrcweir                        bool * pValue)
67*cdf0e10cSrcweir     SAL_THROW(())
68*cdf0e10cSrcweir {
69*cdf0e10cSrcweir     for (sal_Int32 i = 0; i < rArguments.getLength(); ++i)
70*cdf0e10cSrcweir     {
71*cdf0e10cSrcweir         beans::PropertyValue aProperty;
72*cdf0e10cSrcweir         if ((rArguments[i] >>= aProperty) && aProperty.Name == rKey)
73*cdf0e10cSrcweir         {
74*cdf0e10cSrcweir             sal_Bool bValue = sal_Bool();
75*cdf0e10cSrcweir             if (aProperty.Value >>= bValue)
76*cdf0e10cSrcweir             {
77*cdf0e10cSrcweir                 if (pValue)
78*cdf0e10cSrcweir                     *pValue = bValue;
79*cdf0e10cSrcweir                 return true;
80*cdf0e10cSrcweir             }
81*cdf0e10cSrcweir         }
82*cdf0e10cSrcweir     }
83*cdf0e10cSrcweir     return false;
84*cdf0e10cSrcweir }
85*cdf0e10cSrcweir 
86*cdf0e10cSrcweir bool
87*cdf0e10cSrcweir getResourceNameRequestArgument(uno::Sequence< uno::Any > const & rArguments,
88*cdf0e10cSrcweir                                rtl::OUString * pValue)
89*cdf0e10cSrcweir     SAL_THROW(())
90*cdf0e10cSrcweir {
91*cdf0e10cSrcweir     if (!getStringRequestArgument(rArguments,
92*cdf0e10cSrcweir                                   rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
93*cdf0e10cSrcweir                                       "Uri")),
94*cdf0e10cSrcweir                                   pValue))
95*cdf0e10cSrcweir         return false;
96*cdf0e10cSrcweir     // Use the resource name only for file URLs, to avoid confusion:
97*cdf0e10cSrcweir     //TODO! work with ucp locality concept instead of hardcoded "file"?
98*cdf0e10cSrcweir     if (pValue
99*cdf0e10cSrcweir         && pValue->matchIgnoreAsciiCaseAsciiL(RTL_CONSTASCII_STRINGPARAM(
100*cdf0e10cSrcweir                                                   "file:")))
101*cdf0e10cSrcweir         getStringRequestArgument(rArguments,
102*cdf0e10cSrcweir                                  rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
103*cdf0e10cSrcweir                                                    "ResourceName")),
104*cdf0e10cSrcweir                                  pValue);
105*cdf0e10cSrcweir     return true;
106*cdf0e10cSrcweir }
107*cdf0e10cSrcweir 
108*cdf0e10cSrcweir } // namespace
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir bool
111*cdf0e10cSrcweir UUIInteractionHelper::handleInteractiveIOException(
112*cdf0e10cSrcweir         uno::Reference< task::XInteractionRequest > const & rRequest,
113*cdf0e10cSrcweir         bool bObtainErrorStringOnly,
114*cdf0e10cSrcweir         bool & bHasErrorString,
115*cdf0e10cSrcweir         rtl::OUString & rErrorString)
116*cdf0e10cSrcweir     SAL_THROW((uno::RuntimeException))
117*cdf0e10cSrcweir {
118*cdf0e10cSrcweir     uno::Any aAnyRequest(rRequest->getRequest());
119*cdf0e10cSrcweir     bHasErrorString = false;
120*cdf0e10cSrcweir 
121*cdf0e10cSrcweir     ucb::InteractiveIOException aIoException;
122*cdf0e10cSrcweir     if (aAnyRequest >>= aIoException)
123*cdf0e10cSrcweir     {
124*cdf0e10cSrcweir         uno::Sequence< uno::Any > aRequestArguments;
125*cdf0e10cSrcweir         ucb::InteractiveAugmentedIOException aAugmentedIoException;
126*cdf0e10cSrcweir         if (aAnyRequest >>= aAugmentedIoException)
127*cdf0e10cSrcweir             aRequestArguments = aAugmentedIoException.Arguments;
128*cdf0e10cSrcweir 
129*cdf0e10cSrcweir         ErrCode nErrorCode;
130*cdf0e10cSrcweir         std::vector< rtl::OUString > aArguments;
131*cdf0e10cSrcweir         static ErrCode const
132*cdf0e10cSrcweir             aErrorCode[ucb::IOErrorCode_WRONG_VERSION + 1][2]
133*cdf0e10cSrcweir             = { { ERRCODE_IO_ABORT, ERRCODE_UUI_IO_ABORT }, // ABORT
134*cdf0e10cSrcweir                 { ERRCODE_IO_ACCESSDENIED, ERRCODE_UUI_IO_ACCESSDENIED },
135*cdf0e10cSrcweir                 // ACCESS_DENIED
136*cdf0e10cSrcweir                 { ERRCODE_IO_ALREADYEXISTS,
137*cdf0e10cSrcweir                   ERRCODE_UUI_IO_ALREADYEXISTS }, // ALREADY_EXISTING
138*cdf0e10cSrcweir                 { ERRCODE_IO_BADCRC, ERRCODE_UUI_IO_BADCRC }, // BAD_CRC
139*cdf0e10cSrcweir                 { ERRCODE_IO_CANTCREATE, ERRCODE_UUI_IO_CANTCREATE },
140*cdf0e10cSrcweir                 // CANT_CREATE
141*cdf0e10cSrcweir                 { ERRCODE_IO_CANTREAD, ERRCODE_UUI_IO_CANTREAD },
142*cdf0e10cSrcweir                 // CANT_READ
143*cdf0e10cSrcweir                 { ERRCODE_IO_CANTSEEK, ERRCODE_UUI_IO_CANTSEEK },
144*cdf0e10cSrcweir                 // CANT_SEEK
145*cdf0e10cSrcweir                 { ERRCODE_IO_CANTTELL, ERRCODE_UUI_IO_CANTTELL },
146*cdf0e10cSrcweir                 // CANT_TELL
147*cdf0e10cSrcweir                 { ERRCODE_IO_CANTWRITE, ERRCODE_UUI_IO_CANTWRITE },
148*cdf0e10cSrcweir                 // CANT_WRITE
149*cdf0e10cSrcweir                 { ERRCODE_IO_CURRENTDIR, ERRCODE_UUI_IO_CURRENTDIR },
150*cdf0e10cSrcweir                 // CURRENT_DIRECTORY
151*cdf0e10cSrcweir                 { ERRCODE_IO_DEVICENOTREADY, ERRCODE_UUI_IO_NOTREADY },
152*cdf0e10cSrcweir                 // DEVICE_NOT_READY
153*cdf0e10cSrcweir                 { ERRCODE_IO_NOTSAMEDEVICE,
154*cdf0e10cSrcweir                   ERRCODE_UUI_IO_NOTSAMEDEVICE }, // DIFFERENT_DEVICES
155*cdf0e10cSrcweir                 { ERRCODE_IO_GENERAL, ERRCODE_UUI_IO_GENERAL }, // GENERAL
156*cdf0e10cSrcweir                 { ERRCODE_IO_INVALIDACCESS,
157*cdf0e10cSrcweir                   ERRCODE_UUI_IO_INVALIDACCESS }, // INVALID_ACCESS
158*cdf0e10cSrcweir                 { ERRCODE_IO_INVALIDCHAR, ERRCODE_UUI_IO_INVALIDCHAR },
159*cdf0e10cSrcweir                 // INVALID_CHARACTER
160*cdf0e10cSrcweir                 { ERRCODE_IO_INVALIDDEVICE,
161*cdf0e10cSrcweir                   ERRCODE_UUI_IO_INVALIDDEVICE }, // INVALID_DEVICE
162*cdf0e10cSrcweir                 { ERRCODE_IO_INVALIDLENGTH,
163*cdf0e10cSrcweir                   ERRCODE_UUI_IO_INVALIDLENGTH }, // INVALID_LENGTH
164*cdf0e10cSrcweir                 { ERRCODE_IO_INVALIDPARAMETER,
165*cdf0e10cSrcweir                   ERRCODE_UUI_IO_INVALIDPARAMETER }, // INVALID_PARAMETER
166*cdf0e10cSrcweir                 { ERRCODE_IO_ISWILDCARD, ERRCODE_UUI_IO_ISWILDCARD },
167*cdf0e10cSrcweir                 // IS_WILDCARD
168*cdf0e10cSrcweir                 { ERRCODE_IO_LOCKVIOLATION,
169*cdf0e10cSrcweir                   ERRCODE_UUI_IO_LOCKVIOLATION }, // LOCKING_VIOLATION
170*cdf0e10cSrcweir                 { ERRCODE_IO_MISPLACEDCHAR,
171*cdf0e10cSrcweir                   ERRCODE_UUI_IO_MISPLACEDCHAR }, // MISPLACED_CHARACTER
172*cdf0e10cSrcweir                 { ERRCODE_IO_NAMETOOLONG, ERRCODE_UUI_IO_NAMETOOLONG },
173*cdf0e10cSrcweir                 // NAME_TOO_LONG
174*cdf0e10cSrcweir                 { ERRCODE_IO_NOTEXISTS, ERRCODE_UUI_IO_NOTEXISTS },
175*cdf0e10cSrcweir                 // NOT_EXISTING
176*cdf0e10cSrcweir                 { ERRCODE_IO_NOTEXISTSPATH,
177*cdf0e10cSrcweir                   ERRCODE_UUI_IO_NOTEXISTSPATH }, // NOT_EXISTING_PATH
178*cdf0e10cSrcweir                 { ERRCODE_IO_NOTSUPPORTED, ERRCODE_UUI_IO_NOTSUPPORTED },
179*cdf0e10cSrcweir                 // NOT_SUPPORTED
180*cdf0e10cSrcweir                 { ERRCODE_IO_NOTADIRECTORY,
181*cdf0e10cSrcweir                   ERRCODE_UUI_IO_NOTADIRECTORY }, // NO_DIRECTORY
182*cdf0e10cSrcweir                 { ERRCODE_IO_NOTAFILE, ERRCODE_UUI_IO_NOTAFILE },
183*cdf0e10cSrcweir                 // NO_FILE
184*cdf0e10cSrcweir                 { ERRCODE_IO_OUTOFSPACE, ERRCODE_UUI_IO_OUTOFSPACE },
185*cdf0e10cSrcweir                 // OUT_OF_DISK_SPACE
186*cdf0e10cSrcweir                 { ERRCODE_IO_TOOMANYOPENFILES,
187*cdf0e10cSrcweir                   ERRCODE_UUI_IO_TOOMANYOPENFILES },
188*cdf0e10cSrcweir                 // OUT_OF_FILE_HANDLES
189*cdf0e10cSrcweir                 { ERRCODE_IO_OUTOFMEMORY, ERRCODE_UUI_IO_OUTOFMEMORY },
190*cdf0e10cSrcweir                 // OUT_OF_MEMORY
191*cdf0e10cSrcweir                 { ERRCODE_IO_PENDING, ERRCODE_UUI_IO_PENDING }, // PENDING
192*cdf0e10cSrcweir                 { ERRCODE_IO_RECURSIVE, ERRCODE_UUI_IO_RECURSIVE },
193*cdf0e10cSrcweir                 // RECURSIVE
194*cdf0e10cSrcweir                 { ERRCODE_IO_UNKNOWN, ERRCODE_UUI_IO_UNKNOWN }, // UNKNOWN
195*cdf0e10cSrcweir                 { ERRCODE_IO_WRITEPROTECTED,
196*cdf0e10cSrcweir                   ERRCODE_UUI_IO_WRITEPROTECTED }, // WRITE_PROTECTED
197*cdf0e10cSrcweir                 { ERRCODE_IO_WRONGFORMAT, ERRCODE_UUI_IO_WRONGFORMAT },
198*cdf0e10cSrcweir                 // WRONG_FORMAT
199*cdf0e10cSrcweir                 { ERRCODE_IO_WRONGVERSION,
200*cdf0e10cSrcweir                   ERRCODE_UUI_IO_WRONGVERSION } }; // WRONG_VERSION
201*cdf0e10cSrcweir         switch (aIoException.Code)
202*cdf0e10cSrcweir         {
203*cdf0e10cSrcweir         case ucb::IOErrorCode_CANT_CREATE:
204*cdf0e10cSrcweir             {
205*cdf0e10cSrcweir                 rtl::OUString aArgFolder;
206*cdf0e10cSrcweir                 if (getStringRequestArgument(
207*cdf0e10cSrcweir                         aRequestArguments,
208*cdf0e10cSrcweir                         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
209*cdf0e10cSrcweir                                           "Folder")),
210*cdf0e10cSrcweir                         &aArgFolder))
211*cdf0e10cSrcweir                 {
212*cdf0e10cSrcweir                     rtl::OUString aArgUri;
213*cdf0e10cSrcweir                     if (getResourceNameRequestArgument(aRequestArguments,
214*cdf0e10cSrcweir                                                        &aArgUri))
215*cdf0e10cSrcweir                     {
216*cdf0e10cSrcweir                         nErrorCode = ERRCODE_UUI_IO_CANTCREATE;
217*cdf0e10cSrcweir                         aArguments.reserve(2);
218*cdf0e10cSrcweir                         aArguments.push_back(aArgUri);
219*cdf0e10cSrcweir                         aArguments.push_back(aArgFolder);
220*cdf0e10cSrcweir                     }
221*cdf0e10cSrcweir                     else
222*cdf0e10cSrcweir                     {
223*cdf0e10cSrcweir                         nErrorCode = ERRCODE_UUI_IO_CANTCREATE_NONAME;
224*cdf0e10cSrcweir                         aArguments.push_back(aArgFolder);
225*cdf0e10cSrcweir                     }
226*cdf0e10cSrcweir                 }
227*cdf0e10cSrcweir                 else
228*cdf0e10cSrcweir                     nErrorCode = aErrorCode[aIoException.Code][0];
229*cdf0e10cSrcweir                 break;
230*cdf0e10cSrcweir             }
231*cdf0e10cSrcweir 
232*cdf0e10cSrcweir         case ucb::IOErrorCode_DEVICE_NOT_READY:
233*cdf0e10cSrcweir             {
234*cdf0e10cSrcweir                 rtl::OUString aArgUri;
235*cdf0e10cSrcweir                 if (getResourceNameRequestArgument(aRequestArguments,
236*cdf0e10cSrcweir                                                    &aArgUri))
237*cdf0e10cSrcweir                 {
238*cdf0e10cSrcweir                     rtl::OUString aResourceType;
239*cdf0e10cSrcweir                     getStringRequestArgument(
240*cdf0e10cSrcweir                         aRequestArguments,
241*cdf0e10cSrcweir                         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
242*cdf0e10cSrcweir                                           "ResourceType")),
243*cdf0e10cSrcweir                         &aResourceType);
244*cdf0e10cSrcweir                     bool bRemovable = false;
245*cdf0e10cSrcweir                     getBoolRequestArgument(aRequestArguments,
246*cdf0e10cSrcweir                                            rtl::OUString(
247*cdf0e10cSrcweir                                                RTL_CONSTASCII_USTRINGPARAM(
248*cdf0e10cSrcweir                                                    "Removable")),
249*cdf0e10cSrcweir                                            &bRemovable);
250*cdf0e10cSrcweir                     nErrorCode
251*cdf0e10cSrcweir                         = aResourceType.equalsAsciiL(
252*cdf0e10cSrcweir                             RTL_CONSTASCII_STRINGPARAM("volume"))
253*cdf0e10cSrcweir                         ? (bRemovable
254*cdf0e10cSrcweir                            ? ERRCODE_UUI_IO_NOTREADY_VOLUME_REMOVABLE
255*cdf0e10cSrcweir                            : ERRCODE_UUI_IO_NOTREADY_VOLUME)
256*cdf0e10cSrcweir                         : (bRemovable
257*cdf0e10cSrcweir                            ? ERRCODE_UUI_IO_NOTREADY_REMOVABLE
258*cdf0e10cSrcweir                            : ERRCODE_UUI_IO_NOTREADY);
259*cdf0e10cSrcweir                     aArguments.push_back(aArgUri);
260*cdf0e10cSrcweir                 }
261*cdf0e10cSrcweir                 else
262*cdf0e10cSrcweir             nErrorCode = aErrorCode[aIoException.Code][0];
263*cdf0e10cSrcweir                 break;
264*cdf0e10cSrcweir             }
265*cdf0e10cSrcweir 
266*cdf0e10cSrcweir         case ucb::IOErrorCode_DIFFERENT_DEVICES:
267*cdf0e10cSrcweir             {
268*cdf0e10cSrcweir                 rtl::OUString aArgVolume;
269*cdf0e10cSrcweir                 rtl::OUString aArgOtherVolume;
270*cdf0e10cSrcweir                 if (getStringRequestArgument(
271*cdf0e10cSrcweir                         aRequestArguments,
272*cdf0e10cSrcweir                         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
273*cdf0e10cSrcweir                                           "Volume")),
274*cdf0e10cSrcweir                         &aArgVolume)
275*cdf0e10cSrcweir                     && getStringRequestArgument(
276*cdf0e10cSrcweir                         aRequestArguments,
277*cdf0e10cSrcweir                         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
278*cdf0e10cSrcweir                                           "OtherVolume")),
279*cdf0e10cSrcweir                         &aArgOtherVolume))
280*cdf0e10cSrcweir                 {
281*cdf0e10cSrcweir                     nErrorCode = aErrorCode[aIoException.Code][1];
282*cdf0e10cSrcweir                     aArguments.reserve(2);
283*cdf0e10cSrcweir                     aArguments.push_back(aArgVolume);
284*cdf0e10cSrcweir                     aArguments.push_back(aArgOtherVolume);
285*cdf0e10cSrcweir                 }
286*cdf0e10cSrcweir                 else
287*cdf0e10cSrcweir                     nErrorCode = aErrorCode[aIoException.Code][0];
288*cdf0e10cSrcweir                 break;
289*cdf0e10cSrcweir         }
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir         case ucb::IOErrorCode_NOT_EXISTING:
292*cdf0e10cSrcweir             {
293*cdf0e10cSrcweir                 rtl::OUString aArgUri;
294*cdf0e10cSrcweir                 if (getResourceNameRequestArgument(aRequestArguments,
295*cdf0e10cSrcweir                            &aArgUri))
296*cdf0e10cSrcweir                 {
297*cdf0e10cSrcweir                     rtl::OUString aResourceType;
298*cdf0e10cSrcweir                     getStringRequestArgument(
299*cdf0e10cSrcweir                         aRequestArguments,
300*cdf0e10cSrcweir                         rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(
301*cdf0e10cSrcweir                                           "ResourceType")),
302*cdf0e10cSrcweir                         &aResourceType);
303*cdf0e10cSrcweir                     nErrorCode
304*cdf0e10cSrcweir                         = aResourceType.equalsAsciiL(
305*cdf0e10cSrcweir                             RTL_CONSTASCII_STRINGPARAM("volume"))
306*cdf0e10cSrcweir                         ? ERRCODE_UUI_IO_NOTEXISTS_VOLUME
307*cdf0e10cSrcweir                         : (aResourceType.equalsAsciiL(
308*cdf0e10cSrcweir                                RTL_CONSTASCII_STRINGPARAM("folder"))
309*cdf0e10cSrcweir                            ? ERRCODE_UUI_IO_NOTEXISTS_FOLDER
310*cdf0e10cSrcweir                            : ERRCODE_UUI_IO_NOTEXISTS);
311*cdf0e10cSrcweir                     aArguments.push_back(aArgUri);
312*cdf0e10cSrcweir                 }
313*cdf0e10cSrcweir                 else
314*cdf0e10cSrcweir                     nErrorCode = aErrorCode[aIoException.Code][0];
315*cdf0e10cSrcweir                 break;
316*cdf0e10cSrcweir             }
317*cdf0e10cSrcweir 
318*cdf0e10cSrcweir         default:
319*cdf0e10cSrcweir             {
320*cdf0e10cSrcweir                 rtl::OUString aArgUri;
321*cdf0e10cSrcweir                 if (getResourceNameRequestArgument(aRequestArguments,
322*cdf0e10cSrcweir                                                    &aArgUri))
323*cdf0e10cSrcweir                 {
324*cdf0e10cSrcweir                     nErrorCode = aErrorCode[aIoException.Code][1];
325*cdf0e10cSrcweir                     aArguments.push_back(aArgUri);
326*cdf0e10cSrcweir                 }
327*cdf0e10cSrcweir                 else
328*cdf0e10cSrcweir                     nErrorCode = aErrorCode[aIoException.Code][0];
329*cdf0e10cSrcweir                 break;
330*cdf0e10cSrcweir             }
331*cdf0e10cSrcweir         }
332*cdf0e10cSrcweir 
333*cdf0e10cSrcweir         handleErrorHandlerRequest(aIoException.Classification,
334*cdf0e10cSrcweir                                   nErrorCode,
335*cdf0e10cSrcweir                                   aArguments,
336*cdf0e10cSrcweir                                   rRequest->getContinuations(),
337*cdf0e10cSrcweir                                   bObtainErrorStringOnly,
338*cdf0e10cSrcweir                                   bHasErrorString,
339*cdf0e10cSrcweir                                   rErrorString);
340*cdf0e10cSrcweir         return true;
341*cdf0e10cSrcweir     }
342*cdf0e10cSrcweir     return false;
343*cdf0e10cSrcweir }
344