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