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 #ifndef SC_SIDEBAR_PANEL_FACTORY_HXX 23 #define SC_SIDEBAR_PANEL_FACTORY_HXX 24 25 #include <cppuhelper/compbase1.hxx> 26 #include <cppuhelper/basemutex.hxx> 27 #include <com/sun/star/ui/XUIElementFactory.hpp> 28 #include <boost/noncopyable.hpp> 29 30 namespace css = ::com::sun::star; 31 namespace cssu = ::com::sun::star::uno; 32 33 namespace sc { namespace sidebar { 34 35 namespace 36 { 37 typedef ::cppu::WeakComponentImplHelper1 < 38 css::ui::XUIElementFactory 39 > PanelFactoryInterfaceBase; 40 } 41 42 43 class ScPanelFactory 44 : private ::boost::noncopyable, 45 private ::cppu::BaseMutex, 46 public PanelFactoryInterfaceBase 47 { 48 public: 49 static ::rtl::OUString SAL_CALL getImplementationName(void); 50 static cssu::Reference<cssu::XInterface> SAL_CALL createInstance( 51 const cssu::Reference<css::lang::XMultiServiceFactory>& rxFactory); 52 static cssu::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames(void); 53 54 ScPanelFactory(void); 55 virtual ~ScPanelFactory(void); 56 57 // XUIElementFactory 58 cssu::Reference<css::ui::XUIElement> SAL_CALL createUIElement( 59 const ::rtl::OUString& rsResourceURL, 60 const ::cssu::Sequence<css::beans::PropertyValue>& rArguments) 61 throw( 62 css::container::NoSuchElementException, 63 css::lang::IllegalArgumentException, 64 cssu::RuntimeException ); 65 }; 66 67 68 } } // end of namespace sc::sidebar 69 70 #endif 71