Updated core
[LibreOffice.git] / sdext / source / minimizer / pppoptimizer.hxx
blobf01f4dc31c52100810f0f1e901dc334057e1ee75
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
20 #ifndef PPPOPTIMIZER_HXX
21 #define PPPOPTIMIZER_HXX
23 #include <cppuhelper/implbase4.hxx>
24 #include <com/sun/star/frame/XDispatch.hpp>
25 #include <com/sun/star/frame/XDispatchProvider.hpp>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
28 #include <com/sun/star/uno/XComponentContext.hpp>
29 #include <com/sun/star/lang/XInitialization.hpp>
30 #include <com/sun/star/frame/XController.hpp>
32 // ----------------
33 // - PPPOptimizer -
34 // ----------------
36 class PPPOptimizer : public cppu::WeakImplHelper4<
37 com::sun::star::lang::XInitialization,
38 com::sun::star::lang::XServiceInfo,
39 com::sun::star::frame::XDispatchProvider,
40 com::sun::star::frame::XDispatch >
42 com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > mxMSF;
43 com::sun::star::uno::Reference< com::sun::star::frame::XController > mxController;
45 public:
47 PPPOptimizer( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxMSF );
48 virtual ~PPPOptimizer();
50 // XInitialization
51 void SAL_CALL initialize( const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& aArguments )
52 throw( com::sun::star::uno::Exception, com::sun::star::uno::RuntimeException );
54 // XServiceInfo
55 virtual OUString SAL_CALL getImplementationName()
56 throw( com::sun::star::uno::RuntimeException );
58 virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName )
59 throw( com::sun::star::uno::RuntimeException );
61 virtual com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames()
62 throw( com::sun::star::uno::RuntimeException );
64 // XDispatchProvider
65 virtual com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > SAL_CALL queryDispatch(
66 const com::sun::star::util::URL& aURL, const OUString& aTargetFrameName, sal_Int32 nSearchFlags )
67 throw(com::sun::star::uno::RuntimeException);
69 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Reference< com::sun::star::frame::XDispatch > > SAL_CALL queryDispatches(
70 const com::sun::star::uno::Sequence< com::sun::star::frame::DispatchDescriptor >& aDescripts ) throw( com::sun::star::uno::RuntimeException );
72 // XDispatch
73 virtual void SAL_CALL dispatch( const com::sun::star::util::URL& aURL,
74 const com::sun::star::uno::Sequence< com::sun::star::beans::PropertyValue >& lArguments )
75 throw( com::sun::star::uno::RuntimeException );
77 virtual void SAL_CALL addStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener,
78 const com::sun::star::util::URL& aURL )
79 throw( com::sun::star::uno::RuntimeException );
80 virtual void SAL_CALL removeStatusListener( const com::sun::star::uno::Reference< com::sun::star::frame::XStatusListener >& xListener,
81 const com::sun::star::util::URL& aURL )
82 throw( com::sun::star::uno::RuntimeException );
84 static sal_Int64 GetFileSize( const OUString& rURL );
87 OUString PPPOptimizer_getImplementationName();
88 com::sun::star::uno::Sequence< OUString > PPPOptimizer_getSupportedServiceNames();
89 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > PPPOptimizer_createInstance( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > & rSMgr )
90 throw( com::sun::star::uno::Exception );
92 #endif // PPPOPTIMIZER_HXX
94 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */