Line data Source code
1 : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 : /*
3 : * This file is part of the LibreOffice project.
4 : *
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/.
8 : *
9 : * This file incorporates work covered by the following license notice:
10 : *
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 .
18 : */
19 : #ifndef INCLUDED_SFX2_SOURCE_INC_FLTOPTINT_HXX
20 : #define INCLUDED_SFX2_SOURCE_INC_FLTOPTINT_HXX
21 :
22 : #include <com/sun/star/document/XInteractionFilterOptions.hpp>
23 : #include <com/sun/star/frame/XModel.hpp>
24 : #include <comphelper/interaction.hxx>
25 :
26 0 : class FilterOptionsContinuation : public comphelper::OInteraction< ::com::sun::star::document::XInteractionFilterOptions >
27 : {
28 : ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties;
29 :
30 : public:
31 : virtual void SAL_CALL setFilterOptions( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rProp ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
32 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getFilterOptions( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
33 : };
34 :
35 0 : class RequestFilterOptions : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
36 : {
37 : ::com::sun::star::uno::Any m_aRequest;
38 :
39 : ::com::sun::star::uno::Sequence<
40 : ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >
41 : > m_lContinuations;
42 :
43 : comphelper::OInteractionAbort* m_pAbort;
44 :
45 : FilterOptionsContinuation* m_pOptions;
46 :
47 : public:
48 : RequestFilterOptions( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > rModel,
49 : const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rProperties );
50 :
51 0 : bool isAbort() { return m_pAbort->wasSelected(); }
52 :
53 0 : ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > getFilterOptions()
54 : {
55 0 : return m_pOptions->getFilterOptions();
56 : }
57 :
58 : virtual ::com::sun::star::uno::Any SAL_CALL getRequest()
59 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
60 :
61 : virtual ::com::sun::star::uno::Sequence<
62 : ::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >
63 : > SAL_CALL getContinuations()
64 : throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
65 : };
66 :
67 : #endif
68 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|