xref: /AOO41X/main/extensions/source/oooimprovement/corecontroller.hxx (revision 1ecadb572e7010ff3b3382ad9bf179dbc6efadbb)
1 /*************************************************************************
2  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3  *
4  * Copyright 2000, 2010 Oracle and/or its affiliates.
5  *
6  * OpenOffice.org - a multi-platform office productivity suite
7  *
8  * This file is part of OpenOffice.org.
9  *
10  * OpenOffice.org is free software: you can redistribute it and/or modify
11  * it under the terms of the GNU Lesser General Public License version 3
12  * only, as published by the Free Software Foundation.
13  *
14  * OpenOffice.org is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  * GNU Lesser General Public License version 3 for more details
18  * (a copy is included in the LICENSE file that accompanied this code).
19  *
20  * You should have received a copy of the GNU Lesser General Public License
21  * version 3 along with OpenOffice.org.  If not, see
22  * <http://www.openoffice.org/license.html>
23  * for a copy of the LGPLv3 License.
24  *
25  ************************************************************************/
26 
27 // MARKER(update_precomp.py): autogen include statement, do not remove
28 
29 
30 #ifndef EXTENSIONS_OOOIMPROVEMENT_CORECONTROLLER_HXX
31 #define EXTENSIONS_OOOIMPROVEMENT_CORECONTROLLER_HXX
32 
33 #include <com/sun/star/lang/XServiceInfo.hpp>
34 #include <com/sun/star/oooimprovement/XCoreController.hpp>
35 #include <com/sun/star/uno/XComponentContext.hpp>
36 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
37 #include <cppuhelper/implbase2.hxx>
38 
39 
40 namespace oooimprovement
41 {
42     #ifdef css
43         #error css defined globally
44     #endif
45     #define css ::com::sun::star
46     class CoreController : public ::cppu::WeakImplHelper2<
47         css::oooimprovement::XCoreController,
48         css::lang::XServiceInfo>
49     {
50         public:
51             // css::lang::XServiceInfo - static version
52             static ::rtl::OUString SAL_CALL getImplementationName_static();
53             static css::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames_static();
54             //static css::uno::Reference< css::uno::XInterface> SAL_CALL Create(
55             //    const css::uno::Reference<css::uno::XComponentContext>& context);
56 
57             static css::uno::Reference< css::uno::XInterface> SAL_CALL Create(
58                 const css::uno::Reference< css::lang::XMultiServiceFactory>& sm);
59 
60         protected:
61             CoreController(const css::uno::Reference< css::uno::XComponentContext>& context);
62             CoreController(const css::uno::Reference< css::lang::XMultiServiceFactory>& sm);
63             virtual ~CoreController();
64 
65             // css::oooimprovement::XCoreController
66             virtual sal_Bool SAL_CALL enablingUiEventsLoggerAllowed(sal_Int16 version)
67                 throw(css::uno::RuntimeException);
68             virtual sal_Bool SAL_CALL showBuiltinOptionsPage(sal_Int16 version)
69                 throw(css::uno::RuntimeException);
70 
71             // css::lang::XServiceInfo
72             virtual ::rtl::OUString SAL_CALL getImplementationName()
73                 throw(css::uno::RuntimeException);
74             virtual ::sal_Bool SAL_CALL supportsService(const ::rtl::OUString& service_name)
75                 throw(css::uno::RuntimeException);
76             virtual css::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames()
77                 throw(css::uno::RuntimeException);
78 
79         private:
80             css::uno::Reference< css::lang::XMultiServiceFactory> m_ServiceFactory;
81     };
82     #undef css
83 }
84 #endif
85