1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: filinsreq.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
32 #ifndef _FILINSREQ_HXX_
33 #define _FILINSREQ_HXX_
35 #include <cppuhelper/weak.hxx>
36 #include <ucbhelper/macros.hxx>
37 #include <rtl/ustring.hxx>
38 #include <com/sun/star/uno/XInterface.hpp>
39 #include <com/sun/star/lang/XTypeProvider.hpp>
40 #include <com/sun/star/task/XInteractionAbort.hpp>
41 #include <com/sun/star/ucb/XInteractionSupplyName.hpp>
42 #include <com/sun/star/task/XInteractionRequest.hpp>
45 namespace fileaccess
{
51 class XInteractionSupplyNameImpl
52 : public cppu::OWeakObject
,
53 public com::sun::star::lang::XTypeProvider
,
54 public com::sun::star::ucb::XInteractionSupplyName
58 XInteractionSupplyNameImpl()
63 virtual com::sun::star::uno::Any SAL_CALL
65 const com::sun::star::uno::Type
& rType
)
66 throw( com::sun::star::uno::RuntimeException
);
84 virtual void SAL_CALL
select()
85 throw (::com::sun::star::uno::RuntimeException
)
90 void SAL_CALL
setName(const ::rtl::OUString
& Name
)
91 throw(::com::sun::star::uno::RuntimeException
)
96 rtl::OUString
getName() const
101 bool isSelected() const
109 rtl::OUString m_aNewName
;
114 class XInteractionAbortImpl
115 : public cppu::OWeakObject
,
116 public com::sun::star::lang::XTypeProvider
,
117 public com::sun::star::task::XInteractionAbort
121 XInteractionAbortImpl()
126 virtual com::sun::star::uno::Any SAL_CALL
128 const com::sun::star::uno::Type
& rType
)
129 throw( com::sun::star::uno::RuntimeException
);
131 virtual void SAL_CALL
136 virtual void SAL_CALL
147 virtual void SAL_CALL
select()
148 throw (::com::sun::star::uno::RuntimeException
)
154 bool isSelected() const
166 class XInteractionRequestImpl
167 : public cppu::OWeakObject
,
168 public com::sun::star::lang::XTypeProvider
,
169 public com::sun::star::task::XInteractionRequest
173 XInteractionRequestImpl(
174 const rtl::OUString
& aClashingName
,
175 const com::sun::star::uno::Reference
<
176 com::sun::star::uno::XInterface
>& xOrigin
,
178 sal_Int32 CommandId
);
180 virtual com::sun::star::uno::Any SAL_CALL
182 const com::sun::star::uno::Type
& rType
)
183 throw( com::sun::star::uno::RuntimeException
);
185 virtual void SAL_CALL
190 virtual void SAL_CALL
200 ::com::sun::star::uno::Any SAL_CALL
getRequest( )
201 throw (::com::sun::star::uno::RuntimeException
);
203 com::sun::star::uno::Sequence
<
204 com::sun::star::uno::Reference
<
205 com::sun::star::task::XInteractionContinuation
> > SAL_CALL
207 throw (::com::sun::star::uno::RuntimeException
)
214 return p2
->isSelected();
217 rtl::OUString
newName() const
219 if( p1
->isSelected() )
220 return p1
->getName();
222 return rtl::OUString();
227 XInteractionSupplyNameImpl
* p1
;
228 XInteractionAbortImpl
* p2
;
229 sal_Int32 m_nErrorCode
,m_nMinorError
;
231 com::sun::star::uno::Sequence
<
232 com::sun::star::uno::Reference
<
233 com::sun::star::task::XInteractionContinuation
> > m_aSeq
;
235 rtl::OUString m_aClashingName
;
236 com::sun::star::uno::Reference
<
237 com::sun::star::uno::XInterface
> m_xOrigin
;