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