1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: pppoptimizer.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef PPPOPTIMIZER_HXX
32 #define PPPOPTIMIZER_HXX
34 #include <cppuhelper/implbase4.hxx>
35 #include <com/sun/star/frame/XDispatch.hpp>
36 #include <com/sun/star/frame/XDispatchProvider.hpp>
37 #include <com/sun/star/lang/XServiceInfo.hpp>
38 #include <com/sun/star/lang/XMultiComponentFactory.hpp>
39 #include <com/sun/star/uno/XComponentContext.hpp>
40 #include <com/sun/star/lang/XInitialization.hpp>
41 #include <com/sun/star/frame/XController.hpp>
42 #include <comphelper/property.hxx>
48 class PPPOptimizer
: 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
>
54 com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
> mxMSF
;
55 com::sun::star::uno::Reference
< com::sun::star::frame::XController
> mxController
;
59 PPPOptimizer( const com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
>& rxMSF
);
60 virtual ~PPPOptimizer();
63 void SAL_CALL
initialize( const com::sun::star::uno::Sequence
< com::sun::star::uno::Any
>& aArguments
)
64 throw( com::sun::star::uno::Exception
, com::sun::star::uno::RuntimeException
);
67 virtual ::rtl::OUString SAL_CALL
getImplementationName()
68 throw( com::sun::star::uno::RuntimeException
);
70 virtual sal_Bool SAL_CALL
supportsService( const ::rtl::OUString
& sServiceName
)
71 throw( com::sun::star::uno::RuntimeException
);
73 virtual com::sun::star::uno::Sequence
< ::rtl::OUString
> SAL_CALL
getSupportedServiceNames()
74 throw( com::sun::star::uno::RuntimeException
);
77 virtual com::sun::star::uno::Reference
< com::sun::star::frame::XDispatch
> SAL_CALL
queryDispatch(
78 const com::sun::star::util::URL
& aURL
, const rtl::OUString
& aTargetFrameName
, sal_Int32 nSearchFlags
)
79 throw(com::sun::star::uno::RuntimeException
);
81 virtual com::sun::star::uno::Sequence
< com::sun::star::uno::Reference
< com::sun::star::frame::XDispatch
> > SAL_CALL
queryDispatches(
82 const com::sun::star::uno::Sequence
< com::sun::star::frame::DispatchDescriptor
>& aDescripts
) throw( com::sun::star::uno::RuntimeException
);
85 virtual void SAL_CALL
dispatch( const com::sun::star::util::URL
& aURL
,
86 const com::sun::star::uno::Sequence
< com::sun::star::beans::PropertyValue
>& lArguments
)
87 throw( com::sun::star::uno::RuntimeException
);
89 virtual void SAL_CALL
addStatusListener( const com::sun::star::uno::Reference
< com::sun::star::frame::XStatusListener
>& xListener
,
90 const com::sun::star::util::URL
& aURL
)
91 throw( com::sun::star::uno::RuntimeException
);
92 virtual void SAL_CALL
removeStatusListener( 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
);
96 static sal_Int64
GetFileSize( const rtl::OUString
& rURL
);
99 rtl::OUString
PPPOptimizer_getImplementationName();
100 com::sun::star::uno::Sequence
< rtl::OUString
> PPPOptimizer_getSupportedServiceNames();
101 com::sun::star::uno::Reference
< com::sun::star::uno::XInterface
> PPPOptimizer_createInstance( const com::sun::star::uno::Reference
< com::sun::star::uno::XComponentContext
> & rSMgr
)
102 throw( com::sun::star::uno::Exception
);
104 #endif // PPPOPTIMIZER_HXX