LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/forms/source/misc - services.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 102 104 98.1 %
Date: 2013-07-09 Functions: 6 6 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "services.hxx"
      21             : #include "frm_module.hxx"
      22             : #include <cppuhelper/factory.hxx>
      23             : #include <uno/lbnames.h>
      24             : #include <osl/diagnose.h>
      25             : #include <uno/mapping.hxx>
      26             : 
      27             : using namespace ::com::sun::star::uno;
      28             : using namespace ::com::sun::star::lang;
      29             : using namespace ::com::sun::star::registry;
      30             : 
      31             : //---------------------------------------------------------------------------------------
      32             : //.......................................................................................
      33             : #define DECLARE_SERVICE_INFO(classImplName) \
      34             :     namespace frm { \
      35             :         extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> SAL_CALL classImplName##_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory) throw (::com::sun::star::uno::RuntimeException); \
      36             :     }
      37             : 
      38             : //---------------------------------------------------------------------------------------
      39             : DECLARE_SERVICE_INFO(OFixedTextModel)
      40             : DECLARE_SERVICE_INFO(ORadioButtonModel)
      41             : DECLARE_SERVICE_INFO(ORadioButtonControl)
      42             : DECLARE_SERVICE_INFO(OCheckBoxModel)
      43             : DECLARE_SERVICE_INFO(OCheckBoxControl)
      44             : DECLARE_SERVICE_INFO(OHiddenModel)
      45             : DECLARE_SERVICE_INFO(OGroupBoxModel)
      46             : DECLARE_SERVICE_INFO(OGroupBoxControl)
      47             : DECLARE_SERVICE_INFO(OListBoxControl)
      48             : DECLARE_SERVICE_INFO(OListBoxModel)
      49             : DECLARE_SERVICE_INFO(OComboBoxControl)
      50             : DECLARE_SERVICE_INFO(OComboBoxModel)
      51             : DECLARE_SERVICE_INFO(OEditControl)
      52             : DECLARE_SERVICE_INFO(OEditModel)
      53             : DECLARE_SERVICE_INFO(ONumericControl)
      54             : DECLARE_SERVICE_INFO(ONumericModel)
      55             : DECLARE_SERVICE_INFO(OPatternControl)
      56             : DECLARE_SERVICE_INFO(OPatternModel)
      57             : DECLARE_SERVICE_INFO(OCurrencyControl)
      58             : DECLARE_SERVICE_INFO(OCurrencyModel)
      59             : DECLARE_SERVICE_INFO(ODateControl)
      60             : DECLARE_SERVICE_INFO(ODateModel)
      61             : DECLARE_SERVICE_INFO(OTimeControl)
      62             : DECLARE_SERVICE_INFO(OTimeModel)
      63             : DECLARE_SERVICE_INFO(OFormattedControl)
      64             : DECLARE_SERVICE_INFO(OFormattedModel)
      65             : DECLARE_SERVICE_INFO(OFileControlModel)
      66             : DECLARE_SERVICE_INFO(OButtonControl)
      67             : DECLARE_SERVICE_INFO(OButtonModel)
      68             : DECLARE_SERVICE_INFO(OImageButtonControl)
      69             : DECLARE_SERVICE_INFO(OImageButtonModel)
      70             : 
      71             : DECLARE_SERVICE_INFO(OImageControlControl)
      72             : DECLARE_SERVICE_INFO(OImageControlModel)
      73             : DECLARE_SERVICE_INFO(OGridControlModel)
      74             : 
      75             : // XForms objects
      76             : DECLARE_SERVICE_INFO(Binding)
      77             : DECLARE_SERVICE_INFO(Model)
      78             : DECLARE_SERVICE_INFO(XForms)
      79             : 
      80             : // some special handling for the FormattedFieldWrapper which can act as FormattedModel or as EditModel
      81             : DECLARE_SERVICE_INFO(OFormattedFieldWrapper)
      82             :     // this is for a service, which is instantiated through the EditModel service name
      83             :     // and which acts mostly as Edit (mostly means : if somebody uses XPersistObject::read immediately after
      84             :     // the object was instantiated and the stream contains a FormattedModel, it switches permanently to
      85             :     // formatted.)
      86             : namespace frm { \
      87             :     extern Reference< XInterface > SAL_CALL OFormattedFieldWrapper_CreateInstance_ForceFormatted(const Reference<XMultiServiceFactory>& _rxFactory) throw (RuntimeException); \
      88             : }
      89             : 
      90             : DECLARE_SERVICE_INFO(OFormsCollection)
      91             : DECLARE_SERVICE_INFO(ImageProducer)
      92             : 
      93             : //---------------------------------------------------------------------------------------
      94             : 
      95          24 : static Sequence< OUString >                      s_aClassImplementationNames;
      96          24 : static Sequence<Sequence< OUString > >   s_aClassServiceNames;
      97          24 : static Sequence<sal_Int64>                              s_aFactories;
      98             :     // need to use sal_Int64 instead of ComponentInstantiation, as ComponentInstantiation has no cppuType, so
      99             :     // it can't be used with sequences
     100             : 
     101             : //---------------------------------------------------------------------------------------
     102         936 : void registerClassInfo(
     103             :         OUString _rClassImplName,                                // the ImplName of the class
     104             :         const Sequence< OUString >& _rServiceNames,      // the services supported by this class
     105             :         ::cppu::ComponentInstantiation _pCreateFunction                 // the method for instantiating such a class
     106             :         )
     107             : {
     108         936 :     sal_Int32 nCurrentLength = s_aClassImplementationNames.getLength();
     109             :     OSL_ENSURE((nCurrentLength == s_aClassServiceNames.getLength())
     110             :         && (nCurrentLength == s_aFactories.getLength()),
     111             :         "forms::registerClassInfo : invalid class infos !");
     112             : 
     113         936 :     s_aClassImplementationNames.realloc(nCurrentLength + 1);
     114         936 :     s_aClassServiceNames.realloc(nCurrentLength + 1);
     115         936 :     s_aFactories.realloc(nCurrentLength + 1);
     116             : 
     117         936 :     s_aClassImplementationNames.getArray()[nCurrentLength] = _rClassImplName;
     118         936 :     s_aClassServiceNames.getArray()[nCurrentLength] = _rServiceNames;
     119         936 :     s_aFactories.getArray()[nCurrentLength] = reinterpret_cast<sal_Int64>(_pCreateFunction);
     120         936 : }
     121             : 
     122             : //---------------------------------------------------------------------------------------
     123             : //.......................................................................................
     124             : #define REGISTER_CLASS_CORE(classImplName) \
     125             :     registerClassInfo( \
     126             :         OUString("com.sun.star.form.") + OUString(#classImplName), \
     127             :         aServices, \
     128             :         frm::classImplName##_CreateInstance)
     129             : 
     130             : //.......................................................................................
     131             : #define REGISTER_CLASS1(classImplName, service1) \
     132             :     aServices.realloc(1); \
     133             :     aServices.getArray()[0] = service1; \
     134             :     REGISTER_CLASS_CORE(classImplName)
     135             : 
     136             : //.......................................................................................
     137             : #define REGISTER_CLASS2(classImplName, service1, service2) \
     138             :     aServices.realloc(2); \
     139             :     aServices.getArray()[0] = service1; \
     140             :     aServices.getArray()[1] = service2; \
     141             :     REGISTER_CLASS_CORE(classImplName)
     142             : 
     143             : //.......................................................................................
     144             : #define REGISTER_CLASS3(classImplName, service1, service2, service3) \
     145             :     aServices.realloc(3); \
     146             :     aServices.getArray()[0] = service1; \
     147             :     aServices.getArray()[1] = service2; \
     148             :     aServices.getArray()[2] = service3; \
     149             :     REGISTER_CLASS_CORE(classImplName)
     150             : 
     151             : //.......................................................................................
     152             : #define REGISTER_CLASS4(classImplName, service1, service2, service3, service4) \
     153             :     aServices.realloc(4); \
     154             :     aServices.getArray()[0] = service1; \
     155             :     aServices.getArray()[1] = service2; \
     156             :     aServices.getArray()[2] = service3; \
     157             :     aServices.getArray()[3] = service4; \
     158             :     REGISTER_CLASS_CORE(classImplName)
     159             : 
     160             : //---------------------------------------------------------------------------------------
     161         167 : void ensureClassInfos()
     162             : {
     163         167 :     if (s_aClassImplementationNames.getLength())
     164             :         // nothing to do
     165         310 :         return;
     166          24 :     Sequence< OUString > aServices;
     167             : 
     168             :     // ========================================================================
     169             :     // = ControlModels
     170             :     // ------------------------------------------------------------------------
     171             :     // - FixedText
     172          24 :     REGISTER_CLASS2(OFixedTextModel, FRM_COMPONENT_FIXEDTEXT, FRM_SUN_COMPONENT_FIXEDTEXT);
     173             :     // - Hidden
     174          24 :     REGISTER_CLASS3(OHiddenModel, FRM_COMPONENT_HIDDENCONTROL, FRM_SUN_COMPONENT_HIDDENCONTROL, FRM_COMPONENT_HIDDEN);
     175             :     // - FileControl
     176          24 :     REGISTER_CLASS2(OFileControlModel, FRM_COMPONENT_FILECONTROL, FRM_SUN_COMPONENT_FILECONTROL);
     177             :     // - ImageButton
     178          24 :     REGISTER_CLASS2(OImageButtonModel, FRM_COMPONENT_IMAGEBUTTON, FRM_SUN_COMPONENT_IMAGEBUTTON);
     179             :     // - GridControl
     180          24 :     REGISTER_CLASS3(OGridControlModel, FRM_COMPONENT_GRID /* compatibility */, FRM_COMPONENT_GRIDCONTROL, FRM_SUN_COMPONENT_GRIDCONTROL);
     181             :     // - GroupBox
     182          24 :     REGISTER_CLASS2(OGroupBoxModel, FRM_COMPONENT_GROUPBOX, FRM_SUN_COMPONENT_GROUPBOX);
     183             : 
     184             :     // - RadioButton
     185          24 :     REGISTER_CLASS4( ORadioButtonModel, FRM_COMPONENT_RADIOBUTTON, FRM_SUN_COMPONENT_RADIOBUTTON, FRM_SUN_COMPONENT_DATABASE_RADIOBUTTON, BINDABLE_DATABASE_RADIO_BUTTON );
     186             :     // - CheckBox
     187          24 :     REGISTER_CLASS4( OCheckBoxModel, FRM_COMPONENT_CHECKBOX, FRM_SUN_COMPONENT_CHECKBOX, FRM_SUN_COMPONENT_DATABASE_CHECKBOX, BINDABLE_DATABASE_CHECK_BOX );
     188             :     // - ListBox
     189          24 :     REGISTER_CLASS4( OListBoxModel, FRM_COMPONENT_LISTBOX, FRM_SUN_COMPONENT_LISTBOX, FRM_SUN_COMPONENT_DATABASE_LISTBOX, BINDABLE_DATABASE_LIST_BOX );
     190             :     // - ComboBox
     191          24 :     REGISTER_CLASS4( OComboBoxModel, FRM_COMPONENT_COMBOBOX, FRM_SUN_COMPONENT_COMBOBOX, FRM_SUN_COMPONENT_DATABASE_COMBOBOX, BINDABLE_DATABASE_COMBO_BOX );
     192             :     // - EditControl
     193          24 :     REGISTER_CLASS4( OEditModel, FRM_COMPONENT_TEXTFIELD, FRM_SUN_COMPONENT_TEXTFIELD, FRM_SUN_COMPONENT_DATABASE_TEXTFIELD, BINDABLE_DATABASE_TEXT_FIELD );
     194             :     // - DateControl
     195          24 :     REGISTER_CLASS3( ODateModel, FRM_COMPONENT_DATEFIELD, FRM_SUN_COMPONENT_DATEFIELD, FRM_SUN_COMPONENT_DATABASE_DATEFIELD );
     196             :     // - TimeControl
     197          24 :     REGISTER_CLASS3( OTimeModel, FRM_COMPONENT_TIMEFIELD, FRM_SUN_COMPONENT_TIMEFIELD, FRM_SUN_COMPONENT_DATABASE_TIMEFIELD );
     198             :     // - NumericField
     199          24 :     REGISTER_CLASS4( ONumericModel, FRM_COMPONENT_NUMERICFIELD, FRM_SUN_COMPONENT_NUMERICFIELD, FRM_SUN_COMPONENT_DATABASE_NUMERICFIELD, BINDABLE_DATABASE_NUMERIC_FIELD );
     200             :     // - CurrencyField
     201          24 :     REGISTER_CLASS3( OCurrencyModel, FRM_COMPONENT_CURRENCYFIELD, FRM_SUN_COMPONENT_CURRENCYFIELD, FRM_SUN_COMPONENT_DATABASE_CURRENCYFIELD );
     202             :     // - PatternField
     203          24 :     REGISTER_CLASS3( OPatternModel, FRM_COMPONENT_PATTERNFIELD, FRM_SUN_COMPONENT_PATTERNFIELD, FRM_SUN_COMPONENT_DATABASE_PATTERNFIELD );
     204             :     // - Button
     205          24 :     REGISTER_CLASS2( OButtonModel, FRM_COMPONENT_COMMANDBUTTON, FRM_SUN_COMPONENT_COMMANDBUTTON );
     206             :     // - ImageControl
     207          24 :     REGISTER_CLASS2( OImageControlModel, FRM_COMPONENT_IMAGECONTROL, FRM_SUN_COMPONENT_IMAGECONTROL );
     208             : 
     209             :     // - FormattedField
     210          24 :     REGISTER_CLASS1(OFormattedFieldWrapper, FRM_COMPONENT_EDIT);
     211             :         // since SRC568 both OFormattedModel and OEditModel use FRM_COMPONENT_EDIT for persistence,
     212             :         // and while reading a wrapper determines which kind of model it is
     213             :     // register the wrapper for the FormattedField, as it handles the XPersistObject::write
     214             :     // so that version <= 5.1 are able to read it
     215          24 :     aServices.realloc(4);
     216          24 :     aServices.getArray()[0] = FRM_COMPONENT_FORMATTEDFIELD;
     217          24 :     aServices.getArray()[1] = FRM_SUN_COMPONENT_FORMATTEDFIELD;
     218          24 :     aServices.getArray()[2] = FRM_SUN_COMPONENT_DATABASE_FORMATTEDFIELD;
     219          24 :     aServices.getArray()[3] = BINDABLE_DATABASE_FORMATTED_FIELD;
     220             : 
     221             :     registerClassInfo(OUString("com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted"),
     222             :         aServices,
     223          24 :         frm::OFormattedFieldWrapper_CreateInstance_ForceFormatted);
     224             : 
     225             :     // ========================================================================
     226             :     // = Controls
     227             :     // - RadioButton
     228          24 :     REGISTER_CLASS2(ORadioButtonControl, STARDIV_ONE_FORM_CONTROL_RADIOBUTTON, FRM_SUN_CONTROL_RADIOBUTTON);
     229             :     // - CheckBox
     230          24 :     REGISTER_CLASS2(OCheckBoxControl, STARDIV_ONE_FORM_CONTROL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX);
     231             :     // - GroupBox
     232          24 :     REGISTER_CLASS2(OGroupBoxControl, STARDIV_ONE_FORM_CONTROL_GROUPBOX, FRM_SUN_CONTROL_GROUPBOX);
     233             :     // - ListBox
     234          24 :     REGISTER_CLASS2(OListBoxControl, STARDIV_ONE_FORM_CONTROL_LISTBOX, FRM_SUN_CONTROL_LISTBOX);
     235             :     // - ComboBox
     236          24 :     REGISTER_CLASS2(OComboBoxControl, STARDIV_ONE_FORM_CONTROL_COMBOBOX, FRM_SUN_CONTROL_COMBOBOX);
     237             :     // - EditControl
     238          24 :     REGISTER_CLASS3(OEditControl, STARDIV_ONE_FORM_CONTROL_TEXTFIELD, FRM_SUN_CONTROL_TEXTFIELD, STARDIV_ONE_FORM_CONTROL_EDIT);
     239             :     // - DateControl
     240          24 :     REGISTER_CLASS2(ODateControl, STARDIV_ONE_FORM_CONTROL_DATEFIELD, FRM_SUN_CONTROL_DATEFIELD);
     241             :     // - TimeControl
     242          24 :     REGISTER_CLASS2(OTimeControl, STARDIV_ONE_FORM_CONTROL_TIMEFIELD, FRM_SUN_CONTROL_TIMEFIELD);
     243             :     // - NumericField
     244          24 :     REGISTER_CLASS2(ONumericControl, STARDIV_ONE_FORM_CONTROL_NUMERICFIELD, FRM_SUN_CONTROL_NUMERICFIELD);
     245             :     // - CurrencyField
     246          24 :     REGISTER_CLASS2(OCurrencyControl, STARDIV_ONE_FORM_CONTROL_CURRENCYFIELD, FRM_SUN_CONTROL_CURRENCYFIELD);
     247             :     // - PatternField
     248          24 :     REGISTER_CLASS2(OPatternControl, STARDIV_ONE_FORM_CONTROL_PATTERNFIELD, FRM_SUN_CONTROL_PATTERNFIELD);
     249             :     // - FormattedField
     250          24 :     REGISTER_CLASS2(OFormattedControl, STARDIV_ONE_FORM_CONTROL_FORMATTEDFIELD, FRM_SUN_CONTROL_FORMATTEDFIELD);
     251             :     // - Button
     252          24 :     REGISTER_CLASS2(OButtonControl, STARDIV_ONE_FORM_CONTROL_COMMANDBUTTON, FRM_SUN_CONTROL_COMMANDBUTTON);
     253             :     // - ImageButton
     254          24 :     REGISTER_CLASS2(OImageButtonControl, STARDIV_ONE_FORM_CONTROL_IMAGEBUTTON, FRM_SUN_CONTROL_IMAGEBUTTON);
     255             :     // - ImageControl
     256          24 :     REGISTER_CLASS2(OImageControlControl, STARDIV_ONE_FORM_CONTROL_IMAGECONTROL, FRM_SUN_CONTROL_IMAGECONTROL);
     257             : 
     258             : 
     259             :     // ========================================================================
     260             :     // = various
     261          24 :     aServices.realloc(1);
     262          24 :     aServices.getArray()[0] = OUString("com.sun.star.form.Forms");
     263          24 :     REGISTER_CLASS_CORE(OFormsCollection);
     264             : 
     265          24 :     REGISTER_CLASS1(ImageProducer, SRV_AWT_IMAGEPRODUCER);
     266             : 
     267             :     // ========================================================================
     268             :     // = XForms core
     269             : #define REGISTER_XFORMS_CLASS(name) \
     270             :     aServices.realloc(1); \
     271             :     aServices.getArray()[0] = OUString( "com.sun.star.xforms." #name ); \
     272             :     REGISTER_CLASS_CORE(name)
     273             : 
     274          24 :     REGISTER_XFORMS_CLASS(Model);
     275          24 :     REGISTER_XFORMS_CLASS(XForms);
     276             : 
     277             : }
     278             : 
     279             : //=======================================================================================
     280             : extern "C"
     281             : {
     282             : 
     283             : //---------------------------------------------------------------------------------------
     284             : void SAL_CALL createRegistryInfo_ODatabaseForm();
     285             : void SAL_CALL createRegistryInfo_OFilterControl();
     286             : void SAL_CALL createRegistryInfo_OScrollBarModel();
     287             : void SAL_CALL createRegistryInfo_OSpinButtonModel();
     288             : void SAL_CALL createRegistryInfo_ONavigationBarModel();
     289             : void SAL_CALL createRegistryInfo_ONavigationBarControl();
     290             : void SAL_CALL createRegistryInfo_ORichTextModel();
     291             : void SAL_CALL createRegistryInfo_ORichTextControl();
     292             : void SAL_CALL createRegistryInfo_CLibxml2XFormsExtension();
     293             : void SAL_CALL createRegistryInfo_FormOperations();
     294             : 
     295             : //---------------------------------------------------------------------------------------
     296          37 : void SAL_CALL createRegistryInfo_FORMS()
     297             : {
     298             :     static sal_Bool bInit = sal_False;
     299          37 :     if (!bInit)
     300             :     {
     301          15 :         createRegistryInfo_ODatabaseForm();
     302          15 :         createRegistryInfo_OFilterControl();
     303          15 :         createRegistryInfo_OScrollBarModel();
     304          15 :         createRegistryInfo_OSpinButtonModel();
     305          15 :         createRegistryInfo_ONavigationBarModel();
     306          15 :         createRegistryInfo_ONavigationBarControl();
     307          15 :         createRegistryInfo_ORichTextModel();
     308          15 :         createRegistryInfo_ORichTextControl();
     309          15 :         createRegistryInfo_CLibxml2XFormsExtension();
     310          15 :         createRegistryInfo_FormOperations();
     311          15 :         bInit = sal_True;
     312             :     }
     313          37 : }
     314             : 
     315             : //---------------------------------------------------------------------------------------
     316         167 : SAL_DLLPUBLIC_EXPORT void* SAL_CALL frm_component_getFactory(const sal_Char* _pImplName, XMultiServiceFactory* _pServiceManager, void* /*_pRegistryKey*/)
     317             : {
     318         167 :     if (!_pServiceManager || !_pImplName)
     319           0 :         return NULL;
     320             : 
     321             :     // ========================================================================
     322             :     // a lot of stuff which is implemented "manually" here in this file
     323         167 :     void* pRet = NULL;
     324             : 
     325             :     // collect the class infos
     326         167 :     ensureClassInfos();
     327             : 
     328             :     // both our static sequences should have the same length ...
     329         167 :     sal_Int32 nClasses = s_aClassImplementationNames.getLength();
     330             :     OSL_ENSURE((s_aClassServiceNames.getLength() == nClasses) &&
     331             :         (s_aFactories.getLength() == nClasses),
     332             :         "forms::component_getFactory : invalid class infos !");
     333             : 
     334             :     // loop through the sequences and register the service providers
     335         167 :     const OUString* pClasses = s_aClassImplementationNames.getConstArray();
     336         167 :     const Sequence< OUString >* pServices = s_aClassServiceNames.getConstArray();
     337         167 :     const sal_Int64* pFunctionsAsInts = s_aFactories.getConstArray();
     338             : 
     339        3953 :     for (sal_Int32 i=0; i<nClasses; ++i, ++pClasses, ++pServices, ++pFunctionsAsInts)
     340             :     {
     341        3916 :         if (rtl_ustr_ascii_compare(pClasses->getStr(), _pImplName) == 0)
     342             :         {
     343             :             ::cppu::ComponentInstantiation aCurrentCreateFunction =
     344         130 :                 reinterpret_cast< ::cppu::ComponentInstantiation>(*pFunctionsAsInts);
     345             : 
     346             :             Reference<XSingleServiceFactory> xFactory(
     347             :                 ::cppu::createSingleFactory(
     348             :                     _pServiceManager,
     349             :                     *pClasses,
     350             :                     aCurrentCreateFunction,
     351             :                     *pServices
     352             :                 )
     353         130 :             );
     354         130 :             if (xFactory.is())
     355             :             {
     356         130 :                 xFactory->acquire();
     357         130 :                 pRet = xFactory.get();
     358         130 :                 break;
     359           0 :             }
     360             :         }
     361             :     }
     362             : 
     363             :     // ========================================================================
     364             :     // the real way - use the OModule
     365         167 :     if ( !pRet )
     366             :     {
     367          37 :         createRegistryInfo_FORMS();
     368             :         {
     369             :             // let the module look for the component
     370          37 :             Reference< XInterface > xRet;
     371          74 :             xRet = ::frm::OFormsModule::getComponentFactory(
     372             :                 OUString::createFromAscii( _pImplName ),
     373          37 :                 static_cast< XMultiServiceFactory* >( _pServiceManager ) );
     374             : 
     375          37 :             if ( xRet.is() )
     376          37 :                 xRet->acquire();
     377          37 :             pRet = xRet.get();
     378             :         }
     379             :     }
     380             : 
     381         167 :     return pRet;
     382             : }
     383             : 
     384          72 : }
     385             : 
     386             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10