1353d8f4dSAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3353d8f4dSAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4353d8f4dSAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5353d8f4dSAndrew Rist  * distributed with this work for additional information
6353d8f4dSAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7353d8f4dSAndrew Rist  * to you under the Apache License, Version 2.0 (the
8353d8f4dSAndrew Rist  * "License"); you may not use this file except in compliance
9353d8f4dSAndrew Rist  * with the License.  You may obtain a copy of the License at
10353d8f4dSAndrew Rist  *
11353d8f4dSAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12353d8f4dSAndrew Rist  *
13353d8f4dSAndrew Rist  * Unless required by applicable law or agreed to in writing,
14353d8f4dSAndrew Rist  * software distributed under the License is distributed on an
15353d8f4dSAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16353d8f4dSAndrew Rist  * KIND, either express or implied.  See the License for the
17353d8f4dSAndrew Rist  * specific language governing permissions and limitations
18353d8f4dSAndrew Rist  * under the License.
19353d8f4dSAndrew Rist  *
20353d8f4dSAndrew Rist  *************************************************************/
21353d8f4dSAndrew Rist 
22353d8f4dSAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir #ifndef SD_WORKBENCH_CTP_FACTORY_HXX
25cdf0e10cSrcweir #define SD_WORKBENCH_CTP_FACTORY_HXX
26cdf0e10cSrcweir 
27cdf0e10cSrcweir /** === begin UNO includes === **/
28cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
29cdf0e10cSrcweir #include <com/sun/star/ui/XUIElementFactory.hpp>
30cdf0e10cSrcweir #include <com/sun/star/lang/XServiceInfo.hpp>
31cdf0e10cSrcweir /** === end UNO includes === **/
32cdf0e10cSrcweir 
33cdf0e10cSrcweir #include <cppuhelper/implbase2.hxx>
34cdf0e10cSrcweir #include <cppuhelper/basemutex.hxx>
35cdf0e10cSrcweir 
36cdf0e10cSrcweir //......................................................................................................................
37cdf0e10cSrcweir namespace sd { namespace colortoolpanel
38cdf0e10cSrcweir {
39cdf0e10cSrcweir //......................................................................................................................
40cdf0e10cSrcweir 
41cdf0e10cSrcweir     class FactoryGuard;
42cdf0e10cSrcweir 
43cdf0e10cSrcweir 	//==================================================================================================================
44cdf0e10cSrcweir 	//= ToolPanelFactory
45cdf0e10cSrcweir 	//==================================================================================================================
46cdf0e10cSrcweir     typedef ::cppu::WeakImplHelper2 <   ::com::sun::star::ui::XUIElementFactory
47cdf0e10cSrcweir                                     ,   ::com::sun::star::lang::XServiceInfo
48cdf0e10cSrcweir                                     >   ToolPanelFactory_Base;
49cdf0e10cSrcweir     class ToolPanelFactory   :public ::cppu::BaseMutex
50cdf0e10cSrcweir                             ,public ToolPanelFactory_Base
51cdf0e10cSrcweir 	{
52cdf0e10cSrcweir     public:
53cdf0e10cSrcweir         ToolPanelFactory(
54cdf0e10cSrcweir             const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext
55cdf0e10cSrcweir         );
56cdf0e10cSrcweir         ~ToolPanelFactory();
57cdf0e10cSrcweir 
58cdf0e10cSrcweir         // XUIElementFactory
59cdf0e10cSrcweir         virtual ::com::sun::star::uno::Reference< ::com::sun::star::ui::XUIElement > SAL_CALL createUIElement( const ::rtl::OUString& i_rResourceURL, const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& i_rArgs ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
60cdf0e10cSrcweir 
61cdf0e10cSrcweir         // XServiceInfo
62cdf0e10cSrcweir         virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException);
63cdf0e10cSrcweir         virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
64cdf0e10cSrcweir         virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException);
65cdf0e10cSrcweir 
66cdf0e10cSrcweir         // XServiceInfo - static versions
67cdf0e10cSrcweir         static ::rtl::OUString SAL_CALL getImplementationName_static(  ) throw (::com::sun::star::uno::RuntimeException);
68cdf0e10cSrcweir         static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static(  ) throw (::com::sun::star::uno::RuntimeException);
69cdf0e10cSrcweir         static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL Create( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext ) throw (::com::sun::star::uno::RuntimeException);
70cdf0e10cSrcweir 
71cdf0e10cSrcweir     private:
72cdf0e10cSrcweir         const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
73cdf0e10cSrcweir                 m_xContext;
74cdf0e10cSrcweir 	};
75cdf0e10cSrcweir 
76cdf0e10cSrcweir //......................................................................................................................
77cdf0e10cSrcweir } } // namespace sd::colortoolpanel
78cdf0e10cSrcweir //......................................................................................................................
79cdf0e10cSrcweir 
80cdf0e10cSrcweir #endif // SD_WORKBENCH_CTP_FACTORY_HXX
81