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 PPPOPTIMIZERDIALOG_HXX
25 #define PPPOPTIMIZERDIALOGOG_HXX
26 
27 #include <com/sun/star/uno/Sequence.h>
28 #include <com/sun/star/document/XExporter.hpp>
29 #include <com/sun/star/beans/XPropertyAccess.hpp>
30 #include <com/sun/star/beans/PropertyValue.hpp>
31 #include <com/sun/star/beans/XPropertySetInfo.hpp>
32 #include <com/sun/star/lang/XServiceInfo.hpp>
33 #include <com/sun/star/uno/XComponentContext.hpp>
34 #ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_
35 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
36 #endif
37 #include <com/sun/star/lang/XInitialization.hpp>
38 #include <com/sun/star/frame/XController.hpp>
39 #include <com/sun/star/frame/XDispatch.hpp>
40 #include <com/sun/star/frame/XDispatchProvider.hpp>
41 #include <cppuhelper/implbase4.hxx>
42 
43 // ----------------------
44 // - PPPOptimizerDialog -
45 // ----------------------
46 
47 class OptimizerDialog;
48 class PPPOptimizerDialog : public	::cppu::WeakImplHelper4<
49 									com::sun::star::lang::XInitialization,
50 									com::sun::star::lang::XServiceInfo,
51 									com::sun::star::frame::XDispatchProvider,
52 									com::sun::star::frame::XDispatch >
53 {
54 	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
55 	com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
56 	com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController;
57 
58 	OptimizerDialog*	mpOptimizerDialog;
59 
60 public:
61 
62 	PPPOptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF );
63 	virtual	~PPPOptimizerDialog();
64 
65 	// XInitialization
66 	void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments )
67 		throw( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException );
68 
69 	// XServiceInfo
70     virtual ::rtl::OUString SAL_CALL getImplementationName()
71         throw( com::sun::star::uno::RuntimeException );
72 
73     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName )
74         throw( com::sun::star::uno::RuntimeException );
75 
76 	virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
77         throw( com::sun::star::uno::RuntimeException );
78 
79 	// XDispatchProvider
80 	virtual com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(
81 		const com::sun::star::util::URL& aURL, const rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags )
82 			throw(com::sun::star::uno::RuntimeException);
83 
84 	virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches(
85 		const com::sun::star::uno::Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( com::sun::star::uno::RuntimeException );
86 
87     // XDispatch
88     virtual void SAL_CALL dispatch( const com::sun::star::util::URL& aURL,
89 										const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& lArguments )
90         throw( com::sun::star::uno::RuntimeException );
91 
92     virtual void SAL_CALL addStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener,
93 												const com::sun::star::util::URL& aURL )
94         throw( com::sun::star::uno::RuntimeException );
95     virtual void SAL_CALL removeStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener,
96 												const com::sun::star::util::URL& aURL )
97         throw( com::sun::star::uno::RuntimeException );
98 };
99 
100 rtl::OUString PPPOptimizerDialog_getImplementationName();
101 com::sun::star::uno::Sequence< rtl::OUString > PPPOptimizerDialog_getSupportedServiceNames();
102 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > PPPOptimizerDialog_createInstance( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & rSMgr )
103 	throw( com::sun::star::uno::Exception );
104 
105 // -----------------------------------------------------------------------------
106 
107 #endif // PPPOPTIMIZERDIALOG_HXX
108