Update to m13
[ooovba.git] / toolkit / source / helper / registerservices.cxx
blobcb48a95a82d86fdb54f859f571fbaf1cdf955656
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: registerservices.cxx,v $
10 * $Revision: 1.20 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_toolkit.hxx"
33 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
34 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
35 #include <com/sun/star/registry/XRegistryKey.hpp>
36 #include <toolkit/controls/geometrycontrolmodel.hxx>
37 #include <cppuhelper/factory.hxx>
38 #include <cppuhelper/weak.hxx>
39 #include <osl/mutex.hxx>
40 #include <toolkit/helper/servicenames.hxx>
41 #include <toolkit/helper/macros.hxx>
42 #include <toolkit/awt/vclxtoolkit.hxx>
43 #include <toolkit/awt/vclxmenu.hxx>
44 #include <toolkit/awt/vclxpointer.hxx>
45 #include <toolkit/awt/vclxprinter.hxx>
46 #include <toolkit/controls/unocontrols.hxx>
47 #include <toolkit/controls/unocontrolcontainer.hxx>
48 #include <toolkit/controls/unocontrolcontainermodel.hxx>
49 #include <toolkit/controls/stdtabcontroller.hxx>
50 #include <toolkit/controls/stdtabcontrollermodel.hxx>
51 #include <toolkit/controls/formattedcontrol.hxx>
52 #include <toolkit/controls/roadmapcontrol.hxx>
53 #include <toolkit/controls/tkscrollbar.hxx>
54 #include "toolkit/controls/tkspinbutton.hxx"
55 #include <toolkit/controls/tksimpleanimation.hxx>
56 #include <toolkit/controls/tkthrobber.hxx>
57 #include <toolkit/controls/dialogcontrol.hxx>
58 #include "toolkit/dllapi.h"
60 namespace toolkit
62 using namespace ::com::sun::star::uno;
63 using namespace ::com::sun::star::lang;
64 using namespace ::com::sun::star::registry;
66 //.........................................................................
67 Reference< XRegistryKey > registerServices( const Reference< XRegistryKey >& _rxParentKey,
68 const sal_Char* _pAsciiImplName, const sal_Char* _pAsciiServiceName )
70 ::rtl::OUString sImplName( RTL_CONSTASCII_USTRINGPARAM( "/stardiv.Toolkit." ) );
71 sImplName += ::rtl::OUString::createFromAscii( _pAsciiImplName );
72 sImplName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/UNO/SERVICES" ) );
74 Reference< XRegistryKey > xNewKey = _rxParentKey->createKey( sImplName );
75 xNewKey->createKey( ::rtl::OUString::createFromAscii( _pAsciiServiceName ) );
77 return xNewKey;
80 //.........................................................................
81 Reference< XRegistryKey > registerServices( const Reference< XRegistryKey >& _rxParentKey,
82 const sal_Char* _pAsciiImplName, const sal_Char* _pAsciiServiceName1, const sal_Char* _pAsciiServiceName2 )
84 Reference< XRegistryKey > xComponentServicesKey = registerServices( _rxParentKey, _pAsciiImplName, _pAsciiServiceName1 );
85 xComponentServicesKey->createKey( ::rtl::OUString::createFromAscii( _pAsciiServiceName2 ) );
86 return xComponentServicesKey;
89 //.........................................................................
90 void* tryCreateFactory( const sal_Char* _pRequiredImplName, const sal_Char* _pComponentImplName,
91 const sal_Char* _pAsciiServiceName1, const sal_Char* _pAsciiServiceName2,
92 ::cppu::ComponentInstantiation _pInstantiation, const Reference< XMultiServiceFactory >& _rxServiceFactory )
94 void* pReturn = NULL;
96 if ( rtl_str_compare( _pRequiredImplName, _pComponentImplName ) == 0 )
98 Sequence< ::rtl::OUString > aServiceNames( _pAsciiServiceName2 ? 2 : 1 );
99 aServiceNames.getArray()[ 0 ] = ::rtl::OUString::createFromAscii( _pAsciiServiceName1 );
100 if ( _pAsciiServiceName2 )
101 aServiceNames.getArray()[ 1 ] = ::rtl::OUString::createFromAscii( _pAsciiServiceName2 );
102 Reference< XSingleServiceFactory > xFactory( ::cppu::createSingleFactory(
103 _rxServiceFactory, ::rtl::OUString::createFromAscii( _pComponentImplName ),
104 _pInstantiation, aServiceNames
105 ) );
107 if ( xFactory.is() )
109 xFactory->acquire();
110 pReturn = xFactory.get();
114 return pReturn;
120 #define IMPL_CREATEINSTANCE( ImplName ) \
121 ::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 >& ) \
122 { return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName ); }
124 #define IMPL_CREATEINSTANCE2( ImplName ) \
125 ::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 >& rSMgr) \
126 { return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName( rSMgr ) ); }
128 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL UnoControlDialogModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& )
130 return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new OGeometryControlModel<UnoControlDialogModel> );
133 #define CHECKANDCREATEFACTORY( ImplName, ServiceName1, ServiceName2 ) \
134 pRet = tryCreateFactory( sImplementationName, "stardiv.Toolkit." #ImplName, \
135 ServiceName1, ServiceName2, \
136 ImplName##_CreateInstance, xServiceFactory \
137 ); \
138 if ( pRet ) \
139 return pRet; \
141 using namespace toolkit;
143 IMPL_CREATEINSTANCE2( VCLXToolkit )
144 IMPL_CREATEINSTANCE( StdTabController )
145 IMPL_CREATEINSTANCE( StdTabControllerModel )
146 IMPL_CREATEINSTANCE( UnoButtonControl )
147 IMPL_CREATEINSTANCE( UnoCheckBoxControl )
148 IMPL_CREATEINSTANCE( UnoComboBoxControl )
149 IMPL_CREATEINSTANCE( UnoControlButtonModel )
150 IMPL_CREATEINSTANCE( UnoControlCheckBoxModel )
151 IMPL_CREATEINSTANCE( UnoControlComboBoxModel )
152 IMPL_CREATEINSTANCE( UnoControlContainer )
153 IMPL_CREATEINSTANCE( UnoControlContainerModel )
154 IMPL_CREATEINSTANCE( UnoControlCurrencyFieldModel )
155 IMPL_CREATEINSTANCE( UnoControlDateFieldModel )
156 IMPL_CREATEINSTANCE( UnoControlEditModel )
157 IMPL_CREATEINSTANCE( UnoControlFileControlModel )
158 IMPL_CREATEINSTANCE( UnoControlFixedHyperlinkModel )
159 IMPL_CREATEINSTANCE( UnoControlFixedTextModel )
160 IMPL_CREATEINSTANCE( UnoControlFormattedFieldModel )
161 IMPL_CREATEINSTANCE( UnoControlGroupBoxModel )
162 IMPL_CREATEINSTANCE( UnoControlImageControlModel )
163 IMPL_CREATEINSTANCE( UnoControlListBoxModel )
164 IMPL_CREATEINSTANCE( UnoControlNumericFieldModel )
165 IMPL_CREATEINSTANCE( UnoControlPatternFieldModel )
166 IMPL_CREATEINSTANCE( UnoControlRadioButtonModel )
167 IMPL_CREATEINSTANCE( UnoControlTimeFieldModel )
168 IMPL_CREATEINSTANCE( UnoControlProgressBarModel )
169 IMPL_CREATEINSTANCE( UnoControlScrollBarModel )
170 IMPL_CREATEINSTANCE( UnoSpinButtonModel )
171 IMPL_CREATEINSTANCE( UnoMultiPageModel )
172 IMPL_CREATEINSTANCE( UnoControlFixedLineModel )
173 IMPL_CREATEINSTANCE( UnoCurrencyFieldControl )
174 IMPL_CREATEINSTANCE( UnoDateFieldControl )
175 IMPL_CREATEINSTANCE( UnoDialogControl )
176 IMPL_CREATEINSTANCE( UnoEditControl )
177 IMPL_CREATEINSTANCE( UnoFileControl )
178 IMPL_CREATEINSTANCE( UnoFixedHyperlinkControl )
179 IMPL_CREATEINSTANCE( UnoFixedTextControl )
180 IMPL_CREATEINSTANCE( UnoFormattedFieldControl )
181 IMPL_CREATEINSTANCE( UnoGroupBoxControl )
182 IMPL_CREATEINSTANCE( UnoImageControlControl )
183 IMPL_CREATEINSTANCE( UnoListBoxControl )
184 IMPL_CREATEINSTANCE( UnoNumericFieldControl )
185 IMPL_CREATEINSTANCE( UnoPatternFieldControl )
186 IMPL_CREATEINSTANCE( UnoRadioButtonControl )
187 IMPL_CREATEINSTANCE( UnoTimeFieldControl )
188 IMPL_CREATEINSTANCE( UnoProgressBarControl )
189 IMPL_CREATEINSTANCE( UnoScrollBarControl )
190 IMPL_CREATEINSTANCE( UnoSpinButtonControl )
191 IMPL_CREATEINSTANCE( UnoMultiPageControl )
192 IMPL_CREATEINSTANCE( UnoFixedLineControl )
193 IMPL_CREATEINSTANCE( VCLXMenuBar )
194 IMPL_CREATEINSTANCE( VCLXPointer )
195 IMPL_CREATEINSTANCE( VCLXPopupMenu )
196 IMPL_CREATEINSTANCE( VCLXPrinterServer )
197 IMPL_CREATEINSTANCE( UnoRoadmapControl )
198 IMPL_CREATEINSTANCE( UnoControlRoadmapModel )
199 IMPL_CREATEINSTANCE( UnoSimpleAnimationControl )
200 IMPL_CREATEINSTANCE( UnoSimpleAnimationControlModel )
201 IMPL_CREATEINSTANCE( UnoThrobberControl )
202 IMPL_CREATEINSTANCE( UnoThrobberControlModel )
204 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 >& );
205 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 >& );
206 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 >& );
207 extern sal_Bool SAL_CALL comp_AsyncCallback_component_writeInfo( void * serviceManager, void * registryKey );
208 extern void * SAL_CALL comp_AsyncCallback_component_getFactory( const char * implName, void * serviceManager, void * registryKey );
210 extern sal_Bool SAL_CALL comp_Layout_component_writeInfo( void * serviceManager, void * registryKey );
211 extern void * SAL_CALL comp_Layout_component_getFactory( const char * implName, void * serviceManager, void * registryKey );
213 extern "C"
216 TOOLKIT_DLLPUBLIC void SAL_CALL component_getImplementationEnvironment( const sal_Char** ppEnvTypeName, uno_Environment** )
218 *ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
221 TOOLKIT_DLLPUBLIC sal_Bool SAL_CALL component_writeInfo( void* _pServiceManager, void* _pRegistryKey )
223 if (_pRegistryKey)
225 ::com::sun::star::uno::Reference< ::com::sun::star::registry::XRegistryKey > xRegistryKey =
226 static_cast< ::com::sun::star::registry::XRegistryKey* >( _pRegistryKey );
228 registerServices( xRegistryKey, "VCLXToolkit", szServiceName_Toolkit, szServiceName2_Toolkit );
229 registerServices( xRegistryKey, "VCLXPopupMenu", szServiceName_PopupMenu, szServiceName2_PopupMenu );
230 registerServices( xRegistryKey, "VCLXMenuBar", szServiceName_MenuBar, szServiceName2_MenuBar );
231 registerServices( xRegistryKey, "VCLXPointer", szServiceName_Pointer, szServiceName2_Pointer );
232 registerServices( xRegistryKey, "UnoControlContainer", szServiceName_UnoControlContainer, szServiceName2_UnoControlContainer );
233 registerServices( xRegistryKey, "UnoControlContainerModel", szServiceName_UnoControlContainerModel, szServiceName2_UnoControlContainerModel );
234 registerServices( xRegistryKey, "StdTabController", szServiceName_TabController, szServiceName2_TabController );
235 registerServices( xRegistryKey, "StdTabControllerModel", szServiceName_TabControllerModel, szServiceName2_TabControllerModel );
236 registerServices( xRegistryKey, "UnoDialogControl", szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog );
237 registerServices( xRegistryKey, "UnoControlDialogModel", szServiceName_UnoControlDialogModel, szServiceName2_UnoControlDialogModel );
238 registerServices( xRegistryKey, "UnoEditControl", szServiceName_UnoControlEdit, szServiceName2_UnoControlEdit );
239 registerServices( xRegistryKey, "UnoControlEditModel", szServiceName_UnoControlEditModel, szServiceName2_UnoControlEditModel );
240 registerServices( xRegistryKey, "UnoDateFieldControl", szServiceName_UnoControlDateField, szServiceName2_UnoControlDateField );
241 registerServices( xRegistryKey, "UnoControlDateFieldModel", szServiceName_UnoControlDateFieldModel, szServiceName2_UnoControlDateFieldModel );
242 registerServices( xRegistryKey, "UnoTimeFieldControl", szServiceName_UnoControlTimeField, szServiceName2_UnoControlTimeField );
243 registerServices( xRegistryKey, "UnoControlTimeFieldModel", szServiceName_UnoControlTimeFieldModel, szServiceName2_UnoControlTimeFieldModel );
244 registerServices( xRegistryKey, "UnoNumericFieldControl", szServiceName_UnoControlNumericField, szServiceName2_UnoControlNumericField );
245 registerServices( xRegistryKey, "UnoControlNumericFieldModel", szServiceName_UnoControlNumericFieldModel, szServiceName2_UnoControlNumericFieldModel );
246 registerServices( xRegistryKey, "UnoCurrencyFieldControl", szServiceName_UnoControlCurrencyField, szServiceName2_UnoControlCurrencyField );
247 registerServices( xRegistryKey, "UnoControlCurrencyFieldModel", szServiceName_UnoControlCurrencyFieldModel, szServiceName2_UnoControlCurrencyFieldModel );
248 registerServices( xRegistryKey, "UnoPatternFieldControl", szServiceName_UnoControlPatternField, szServiceName2_UnoControlPatternField );
249 registerServices( xRegistryKey, "UnoControlPatternFieldModel", szServiceName_UnoControlPatternFieldModel, szServiceName2_UnoControlPatternFieldModel );
250 registerServices( xRegistryKey, "UnoFormattedFieldControl", szServiceName_UnoControlFormattedField, szServiceName2_UnoControlFormattedField );
251 registerServices( xRegistryKey, "UnoControlFormattedFieldModel", szServiceName_UnoControlFormattedFieldModel, szServiceName2_UnoControlFormattedFieldModel );
252 registerServices( xRegistryKey, "UnoFileControl", szServiceName_UnoControlFileControl, szServiceName2_UnoControlFileControl );
253 registerServices( xRegistryKey, "UnoControlFileControlModel", szServiceName_UnoControlFileControlModel, szServiceName2_UnoControlFileControlModel );
254 registerServices( xRegistryKey, "UnoButtonControl", szServiceName_UnoControlButton, szServiceName2_UnoControlButton );
255 registerServices( xRegistryKey, "UnoControlButtonModel", szServiceName_UnoControlButtonModel, szServiceName2_UnoControlButtonModel );
256 registerServices( xRegistryKey, "UnoImageControlControl", szServiceName_UnoControlImageButton, szServiceName2_UnoControlImageButton );
257 registerServices( xRegistryKey, "UnoControlImageControlModel", szServiceName_UnoControlImageButtonModel, szServiceName2_UnoControlImageButtonModel );
258 registerServices( xRegistryKey, "UnoImageControlControl", szServiceName_UnoControlImageControl, szServiceName2_UnoControlImageControl );
259 registerServices( xRegistryKey, "UnoControlImageControlModel", szServiceName_UnoControlImageControlModel, szServiceName2_UnoControlImageControlModel );
260 registerServices( xRegistryKey, "UnoRadioButtonControl", szServiceName_UnoControlRadioButton, szServiceName2_UnoControlRadioButton );
261 registerServices( xRegistryKey, "UnoControlRadioButtonModel", szServiceName_UnoControlRadioButtonModel, szServiceName2_UnoControlRadioButtonModel );
262 registerServices( xRegistryKey, "UnoCheckBoxControl", szServiceName_UnoControlCheckBox, szServiceName2_UnoControlCheckBox );
263 registerServices( xRegistryKey, "UnoControlCheckBoxModel", szServiceName_UnoControlCheckBoxModel, szServiceName2_UnoControlCheckBoxModel );
264 registerServices( xRegistryKey, "UnoListBoxControl", szServiceName_UnoControlListBox, szServiceName2_UnoControlListBox );
265 registerServices( xRegistryKey, "UnoControlListBoxModel", szServiceName_UnoControlListBoxModel, szServiceName2_UnoControlListBoxModel );
266 registerServices( xRegistryKey, "UnoComboBoxControl", szServiceName_UnoControlComboBox, szServiceName2_UnoControlComboBox );
267 registerServices( xRegistryKey, "UnoControlComboBoxModel", szServiceName_UnoControlComboBoxModel, szServiceName2_UnoControlComboBoxModel );
268 registerServices( xRegistryKey, "UnoFixedTextControl", szServiceName_UnoControlFixedText, szServiceName2_UnoControlFixedText );
269 registerServices( xRegistryKey, "UnoControlFixedTextModel", szServiceName_UnoControlFixedTextModel, szServiceName2_UnoControlFixedTextModel );
270 registerServices( xRegistryKey, "UnoGroupBoxControl", szServiceName_UnoControlGroupBox, szServiceName2_UnoControlGroupBox );
271 registerServices( xRegistryKey, "UnoControlGroupBoxModel", szServiceName_UnoControlGroupBoxModel, szServiceName2_UnoControlGroupBoxModel );
272 registerServices( xRegistryKey, "UnoProgressBarControl", szServiceName_UnoControlProgressBar, szServiceName2_UnoControlProgressBar );
273 registerServices( xRegistryKey, "UnoControlProgressBarModel", szServiceName_UnoControlProgressBarModel, szServiceName2_UnoControlProgressBarModel );
274 registerServices( xRegistryKey, "UnoScrollBarControl", szServiceName_UnoControlScrollBar, szServiceName2_UnoControlScrollBar );
275 registerServices( xRegistryKey, "UnoControlScrollBarModel", szServiceName_UnoControlScrollBarModel, szServiceName2_UnoControlScrollBarModel );
276 registerServices( xRegistryKey, "UnoSpinButtonModel", szServiceName_UnoSpinButtonModel );
277 registerServices( xRegistryKey, "UnoSpinButtonControl", szServiceName_UnoSpinButtonControl );
278 registerServices( xRegistryKey, "UnoMultiPageModel", szServiceName_UnoMultiPageModel );
279 registerServices( xRegistryKey, "UnoMultiPageControl", szServiceName_UnoMultiPageControl );
280 registerServices( xRegistryKey, "UnoFixedLineControl", szServiceName_UnoControlFixedLine, szServiceName2_UnoControlFixedLine );
281 registerServices( xRegistryKey, "UnoControlFixedLineModel", szServiceName_UnoControlFixedLineModel, szServiceName2_UnoControlFixedLineModel );
282 registerServices( xRegistryKey, "VCLXPrinterServer", szServiceName_PrinterServer, szServiceName2_PrinterServer );
283 registerServices( xRegistryKey, "UnoRoadmapControl", szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap );
284 registerServices( xRegistryKey, "UnoControlRoadmapModel", szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel );
285 registerServices( xRegistryKey, "TreeControl", szServiceName_TreeControl );
286 registerServices( xRegistryKey, "TreeControlModel", szServiceName_TreeControlModel );
287 registerServices( xRegistryKey, "MutableTreeDataModel", szServiceName_MutableTreeDataModel );
288 registerServices( xRegistryKey, "UnoSimpleAnimationControlModel", szServiceName_UnoSimpleAnimationControlModel );
289 registerServices( xRegistryKey, "UnoSimpleAnimationControl", szServiceName_UnoSimpleAnimationControl );
290 registerServices( xRegistryKey, "UnoThrobberControlModel", szServiceName_UnoThrobberControlModel );
291 registerServices( xRegistryKey, "UnoThrobberControl", szServiceName_UnoThrobberControl );
292 registerServices( xRegistryKey, "UnoFixedHyperlinkControl", szServiceName_UnoControlFixedHyperlink );
293 registerServices( xRegistryKey, "UnoControlFixedHyperlinkModel", szServiceName_UnoControlFixedHyperlinkModel );
295 comp_AsyncCallback_component_writeInfo( _pServiceManager, _pRegistryKey );
296 comp_Layout_component_writeInfo( _pServiceManager, _pRegistryKey );
298 return sal_True;
300 return sal_False;
303 TOOLKIT_DLLPUBLIC void* SAL_CALL component_getFactory( const sal_Char* sImplementationName, void* _pServiceManager, void* _pRegistryKey )
305 void* pRet = NULL;
307 if ( _pServiceManager )
309 ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory =
310 static_cast< ::com::sun::star::lang::XMultiServiceFactory* >( _pServiceManager );
312 CHECKANDCREATEFACTORY( VCLXToolkit, szServiceName_Toolkit, szServiceName2_Toolkit )
313 CHECKANDCREATEFACTORY( VCLXPopupMenu, szServiceName_PopupMenu, szServiceName2_PopupMenu )
314 CHECKANDCREATEFACTORY( VCLXMenuBar, szServiceName_MenuBar, szServiceName2_MenuBar )
315 CHECKANDCREATEFACTORY( VCLXPointer, szServiceName_Pointer, szServiceName2_Pointer )
316 CHECKANDCREATEFACTORY( UnoControlContainer, szServiceName_UnoControlContainer, szServiceName2_UnoControlContainer )
317 CHECKANDCREATEFACTORY( UnoControlContainerModel, szServiceName_UnoControlContainerModel, szServiceName2_UnoControlContainerModel )
318 CHECKANDCREATEFACTORY( StdTabController, szServiceName_TabController, szServiceName2_TabController )
319 CHECKANDCREATEFACTORY( StdTabControllerModel, szServiceName_TabControllerModel, szServiceName2_TabControllerModel )
320 CHECKANDCREATEFACTORY( UnoDialogControl, szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog )
321 CHECKANDCREATEFACTORY( UnoControlDialogModel, szServiceName_UnoControlDialogModel, szServiceName2_UnoControlDialogModel )
322 CHECKANDCREATEFACTORY( UnoEditControl, szServiceName_UnoControlEdit, szServiceName2_UnoControlEdit )
323 CHECKANDCREATEFACTORY( UnoControlEditModel, szServiceName_UnoControlEditModel, szServiceName2_UnoControlEditModel )
324 CHECKANDCREATEFACTORY( UnoDateFieldControl, szServiceName_UnoControlDateField, szServiceName2_UnoControlDateField )
325 CHECKANDCREATEFACTORY( UnoControlDateFieldModel, szServiceName_UnoControlDateFieldModel, szServiceName2_UnoControlDateFieldModel )
326 CHECKANDCREATEFACTORY( UnoTimeFieldControl, szServiceName_UnoControlTimeField, szServiceName2_UnoControlTimeField )
327 CHECKANDCREATEFACTORY( UnoControlTimeFieldModel, szServiceName_UnoControlTimeFieldModel, szServiceName2_UnoControlTimeFieldModel )
328 CHECKANDCREATEFACTORY( UnoNumericFieldControl, szServiceName_UnoControlNumericField, szServiceName2_UnoControlNumericField )
329 CHECKANDCREATEFACTORY( UnoControlNumericFieldModel, szServiceName_UnoControlNumericFieldModel, szServiceName2_UnoControlNumericFieldModel )
330 CHECKANDCREATEFACTORY( UnoCurrencyFieldControl, szServiceName_UnoControlCurrencyField, szServiceName2_UnoControlCurrencyField )
331 CHECKANDCREATEFACTORY( UnoControlCurrencyFieldModel, szServiceName_UnoControlCurrencyFieldModel, szServiceName2_UnoControlCurrencyFieldModel )
332 CHECKANDCREATEFACTORY( UnoPatternFieldControl, szServiceName_UnoControlPatternField, szServiceName2_UnoControlPatternField )
333 CHECKANDCREATEFACTORY( UnoControlPatternFieldModel, szServiceName_UnoControlPatternFieldModel, szServiceName2_UnoControlPatternFieldModel )
334 CHECKANDCREATEFACTORY( UnoFormattedFieldControl, szServiceName_UnoControlFormattedField, szServiceName2_UnoControlFormattedField )
335 CHECKANDCREATEFACTORY( UnoControlFormattedFieldModel, szServiceName_UnoControlFormattedFieldModel, szServiceName2_UnoControlFormattedFieldModel )
336 CHECKANDCREATEFACTORY( UnoFileControl, szServiceName_UnoControlFileControl, szServiceName2_UnoControlFileControl )
337 CHECKANDCREATEFACTORY( UnoControlFileControlModel, szServiceName_UnoControlFileControlModel, szServiceName2_UnoControlFileControlModel )
338 CHECKANDCREATEFACTORY( UnoButtonControl, szServiceName_UnoControlButton, szServiceName2_UnoControlButton )
339 CHECKANDCREATEFACTORY( UnoControlButtonModel, szServiceName_UnoControlButtonModel, szServiceName2_UnoControlButtonModel )
340 CHECKANDCREATEFACTORY( UnoImageControlControl, szServiceName_UnoControlImageButton, szServiceName2_UnoControlImageButton )
341 CHECKANDCREATEFACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageButtonModel, szServiceName2_UnoControlImageButtonModel )
342 CHECKANDCREATEFACTORY( UnoImageControlControl, szServiceName_UnoControlImageControl, szServiceName2_UnoControlImageControl )
343 CHECKANDCREATEFACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageControlModel, szServiceName2_UnoControlImageControlModel )
344 CHECKANDCREATEFACTORY( UnoRadioButtonControl, szServiceName_UnoControlRadioButton, szServiceName2_UnoControlRadioButton )
345 CHECKANDCREATEFACTORY( UnoControlRadioButtonModel, szServiceName_UnoControlRadioButtonModel, szServiceName2_UnoControlRadioButtonModel )
346 CHECKANDCREATEFACTORY( UnoCheckBoxControl, szServiceName_UnoControlCheckBox, szServiceName2_UnoControlCheckBox )
347 CHECKANDCREATEFACTORY( UnoControlCheckBoxModel, szServiceName_UnoControlCheckBoxModel, szServiceName2_UnoControlCheckBoxModel )
348 CHECKANDCREATEFACTORY( UnoListBoxControl, szServiceName_UnoControlListBox, szServiceName2_UnoControlListBox )
349 CHECKANDCREATEFACTORY( UnoControlListBoxModel, szServiceName_UnoControlListBoxModel, szServiceName2_UnoControlListBoxModel )
350 CHECKANDCREATEFACTORY( UnoComboBoxControl, szServiceName_UnoControlComboBox, szServiceName2_UnoControlComboBox )
351 CHECKANDCREATEFACTORY( UnoControlComboBoxModel, szServiceName_UnoControlComboBoxModel, szServiceName2_UnoControlComboBoxModel )
352 CHECKANDCREATEFACTORY( UnoFixedTextControl, szServiceName_UnoControlFixedText, szServiceName2_UnoControlFixedText )
353 CHECKANDCREATEFACTORY( UnoControlFixedTextModel, szServiceName_UnoControlFixedTextModel, szServiceName2_UnoControlFixedTextModel )
354 CHECKANDCREATEFACTORY( UnoGroupBoxControl, szServiceName_UnoControlGroupBox, szServiceName2_UnoControlGroupBox )
355 CHECKANDCREATEFACTORY( UnoControlGroupBoxModel, szServiceName_UnoControlGroupBoxModel, szServiceName2_UnoControlGroupBoxModel )
356 CHECKANDCREATEFACTORY( UnoProgressBarControl, szServiceName_UnoControlProgressBar, szServiceName2_UnoControlProgressBar )
357 CHECKANDCREATEFACTORY( UnoControlProgressBarModel, szServiceName_UnoControlProgressBarModel, szServiceName2_UnoControlProgressBarModel )
358 CHECKANDCREATEFACTORY( UnoScrollBarControl, szServiceName_UnoControlScrollBar, szServiceName2_UnoControlScrollBar )
359 CHECKANDCREATEFACTORY( UnoControlScrollBarModel, szServiceName_UnoControlScrollBarModel, szServiceName2_UnoControlScrollBarModel )
360 CHECKANDCREATEFACTORY( UnoFixedLineControl, szServiceName_UnoControlFixedLine, szServiceName2_UnoControlFixedLine )
361 CHECKANDCREATEFACTORY( UnoControlFixedLineModel, szServiceName_UnoControlFixedLineModel, szServiceName2_UnoControlFixedLineModel )
362 CHECKANDCREATEFACTORY( VCLXPrinterServer, szServiceName_PrinterServer, szServiceName2_PrinterServer )
363 CHECKANDCREATEFACTORY( UnoRoadmapControl, szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap )
364 CHECKANDCREATEFACTORY( UnoControlRoadmapModel, szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel )
365 CHECKANDCREATEFACTORY( UnoMultiPageModel, szServiceName_UnoMultiPageModel, NULL )
366 CHECKANDCREATEFACTORY( UnoMultiPageControl, szServiceName_UnoMultiPageControl, NULL )
367 CHECKANDCREATEFACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL )
368 CHECKANDCREATEFACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL )
369 CHECKANDCREATEFACTORY( TreeControl, szServiceName_TreeControl, NULL )
370 CHECKANDCREATEFACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL )
371 CHECKANDCREATEFACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL )
372 CHECKANDCREATEFACTORY( UnoSimpleAnimationControlModel, szServiceName_UnoSimpleAnimationControlModel, NULL )
373 CHECKANDCREATEFACTORY( UnoSimpleAnimationControl, szServiceName_UnoSimpleAnimationControl, NULL )
374 CHECKANDCREATEFACTORY( UnoThrobberControlModel, szServiceName_UnoThrobberControlModel, NULL )
375 CHECKANDCREATEFACTORY( UnoThrobberControl, szServiceName_UnoThrobberControl, NULL )
376 CHECKANDCREATEFACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL )
377 CHECKANDCREATEFACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL )
379 if ( rtl_str_compare( sImplementationName, "com.sun.star.awt.comp.AsyncCallback" ) == 0 )
380 return comp_AsyncCallback_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey );
383 if( pRet == 0 )
384 pRet = comp_Layout_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey );
386 return pRet;