xref: /AOO41X/main/toolkit/source/helper/registerservices.cxx (revision 47148b3bc50811ceb41802e4cc50a5db21535900)
1*b0724fc6SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
3*b0724fc6SAndrew Rist  * Licensed to the Apache Software Foundation (ASF) under one
4*b0724fc6SAndrew Rist  * or more contributor license agreements.  See the NOTICE file
5*b0724fc6SAndrew Rist  * distributed with this work for additional information
6*b0724fc6SAndrew Rist  * regarding copyright ownership.  The ASF licenses this file
7*b0724fc6SAndrew Rist  * to you under the Apache License, Version 2.0 (the
8*b0724fc6SAndrew Rist  * "License"); you may not use this file except in compliance
9*b0724fc6SAndrew Rist  * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir  *
11*b0724fc6SAndrew Rist  *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir  *
13*b0724fc6SAndrew Rist  * Unless required by applicable law or agreed to in writing,
14*b0724fc6SAndrew Rist  * software distributed under the License is distributed on an
15*b0724fc6SAndrew Rist  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*b0724fc6SAndrew Rist  * KIND, either express or implied.  See the License for the
17*b0724fc6SAndrew Rist  * specific language governing permissions and limitations
18*b0724fc6SAndrew Rist  * under the License.
19cdf0e10cSrcweir  *
20*b0724fc6SAndrew Rist  *************************************************************/
21*b0724fc6SAndrew Rist 
22*b0724fc6SAndrew Rist 
23cdf0e10cSrcweir 
24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
25cdf0e10cSrcweir #include "precompiled_toolkit.hxx"
26cdf0e10cSrcweir #include <com/sun/star/lang/XSingleServiceFactory.hpp>
27cdf0e10cSrcweir #include <com/sun/star/lang/XMultiServiceFactory.hpp>
28cdf0e10cSrcweir #include <com/sun/star/registry/XRegistryKey.hpp>
29cdf0e10cSrcweir #include <toolkit/controls/geometrycontrolmodel.hxx>
30cdf0e10cSrcweir #include <cppuhelper/factory.hxx>
31cdf0e10cSrcweir #include <cppuhelper/weak.hxx>
32cdf0e10cSrcweir #include <osl/mutex.hxx>
33cdf0e10cSrcweir #include <toolkit/helper/servicenames.hxx>
34cdf0e10cSrcweir #include <toolkit/helper/macros.hxx>
35cdf0e10cSrcweir #include <toolkit/awt/vclxtoolkit.hxx>
36cdf0e10cSrcweir #include <toolkit/awt/vclxmenu.hxx>
37cdf0e10cSrcweir #include <toolkit/awt/vclxpointer.hxx>
38cdf0e10cSrcweir #include <toolkit/awt/vclxprinter.hxx>
39cdf0e10cSrcweir #include <toolkit/controls/unocontrols.hxx>
40cdf0e10cSrcweir #include <toolkit/controls/unocontrolcontainer.hxx>
41cdf0e10cSrcweir #include <toolkit/controls/unocontrolcontainermodel.hxx>
42cdf0e10cSrcweir #include <toolkit/controls/stdtabcontroller.hxx>
43cdf0e10cSrcweir #include <toolkit/controls/stdtabcontrollermodel.hxx>
44cdf0e10cSrcweir #include <toolkit/controls/formattedcontrol.hxx>
45cdf0e10cSrcweir #include <toolkit/controls/roadmapcontrol.hxx>
46cdf0e10cSrcweir #include <toolkit/controls/tkscrollbar.hxx>
47cdf0e10cSrcweir #include "toolkit/controls/tkspinbutton.hxx"
48cdf0e10cSrcweir #include <toolkit/controls/animatedimages.hxx>
49cdf0e10cSrcweir #include <toolkit/controls/spinningprogress.hxx>
50cdf0e10cSrcweir #include <toolkit/controls/dialogcontrol.hxx>
51cdf0e10cSrcweir #include <toolkit/controls/tabpagemodel.hxx>
52cdf0e10cSrcweir #include <toolkit/controls/tabpagecontainer.hxx>
53cdf0e10cSrcweir #include "toolkit/dllapi.h"
54cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp>
55cdf0e10cSrcweir #include <com/sun/star/uno/XComponentContext.hpp>
56cdf0e10cSrcweir 
57cdf0e10cSrcweir namespace toolkit
58cdf0e10cSrcweir {
59cdf0e10cSrcweir     using namespace ::com::sun::star::uno;
60cdf0e10cSrcweir     using namespace ::com::sun::star::lang;
61cdf0e10cSrcweir     using namespace ::com::sun::star::registry;
62cdf0e10cSrcweir 
63cdf0e10cSrcweir     //.........................................................................
registerServices(const Reference<XRegistryKey> & _rxParentKey,const sal_Char * _pAsciiImplName,const sal_Char * _pAsciiServiceName)64cdf0e10cSrcweir     Reference< XRegistryKey > registerServices( const Reference< XRegistryKey >& _rxParentKey,
65cdf0e10cSrcweir         const sal_Char* _pAsciiImplName, const sal_Char* _pAsciiServiceName )
66cdf0e10cSrcweir     {
67cdf0e10cSrcweir         ::rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM( "/stardiv.Toolkit." ) );
68cdf0e10cSrcweir         sImplName += ::rtl::OUString::createFromAscii( _pAsciiImplName );
69cdf0e10cSrcweir         sImplName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ) );
70cdf0e10cSrcweir 
71cdf0e10cSrcweir 		Reference< XRegistryKey > xNewKey = _rxParentKey->createKey( sImplName );
72cdf0e10cSrcweir         xNewKey->createKey( ::rtl::OUString::createFromAscii( _pAsciiServiceName ) );
73cdf0e10cSrcweir 
74cdf0e10cSrcweir         return xNewKey;
75cdf0e10cSrcweir     }
76cdf0e10cSrcweir 
77cdf0e10cSrcweir     //.........................................................................
registerServices(const Reference<XRegistryKey> & _rxParentKey,const sal_Char * _pAsciiImplName,const sal_Char * _pAsciiServiceName1,const sal_Char * _pAsciiServiceName2)78cdf0e10cSrcweir     Reference< XRegistryKey > registerServices( const Reference< XRegistryKey >& _rxParentKey,
79cdf0e10cSrcweir         const sal_Char* _pAsciiImplName, const sal_Char* _pAsciiServiceName1, const sal_Char* _pAsciiServiceName2 )
80cdf0e10cSrcweir     {
81cdf0e10cSrcweir         Reference< XRegistryKey > xComponentServicesKey = registerServices( _rxParentKey, _pAsciiImplName, _pAsciiServiceName1 );
82cdf0e10cSrcweir         xComponentServicesKey->createKey( ::rtl::OUString::createFromAscii( _pAsciiServiceName2 ) );
83cdf0e10cSrcweir         return xComponentServicesKey;
84cdf0e10cSrcweir     }
85cdf0e10cSrcweir 
86cdf0e10cSrcweir     //.........................................................................
tryCreateFactory(const sal_Char * _pRequiredImplName,const sal_Char * _pComponentImplName,const sal_Char * _pAsciiServiceName1,const sal_Char * _pAsciiServiceName2,::cppu::ComponentInstantiation _pInstantiation,const Reference<XMultiServiceFactory> & _rxServiceFactory)87cdf0e10cSrcweir     void* tryCreateFactory( const sal_Char* _pRequiredImplName, const sal_Char* _pComponentImplName,
88cdf0e10cSrcweir         const sal_Char* _pAsciiServiceName1, const sal_Char* _pAsciiServiceName2,
89cdf0e10cSrcweir         ::cppu::ComponentInstantiation _pInstantiation, const Reference< XMultiServiceFactory >& _rxServiceFactory )
90cdf0e10cSrcweir     {
91cdf0e10cSrcweir         void* pReturn = NULL;
92cdf0e10cSrcweir 
93cdf0e10cSrcweir     	if ( rtl_str_compare( _pRequiredImplName, _pComponentImplName ) == 0 )
94cdf0e10cSrcweir     	{
95cdf0e10cSrcweir             Sequence< ::rtl::OUString > aServiceNames( _pAsciiServiceName2 ? 2 : 1 );
96cdf0e10cSrcweir             aServiceNames.getArray()[ 0 ] = ::rtl::OUString::createFromAscii( _pAsciiServiceName1 );
97cdf0e10cSrcweir             if ( _pAsciiServiceName2 )
98cdf0e10cSrcweir                 aServiceNames.getArray()[ 1 ] = ::rtl::OUString::createFromAscii( _pAsciiServiceName2 );
99cdf0e10cSrcweir     		Reference< XSingleServiceFactory > xFactory( ::cppu::createSingleFactory(
100cdf0e10cSrcweir                 _rxServiceFactory, ::rtl::OUString::createFromAscii( _pComponentImplName ),
101cdf0e10cSrcweir                 _pInstantiation, aServiceNames
102cdf0e10cSrcweir             ) );
103cdf0e10cSrcweir 
104cdf0e10cSrcweir 		    if ( xFactory.is() )
105cdf0e10cSrcweir 		    {
106cdf0e10cSrcweir 			    xFactory->acquire();
107cdf0e10cSrcweir 			    pReturn = xFactory.get();
108cdf0e10cSrcweir 		    }
109cdf0e10cSrcweir 	    }
110cdf0e10cSrcweir 
111cdf0e10cSrcweir         return pReturn;
112cdf0e10cSrcweir     }
113cdf0e10cSrcweir 
114cdf0e10cSrcweir 
115cdf0e10cSrcweir }
116cdf0e10cSrcweir 
117cdf0e10cSrcweir #define IMPL_CREATEINSTANCE( ImplName ) \
118cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ) \
119cdf0e10cSrcweir 	{ return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName ); }
120cdf0e10cSrcweir 
121cdf0e10cSrcweir #define IMPL_CREATEINSTANCE2( ImplName ) \
122cdf0e10cSrcweir 	::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) \
123cdf0e10cSrcweir 	{ return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName( i_factory ) ); }
124cdf0e10cSrcweir 
125cdf0e10cSrcweir #define IMPL_CREATE_INSTANCE_WITH_GEOMETRY( ImplName ) \
126cdf0e10cSrcweir     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) \
127cdf0e10cSrcweir { \
128cdf0e10cSrcweir 	return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new OGeometryControlModel< ImplName >( i_factory ) ); \
129cdf0e10cSrcweir }
130cdf0e10cSrcweir 
131cdf0e10cSrcweir #define GET_FACTORY_WITH_IMPL_PREFIX( ClassName, ImplNamePrefix, ServiceName1, ServiceName2 ) \
132cdf0e10cSrcweir     pRet = tryCreateFactory( sImplementationName, ImplNamePrefix "." #ClassName, \
133cdf0e10cSrcweir                 ServiceName1, ServiceName2, \
134cdf0e10cSrcweir                 ClassName##_CreateInstance, xServiceFactory \
135cdf0e10cSrcweir             ); \
136cdf0e10cSrcweir     if ( pRet ) \
137cdf0e10cSrcweir         return pRet; \
138cdf0e10cSrcweir 
139cdf0e10cSrcweir #define GET_FACTORY( ImplName, ServiceName1, ServiceName2 ) \
140cdf0e10cSrcweir     GET_FACTORY_WITH_IMPL_PREFIX( ImplName, "stardiv.Toolkit", ServiceName1, ServiceName2 )
141cdf0e10cSrcweir 
142cdf0e10cSrcweir using namespace toolkit;
143cdf0e10cSrcweir 
144cdf0e10cSrcweir IMPL_CREATEINSTANCE2( VCLXToolkit )
145cdf0e10cSrcweir IMPL_CREATEINSTANCE( StdTabController )
146cdf0e10cSrcweir IMPL_CREATEINSTANCE( StdTabControllerModel )
147cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoButtonControl )
148cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoCheckBoxControl )
149cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoComboBoxControl )
150cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlButtonModel )
151cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlCheckBoxModel )
152cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlComboBoxModel )
153cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlContainer )
154cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlContainerModel )
155cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlCurrencyFieldModel )
156cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlDateFieldModel )
157cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlEditModel )
158cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlFileControlModel )
159cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlFixedHyperlinkModel )
160cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlFixedTextModel )
161cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlFormattedFieldModel )
162cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlGroupBoxModel )
163cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlImageControlModel )
164cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlListBoxModel )
165cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlNumericFieldModel )
166cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlPatternFieldModel )
167cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlRadioButtonModel )
168cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlTimeFieldModel )
169cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlProgressBarModel )
170cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlScrollBarModel )
171cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoSpinButtonModel )
172cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlFixedLineModel )
173cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoCurrencyFieldControl )
174cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoDateFieldControl )
175cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoDialogControl )
176cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoEditControl )
177cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoFileControl )
178cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoFixedHyperlinkControl )
179cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoFixedTextControl )
180cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoFormattedFieldControl )
181cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoGroupBoxControl )
182cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoImageControlControl )
183cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoListBoxControl )
184cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoNumericFieldControl )
185cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoPatternFieldControl )
186cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoRadioButtonControl )
187cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoTimeFieldControl )
188cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoProgressBarControl )
189cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoScrollBarControl )
190cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoSpinButtonControl )
191cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoFixedLineControl )
192cdf0e10cSrcweir IMPL_CREATEINSTANCE( VCLXMenuBar )
193cdf0e10cSrcweir IMPL_CREATEINSTANCE( VCLXPointer )
194cdf0e10cSrcweir IMPL_CREATEINSTANCE( VCLXPopupMenu )
195cdf0e10cSrcweir IMPL_CREATEINSTANCE( VCLXPrinterServer )
196cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoRoadmapControl )
197cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlRoadmapModel )
198cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlTabPage )
199cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlTabPageModel )
200cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlTabPageContainer )
201cdf0e10cSrcweir IMPL_CREATEINSTANCE2( UnoControlTabPageContainerModel )
202cdf0e10cSrcweir IMPL_CREATEINSTANCE2( AnimatedImagesControl )
203cdf0e10cSrcweir IMPL_CREATEINSTANCE2( AnimatedImagesControlModel )
204cdf0e10cSrcweir IMPL_CREATEINSTANCE2( SpinningProgressControlModel )
205cdf0e10cSrcweir 
206cdf0e10cSrcweir IMPL_CREATE_INSTANCE_WITH_GEOMETRY( UnoControlDialogModel )
207cdf0e10cSrcweir 
208cdf0e10cSrcweir extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControl_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
209cdf0e10cSrcweir extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControlModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
210cdf0e10cSrcweir extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL MutableTreeDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
211cdf0e10cSrcweir extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridControl_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
212cdf0e10cSrcweir extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridControlModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
213cdf0e10cSrcweir extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
214cdf0e10cSrcweir extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
215cdf0e10cSrcweir extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
216cdf0e10cSrcweir extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL SortableGridDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
217cdf0e10cSrcweir 
218cdf0e10cSrcweir extern void * SAL_CALL comp_AsyncCallback_component_getFactory( const char * implName, void * serviceManager, void * registryKey );
219cdf0e10cSrcweir 
220cdf0e10cSrcweir extern void * SAL_CALL comp_Layout_component_getFactory( const char * implName, void * serviceManager, void * registryKey );
221cdf0e10cSrcweir 
222cdf0e10cSrcweir extern "C"
223cdf0e10cSrcweir {
224cdf0e10cSrcweir 
component_getImplementationEnvironment(const sal_Char ** ppEnvTypeName,uno_Environment **)225cdf0e10cSrcweir TOOLKIT_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvTypeName, uno_Environment** )
226cdf0e10cSrcweir {
227cdf0e10cSrcweir 	*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
228cdf0e10cSrcweir }
229cdf0e10cSrcweir 
230cdf0e10cSrcweir 
component_getFactory(const sal_Char * sImplementationName,void * _pServiceManager,void * _pRegistryKey)231cdf0e10cSrcweir TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, void* _pServiceManager, void* _pRegistryKey )
232cdf0e10cSrcweir {
233cdf0e10cSrcweir 	void* pRet = NULL;
234cdf0e10cSrcweir 
235cdf0e10cSrcweir 	if ( _pServiceManager )
236cdf0e10cSrcweir 	{
237cdf0e10cSrcweir         ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory =
238cdf0e10cSrcweir             static_cast< ::com::sun::star::lang::XMultiServiceFactory* >( _pServiceManager );
239cdf0e10cSrcweir 
240cdf0e10cSrcweir 		GET_FACTORY( VCLXToolkit, szServiceName_Toolkit, szServiceName2_Toolkit )
241cdf0e10cSrcweir 		GET_FACTORY( VCLXPopupMenu, szServiceName_PopupMenu, szServiceName2_PopupMenu )
242cdf0e10cSrcweir 		GET_FACTORY( VCLXMenuBar, szServiceName_MenuBar, szServiceName2_MenuBar )
243cdf0e10cSrcweir 		GET_FACTORY( VCLXPointer, szServiceName_Pointer, szServiceName2_Pointer )
244cdf0e10cSrcweir 		GET_FACTORY( UnoControlContainer, szServiceName_UnoControlContainer, szServiceName2_UnoControlContainer )
245cdf0e10cSrcweir 		GET_FACTORY( UnoControlContainerModel, szServiceName_UnoControlContainerModel, szServiceName2_UnoControlContainerModel )
246cdf0e10cSrcweir 		GET_FACTORY( StdTabController, szServiceName_TabController, szServiceName2_TabController )
247cdf0e10cSrcweir 		GET_FACTORY( StdTabControllerModel, szServiceName_TabControllerModel, szServiceName2_TabControllerModel )
248cdf0e10cSrcweir 		GET_FACTORY( UnoDialogControl, szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog )
249cdf0e10cSrcweir 		GET_FACTORY( UnoControlDialogModel, szServiceName_UnoControlDialogModel, szServiceName2_UnoControlDialogModel )
250cdf0e10cSrcweir 		GET_FACTORY( UnoEditControl, szServiceName_UnoControlEdit, szServiceName2_UnoControlEdit )
251cdf0e10cSrcweir 		GET_FACTORY( UnoControlEditModel, szServiceName_UnoControlEditModel, szServiceName2_UnoControlEditModel )
252cdf0e10cSrcweir 		GET_FACTORY( UnoDateFieldControl, szServiceName_UnoControlDateField, szServiceName2_UnoControlDateField )
253cdf0e10cSrcweir 		GET_FACTORY( UnoControlDateFieldModel, szServiceName_UnoControlDateFieldModel, szServiceName2_UnoControlDateFieldModel )
254cdf0e10cSrcweir 		GET_FACTORY( UnoTimeFieldControl, szServiceName_UnoControlTimeField, szServiceName2_UnoControlTimeField )
255cdf0e10cSrcweir 		GET_FACTORY( UnoControlTimeFieldModel, szServiceName_UnoControlTimeFieldModel, szServiceName2_UnoControlTimeFieldModel )
256cdf0e10cSrcweir 		GET_FACTORY( UnoNumericFieldControl, szServiceName_UnoControlNumericField, szServiceName2_UnoControlNumericField )
257cdf0e10cSrcweir 		GET_FACTORY( UnoControlNumericFieldModel, szServiceName_UnoControlNumericFieldModel, szServiceName2_UnoControlNumericFieldModel )
258cdf0e10cSrcweir 		GET_FACTORY( UnoCurrencyFieldControl, szServiceName_UnoControlCurrencyField, szServiceName2_UnoControlCurrencyField )
259cdf0e10cSrcweir 		GET_FACTORY( UnoControlCurrencyFieldModel, szServiceName_UnoControlCurrencyFieldModel, szServiceName2_UnoControlCurrencyFieldModel )
260cdf0e10cSrcweir 		GET_FACTORY( UnoPatternFieldControl, szServiceName_UnoControlPatternField, szServiceName2_UnoControlPatternField )
261cdf0e10cSrcweir 		GET_FACTORY( UnoControlPatternFieldModel, szServiceName_UnoControlPatternFieldModel, szServiceName2_UnoControlPatternFieldModel )
262cdf0e10cSrcweir 		GET_FACTORY( UnoFormattedFieldControl, szServiceName_UnoControlFormattedField, szServiceName2_UnoControlFormattedField )
263cdf0e10cSrcweir 		GET_FACTORY( UnoControlFormattedFieldModel, szServiceName_UnoControlFormattedFieldModel, szServiceName2_UnoControlFormattedFieldModel )
264cdf0e10cSrcweir 		GET_FACTORY( UnoFileControl, szServiceName_UnoControlFileControl, szServiceName2_UnoControlFileControl )
265cdf0e10cSrcweir 		GET_FACTORY( UnoControlFileControlModel, szServiceName_UnoControlFileControlModel, szServiceName2_UnoControlFileControlModel )
266cdf0e10cSrcweir 		GET_FACTORY( UnoButtonControl, szServiceName_UnoControlButton, szServiceName2_UnoControlButton )
267cdf0e10cSrcweir 		GET_FACTORY( UnoControlButtonModel, szServiceName_UnoControlButtonModel, szServiceName2_UnoControlButtonModel )
268cdf0e10cSrcweir 		GET_FACTORY( UnoImageControlControl, szServiceName_UnoControlImageButton, szServiceName2_UnoControlImageButton )
269cdf0e10cSrcweir 		GET_FACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageButtonModel, szServiceName2_UnoControlImageButtonModel )
270cdf0e10cSrcweir 		GET_FACTORY( UnoImageControlControl, szServiceName_UnoControlImageControl, szServiceName2_UnoControlImageControl )
271cdf0e10cSrcweir 		GET_FACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageControlModel, szServiceName2_UnoControlImageControlModel )
272cdf0e10cSrcweir 		GET_FACTORY( UnoRadioButtonControl, szServiceName_UnoControlRadioButton, szServiceName2_UnoControlRadioButton )
273cdf0e10cSrcweir 		GET_FACTORY( UnoControlRadioButtonModel, szServiceName_UnoControlRadioButtonModel, szServiceName2_UnoControlRadioButtonModel )
274cdf0e10cSrcweir 		GET_FACTORY( UnoCheckBoxControl, szServiceName_UnoControlCheckBox, szServiceName2_UnoControlCheckBox )
275cdf0e10cSrcweir 		GET_FACTORY( UnoControlCheckBoxModel, szServiceName_UnoControlCheckBoxModel, szServiceName2_UnoControlCheckBoxModel )
276cdf0e10cSrcweir 		GET_FACTORY( UnoListBoxControl, szServiceName_UnoControlListBox, szServiceName2_UnoControlListBox )
277cdf0e10cSrcweir 		GET_FACTORY( UnoControlListBoxModel, szServiceName_UnoControlListBoxModel, szServiceName2_UnoControlListBoxModel )
278cdf0e10cSrcweir 		GET_FACTORY( UnoComboBoxControl, szServiceName_UnoControlComboBox, szServiceName2_UnoControlComboBox )
279cdf0e10cSrcweir 		GET_FACTORY( UnoControlComboBoxModel, szServiceName_UnoControlComboBoxModel, szServiceName2_UnoControlComboBoxModel )
280cdf0e10cSrcweir         GET_FACTORY( UnoFixedTextControl, szServiceName_UnoControlFixedText, szServiceName2_UnoControlFixedText )
281cdf0e10cSrcweir         GET_FACTORY( UnoControlFixedTextModel, szServiceName_UnoControlFixedTextModel, szServiceName2_UnoControlFixedTextModel )
282cdf0e10cSrcweir 		GET_FACTORY( UnoGroupBoxControl, szServiceName_UnoControlGroupBox, szServiceName2_UnoControlGroupBox )
283cdf0e10cSrcweir 		GET_FACTORY( UnoControlGroupBoxModel, szServiceName_UnoControlGroupBoxModel, szServiceName2_UnoControlGroupBoxModel )
284cdf0e10cSrcweir 		GET_FACTORY( UnoProgressBarControl, szServiceName_UnoControlProgressBar, szServiceName2_UnoControlProgressBar )
285cdf0e10cSrcweir 		GET_FACTORY( UnoControlProgressBarModel, szServiceName_UnoControlProgressBarModel, szServiceName2_UnoControlProgressBarModel )
286cdf0e10cSrcweir 		GET_FACTORY( UnoScrollBarControl, szServiceName_UnoControlScrollBar, szServiceName2_UnoControlScrollBar )
287cdf0e10cSrcweir 		GET_FACTORY( UnoControlScrollBarModel, szServiceName_UnoControlScrollBarModel, szServiceName2_UnoControlScrollBarModel )
288cdf0e10cSrcweir 		GET_FACTORY( UnoFixedLineControl, szServiceName_UnoControlFixedLine, szServiceName2_UnoControlFixedLine )
289cdf0e10cSrcweir 		GET_FACTORY( UnoControlFixedLineModel, szServiceName_UnoControlFixedLineModel, szServiceName2_UnoControlFixedLineModel )
290cdf0e10cSrcweir 		GET_FACTORY( VCLXPrinterServer, szServiceName_PrinterServer, szServiceName2_PrinterServer )
291cdf0e10cSrcweir 		GET_FACTORY( UnoRoadmapControl, szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap )
292cdf0e10cSrcweir 		GET_FACTORY( UnoControlRoadmapModel, szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel )
293cdf0e10cSrcweir         GET_FACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL )
294cdf0e10cSrcweir         GET_FACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL )
295cdf0e10cSrcweir 		GET_FACTORY( TreeControl, szServiceName_TreeControl, NULL )
296cdf0e10cSrcweir 		GET_FACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL )
297cdf0e10cSrcweir 		GET_FACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL )
298cdf0e10cSrcweir         GET_FACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL )
299cdf0e10cSrcweir         GET_FACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL )
300cdf0e10cSrcweir 		GET_FACTORY( GridControl, szServiceName_GridControl, NULL );
301cdf0e10cSrcweir  		GET_FACTORY( GridControlModel, szServiceName_GridControlModel, NULL );
302cdf0e10cSrcweir 		GET_FACTORY( DefaultGridDataModel, szServiceName_DefaultGridDataModel, NULL );
303cdf0e10cSrcweir 		GET_FACTORY( DefaultGridColumnModel, szServiceName_DefaultGridColumnModel, NULL );
304cdf0e10cSrcweir 		GET_FACTORY_WITH_IMPL_PREFIX( GridColumn, "org.openoffice.comp.toolkit", szServiceName_GridColumn, NULL );
305cdf0e10cSrcweir 		GET_FACTORY_WITH_IMPL_PREFIX( SortableGridDataModel, "org.openoffice.comp.toolkit", szServiceName_SortableGridDataModel, NULL );
306cdf0e10cSrcweir 		GET_FACTORY( UnoControlTabPageModel, szServiceName_UnoControlTabPageModel, NULL )
307cdf0e10cSrcweir 		GET_FACTORY( UnoControlTabPage, szServiceName_UnoControlTabPage, NULL )
308cdf0e10cSrcweir 		GET_FACTORY( UnoControlTabPageContainerModel, szServiceName_UnoControlTabPageContainerModel, NULL )
309cdf0e10cSrcweir 		GET_FACTORY( UnoControlTabPageContainer, szServiceName_UnoControlTabPageContainer, NULL )
310cdf0e10cSrcweir         GET_FACTORY_WITH_IMPL_PREFIX( AnimatedImagesControl, "org.openoffice.comp.toolkit", szServiceName_AnimatedImagesControl, NULL )
311cdf0e10cSrcweir         GET_FACTORY_WITH_IMPL_PREFIX( AnimatedImagesControlModel, "org.openoffice.comp.toolkit", szServiceName_AnimatedImagesControlModel, NULL )
312cdf0e10cSrcweir         GET_FACTORY_WITH_IMPL_PREFIX( SpinningProgressControlModel, "org.openoffice.comp.toolkit", szServiceName_SpinningProgressControlModel, NULL )
313cdf0e10cSrcweir 
314cdf0e10cSrcweir     	if ( rtl_str_compare( sImplementationName, "com.sun.star.awt.comp.AsyncCallback" ) == 0 )
315cdf0e10cSrcweir             return comp_AsyncCallback_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey );
316cdf0e10cSrcweir 		if( pRet == 0 )
317cdf0e10cSrcweir 			pRet = comp_Layout_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey );
318cdf0e10cSrcweir 	}
319cdf0e10cSrcweir 	return pRet;
320cdf0e10cSrcweir }
321cdf0e10cSrcweir }
322cdf0e10cSrcweir 
323cdf0e10cSrcweir 
324cdf0e10cSrcweir 
325