xref: /aoo41x/main/sfx2/source/inc/fltoptint.hxx (revision 353d8f4d)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef SFX2_FLTOPTINT_HXX
24 #define SFX2_FLTOPTINT_HXX
25 
26 #include <com/sun/star/document/FilterOptionsRequest.hpp>
27 #include <com/sun/star/document/XInteractionFilterOptions.hpp>
28 #include <com/sun/star/frame/XModel.hpp>
29 #include <comphelper/interaction.hxx>
30 
31 //using namespace ::framework;
32 
33 class FilterOptionsContinuation : public comphelper::OInteraction< ::com::sun::star::document::XInteractionFilterOptions >
34 {
35 	::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties;
36 
37 public:
38     virtual void SAL_CALL setFilterOptions( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rProp ) throw (::com::sun::star::uno::RuntimeException);
39     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getFilterOptions(  ) throw (::com::sun::star::uno::RuntimeException);
40 };
41 
42 class RequestFilterOptions : public ::cppu::WeakImplHelper1< ::com::sun::star::task::XInteractionRequest >
43 {
44     ::com::sun::star::uno::Any m_aRequest;
45 
46     ::com::sun::star::uno::Sequence<
47 					::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >
48 				> m_lContinuations;
49 
50     comphelper::OInteractionAbort*  m_pAbort;
51 
52     FilterOptionsContinuation*	m_pOptions;
53 
54 public:
55     RequestFilterOptions( ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > rModel,
56 							  ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > rProperties );
57 
isAbort()58     sal_Bool    isAbort() { return m_pAbort->wasSelected(); }
59 
getFilterOptions()60 	::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > getFilterOptions()
61 	{
62 		return m_pOptions->getFilterOptions();
63 	}
64 
65     virtual ::com::sun::star::uno::Any SAL_CALL getRequest()
66 		throw( ::com::sun::star::uno::RuntimeException );
67 
68     virtual ::com::sun::star::uno::Sequence<
69 				::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionContinuation >
70 			> SAL_CALL getContinuations()
71 		throw( ::com::sun::star::uno::RuntimeException );
72 };
73 
74 #endif
75