1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: registerservices.cxx,v $
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"
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
) );
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
)
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
110 pReturn
= xFactory
.get();
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 \
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 ::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
>& );
208 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
>& );
209 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
>& );
210 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
>& );
211 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
>& );
213 extern sal_Bool SAL_CALL
comp_AsyncCallback_component_writeInfo( void * serviceManager
, void * registryKey
);
214 extern void * SAL_CALL
comp_AsyncCallback_component_getFactory( const char * implName
, void * serviceManager
, void * registryKey
);
216 extern sal_Bool SAL_CALL
comp_Layout_component_writeInfo( void * serviceManager
, void * registryKey
);
217 extern void * SAL_CALL
comp_Layout_component_getFactory( const char * implName
, void * serviceManager
, void * registryKey
);
222 TOOLKIT_DLLPUBLIC
void SAL_CALL
component_getImplementationEnvironment( const sal_Char
** ppEnvTypeName
, uno_Environment
** )
224 *ppEnvTypeName
= CPPU_CURRENT_LANGUAGE_BINDING_NAME
;
227 TOOLKIT_DLLPUBLIC sal_Bool SAL_CALL
component_writeInfo( void* _pServiceManager
, void* _pRegistryKey
)
231 ::com::sun::star::uno::Reference
< ::com::sun::star::registry::XRegistryKey
> xRegistryKey
=
232 static_cast< ::com::sun::star::registry::XRegistryKey
* >( _pRegistryKey
);
234 registerServices( xRegistryKey
, "VCLXToolkit", szServiceName_Toolkit
, szServiceName2_Toolkit
);
235 registerServices( xRegistryKey
, "VCLXPopupMenu", szServiceName_PopupMenu
, szServiceName2_PopupMenu
);
236 registerServices( xRegistryKey
, "VCLXMenuBar", szServiceName_MenuBar
, szServiceName2_MenuBar
);
237 registerServices( xRegistryKey
, "VCLXPointer", szServiceName_Pointer
, szServiceName2_Pointer
);
238 registerServices( xRegistryKey
, "UnoControlContainer", szServiceName_UnoControlContainer
, szServiceName2_UnoControlContainer
);
239 registerServices( xRegistryKey
, "UnoControlContainerModel", szServiceName_UnoControlContainerModel
, szServiceName2_UnoControlContainerModel
);
240 registerServices( xRegistryKey
, "StdTabController", szServiceName_TabController
, szServiceName2_TabController
);
241 registerServices( xRegistryKey
, "StdTabControllerModel", szServiceName_TabControllerModel
, szServiceName2_TabControllerModel
);
242 registerServices( xRegistryKey
, "UnoDialogControl", szServiceName_UnoControlDialog
, szServiceName2_UnoControlDialog
);
243 registerServices( xRegistryKey
, "UnoControlDialogModel", szServiceName_UnoControlDialogModel
, szServiceName2_UnoControlDialogModel
);
244 registerServices( xRegistryKey
, "UnoEditControl", szServiceName_UnoControlEdit
, szServiceName2_UnoControlEdit
);
245 registerServices( xRegistryKey
, "UnoControlEditModel", szServiceName_UnoControlEditModel
, szServiceName2_UnoControlEditModel
);
246 registerServices( xRegistryKey
, "UnoDateFieldControl", szServiceName_UnoControlDateField
, szServiceName2_UnoControlDateField
);
247 registerServices( xRegistryKey
, "UnoControlDateFieldModel", szServiceName_UnoControlDateFieldModel
, szServiceName2_UnoControlDateFieldModel
);
248 registerServices( xRegistryKey
, "UnoTimeFieldControl", szServiceName_UnoControlTimeField
, szServiceName2_UnoControlTimeField
);
249 registerServices( xRegistryKey
, "UnoControlTimeFieldModel", szServiceName_UnoControlTimeFieldModel
, szServiceName2_UnoControlTimeFieldModel
);
250 registerServices( xRegistryKey
, "UnoNumericFieldControl", szServiceName_UnoControlNumericField
, szServiceName2_UnoControlNumericField
);
251 registerServices( xRegistryKey
, "UnoControlNumericFieldModel", szServiceName_UnoControlNumericFieldModel
, szServiceName2_UnoControlNumericFieldModel
);
252 registerServices( xRegistryKey
, "UnoCurrencyFieldControl", szServiceName_UnoControlCurrencyField
, szServiceName2_UnoControlCurrencyField
);
253 registerServices( xRegistryKey
, "UnoControlCurrencyFieldModel", szServiceName_UnoControlCurrencyFieldModel
, szServiceName2_UnoControlCurrencyFieldModel
);
254 registerServices( xRegistryKey
, "UnoPatternFieldControl", szServiceName_UnoControlPatternField
, szServiceName2_UnoControlPatternField
);
255 registerServices( xRegistryKey
, "UnoControlPatternFieldModel", szServiceName_UnoControlPatternFieldModel
, szServiceName2_UnoControlPatternFieldModel
);
256 registerServices( xRegistryKey
, "UnoFormattedFieldControl", szServiceName_UnoControlFormattedField
, szServiceName2_UnoControlFormattedField
);
257 registerServices( xRegistryKey
, "UnoControlFormattedFieldModel", szServiceName_UnoControlFormattedFieldModel
, szServiceName2_UnoControlFormattedFieldModel
);
258 registerServices( xRegistryKey
, "UnoFileControl", szServiceName_UnoControlFileControl
, szServiceName2_UnoControlFileControl
);
259 registerServices( xRegistryKey
, "UnoControlFileControlModel", szServiceName_UnoControlFileControlModel
, szServiceName2_UnoControlFileControlModel
);
260 registerServices( xRegistryKey
, "UnoButtonControl", szServiceName_UnoControlButton
, szServiceName2_UnoControlButton
);
261 registerServices( xRegistryKey
, "UnoControlButtonModel", szServiceName_UnoControlButtonModel
, szServiceName2_UnoControlButtonModel
);
262 registerServices( xRegistryKey
, "UnoImageControlControl", szServiceName_UnoControlImageButton
, szServiceName2_UnoControlImageButton
);
263 registerServices( xRegistryKey
, "UnoControlImageControlModel", szServiceName_UnoControlImageButtonModel
, szServiceName2_UnoControlImageButtonModel
);
264 registerServices( xRegistryKey
, "UnoImageControlControl", szServiceName_UnoControlImageControl
, szServiceName2_UnoControlImageControl
);
265 registerServices( xRegistryKey
, "UnoControlImageControlModel", szServiceName_UnoControlImageControlModel
, szServiceName2_UnoControlImageControlModel
);
266 registerServices( xRegistryKey
, "UnoRadioButtonControl", szServiceName_UnoControlRadioButton
, szServiceName2_UnoControlRadioButton
);
267 registerServices( xRegistryKey
, "UnoControlRadioButtonModel", szServiceName_UnoControlRadioButtonModel
, szServiceName2_UnoControlRadioButtonModel
);
268 registerServices( xRegistryKey
, "UnoCheckBoxControl", szServiceName_UnoControlCheckBox
, szServiceName2_UnoControlCheckBox
);
269 registerServices( xRegistryKey
, "UnoControlCheckBoxModel", szServiceName_UnoControlCheckBoxModel
, szServiceName2_UnoControlCheckBoxModel
);
270 registerServices( xRegistryKey
, "UnoListBoxControl", szServiceName_UnoControlListBox
, szServiceName2_UnoControlListBox
);
271 registerServices( xRegistryKey
, "UnoControlListBoxModel", szServiceName_UnoControlListBoxModel
, szServiceName2_UnoControlListBoxModel
);
272 registerServices( xRegistryKey
, "UnoComboBoxControl", szServiceName_UnoControlComboBox
, szServiceName2_UnoControlComboBox
);
273 registerServices( xRegistryKey
, "UnoControlComboBoxModel", szServiceName_UnoControlComboBoxModel
, szServiceName2_UnoControlComboBoxModel
);
274 registerServices( xRegistryKey
, "UnoFixedTextControl", szServiceName_UnoControlFixedText
, szServiceName2_UnoControlFixedText
);
275 registerServices( xRegistryKey
, "UnoControlFixedTextModel", szServiceName_UnoControlFixedTextModel
, szServiceName2_UnoControlFixedTextModel
);
276 registerServices( xRegistryKey
, "UnoGroupBoxControl", szServiceName_UnoControlGroupBox
, szServiceName2_UnoControlGroupBox
);
277 registerServices( xRegistryKey
, "UnoControlGroupBoxModel", szServiceName_UnoControlGroupBoxModel
, szServiceName2_UnoControlGroupBoxModel
);
278 registerServices( xRegistryKey
, "UnoProgressBarControl", szServiceName_UnoControlProgressBar
, szServiceName2_UnoControlProgressBar
);
279 registerServices( xRegistryKey
, "UnoControlProgressBarModel", szServiceName_UnoControlProgressBarModel
, szServiceName2_UnoControlProgressBarModel
);
280 registerServices( xRegistryKey
, "UnoScrollBarControl", szServiceName_UnoControlScrollBar
, szServiceName2_UnoControlScrollBar
);
281 registerServices( xRegistryKey
, "UnoControlScrollBarModel", szServiceName_UnoControlScrollBarModel
, szServiceName2_UnoControlScrollBarModel
);
282 registerServices( xRegistryKey
, "UnoSpinButtonModel", szServiceName_UnoSpinButtonModel
);
283 registerServices( xRegistryKey
, "UnoSpinButtonControl", szServiceName_UnoSpinButtonControl
);
284 registerServices( xRegistryKey
, "UnoMultiPageModel", szServiceName_UnoMultiPageModel
);
285 registerServices( xRegistryKey
, "UnoMultiPageControl", szServiceName_UnoMultiPageControl
);
286 registerServices( xRegistryKey
, "UnoFixedLineControl", szServiceName_UnoControlFixedLine
, szServiceName2_UnoControlFixedLine
);
287 registerServices( xRegistryKey
, "UnoControlFixedLineModel", szServiceName_UnoControlFixedLineModel
, szServiceName2_UnoControlFixedLineModel
);
288 registerServices( xRegistryKey
, "VCLXPrinterServer", szServiceName_PrinterServer
, szServiceName2_PrinterServer
);
289 registerServices( xRegistryKey
, "UnoRoadmapControl", szServiceName_UnoControlRoadmap
, szServiceName2_UnoControlRoadmap
);
290 registerServices( xRegistryKey
, "UnoControlRoadmapModel", szServiceName_UnoControlRoadmapModel
, szServiceName2_UnoControlRoadmapModel
);
291 registerServices( xRegistryKey
, "TreeControl", szServiceName_TreeControl
);
292 registerServices( xRegistryKey
, "TreeControlModel", szServiceName_TreeControlModel
);
293 registerServices( xRegistryKey
, "MutableTreeDataModel", szServiceName_MutableTreeDataModel
);
294 registerServices( xRegistryKey
, "UnoSimpleAnimationControlModel", szServiceName_UnoSimpleAnimationControlModel
);
295 registerServices( xRegistryKey
, "UnoSimpleAnimationControl", szServiceName_UnoSimpleAnimationControl
);
296 registerServices( xRegistryKey
, "UnoThrobberControlModel", szServiceName_UnoThrobberControlModel
);
297 registerServices( xRegistryKey
, "UnoThrobberControl", szServiceName_UnoThrobberControl
);
298 registerServices( xRegistryKey
, "UnoFixedHyperlinkControl", szServiceName_UnoControlFixedHyperlink
);
299 registerServices( xRegistryKey
, "UnoControlFixedHyperlinkModel", szServiceName_UnoControlFixedHyperlinkModel
);
300 registerServices( xRegistryKey
, "GridControl", szServiceName_GridControl
);
301 registerServices( xRegistryKey
, "GridControlModel", szServiceName_GridControlModel
);
302 registerServices( xRegistryKey
, "DefaultGridDataModel", szServiceName_DefaultGridDataModel
);
303 registerServices( xRegistryKey
, "DefaultGridColumnModel", szServiceName_DefaultGridColumnModel
);
304 registerServices( xRegistryKey
, "GridColumn", szServiceName_GridColumn
);
306 comp_AsyncCallback_component_writeInfo( _pServiceManager
, _pRegistryKey
);
307 comp_Layout_component_writeInfo( _pServiceManager
, _pRegistryKey
);
314 TOOLKIT_DLLPUBLIC
void* SAL_CALL
component_getFactory( const sal_Char
* sImplementationName
, void* _pServiceManager
, void* _pRegistryKey
)
318 if ( _pServiceManager
)
320 ::com::sun::star::uno::Reference
< ::com::sun::star::lang::XMultiServiceFactory
> xServiceFactory
=
321 static_cast< ::com::sun::star::lang::XMultiServiceFactory
* >( _pServiceManager
);
323 CHECKANDCREATEFACTORY( VCLXToolkit
, szServiceName_Toolkit
, szServiceName2_Toolkit
)
324 CHECKANDCREATEFACTORY( VCLXPopupMenu
, szServiceName_PopupMenu
, szServiceName2_PopupMenu
)
325 CHECKANDCREATEFACTORY( VCLXMenuBar
, szServiceName_MenuBar
, szServiceName2_MenuBar
)
326 CHECKANDCREATEFACTORY( VCLXPointer
, szServiceName_Pointer
, szServiceName2_Pointer
)
327 CHECKANDCREATEFACTORY( UnoControlContainer
, szServiceName_UnoControlContainer
, szServiceName2_UnoControlContainer
)
328 CHECKANDCREATEFACTORY( UnoControlContainerModel
, szServiceName_UnoControlContainerModel
, szServiceName2_UnoControlContainerModel
)
329 CHECKANDCREATEFACTORY( StdTabController
, szServiceName_TabController
, szServiceName2_TabController
)
330 CHECKANDCREATEFACTORY( StdTabControllerModel
, szServiceName_TabControllerModel
, szServiceName2_TabControllerModel
)
331 CHECKANDCREATEFACTORY( UnoDialogControl
, szServiceName_UnoControlDialog
, szServiceName2_UnoControlDialog
)
332 CHECKANDCREATEFACTORY( UnoControlDialogModel
, szServiceName_UnoControlDialogModel
, szServiceName2_UnoControlDialogModel
)
333 CHECKANDCREATEFACTORY( UnoEditControl
, szServiceName_UnoControlEdit
, szServiceName2_UnoControlEdit
)
334 CHECKANDCREATEFACTORY( UnoControlEditModel
, szServiceName_UnoControlEditModel
, szServiceName2_UnoControlEditModel
)
335 CHECKANDCREATEFACTORY( UnoDateFieldControl
, szServiceName_UnoControlDateField
, szServiceName2_UnoControlDateField
)
336 CHECKANDCREATEFACTORY( UnoControlDateFieldModel
, szServiceName_UnoControlDateFieldModel
, szServiceName2_UnoControlDateFieldModel
)
337 CHECKANDCREATEFACTORY( UnoTimeFieldControl
, szServiceName_UnoControlTimeField
, szServiceName2_UnoControlTimeField
)
338 CHECKANDCREATEFACTORY( UnoControlTimeFieldModel
, szServiceName_UnoControlTimeFieldModel
, szServiceName2_UnoControlTimeFieldModel
)
339 CHECKANDCREATEFACTORY( UnoNumericFieldControl
, szServiceName_UnoControlNumericField
, szServiceName2_UnoControlNumericField
)
340 CHECKANDCREATEFACTORY( UnoControlNumericFieldModel
, szServiceName_UnoControlNumericFieldModel
, szServiceName2_UnoControlNumericFieldModel
)
341 CHECKANDCREATEFACTORY( UnoCurrencyFieldControl
, szServiceName_UnoControlCurrencyField
, szServiceName2_UnoControlCurrencyField
)
342 CHECKANDCREATEFACTORY( UnoControlCurrencyFieldModel
, szServiceName_UnoControlCurrencyFieldModel
, szServiceName2_UnoControlCurrencyFieldModel
)
343 CHECKANDCREATEFACTORY( UnoPatternFieldControl
, szServiceName_UnoControlPatternField
, szServiceName2_UnoControlPatternField
)
344 CHECKANDCREATEFACTORY( UnoControlPatternFieldModel
, szServiceName_UnoControlPatternFieldModel
, szServiceName2_UnoControlPatternFieldModel
)
345 CHECKANDCREATEFACTORY( UnoFormattedFieldControl
, szServiceName_UnoControlFormattedField
, szServiceName2_UnoControlFormattedField
)
346 CHECKANDCREATEFACTORY( UnoControlFormattedFieldModel
, szServiceName_UnoControlFormattedFieldModel
, szServiceName2_UnoControlFormattedFieldModel
)
347 CHECKANDCREATEFACTORY( UnoFileControl
, szServiceName_UnoControlFileControl
, szServiceName2_UnoControlFileControl
)
348 CHECKANDCREATEFACTORY( UnoControlFileControlModel
, szServiceName_UnoControlFileControlModel
, szServiceName2_UnoControlFileControlModel
)
349 CHECKANDCREATEFACTORY( UnoButtonControl
, szServiceName_UnoControlButton
, szServiceName2_UnoControlButton
)
350 CHECKANDCREATEFACTORY( UnoControlButtonModel
, szServiceName_UnoControlButtonModel
, szServiceName2_UnoControlButtonModel
)
351 CHECKANDCREATEFACTORY( UnoImageControlControl
, szServiceName_UnoControlImageButton
, szServiceName2_UnoControlImageButton
)
352 CHECKANDCREATEFACTORY( UnoControlImageControlModel
, szServiceName_UnoControlImageButtonModel
, szServiceName2_UnoControlImageButtonModel
)
353 CHECKANDCREATEFACTORY( UnoImageControlControl
, szServiceName_UnoControlImageControl
, szServiceName2_UnoControlImageControl
)
354 CHECKANDCREATEFACTORY( UnoControlImageControlModel
, szServiceName_UnoControlImageControlModel
, szServiceName2_UnoControlImageControlModel
)
355 CHECKANDCREATEFACTORY( UnoRadioButtonControl
, szServiceName_UnoControlRadioButton
, szServiceName2_UnoControlRadioButton
)
356 CHECKANDCREATEFACTORY( UnoControlRadioButtonModel
, szServiceName_UnoControlRadioButtonModel
, szServiceName2_UnoControlRadioButtonModel
)
357 CHECKANDCREATEFACTORY( UnoCheckBoxControl
, szServiceName_UnoControlCheckBox
, szServiceName2_UnoControlCheckBox
)
358 CHECKANDCREATEFACTORY( UnoControlCheckBoxModel
, szServiceName_UnoControlCheckBoxModel
, szServiceName2_UnoControlCheckBoxModel
)
359 CHECKANDCREATEFACTORY( UnoListBoxControl
, szServiceName_UnoControlListBox
, szServiceName2_UnoControlListBox
)
360 CHECKANDCREATEFACTORY( UnoControlListBoxModel
, szServiceName_UnoControlListBoxModel
, szServiceName2_UnoControlListBoxModel
)
361 CHECKANDCREATEFACTORY( UnoComboBoxControl
, szServiceName_UnoControlComboBox
, szServiceName2_UnoControlComboBox
)
362 CHECKANDCREATEFACTORY( UnoControlComboBoxModel
, szServiceName_UnoControlComboBoxModel
, szServiceName2_UnoControlComboBoxModel
)
363 CHECKANDCREATEFACTORY( UnoFixedTextControl
, szServiceName_UnoControlFixedText
, szServiceName2_UnoControlFixedText
)
364 CHECKANDCREATEFACTORY( UnoControlFixedTextModel
, szServiceName_UnoControlFixedTextModel
, szServiceName2_UnoControlFixedTextModel
)
365 CHECKANDCREATEFACTORY( UnoGroupBoxControl
, szServiceName_UnoControlGroupBox
, szServiceName2_UnoControlGroupBox
)
366 CHECKANDCREATEFACTORY( UnoControlGroupBoxModel
, szServiceName_UnoControlGroupBoxModel
, szServiceName2_UnoControlGroupBoxModel
)
367 CHECKANDCREATEFACTORY( UnoProgressBarControl
, szServiceName_UnoControlProgressBar
, szServiceName2_UnoControlProgressBar
)
368 CHECKANDCREATEFACTORY( UnoControlProgressBarModel
, szServiceName_UnoControlProgressBarModel
, szServiceName2_UnoControlProgressBarModel
)
369 CHECKANDCREATEFACTORY( UnoScrollBarControl
, szServiceName_UnoControlScrollBar
, szServiceName2_UnoControlScrollBar
)
370 CHECKANDCREATEFACTORY( UnoControlScrollBarModel
, szServiceName_UnoControlScrollBarModel
, szServiceName2_UnoControlScrollBarModel
)
371 CHECKANDCREATEFACTORY( UnoFixedLineControl
, szServiceName_UnoControlFixedLine
, szServiceName2_UnoControlFixedLine
)
372 CHECKANDCREATEFACTORY( UnoControlFixedLineModel
, szServiceName_UnoControlFixedLineModel
, szServiceName2_UnoControlFixedLineModel
)
373 CHECKANDCREATEFACTORY( VCLXPrinterServer
, szServiceName_PrinterServer
, szServiceName2_PrinterServer
)
374 CHECKANDCREATEFACTORY( UnoRoadmapControl
, szServiceName_UnoControlRoadmap
, szServiceName2_UnoControlRoadmap
)
375 CHECKANDCREATEFACTORY( UnoControlRoadmapModel
, szServiceName_UnoControlRoadmapModel
, szServiceName2_UnoControlRoadmapModel
)
376 CHECKANDCREATEFACTORY( UnoMultiPageModel
, szServiceName_UnoMultiPageModel
, NULL
)
377 CHECKANDCREATEFACTORY( UnoMultiPageControl
, szServiceName_UnoMultiPageControl
, NULL
)
378 CHECKANDCREATEFACTORY( UnoSpinButtonModel
, szServiceName_UnoSpinButtonModel
, NULL
)
379 CHECKANDCREATEFACTORY( UnoSpinButtonControl
, szServiceName_UnoSpinButtonControl
, NULL
)
380 CHECKANDCREATEFACTORY( TreeControl
, szServiceName_TreeControl
, NULL
)
381 CHECKANDCREATEFACTORY( TreeControlModel
, szServiceName_TreeControlModel
, NULL
)
382 CHECKANDCREATEFACTORY( MutableTreeDataModel
, szServiceName_MutableTreeDataModel
, NULL
)
383 CHECKANDCREATEFACTORY( UnoSimpleAnimationControlModel
, szServiceName_UnoSimpleAnimationControlModel
, NULL
)
384 CHECKANDCREATEFACTORY( UnoSimpleAnimationControl
, szServiceName_UnoSimpleAnimationControl
, NULL
)
385 CHECKANDCREATEFACTORY( UnoThrobberControlModel
, szServiceName_UnoThrobberControlModel
, NULL
)
386 CHECKANDCREATEFACTORY( UnoThrobberControl
, szServiceName_UnoThrobberControl
, NULL
)
387 CHECKANDCREATEFACTORY( UnoFixedHyperlinkControl
, szServiceName_UnoControlFixedHyperlink
, NULL
)
388 CHECKANDCREATEFACTORY( UnoControlFixedHyperlinkModel
, szServiceName_UnoControlFixedHyperlinkModel
, NULL
)
389 CHECKANDCREATEFACTORY( GridControl
, szServiceName_GridControl
, NULL
);
390 CHECKANDCREATEFACTORY( GridControlModel
, szServiceName_GridControlModel
, NULL
);
391 CHECKANDCREATEFACTORY( DefaultGridDataModel
, szServiceName_DefaultGridDataModel
, NULL
);
392 CHECKANDCREATEFACTORY( DefaultGridColumnModel
, szServiceName_DefaultGridColumnModel
, NULL
);
393 CHECKANDCREATEFACTORY( GridColumn
, szServiceName_GridColumn
, NULL
);
396 if ( rtl_str_compare( sImplementationName
, "com.sun.star.awt.comp.AsyncCallback" ) == 0 )
397 return comp_AsyncCallback_component_getFactory( sImplementationName
, _pServiceManager
, _pRegistryKey
);
401 pRet
= comp_Layout_component_getFactory( sImplementationName
, _pServiceManager
, _pRegistryKey
);