1 /************************************************************************* 2 * 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * Copyright 2000, 2010 Oracle and/or its affiliates. 6 * 7 * OpenOffice.org - a multi-platform office productivity suite 8 * 9 * This file is part of OpenOffice.org. 10 * 11 * OpenOffice.org is free software: you can redistribute it and/or modify 12 * it under the terms of the GNU Lesser General Public License version 3 13 * only, as published by the Free Software Foundation. 14 * 15 * OpenOffice.org is distributed in the hope that it will be useful, 16 * but WITHOUT ANY WARRANTY; without even the implied warranty of 17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18 * GNU Lesser General Public License version 3 for more details 19 * (a copy is included in the LICENSE file that accompanied this code). 20 * 21 * You should have received a copy of the GNU Lesser General Public License 22 * version 3 along with OpenOffice.org. If not, see 23 * <http://www.openoffice.org/license.html> 24 * for a copy of the LGPLv3 License. 25 * 26 ************************************************************************/ 27 28 #ifndef PPPOPTIMIZERDIALOG_HXX 29 #define PPPOPTIMIZERDIALOGOG_HXX 30 31 #include <com/sun/star/uno/Sequence.h> 32 #include <com/sun/star/document/XExporter.hpp> 33 #include <com/sun/star/beans/XPropertyAccess.hpp> 34 #include <com/sun/star/beans/PropertyValue.hpp> 35 #include <com/sun/star/beans/XPropertySetInfo.hpp> 36 #include <com/sun/star/lang/XServiceInfo.hpp> 37 #include <com/sun/star/uno/XComponentContext.hpp> 38 #ifndef _COM_SUN_STAR_LANG_XMULTI_COMPONENT_FACTORY_HPP_ 39 #include <com/sun/star/lang/XMultiComponentFactory.hpp> 40 #endif 41 #include <com/sun/star/lang/XInitialization.hpp> 42 #include <com/sun/star/frame/XController.hpp> 43 #include <com/sun/star/frame/XDispatch.hpp> 44 #include <com/sun/star/frame/XDispatchProvider.hpp> 45 #include <cppuhelper/implbase4.hxx> 46 47 // ---------------------- 48 // - PPPOptimizerDialog - 49 // ---------------------- 50 51 class OptimizerDialog; 52 class PPPOptimizerDialog : public ::cppu::WeakImplHelper4< 53 com::sun::star::lang::XInitialization, 54 com::sun::star::lang::XServiceInfo, 55 com::sun::star::frame::XDispatchProvider, 56 com::sun::star::frame::XDispatch > 57 { 58 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF; 59 com::sun::star::uno::Reference< com::sun::star::frame::XFrame > mxFrame; 60 com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController; 61 62 OptimizerDialog* mpOptimizerDialog; 63 64 public: 65 66 PPPOptimizerDialog( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF ); 67 virtual ~PPPOptimizerDialog(); 68 69 // XInitialization 70 void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments ) 71 throw( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException ); 72 73 // XServiceInfo 74 virtual ::rtl::OUString SAL_CALL getImplementationName() 75 throw( com::sun::star::uno::RuntimeException ); 76 77 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName ) 78 throw( com::sun::star::uno::RuntimeException ); 79 80 virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 81 throw( com::sun::star::uno::RuntimeException ); 82 83 // XDispatchProvider 84 virtual com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( 85 const com::sun::star::util::URL& aURL, const rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags ) 86 throw(com::sun::star::uno::RuntimeException); 87 88 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( 89 const com::sun::star::uno::Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( com::sun::star::uno::RuntimeException ); 90 91 // XDispatch 92 virtual void SAL_CALL dispatch( const com::sun::star::util::URL& aURL, 93 const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& lArguments ) 94 throw( com::sun::star::uno::RuntimeException ); 95 96 virtual void SAL_CALL addStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener, 97 const com::sun::star::util::URL& aURL ) 98 throw( com::sun::star::uno::RuntimeException ); 99 virtual void SAL_CALL removeStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener, 100 const com::sun::star::util::URL& aURL ) 101 throw( com::sun::star::uno::RuntimeException ); 102 }; 103 104 rtl::OUString PPPOptimizerDialog_getImplementationName(); 105 com::sun::star::uno::Sequence< rtl::OUString > PPPOptimizerDialog_getSupportedServiceNames(); 106 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > PPPOptimizerDialog_createInstance( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & rSMgr ) 107 throw( com::sun::star::uno::Exception ); 108 109 // ----------------------------------------------------------------------------- 110 111 #endif // PPPOPTIMIZERDIALOG_HXX 112