106bcd5d2SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 306bcd5d2SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 406bcd5d2SAndrew Rist * or more contributor license agreements. See the NOTICE file 506bcd5d2SAndrew Rist * distributed with this work for additional information 606bcd5d2SAndrew Rist * regarding copyright ownership. The ASF licenses this file 706bcd5d2SAndrew Rist * to you under the Apache License, Version 2.0 (the 806bcd5d2SAndrew Rist * "License"); you may not use this file except in compliance 906bcd5d2SAndrew Rist * with the License. You may obtain a copy of the License at 1006bcd5d2SAndrew Rist * 1106bcd5d2SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 1206bcd5d2SAndrew Rist * 1306bcd5d2SAndrew Rist * Unless required by applicable law or agreed to in writing, 1406bcd5d2SAndrew Rist * software distributed under the License is distributed on an 1506bcd5d2SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 1606bcd5d2SAndrew Rist * KIND, either express or implied. See the License for the 1706bcd5d2SAndrew Rist * specific language governing permissions and limitations 1806bcd5d2SAndrew Rist * under the License. 1906bcd5d2SAndrew Rist * 2006bcd5d2SAndrew Rist *************************************************************/ 2106bcd5d2SAndrew Rist 2206bcd5d2SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef PPPOPTIMIZER_HXX 25cdf0e10cSrcweir #define PPPOPTIMIZER_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <cppuhelper/implbase4.hxx> 28cdf0e10cSrcweir #include <com/sun/star/frame/XDispatch.hpp> 29cdf0e10cSrcweir #include <com/sun/star/frame/XDispatchProvider.hpp> 30cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp> 31cdf0e10cSrcweir #include <com/sun/star/lang/XMultiComponentFactory.hpp> 32cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp> 33cdf0e10cSrcweir #include <com/sun/star/lang/XInitialization.hpp> 34cdf0e10cSrcweir #include <com/sun/star/frame/XController.hpp> 35cdf0e10cSrcweir 36cdf0e10cSrcweir // ---------------- 37cdf0e10cSrcweir // - PPPOptimizer - 38cdf0e10cSrcweir // ---------------- 39cdf0e10cSrcweir 40cdf0e10cSrcweir class PPPOptimizer : public cppu::WeakImplHelper4< 41cdf0e10cSrcweir com::sun::star::lang::XInitialization, 42cdf0e10cSrcweir com::sun::star::lang::XServiceInfo, 43cdf0e10cSrcweir com::sun::star::frame::XDispatchProvider, 44cdf0e10cSrcweir com::sun::star::frame::XDispatch > 45cdf0e10cSrcweir { 46*597a4c59SAriel Constenla-Haile com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxContext; 47cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController; 48cdf0e10cSrcweir 49cdf0e10cSrcweir public: 50cdf0e10cSrcweir 51*597a4c59SAriel Constenla-Haile PPPOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext ); 52cdf0e10cSrcweir virtual ~PPPOptimizer(); 53cdf0e10cSrcweir 54cdf0e10cSrcweir // XInitialization 55cdf0e10cSrcweir void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments ) 56cdf0e10cSrcweir throw( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException ); 57cdf0e10cSrcweir 58cdf0e10cSrcweir // XServiceInfo 59cdf0e10cSrcweir virtual ::rtl::OUString SAL_CALL getImplementationName() 60cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 61cdf0e10cSrcweir 62cdf0e10cSrcweir virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& sServiceName ) 63cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 64cdf0e10cSrcweir 65cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() 66cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 67cdf0e10cSrcweir 68cdf0e10cSrcweir // XDispatchProvider 69cdf0e10cSrcweir virtual com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > SAL_CALL queryDispatch( 70cdf0e10cSrcweir const com::sun::star::util::URL& aURL, const rtl::OUString& aTargetFrameName, sal_Int32 nSearchFlags ) 71cdf0e10cSrcweir throw(com::sun::star::uno::RuntimeException); 72cdf0e10cSrcweir 73cdf0e10cSrcweir virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches( 74cdf0e10cSrcweir const com::sun::star::uno::Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( com::sun::star::uno::RuntimeException ); 75cdf0e10cSrcweir 76cdf0e10cSrcweir // XDispatch 77cdf0e10cSrcweir virtual void SAL_CALL dispatch( const com::sun::star::util::URL& aURL, 78cdf0e10cSrcweir const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& lArguments ) 79cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 80cdf0e10cSrcweir 81cdf0e10cSrcweir virtual void SAL_CALL addStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener, 82cdf0e10cSrcweir const com::sun::star::util::URL& aURL ) 83cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 84cdf0e10cSrcweir virtual void SAL_CALL removeStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener, 85cdf0e10cSrcweir const com::sun::star::util::URL& aURL ) 86cdf0e10cSrcweir throw( com::sun::star::uno::RuntimeException ); 87cdf0e10cSrcweir 88cdf0e10cSrcweir static sal_Int64 GetFileSize( const rtl::OUString& rURL ); 89cdf0e10cSrcweir }; 90cdf0e10cSrcweir 91cdf0e10cSrcweir rtl::OUString PPPOptimizer_getImplementationName(); 92cdf0e10cSrcweir com::sun::star::uno::Sequence< rtl::OUString > PPPOptimizer_getSupportedServiceNames(); 93cdf0e10cSrcweir com::sun::star::uno::Reference< com::sun::star::uno::XInterface > PPPOptimizer_createInstance( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & rSMgr ) 94cdf0e10cSrcweir throw( com::sun::star::uno::Exception ); 95cdf0e10cSrcweir 96cdf0e10cSrcweir #endif // PPPOPTIMIZER_HXX 97