1*62024513SAndre Fischer /**************************************************************
2*62024513SAndre Fischer  *
3*62024513SAndre Fischer  * Licensed to the Apache Software Foundation (ASF) under one
4*62024513SAndre Fischer  * or more contributor license agreements.  See the NOTICE file
5*62024513SAndre Fischer  * distributed with this work for additional information
6*62024513SAndre Fischer  * regarding copyright ownership.  The ASF licenses this file
7*62024513SAndre Fischer  * to you under the Apache License, Version 2.0 (the
8*62024513SAndre Fischer  * "License"); you may not use this file except in compliance
9*62024513SAndre Fischer  * with the License.  You may obtain a copy of the License at
10*62024513SAndre Fischer  *
11*62024513SAndre Fischer  *   http://www.apache.org/licenses/LICENSE-2.0
12*62024513SAndre Fischer  *
13*62024513SAndre Fischer  * Unless required by applicable law or agreed to in writing,
14*62024513SAndre Fischer  * software distributed under the License is distributed on an
15*62024513SAndre Fischer  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*62024513SAndre Fischer  * KIND, either express or implied.  See the License for the
17*62024513SAndre Fischer  * specific language governing permissions and limitations
18*62024513SAndre Fischer  * under the License.
19*62024513SAndre Fischer  *
20*62024513SAndre Fischer  *************************************************************/
21*62024513SAndre Fischer 
22*62024513SAndre Fischer #ifndef SD_SIDEBAR_PANEL_FACTORY_HXX
23*62024513SAndre Fischer #define SD_SIDEBAR_PANEL_FACTORY_HXX
24*62024513SAndre Fischer 
25*62024513SAndre Fischer #include <cppuhelper/compbase1.hxx>
26*62024513SAndre Fischer #include <cppuhelper/basemutex.hxx>
27*62024513SAndre Fischer #include <rtl/ref.hxx>
28*62024513SAndre Fischer #include "framework/Pane.hxx"
29*62024513SAndre Fischer 
30*62024513SAndre Fischer #include <com/sun/star/ui/XUIElementFactory.hpp>
31*62024513SAndre Fischer #include <com/sun/star/uno/XComponentContext.hpp>
32*62024513SAndre Fischer #include <com/sun/star/lang/XInitialization.hpp>
33*62024513SAndre Fischer 
34*62024513SAndre Fischer #include <map>
35*62024513SAndre Fischer #include <boost/noncopyable.hpp>
36*62024513SAndre Fischer #include <boost/shared_ptr.hpp>
37*62024513SAndre Fischer 
38*62024513SAndre Fischer 
39*62024513SAndre Fischer namespace css = ::com::sun::star;
40*62024513SAndre Fischer namespace cssu = ::com::sun::star::uno;
41*62024513SAndre Fischer 
42*62024513SAndre Fischer 
43*62024513SAndre Fischer namespace sd {
44*62024513SAndre Fischer     class ViewShellBase;
45*62024513SAndre Fischer }
46*62024513SAndre Fischer 
47*62024513SAndre Fischer namespace sd { namespace sidebar {
48*62024513SAndre Fischer 
49*62024513SAndre Fischer namespace
50*62024513SAndre Fischer {
51*62024513SAndre Fischer     typedef ::cppu::WeakComponentImplHelper1 <
52*62024513SAndre Fischer         css::ui::XUIElementFactory
53*62024513SAndre Fischer         > PanelFactoryInterfaceBase;
54*62024513SAndre Fischer }
55*62024513SAndre Fischer 
56*62024513SAndre Fischer 
57*62024513SAndre Fischer class PanelFactory
58*62024513SAndre Fischer     : private ::boost::noncopyable,
59*62024513SAndre Fischer       private ::cppu::BaseMutex,
60*62024513SAndre Fischer       public PanelFactoryInterfaceBase
61*62024513SAndre Fischer {
62*62024513SAndre Fischer public:
63*62024513SAndre Fischer     static ::rtl::OUString SAL_CALL getImplementationName (void);
64*62024513SAndre Fischer     static cssu::Reference<cssu::XInterface> SAL_CALL createInstance (
65*62024513SAndre Fischer         const cssu::Reference<css::lang::XMultiServiceFactory>& rxFactory);
66*62024513SAndre Fischer     static cssu::Sequence<rtl::OUString> SAL_CALL getSupportedServiceNames (void);
67*62024513SAndre Fischer 
68*62024513SAndre Fischer     PanelFactory (const cssu::Reference<cssu::XComponentContext>& rxContext);
69*62024513SAndre Fischer     virtual ~PanelFactory (void);
70*62024513SAndre Fischer 
71*62024513SAndre Fischer     virtual void SAL_CALL disposing (void);
72*62024513SAndre Fischer 
73*62024513SAndre Fischer 
74*62024513SAndre Fischer     // XUIElementFactory
75*62024513SAndre Fischer 
76*62024513SAndre Fischer     cssu::Reference<css::ui::XUIElement> SAL_CALL createUIElement (
77*62024513SAndre Fischer         const ::rtl::OUString& rsResourceURL,
78*62024513SAndre Fischer         const ::cssu::Sequence<css::beans::PropertyValue>& rArguments)
79*62024513SAndre Fischer         throw(
80*62024513SAndre Fischer             css::container::NoSuchElementException,
81*62024513SAndre Fischer             css::lang::IllegalArgumentException,
82*62024513SAndre Fischer             cssu::RuntimeException);
83*62024513SAndre Fischer };
84*62024513SAndre Fischer 
85*62024513SAndre Fischer 
86*62024513SAndre Fischer } } // end of namespace sd::sidebar
87*62024513SAndre Fischer 
88*62024513SAndre Fischer #endif
89