1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
21 #ifndef _FILINSREQ_HXX_
22 #define _FILINSREQ_HXX_
24 #include <cppuhelper/weak.hxx>
25 #include <ucbhelper/macros.hxx>
26 #include <rtl/ustring.hxx>
27 #include <com/sun/star/uno/XInterface.hpp>
28 #include <com/sun/star/lang/XTypeProvider.hpp>
29 #include <com/sun/star/task/XInteractionAbort.hpp>
30 #include <com/sun/star/ucb/XInteractionSupplyName.hpp>
31 #include <com/sun/star/task/XInteractionRequest.hpp>
34 namespace fileaccess
{
40 class XInteractionSupplyNameImpl
41 : public cppu::OWeakObject
,
42 public com::sun::star::lang::XTypeProvider
,
43 public com::sun::star::ucb::XInteractionSupplyName
47 XInteractionSupplyNameImpl()
52 virtual com::sun::star::uno::Any SAL_CALL
54 const com::sun::star::uno::Type
& rType
)
55 throw( com::sun::star::uno::RuntimeException
);
73 virtual void SAL_CALL
select()
74 throw (::com::sun::star::uno::RuntimeException
)
79 void SAL_CALL
setName(const ::rtl::OUString
& Name
)
80 throw(::com::sun::star::uno::RuntimeException
)
85 rtl::OUString
getName() const
90 bool isSelected() const
98 rtl::OUString m_aNewName
;
103 class XInteractionAbortImpl
104 : public cppu::OWeakObject
,
105 public com::sun::star::lang::XTypeProvider
,
106 public com::sun::star::task::XInteractionAbort
110 XInteractionAbortImpl()
115 virtual com::sun::star::uno::Any SAL_CALL
117 const com::sun::star::uno::Type
& rType
)
118 throw( com::sun::star::uno::RuntimeException
);
120 virtual void SAL_CALL
125 virtual void SAL_CALL
136 virtual void SAL_CALL
select()
137 throw (::com::sun::star::uno::RuntimeException
)
143 bool isSelected() const
155 class XInteractionRequestImpl
156 : public cppu::OWeakObject
,
157 public com::sun::star::lang::XTypeProvider
,
158 public com::sun::star::task::XInteractionRequest
162 XInteractionRequestImpl(
163 const rtl::OUString
& aClashingName
,
164 const com::sun::star::uno::Reference
<
165 com::sun::star::uno::XInterface
>& xOrigin
,
167 sal_Int32 CommandId
);
169 virtual com::sun::star::uno::Any SAL_CALL
171 const com::sun::star::uno::Type
& rType
)
172 throw( com::sun::star::uno::RuntimeException
);
174 virtual void SAL_CALL
179 virtual void SAL_CALL
189 ::com::sun::star::uno::Any SAL_CALL
getRequest( )
190 throw (::com::sun::star::uno::RuntimeException
);
192 com::sun::star::uno::Sequence
<
193 com::sun::star::uno::Reference
<
194 com::sun::star::task::XInteractionContinuation
> > SAL_CALL
196 throw (::com::sun::star::uno::RuntimeException
)
203 return p2
->isSelected();
206 rtl::OUString
newName() const
208 if( p1
->isSelected() )
209 return p1
->getName();
211 return rtl::OUString();
216 XInteractionSupplyNameImpl
* p1
;
217 XInteractionAbortImpl
* p2
;
218 sal_Int32 m_nErrorCode
,m_nMinorError
;
220 com::sun::star::uno::Sequence
<
221 com::sun::star::uno::Reference
<
222 com::sun::star::task::XInteractionContinuation
> > m_aSeq
;
224 rtl::OUString m_aClashingName
;
225 com::sun::star::uno::Reference
<
226 com::sun::star::uno::XInterface
> m_xOrigin
;
234 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */