1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*************************************************************************
4 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
6 * Copyright 2000, 2010 Oracle and/or its affiliates.
8 * OpenOffice.org - a multi-platform office productivity suite
10 * This file is part of OpenOffice.org.
12 * OpenOffice.org is free software: you can redistribute it and/or modify
13 * it under the terms of the GNU Lesser General Public License version 3
14 * only, as published by the Free Software Foundation.
16 * OpenOffice.org is distributed in the hope that it will be useful,
17 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19 * GNU Lesser General Public License version 3 for more details
20 * (a copy is included in the LICENSE file that accompanied this code).
22 * You should have received a copy of the GNU Lesser General Public License
23 * version 3 along with OpenOffice.org. If not, see
24 * <http://www.openoffice.org/license.html>
25 * for a copy of the LGPLv3 License.
27 ************************************************************************/
30 #ifndef _FILINSREQ_HXX_
31 #define _FILINSREQ_HXX_
33 #include <cppuhelper/weak.hxx>
34 #include <ucbhelper/macros.hxx>
35 #include <rtl/ustring.hxx>
36 #include <com/sun/star/uno/XInterface.hpp>
37 #include <com/sun/star/lang/XTypeProvider.hpp>
38 #include <com/sun/star/task/XInteractionAbort.hpp>
39 #include <com/sun/star/ucb/XInteractionSupplyName.hpp>
40 #include <com/sun/star/task/XInteractionRequest.hpp>
43 namespace fileaccess
{
49 class XInteractionSupplyNameImpl
50 : public cppu::OWeakObject
,
51 public com::sun::star::lang::XTypeProvider
,
52 public com::sun::star::ucb::XInteractionSupplyName
56 XInteractionSupplyNameImpl()
61 virtual com::sun::star::uno::Any SAL_CALL
63 const com::sun::star::uno::Type
& rType
)
64 throw( com::sun::star::uno::RuntimeException
);
82 virtual void SAL_CALL
select()
83 throw (::com::sun::star::uno::RuntimeException
)
88 void SAL_CALL
setName(const ::rtl::OUString
& Name
)
89 throw(::com::sun::star::uno::RuntimeException
)
94 rtl::OUString
getName() const
99 bool isSelected() const
107 rtl::OUString m_aNewName
;
112 class XInteractionAbortImpl
113 : public cppu::OWeakObject
,
114 public com::sun::star::lang::XTypeProvider
,
115 public com::sun::star::task::XInteractionAbort
119 XInteractionAbortImpl()
124 virtual com::sun::star::uno::Any SAL_CALL
126 const com::sun::star::uno::Type
& rType
)
127 throw( com::sun::star::uno::RuntimeException
);
129 virtual void SAL_CALL
134 virtual void SAL_CALL
145 virtual void SAL_CALL
select()
146 throw (::com::sun::star::uno::RuntimeException
)
152 bool isSelected() const
164 class XInteractionRequestImpl
165 : public cppu::OWeakObject
,
166 public com::sun::star::lang::XTypeProvider
,
167 public com::sun::star::task::XInteractionRequest
171 XInteractionRequestImpl(
172 const rtl::OUString
& aClashingName
,
173 const com::sun::star::uno::Reference
<
174 com::sun::star::uno::XInterface
>& xOrigin
,
176 sal_Int32 CommandId
);
178 virtual com::sun::star::uno::Any SAL_CALL
180 const com::sun::star::uno::Type
& rType
)
181 throw( com::sun::star::uno::RuntimeException
);
183 virtual void SAL_CALL
188 virtual void SAL_CALL
198 ::com::sun::star::uno::Any SAL_CALL
getRequest( )
199 throw (::com::sun::star::uno::RuntimeException
);
201 com::sun::star::uno::Sequence
<
202 com::sun::star::uno::Reference
<
203 com::sun::star::task::XInteractionContinuation
> > SAL_CALL
205 throw (::com::sun::star::uno::RuntimeException
)
212 return p2
->isSelected();
215 rtl::OUString
newName() const
217 if( p1
->isSelected() )
218 return p1
->getName();
220 return rtl::OUString();
225 XInteractionSupplyNameImpl
* p1
;
226 XInteractionAbortImpl
* p2
;
227 sal_Int32 m_nErrorCode
,m_nMinorError
;
229 com::sun::star::uno::Sequence
<
230 com::sun::star::uno::Reference
<
231 com::sun::star::task::XInteractionContinuation
> > m_aSeq
;
233 rtl::OUString m_aClashingName
;
234 com::sun::star::uno::Reference
<
235 com::sun::star::uno::XInterface
> m_xOrigin
;
243 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */