1 /************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23 24 // MARKER(update_precomp.py): autogen include statement, do not remove 25 26 27 #ifndef EXTENSIONS_OOOIMPROVEMENT_CORECONTROLLER_HXX 28 #define EXTENSIONS_OOOIMPROVEMENT_CORECONTROLLER_HXX 29 30 #include <com/sun/star/lang/XServiceInfo.hpp> 31 #include <com/sun/star/oooimprovement/XCoreController.hpp> 32 #include <com/sun/star/uno/XComponentContext.hpp> 33 #include <com/sun/star/lang/XMultiServiceFactory.hpp> 34 #include <cppuhelper/implbase2.hxx> 35 36 37 namespace oooimprovement 38 { 39 #ifdef css 40 #error css defined globally 41 #endif 42 #define css ::com::sun::star 43 class CoreController : public ::cppu::WeakImplHelper2< 44 css::oooimprovement::XCoreController, 45 css::lang::XServiceInfo> 46 { 47 public: 48 // css::lang::XServiceInfo - static version 49 static ::rtl::OUString SAL_CALL getImplementationName_static(); 50 static css::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames_static(); 51 //static css::uno::Reference< css::uno::XInterface> SAL_CALL Create( 52 // const css::uno::Reference<css::uno::XComponentContext>& context); 53 54 static css::uno::Reference< css::uno::XInterface> SAL_CALL Create( 55 const css::uno::Reference< css::lang::XMultiServiceFactory>& sm); 56 57 protected: 58 CoreController(const css::uno::Reference< css::uno::XComponentContext>& context); 59 CoreController(const css::uno::Reference< css::lang::XMultiServiceFactory>& sm); 60 virtual ~CoreController(); 61 62 // css::oooimprovement::XCoreController 63 virtual sal_Bool SAL_CALL enablingUiEventsLoggerAllowed(sal_Int16 version) 64 throw(css::uno::RuntimeException); 65 virtual sal_Bool SAL_CALL showBuiltinOptionsPage(sal_Int16 version) 66 throw(css::uno::RuntimeException); 67 68 // css::lang::XServiceInfo 69 virtual ::rtl::OUString SAL_CALL getImplementationName() 70 throw(css::uno::RuntimeException); 71 virtual ::sal_Bool SAL_CALL supportsService(const ::rtl::OUString& service_name) 72 throw(css::uno::RuntimeException); 73 virtual css::uno::Sequence< ::rtl::OUString> SAL_CALL getSupportedServiceNames() 74 throw(css::uno::RuntimeException); 75 76 private: 77 css::uno::Reference< css::lang::XMultiServiceFactory> m_ServiceFactory; 78 }; 79 #undef css 80 } 81 #endif 82