1*ac9096f4SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*ac9096f4SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*ac9096f4SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*ac9096f4SAndrew Rist  * distributed with this work for additional information
6*ac9096f4SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*ac9096f4SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*ac9096f4SAndrew Rist  * "License"); you may not use this file except in compliance
9*ac9096f4SAndrew Rist  * with the License.  You may obtain a copy of the License at
10*ac9096f4SAndrew Rist  *
11*ac9096f4SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12*ac9096f4SAndrew Rist  *
13*ac9096f4SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*ac9096f4SAndrew Rist  * software distributed under the License is distributed on an
15*ac9096f4SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*ac9096f4SAndrew Rist  * KIND, either express or implied.  See the License for the
17*ac9096f4SAndrew Rist  * specific language governing permissions and limitations
18*ac9096f4SAndrew Rist  * under the License.
19*ac9096f4SAndrew Rist  *
20*ac9096f4SAndrew Rist  *************************************************************/
21*ac9096f4SAndrew Rist 
22*ac9096f4SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_ucbhelper.hxx"
26cdf0e10cSrcweir #include <com/sun/star/ucb/InteractiveAugmentedIOException.hpp>
27cdf0e10cSrcweir #include <ucbhelper/simpleioerrorrequest.hxx>
28cdf0e10cSrcweir 
29cdf0e10cSrcweir using namespace com::sun::star;
30cdf0e10cSrcweir using namespace ucbhelper;
31cdf0e10cSrcweir 
32cdf0e10cSrcweir //=========================================================================
SimpleIOErrorRequest(const ucb::IOErrorCode eError,const uno::Sequence<uno::Any> & rArgs,const rtl::OUString & rMessage,const uno::Reference<ucb::XCommandProcessor> & xContext)33cdf0e10cSrcweir SimpleIOErrorRequest::SimpleIOErrorRequest(
34cdf0e10cSrcweir                 const ucb::IOErrorCode eError,
35cdf0e10cSrcweir                 const uno::Sequence< uno::Any > & rArgs,
36cdf0e10cSrcweir                 const rtl::OUString & rMessage,
37cdf0e10cSrcweir                 const uno::Reference< ucb::XCommandProcessor > & xContext )
38cdf0e10cSrcweir {
39cdf0e10cSrcweir     // Fill request...
40cdf0e10cSrcweir     ucb::InteractiveAugmentedIOException aRequest;
41cdf0e10cSrcweir     aRequest.Message         = rMessage;
42cdf0e10cSrcweir     aRequest.Context         = xContext;
43cdf0e10cSrcweir     aRequest.Classification  = task::InteractionClassification_ERROR;
44cdf0e10cSrcweir     aRequest.Code            = eError;
45cdf0e10cSrcweir     aRequest.Arguments       = rArgs;
46cdf0e10cSrcweir 
47cdf0e10cSrcweir     setRequest( uno::makeAny( aRequest ) );
48cdf0e10cSrcweir 
49cdf0e10cSrcweir     // Fill continuations...
50cdf0e10cSrcweir     uno::Sequence< uno::Reference<
51cdf0e10cSrcweir             task::XInteractionContinuation > > aContinuations( 1 );
52cdf0e10cSrcweir     aContinuations[ 0 ] = new InteractionAbort( this );
53cdf0e10cSrcweir 
54cdf0e10cSrcweir     setContinuations( aContinuations );
55cdf0e10cSrcweir }
56cdf0e10cSrcweir 
57