xref: /aoo4110/main/sc/inc/filtuno.hxx (revision b1cdbd2c)
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 
24 #ifndef SC_FILTUNO_HXX
25 #define SC_FILTUNO_HXX
26 
27 #include <com/sun/star/beans/XPropertyAccess.hpp>
28 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
29 #include <com/sun/star/document/XImporter.hpp>
30 #include <com/sun/star/document/XExporter.hpp>
31 #include <com/sun/star/lang/XServiceInfo.hpp>
32 #include <cppuhelper/implbase5.hxx>
33 #include "scdllapi.h"
34 
35 namespace com { namespace sun { namespace star { namespace io {
36 	class XInputStream;
37 } } } }
38 
39 
40 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL
41 	ScFilterOptionsObj_CreateInstance(
42 		const ::com::sun::star::uno::Reference<
43 			::com::sun::star::lang::XMultiServiceFactory >& );
44 
45 
46 class ScFilterOptionsObj : public ::cppu::WeakImplHelper5<
47 							::com::sun::star::beans::XPropertyAccess,
48 							::com::sun::star::ui::dialogs::XExecutableDialog,
49 							::com::sun::star::document::XImporter,
50 							::com::sun::star::document::XExporter,
51 							::com::sun::star::lang::XServiceInfo >
52 {
53 private:
54 	::rtl::OUString		aFileName;
55 	::rtl::OUString		aFilterName;
56 	::rtl::OUString		aFilterOptions;
57 	::com::sun::star::uno::Reference<
58 		::com::sun::star::io::XInputStream > xInputStream;
59 	sal_Bool			bExport;
60 
61 public:
62 							ScFilterOptionsObj();
63 	virtual					~ScFilterOptionsObj();
64 
65 	static ::rtl::OUString	getImplementationName_Static();
66 	static ::com::sun::star::uno::Sequence< ::rtl::OUString> getSupportedServiceNames_Static();
67 
68 							// XPropertyAccess
69 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >
70 							SAL_CALL getPropertyValues() throw (::com::sun::star::uno::RuntimeException);
71 	virtual void SAL_CALL	setPropertyValues( const ::com::sun::star::uno::Sequence<
72 									::com::sun::star::beans::PropertyValue >& aProps )
73 								throw (::com::sun::star::beans::UnknownPropertyException,
74 										::com::sun::star::beans::PropertyVetoException,
75 										::com::sun::star::lang::IllegalArgumentException,
76 										::com::sun::star::lang::WrappedTargetException,
77 										::com::sun::star::uno::RuntimeException);
78 
79 							// XExecutableDialog
80 	virtual void SAL_CALL	setTitle( const ::rtl::OUString& aTitle )
81 								throw (::com::sun::star::uno::RuntimeException);
82 	virtual sal_Int16 SAL_CALL execute() throw (::com::sun::star::uno::RuntimeException);
83 
84 							// XImporter
85 	virtual void SAL_CALL	setTargetDocument( const ::com::sun::star::uno::Reference<
86 									::com::sun::star::lang::XComponent >& xDoc )
87 								throw (::com::sun::star::lang::IllegalArgumentException,
88 										::com::sun::star::uno::RuntimeException);
89 
90 							// XExporter
91 	virtual void SAL_CALL	setSourceDocument( const ::com::sun::star::uno::Reference<
92 									::com::sun::star::lang::XComponent >& xDoc )
93 								throw (::com::sun::star::lang::IllegalArgumentException,
94 										::com::sun::star::uno::RuntimeException);
95 
96 							// XServiceInfo
97 	virtual ::rtl::OUString SAL_CALL getImplementationName()
98 								throw(::com::sun::star::uno::RuntimeException);
99 	virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName )
100 								throw(::com::sun::star::uno::RuntimeException);
101 	virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
102 								throw(::com::sun::star::uno::RuntimeException);
103 };
104 
105 
106 #endif
107 
108