1*760d135fSAriel Constenla-Haile /************************************************************** 2*760d135fSAriel Constenla-Haile * 3*760d135fSAriel Constenla-Haile * Licensed to the Apache Software Foundation (ASF) under one 4*760d135fSAriel Constenla-Haile * or more contributor license agreements. See the NOTICE file 5*760d135fSAriel Constenla-Haile * distributed with this work for additional information 6*760d135fSAriel Constenla-Haile * regarding copyright ownership. The ASF licenses this file 7*760d135fSAriel Constenla-Haile * to you under the Apache License, Version 2.0 (the 8*760d135fSAriel Constenla-Haile * "License"); you may not use this file except in compliance 9*760d135fSAriel Constenla-Haile * with the License. You may obtain a copy of the License at 10*760d135fSAriel Constenla-Haile * 11*760d135fSAriel Constenla-Haile * http://www.apache.org/licenses/LICENSE-2.0 12*760d135fSAriel Constenla-Haile * 13*760d135fSAriel Constenla-Haile * Unless required by applicable law or agreed to in writing, 14*760d135fSAriel Constenla-Haile * software distributed under the License is distributed on an 15*760d135fSAriel Constenla-Haile * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*760d135fSAriel Constenla-Haile * KIND, either express or implied. See the License for the 17*760d135fSAriel Constenla-Haile * specific language governing permissions and limitations 18*760d135fSAriel Constenla-Haile * under the License. 19*760d135fSAriel Constenla-Haile * 20*760d135fSAriel Constenla-Haile *************************************************************/ 21*760d135fSAriel Constenla-Haile 22*760d135fSAriel Constenla-Haile 23*760d135fSAriel Constenla-Haile 24*760d135fSAriel Constenla-Haile #ifndef SD_WORKBENCH_CTP_FACTORY_HXX 25*760d135fSAriel Constenla-Haile #define SD_WORKBENCH_CTP_FACTORY_HXX 26*760d135fSAriel Constenla-Haile 27*760d135fSAriel Constenla-Haile /** === begin UNO includes === **/ 28*760d135fSAriel Constenla-Haile #include <com/sun/star/uno/XComponentContext.hpp> 29*760d135fSAriel Constenla-Haile #include <com/sun/star/ui/XUIElementFactory.hpp> 30*760d135fSAriel Constenla-Haile #include <com/sun/star/lang/XServiceInfo.hpp> 31*760d135fSAriel Constenla-Haile /** === end UNO includes === **/ 32*760d135fSAriel Constenla-Haile 33*760d135fSAriel Constenla-Haile #include <cppuhelper/implbase2.hxx> 34*760d135fSAriel Constenla-Haile #include <cppuhelper/basemutex.hxx> 35*760d135fSAriel Constenla-Haile 36*760d135fSAriel Constenla-Haile //...................................................................................................................... 37*760d135fSAriel Constenla-Haile namespace sd { namespace colortoolpanel 38*760d135fSAriel Constenla-Haile { 39*760d135fSAriel Constenla-Haile //...................................................................................................................... 40*760d135fSAriel Constenla-Haile 41*760d135fSAriel Constenla-Haile class FactoryGuard; 42*760d135fSAriel Constenla-Haile 43*760d135fSAriel Constenla-Haile //================================================================================================================== 44*760d135fSAriel Constenla-Haile //= ToolPanelFactory 45*760d135fSAriel Constenla-Haile //================================================================================================================== 46*760d135fSAriel Constenla-Haile typedef ::cppu::WeakImplHelper2 < ::com::sun::star::ui::XUIElementFactory 47*760d135fSAriel Constenla-Haile , ::com::sun::star::lang::XServiceInfo 48*760d135fSAriel Constenla-Haile > ToolPanelFactory_Base; 49*760d135fSAriel Constenla-Haile class ToolPanelFactory :public ::cppu::BaseMutex 50*760d135fSAriel Constenla-Haile ,public ToolPanelFactory_Base 51*760d135fSAriel Constenla-Haile { 52*760d135fSAriel Constenla-Haile public: 53*760d135fSAriel Constenla-Haile ToolPanelFactory( 54*760d135fSAriel Constenla-Haile const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_rContext 55*760d135fSAriel Constenla-Haile ); 56*760d135fSAriel Constenla-Haile ~ToolPanelFactory(); 57*760d135fSAriel Constenla-Haile 58*760d135fSAriel Constenla-Haile // XUIElementFactory 59*760d135fSAriel Constenla-Haile 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); 60*760d135fSAriel Constenla-Haile 61*760d135fSAriel Constenla-Haile // XServiceInfo 62*760d135fSAriel Constenla-Haile virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw (::com::sun::star::uno::RuntimeException); 63*760d135fSAriel Constenla-Haile virtual ::sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException); 64*760d135fSAriel Constenla-Haile virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException); 65*760d135fSAriel Constenla-Haile 66*760d135fSAriel Constenla-Haile // XServiceInfo - static versions 67*760d135fSAriel Constenla-Haile static ::rtl::OUString SAL_CALL getImplementationName_static( ) throw (::com::sun::star::uno::RuntimeException); 68*760d135fSAriel Constenla-Haile static ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames_static( ) throw (::com::sun::star::uno::RuntimeException); 69*760d135fSAriel Constenla-Haile 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); 70*760d135fSAriel Constenla-Haile 71*760d135fSAriel Constenla-Haile private: 72*760d135fSAriel Constenla-Haile const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > 73*760d135fSAriel Constenla-Haile m_xContext; 74*760d135fSAriel Constenla-Haile }; 75*760d135fSAriel Constenla-Haile 76*760d135fSAriel Constenla-Haile //...................................................................................................................... 77*760d135fSAriel Constenla-Haile } } // namespace sd::colortoolpanel 78*760d135fSAriel Constenla-Haile //...................................................................................................................... 79*760d135fSAriel Constenla-Haile 80*760d135fSAriel Constenla-Haile #endif // SD_WORKBENCH_CTP_FACTORY_HXX 81