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 PPPOPTIMIZERDIALOG_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 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
35 #include <com/sun/star/lang/XInitialization.hpp>
36 #include <com/sun/star/frame/XController.hpp>
37 #include <com/sun/star/frame/XDispatch.hpp>
38 #include <com/sun/star/frame/XDispatchProvider.hpp>
39 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
40 #include <com/sun/star/awt/XWindowPeer.hpp>
41 
42 #include <cppuhelper/implbase3.hxx>
43 #include <cppuhelper/basemutex.hxx>
44 
45 // ----------------------
46 // - PPPOptimizerDialog -
47 // ----------------------
48 
49 class PPPOptimizerDialog :  protected ::cppu::BaseMutex,
50                             public	::cppu::WeakImplHelper3<
51 									com::sun::star::lang::XInitialization,
52 									com::sun::star::lang::XServiceInfo,
53                                     com::sun::star::ui::dialogs::XExecutableDialog >
54 {
55 private:
56 	com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
57     bool mbInitialized;
58     com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame;
59 	com::sun::star::uno::Reference< com::sun::star::awt::XWindowPeer > mxParentWindow;
60     rtl::OUString msTitle;
61 
62 public:
63 
64 	PPPOptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext );
65 	virtual	~PPPOptimizerDialog();
66 
67 	// XInitialization
68 	void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments )
69 		throw( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException );
70 
71     virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException);
72     virtual ::sal_Int16 SAL_CALL execute(  ) throw (::com::sun::star::uno::RuntimeException);
73 
74 	// XServiceInfo
75     virtual ::rtl::OUString SAL_CALL getImplementationName()
76         throw( com::sun::star::uno::RuntimeException );
77 
78     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName )
79         throw( com::sun::star::uno::RuntimeException );
80 
81 	virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
82         throw( com::sun::star::uno::RuntimeException );
83 };
84 
85 rtl::OUString PPPOptimizerDialog_getImplementationName();
86 com::sun::star::uno::Sequence< rtl::OUString > PPPOptimizerDialog_getSupportedServiceNames();
87 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > PPPOptimizerDialog_createInstance( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & rSMgr )
88 	throw( com::sun::star::uno::Exception );
89 
90 // -----------------------------------------------------------------------------
91 
92 #endif // PPPOPTIMIZERDIALOG_HXX
93