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 INCLUDED_UCB_SOURCE_UCP_FILE_FILINSREQ_HXX
22 #define INCLUDED_UCB_SOURCE_UCP_FILE_FILINSREQ_HXX
24 #include <rtl/ustring.hxx>
25 #include <com/sun/star/uno/XInterface.hpp>
26 #include <com/sun/star/task/XInteractionAbort.hpp>
27 #include <com/sun/star/ucb/XInteractionSupplyName.hpp>
28 #include <com/sun/star/task/XInteractionRequest.hpp>
29 #include <cppuhelper/implbase.hxx>
32 namespace fileaccess
{
38 class XInteractionSupplyNameImpl
: public cppu::WeakImplHelper
<
39 css::ucb::XInteractionSupplyName
>
43 XInteractionSupplyNameImpl()
48 virtual void SAL_CALL
select() override
53 void SAL_CALL
setName(const OUString
& Name
) override
58 const OUString
& getName() const
63 bool isSelected() const
75 class XInteractionAbortImpl
: public cppu::WeakImplHelper
<
76 css::task::XInteractionAbort
>
80 XInteractionAbortImpl()
85 virtual void SAL_CALL
select() override
91 bool isSelected() const
102 class XInteractionRequestImpl
106 XInteractionRequestImpl(
107 const OUString
& aClashingName
,
108 const css::uno::Reference
< css::uno::XInterface
>& xOrigin
,
110 sal_Int32 CommandId
);
114 return p2
->isSelected();
117 OUString
newName() const
119 if( p1
->isSelected() )
120 return p1
->getName();
125 css::uno::Reference
<css::task::XInteractionRequest
> const& getRequest() const
132 XInteractionSupplyNameImpl
* const p1
;
133 XInteractionAbortImpl
* const p2
;
135 css::uno::Reference
<css::task::XInteractionRequest
> m_xRequest
;
137 css::uno::Reference
< css::uno::XInterface
> m_xOrigin
;
145 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */