forms/Library_frm.mk | 1 forms/source/component/Button.cxx | 27 - forms/source/component/CheckBox.cxx | 28 - forms/source/component/ComboBox.cxx | 28 - forms/source/component/Currency.cxx | 28 - forms/source/component/Date.cxx | 26 - forms/source/component/Edit.cxx | 23 - forms/source/component/Edit.hxx | 11 forms/source/component/File.cxx | 13 forms/source/component/Filter.cxx | 16 forms/source/component/FixedText.cxx | 15 forms/source/component/FormattedField.cxx | 16 forms/source/component/FormattedFieldWrapper.cxx | 25 - forms/source/component/FormattedFieldWrapper.hxx | 12 forms/source/component/FormsCollection.cxx | 26 - forms/source/component/Grid.cxx | 16 forms/source/component/GroupBox.cxx | 31 - forms/source/component/Hidden.cxx | 14 forms/source/component/ImageButton.cxx | 25 - forms/source/component/ImageControl.cxx | 31 - forms/source/component/ListBox.cxx | 29 - forms/source/component/Numeric.cxx | 28 - forms/source/component/Pattern.cxx | 57 +- forms/source/component/RadioButton.cxx | 27 - forms/source/component/Time.cxx | 26 - forms/source/component/imgprod.cxx | 14 forms/source/component/navigationbar.cxx | 15 forms/source/component/scrollbar.cxx | 16 forms/source/component/scrollbar.hxx | 7 forms/source/component/spinbutton.cxx | 14 forms/source/component/spinbutton.hxx | 3 forms/source/inc/services.hxx | 502 ++++++++--------------- forms/source/misc/services.cxx | 311 -------------- forms/source/richtext/richtextcontrol.cxx | 13 forms/source/richtext/richtextmodel.cxx | 15 forms/source/richtext/richtextmodel.hxx | 4 forms/source/runtime/formoperations.cxx | 13 forms/source/solar/component/navbarcontrol.cxx | 15 forms/source/xforms/model.cxx | 9 forms/source/xforms/xforms_services.cxx | 35 - forms/source/xforms/xpathlib/extension.cxx | 8 forms/source/xforms/xpathlib/extension.hxx | 2 forms/util/frm.component | 141 ++++-- 43 files changed, 615 insertions(+), 1101 deletions(-)
New commits: commit de31ef2674fd0434d58dc68b6abca0bcc272cca5 Author: Jan Holesovsky <ke...@collabora.com> Date: Tue Feb 17 12:05:47 2015 +0100 forms: Fix copy'n'paste mistakes. com_sun_star_form_ORadioButtonModel_get_implementation -> com_sun_star_form_ORadioButtonControl_get_implementation com_sun_star_form_OGroupBoxModel_get_implementation -> com_sun_star_form_OGroupBoxControl_get_implementation and a bit of further cleanup. Change-Id: I2d03d69ac83c482257baed5a6b84a6bacae68889 diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index 178f193..57c3c04 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -349,7 +349,7 @@ com_sun_star_form_OFormattedFieldWrapper_get_implementation(::com::sun::star::un } extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL -com_sun_star_comp_form_OFormattedFieldWrapper_ForcedFormatted_get_implementation(::com::sun::star::uno::XComponentContext* component, +com_sun_star_comp_forms_OFormattedFieldWrapper_ForcedFormatted_get_implementation(::com::sun::star::uno::XComponentContext* component, ::com::sun::star::uno::Sequence<css::uno::Any> const &) { return cppu::acquire(new frm::OFormattedFieldWrapper(component)); diff --git a/forms/source/richtext/richtextcontrol.cxx b/forms/source/richtext/richtextcontrol.cxx index 29f316b..e40ec1f 100644 --- a/forms/source/richtext/richtextcontrol.cxx +++ b/forms/source/richtext/richtextcontrol.cxx @@ -40,13 +40,6 @@ #include <svl/itempool.hxx> #include <sfx2/msgpool.hxx> -extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL -com_sun_star_form_ORichTextControl_get_implementation(::com::sun::star::uno::XComponentContext*, - ::com::sun::star::uno::Sequence<css::uno::Any> const &) -{ - return cppu::acquire(new frm::ORichTextControl()); -} - namespace frm { @@ -720,5 +713,11 @@ namespace frm } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_comp_form_ORichTextControl_get_implementation(::com::sun::star::uno::XComponentContext*, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::ORichTextControl()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx index 2e56e10..e428d45 100644 --- a/forms/source/xforms/model.cxx +++ b/forms/source/xforms/model.cxx @@ -682,7 +682,7 @@ Sequence<sal_Int8> Model::getImplementationId() extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL -com_sun_star_xform_Model_get_implementation(::com::sun::star::uno::XComponentContext*, +com_sun_star_form_Model_get_implementation(::com::sun::star::uno::XComponentContext*, ::com::sun::star::uno::Sequence<css::uno::Any> const &) { return cppu::acquire(new xforms::Model()); diff --git a/forms/source/xforms/xpathlib/extension.cxx b/forms/source/xforms/xpathlib/extension.cxx index 0404022..b7bb1f5 100644 --- a/forms/source/xforms/xpathlib/extension.cxx +++ b/forms/source/xforms/xpathlib/extension.cxx @@ -85,8 +85,8 @@ void SAL_CALL CLibxml2XFormsExtension::initialize(const Sequence< Any >& aSequen extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL -CLibxlm2XFormsExtension_get_implementation(::com::sun::star::uno::XComponentContext*, - ::com::sun::star::uno::Sequence<css::uno::Any> const &) +com_sun_star_comp_xml_xpath_XFormsExtension_get_implementation(::com::sun::star::uno::XComponentContext*, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) { return cppu::acquire(new CLibxml2XFormsExtension()); } diff --git a/forms/util/frm.component b/forms/util/frm.component index 7fac983..962aec0 100644 --- a/forms/util/frm.component +++ b/forms/util/frm.component @@ -30,7 +30,7 @@ <service name="com.sun.star.form.component.NavigationToolBar"/> </implementation> <implementation name="com.sun.star.comp.form.ORichTextControl" - constructor="com_sun_star_form_ORichTextControl_get_implementation"> + constructor="com_sun_star_comp_form_ORichTextControl_get_implementation"> <service name="com.sun.star.form.control.RichTextControl"/> </implementation> <implementation name="com.sun.star.comp.forms.FormOperations" @@ -52,7 +52,7 @@ <service name="com.sun.star.form.control.FilterControl"/> </implementation> <implementation name="com.sun.star.comp.forms.OFormattedFieldWrapper_ForcedFormatted" - constructor="com_sun_star_comp_form_OFormattedFieldWrapper_ForcedFormatted_get_implementation"> + constructor="com_sun_star_comp_forms_OFormattedFieldWrapper_ForcedFormatted_get_implementation"> <service name="com.sun.star.form.binding.BindableDatabaseFormattedField"/> <service name="com.sun.star.form.component.DatabaseFormattedField"/> <service name="com.sun.star.form.component.FormattedField"/> @@ -85,7 +85,7 @@ <service name="com.sun.star.form.component.SpinButton"/> </implementation> <implementation name="com.sun.star.comp.xml.xpath.XFormsExtension" - constructor="CLibxlm2XFormsExtension_get_implementation"> + constructor="com_sun_star_comp_xml_xpath_XFormsExtension_get_implementation"> <service name="com.sun.star.xml.xpath.XPathExtension"/> </implementation> <implementation name="com.sun.star.form.ImageProducer" @@ -93,7 +93,7 @@ <service name="com.sun.star.awt.ImageProducer"/> </implementation> <implementation name="com.sun.star.form.Model" - constructor="com_sun_star_xform_Model_get_implementation"> + constructor="com_sun_star_form_Model_get_implementation"> <service name="com.sun.star.xforms.Model"/> </implementation> <implementation name="com.sun.star.form.OButtonControl" @@ -195,7 +195,7 @@ <service name="stardiv.one.form.component.GridControl"/> </implementation> <implementation name="com.sun.star.form.OGroupBoxControl" - constructor="com_sun_star_form_OGroupBoxModel_get_implementation"> + constructor="com_sun_star_form_OGroupBoxControl_get_implementation"> <service name="com.sun.star.form.control.GroupBox"/> <service name="stardiv.one.form.control.GroupBox"/> </implementation> @@ -266,7 +266,7 @@ <service name="stardiv.one.form.component.PatternField"/> </implementation> <implementation name="com.sun.star.form.ORadioButtonControl" - constructor="com_sun_star_form_ORadioButtonModel_get_implementation"> + constructor="com_sun_star_form_ORadioButtonControl_get_implementation"> <service name="com.sun.star.form.control.RadioButton"/> <service name="stardiv.one.form.control.RadioButton"/> </implementation> commit 8b145d67b170618041840a6573d9c3aa2b147ae6 Author: Jan Holesovsky <ke...@collabora.com> Date: Tue Feb 17 10:21:14 2015 +0100 forms: Convert also com.sun.star.form.XForms. Plus some associated cleanup. Change-Id: I0a923198c23e2e4ecbc91e5b56cfac31b7f71256 diff --git a/forms/Library_frm.mk b/forms/Library_frm.mk index d371c67..8d467cb 100644 --- a/forms/Library_frm.mk +++ b/forms/Library_frm.mk @@ -108,7 +108,6 @@ $(eval $(call gb_Library_add_exception_objects,frm,\ forms/source/misc/limitedformats \ forms/source/misc/listenercontainers \ forms/source/misc/property \ - forms/source/misc/services \ forms/source/resource/frm_resource \ forms/source/richtext/attributedispatcher \ forms/source/richtext/clipboarddispatcher \ diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx index 7656204..2e80b2e 100644 --- a/forms/source/component/Edit.hxx +++ b/forms/source/component/Edit.hxx @@ -49,7 +49,6 @@ protected: void disableFormattedWriteFake() { m_bWritingFormattedFake = false; } bool lastReadWasFormattedFake() const { return (getLastReadVersion() & PF_FAKE_FORMATTED_FIELD) != 0; } - friend InterfaceRef SAL_CALL OEditModel_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); friend class OFormattedFieldWrapper; friend class OFormattedModel; // temporary diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index ed949e0..178f193 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -30,8 +30,7 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> -namespace frm -{ +using namespace frm; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::sdbc; @@ -44,17 +43,6 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; - -Reference<XInterface> SAL_CALL OFormattedFieldWrapper_CreateInstance_ForceFormatted(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return OFormattedFieldWrapper::createFormattedFieldWrapper( comphelper::getComponentContext(_rxFactory), true); -} - -InterfaceRef SAL_CALL OFormattedFieldWrapper_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return OFormattedFieldWrapper::createFormattedFieldWrapper( comphelper::getComponentContext(_rxFactory), false); -} - OFormattedFieldWrapper::OFormattedFieldWrapper(const Reference<XComponentContext>& _rxFactory) :m_xContext(_rxFactory) { @@ -353,8 +341,6 @@ void OFormattedFieldWrapper::ensureAggregate() decrement(m_refCount); } -} - extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL com_sun_star_form_OFormattedFieldWrapper_get_implementation(::com::sun::star::uno::XComponentContext* component, ::com::sun::star::uno::Sequence<css::uno::Any> const &) diff --git a/forms/source/component/FormattedFieldWrapper.hxx b/forms/source/component/FormattedFieldWrapper.hxx index 7109d38..6c0fdad 100644 --- a/forms/source/component/FormattedFieldWrapper.hxx +++ b/forms/source/component/FormattedFieldWrapper.hxx @@ -59,9 +59,6 @@ protected: protected: virtual ~OFormattedFieldWrapper(); - friend InterfaceRef SAL_CALL OFormattedFieldWrapper_CreateInstance_ForceFormatted(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); - friend InterfaceRef SAL_CALL OFormattedFieldWrapper_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); - public: // UNO DECLARE_UNO3_AGG_DEFAULTS(OFormattedFieldWrapper, OWeakAggObject) diff --git a/forms/source/component/FormsCollection.cxx b/forms/source/component/FormsCollection.cxx index d67c108..daa1b0c 100644 --- a/forms/source/component/FormsCollection.cxx +++ b/forms/source/component/FormsCollection.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "FormsCollection.hxx" #include "services.hxx" #include <comphelper/sequence.hxx> @@ -25,42 +24,28 @@ #include <cppuhelper/supportsservice.hxx> #include <com/sun/star/form/XForm.hpp> - -namespace frm -{ - +using namespace frm; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::form; using namespace ::com::sun::star::container; using namespace ::com::sun::star::util; - - -InterfaceRef SAL_CALL OFormsCollection_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OFormsCollection( comphelper::getComponentContext(_rxFactory) )); -} - - OUString SAL_CALL OFormsCollection::getServiceName() throw(RuntimeException, std::exception) { return OUString("com.sun.star.form.Forms"); } - Sequence< sal_Int8 > SAL_CALL OFormsCollection::getImplementationId( ) throw(RuntimeException, std::exception) { return css::uno::Sequence<sal_Int8>(); } - Sequence<Type> SAL_CALL OFormsCollection::getTypes() throw(RuntimeException, std::exception) { return concatSequences(OInterfaceContainer::getTypes(), FormsCollectionComponentBase::getTypes(), OFormsCollection_BASE::getTypes()); } - OFormsCollection::OFormsCollection(const Reference<XComponentContext>& _rxFactory) :FormsCollectionComponentBase( m_aMutex ) ,OInterfaceContainer( _rxFactory, m_aMutex, cppu::UnoType<XForm>::get() ) @@ -68,7 +53,6 @@ OFormsCollection::OFormsCollection(const Reference<XComponentContext>& _rxFactor { } - OFormsCollection::OFormsCollection( const OFormsCollection& _cloneSource ) :FormsCollectionComponentBase( m_aMutex ) ,OInterfaceContainer( m_aMutex, _cloneSource ) @@ -76,7 +60,6 @@ OFormsCollection::OFormsCollection( const OFormsCollection& _cloneSource ) { } - OFormsCollection::~OFormsCollection() { if (!FormsCollectionComponentBase::rBHelper.bDisposed) @@ -86,7 +69,6 @@ OFormsCollection::~OFormsCollection() } } - Any SAL_CALL OFormsCollection::queryAggregation(const Type& _rType) throw(RuntimeException, std::exception) { Any aReturn = OFormsCollection_BASE::queryInterface(_rType); @@ -151,18 +133,14 @@ void OFormsCollection::setParent(const InterfaceRef& Parent) throw( NoSupportExc m_xParent = Parent; } - InterfaceRef OFormsCollection::getParent() throw( RuntimeException, std::exception ) { return m_xParent; } - -} // namespace frm - extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL com_sun_star_form_OFormsCollection_get_implementation(css::uno::XComponentContext* context, - css::uno::Sequence<css::uno::Any> const &) + css::uno::Sequence<css::uno::Any> const &) { return cppu::acquire(new frm::OFormsCollection(context)); } diff --git a/forms/source/inc/services.hxx b/forms/source/inc/services.hxx index 1fb42f1..170cc33 100644 --- a/forms/source/inc/services.hxx +++ b/forms/source/inc/services.hxx @@ -23,330 +23,184 @@ #include <rtl/ustring.hxx> #include "frm_strings.hxx" -namespace com { namespace sun { namespace star { namespace lang { - class XMultiServiceFactory; -} } } } - -namespace frm -{ - - - #define AWT_CONTROL_TEXTFIELD "com.sun.star.awt.TextField" - - #define VCL_CONTROL_EDIT "stardiv.vcl.control.Edit" - #define VCL_CONTROL_LISTBOX "stardiv.vcl.control.ListBox" - #define VCL_CONTROL_COMBOBOX "stardiv.vcl.control.ComboBox" - #define VCL_CONTROL_RADIOBUTTON "stardiv.vcl.control.RadioButton" - #define VCL_CONTROL_GROUPBOX "stardiv.vcl.control.GroupBox" - #define VCL_CONTROL_FIXEDTEXT "stardiv.vcl.control.FixedText" - #define VCL_CONTROL_COMMANDBUTTON "stardiv.vcl.control.Button" - #define VCL_CONTROL_CHECKBOX "stardiv.vcl.control.CheckBox" - #define VCL_CONTROL_IMAGEBUTTON "stardiv.vcl.control.ImageButton" - #define VCL_CONTROL_FILECONTROL "stardiv.vcl.control.FileControl" - #define VCL_CONTROL_TIMEFIELD "stardiv.vcl.control.TimeField" - #define VCL_CONTROL_DATEFIELD "stardiv.vcl.control.DateField" - #define VCL_CONTROL_NUMERICFIELD "stardiv.vcl.control.NumericField" - #define VCL_CONTROL_CURRENCYFIELD "stardiv.vcl.control.CurrencyField" - #define VCL_CONTROL_PATTERNFIELD "stardiv.vcl.control.PatternField" - #define VCL_CONTROL_FORMATTEDFIELD "stardiv.vcl.control.FormattedField" - #define VCL_CONTROL_IMAGECONTROL "stardiv.vcl.control.ImageControl" - - #define VCL_CONTROLMODEL_EDIT "stardiv.vcl.controlmodel.Edit" - #define VCL_CONTROLMODEL_LISTBOX "stardiv.vcl.controlmodel.ListBox" - #define VCL_CONTROLMODEL_COMBOBOX "stardiv.vcl.controlmodel.ComboBox" - #define VCL_CONTROLMODEL_RADIOBUTTON "stardiv.vcl.controlmodel.RadioButton" - #define VCL_CONTROLMODEL_GROUPBOX "stardiv.vcl.controlmodel.GroupBox" - #define VCL_CONTROLMODEL_FIXEDTEXT "stardiv.vcl.controlmodel.FixedText" - #define VCL_CONTROLMODEL_COMMANDBUTTON "stardiv.vcl.controlmodel.Button" - #define VCL_CONTROLMODEL_CHECKBOX "stardiv.vcl.controlmodel.CheckBox" - #define VCL_CONTROLMODEL_IMAGEBUTTON "stardiv.vcl.controlmodel.ImageButton" - #define VCL_CONTROLMODEL_FILECONTROL "stardiv.vcl.controlmodel.FileControl" - #define VCL_CONTROLMODEL_TIMEFIELD "stardiv.vcl.controlmodel.TimeField" - #define VCL_CONTROLMODEL_DATEFIELD "stardiv.vcl.controlmodel.DateField" - #define VCL_CONTROLMODEL_NUMERICFIELD "stardiv.vcl.controlmodel.NumericField" - #define VCL_CONTROLMODEL_CURRENCYFIELD "stardiv.vcl.controlmodel.CurrencyField" - #define VCL_CONTROLMODEL_PATTERNFIELD "stardiv.vcl.controlmodel.PatternField" - #define VCL_CONTROLMODEL_FORMATTEDFIELD "stardiv.vcl.controlmodel.FormattedField" - #define VCL_CONTROLMODEL_IMAGECONTROL "stardiv.vcl.controlmodel.ImageControl" - - #define VCL_CONTROLMODEL_SCROLLBAR "com.sun.star.awt.UnoControlScrollBarModel" - #define VCL_CONTROL_SCROLLBAR "com.sun.star.awt.UnoControlScrollBar" - #define VCL_CONTROLMODEL_SPINBUTTON "com.sun.star.awt.UnoControlSpinButtonModel" - #define VCL_CONTROL_SPINBUTTON "com.sun.star.awt.UnoControlSpinButton" - - - // service names for compatibility - - #define FRM_COMPONENT_FORM "stardiv.one.form.component.Form" - #define FRM_COMPONENT_EDIT "stardiv.one.form.component.Edit" // compatibility - #define FRM_COMPONENT_TEXTFIELD "stardiv.one.form.component.TextField" - #define FRM_COMPONENT_LISTBOX "stardiv.one.form.component.ListBox" - #define FRM_COMPONENT_COMBOBOX "stardiv.one.form.component.ComboBox" - #define FRM_COMPONENT_RADIOBUTTON "stardiv.one.form.component.RadioButton" - #define FRM_COMPONENT_GROUPBOX "stardiv.one.form.component.GroupBox" // compatibility - #define FRM_COMPONENT_FIXEDTEXT "stardiv.one.form.component.FixedText" // compatibility - #define FRM_COMPONENT_COMMANDBUTTON "stardiv.one.form.component.CommandButton" - #define FRM_COMPONENT_CHECKBOX "stardiv.one.form.component.CheckBox" - #define FRM_COMPONENT_GRID "stardiv.one.form.component.Grid" // compatibility - #define FRM_COMPONENT_GRIDCONTROL "stardiv.one.form.component.GridControl" - #define FRM_COMPONENT_IMAGEBUTTON "stardiv.one.form.component.ImageButton" - #define FRM_COMPONENT_FILECONTROL "stardiv.one.form.component.FileControl" - #define FRM_COMPONENT_TIMEFIELD "stardiv.one.form.component.TimeField" - #define FRM_COMPONENT_DATEFIELD "stardiv.one.form.component.DateField" - #define FRM_COMPONENT_NUMERICFIELD "stardiv.one.form.component.NumericField" - #define FRM_COMPONENT_CURRENCYFIELD "stardiv.one.form.component.CurrencyField" - #define FRM_COMPONENT_PATTERNFIELD "stardiv.one.form.component.PatternField" - #define FRM_COMPONENT_HIDDEN "stardiv.one.form.component.Hidden" - #define FRM_COMPONENT_HIDDENCONTROL "stardiv.one.form.component.HiddenControl" - #define FRM_COMPONENT_IMAGECONTROL "stardiv.one.form.component.ImageControl" - #define FRM_COMPONENT_FORMATTEDFIELD "stardiv.one.form.component.FormattedField" - - // <compatibility_I> - #define STARDIV_ONE_FORM_CONTROL_COMMANDBUTTON "stardiv.one.form.control.CommandButton" - #define STARDIV_ONE_FORM_CONTROL_RADIOBUTTON "stardiv.one.form.control.RadioButton" - #define STARDIV_ONE_FORM_CONTROL_CHECKBOX "stardiv.one.form.control.CheckBox" - #define STARDIV_ONE_FORM_CONTROL_EDIT "stardiv.one.form.control.Edit" - #define STARDIV_ONE_FORM_CONTROL_LISTBOX "stardiv.one.form.control.ListBox" - #define STARDIV_ONE_FORM_CONTROL_COMBOBOX "stardiv.one.form.control.ComboBox" - #define STARDIV_ONE_FORM_CONTROL_GROUPBOX "stardiv.one.form.control.GroupBox" - #define STARDIV_ONE_FORM_CONTROL_TEXTFIELD "stardiv.one.form.control.TextField" - #define STARDIV_ONE_FORM_CONTROL_GRID "stardiv.one.form.control.Grid" - #define STARDIV_ONE_FORM_CONTROL_IMAGEBUTTON "stardiv.one.form.control.ImageButton" - #define STARDIV_ONE_FORM_CONTROL_TIMEFIELD "stardiv.one.form.control.TimeField" - #define STARDIV_ONE_FORM_CONTROL_DATEFIELD "stardiv.one.form.control.DateField" - #define STARDIV_ONE_FORM_CONTROL_NUMERICFIELD "stardiv.one.form.control.NumericField" - #define STARDIV_ONE_FORM_CONTROL_CURRENCYFIELD "stardiv.one.form.control.CurrencyField" - #define STARDIV_ONE_FORM_CONTROL_PATTERNFIELD "stardiv.one.form.control.PatternField" - #define STARDIV_ONE_FORM_CONTROL_IMAGECONTROL "stardiv.one.form.control.ImageControl" - #define STARDIV_ONE_FORM_CONTROL_FORMATTEDFIELD "stardiv.one.form.control.FormattedField" - // </compatibility_I> - - - // new (sun) service names - - #define FRM_SUN_COMPONENT_FORM "com.sun.star.form.component.Form" - #define FRM_SUN_COMPONENT_HTMLFORM "com.sun.star.form.component.HTMLForm" - #define FRM_SUN_COMPONENT_DATAFORM "com.sun.star.form.component.DataForm" - #define FRM_SUN_COMPONENT_TEXTFIELD "com.sun.star.form.component.TextField" - #define FRM_SUN_COMPONENT_LISTBOX "com.sun.star.form.component.ListBox" - #define FRM_SUN_COMPONENT_COMBOBOX "com.sun.star.form.component.ComboBox" - #define FRM_SUN_COMPONENT_RADIOBUTTON "com.sun.star.form.component.RadioButton" - #define FRM_SUN_COMPONENT_GROUPBOX "com.sun.star.form.component.GroupBox" - #define FRM_SUN_COMPONENT_FIXEDTEXT "com.sun.star.form.component.FixedText" - #define FRM_SUN_COMPONENT_COMMANDBUTTON "com.sun.star.form.component.CommandButton" - #define FRM_SUN_COMPONENT_CHECKBOX "com.sun.star.form.component.CheckBox" - #define FRM_SUN_COMPONENT_GRIDCONTROL "com.sun.star.form.component.GridControl" - #define FRM_SUN_COMPONENT_IMAGEBUTTON "com.sun.star.form.component.ImageButton" - #define FRM_SUN_COMPONENT_FILECONTROL "com.sun.star.form.component.FileControl" - #define FRM_SUN_COMPONENT_TIMEFIELD "com.sun.star.form.component.TimeField" - #define FRM_SUN_COMPONENT_DATEFIELD "com.sun.star.form.component.DateField" - #define FRM_SUN_COMPONENT_NUMERICFIELD "com.sun.star.form.component.NumericField" - #define FRM_SUN_COMPONENT_CURRENCYFIELD "com.sun.star.form.component.CurrencyField" - #define FRM_SUN_COMPONENT_PATTERNFIELD "com.sun.star.form.component.PatternField" - #define FRM_SUN_COMPONENT_HIDDENCONTROL "com.sun.star.form.component.HiddenControl" - #define FRM_SUN_COMPONENT_FORMATTEDFIELD "com.sun.star.form.component.FormattedField" - #define FRM_SUN_COMPONENT_SCROLLBAR "com.sun.star.form.component.ScrollBar" - #define FRM_SUN_COMPONENT_SPINBUTTON "com.sun.star.form.component.SpinButton" - #define FRM_SUN_COMPONENT_RICHTEXTCONTROL "com.sun.star.form.component.RichTextControl" - #define FRM_SUN_COMPONENT_NAVTOOLBAR "com.sun.star.form.component.NavigationToolBar" - #define FRM_SUN_COMPONENT_SUBMITBUTTON "com.sun.star.form.component.SubmitButton" - - #define FRM_SUN_COMPONENT_IMAGECONTROL "com.sun.star.form.component.DatabaseImageControl" - #define FRM_SUN_COMPONENT_DATABASE_RADIOBUTTON "com.sun.star.form.component.DatabaseRadioButton" - #define FRM_SUN_COMPONENT_DATABASE_CHECKBOX "com.sun.star.form.component.DatabaseCheckBox" - #define FRM_SUN_COMPONENT_DATABASE_LISTBOX "com.sun.star.form.component.DatabaseListBox" - #define FRM_SUN_COMPONENT_DATABASE_COMBOBOX "com.sun.star.form.component.DatabaseComboBox" - #define FRM_SUN_COMPONENT_DATABASE_FORMATTEDFIELD "com.sun.star.form.component.DatabaseFormattedField" - #define FRM_SUN_COMPONENT_DATABASE_TEXTFIELD "com.sun.star.form.component.DatabaseTextField" - #define FRM_SUN_COMPONENT_DATABASE_DATEFIELD "com.sun.star.form.component.DatabaseDateField" - #define FRM_SUN_COMPONENT_DATABASE_TIMEFIELD "com.sun.star.form.component.DatabaseTimeField" - #define FRM_SUN_COMPONENT_DATABASE_NUMERICFIELD "com.sun.star.form.component.DatabaseNumericField" - #define FRM_SUN_COMPONENT_DATABASE_CURRENCYFIELD "com.sun.star.form.component.DatabaseCurrencyField" - #define FRM_SUN_COMPONENT_DATABASE_PATTERNFIELD "com.sun.star.form.component.DatabasePatternField" - - #define FRM_SUN_CONTROL_TEXTFIELD "com.sun.star.form.control.TextField" - #define FRM_SUN_CONTROL_LISTBOX "com.sun.star.form.control.ListBox" - #define FRM_SUN_CONTROL_COMBOBOX "com.sun.star.form.control.ComboBox" - #define FRM_SUN_CONTROL_RADIOBUTTON "com.sun.star.form.control.RadioButton" - #define FRM_SUN_CONTROL_GROUPBOX "com.sun.star.form.control.GroupBox" - #define FRM_SUN_CONTROL_FIXEDTEXT "com.sun.star.form.control.FixedText" - #define FRM_SUN_CONTROL_COMMANDBUTTON "com.sun.star.form.control.CommandButton" - #define FRM_SUN_CONTROL_CHECKBOX "com.sun.star.form.control.CheckBox" - #define FRM_SUN_CONTROL_GRIDCONTROL "com.sun.star.form.control.GridControl" - #define FRM_SUN_CONTROL_IMAGEBUTTON "com.sun.star.form.control.ImageButton" - #define FRM_SUN_CONTROL_TIMEFIELD "com.sun.star.form.control.TimeField" - #define FRM_SUN_CONTROL_DATEFIELD "com.sun.star.form.control.DateField" - #define FRM_SUN_CONTROL_NUMERICFIELD "com.sun.star.form.control.NumericField" - #define FRM_SUN_CONTROL_CURRENCYFIELD "com.sun.star.form.control.CurrencyField" - #define FRM_SUN_CONTROL_PATTERNFIELD "com.sun.star.form.control.PatternField" - #define FRM_SUN_CONTROL_IMAGECONTROL "com.sun.star.form.control.ImageControl" - #define FRM_SUN_CONTROL_FORMATTEDFIELD "com.sun.star.form.control.FormattedField" - #define FRM_SUN_CONTROL_RICHTEXTCONTROL "com.sun.star.form.control.RichTextControl" - #define FRM_SUN_CONTROL_SUBMITBUTTON "com.sun.star.form.control.SubmitButton" - - #define BINDABLE_DATABASE_CHECK_BOX "com.sun.star.form.binding.BindableDatabaseCheckBox" - #define BINDABLE_DATABASE_COMBO_BOX "com.sun.star.form.binding.BindableDatabaseComboBox" - #define BINDABLE_DATABASE_FORMATTED_FIELD "com.sun.star.form.binding.BindableDatabaseFormattedField" - #define BINDABLE_DATABASE_LIST_BOX "com.sun.star.form.binding.BindableDatabaseListBox" - #define BINDABLE_DATABASE_NUMERIC_FIELD "com.sun.star.form.binding.BindableDatabaseNumericField" - #define BINDABLE_DATABASE_RADIO_BUTTON "com.sun.star.form.binding.BindableDatabaseRadioButton" - #define BINDABLE_DATABASE_TEXT_FIELD "com.sun.star.form.binding.BindableDatabaseTextField" - #define BINDABLE_DATABASE_DATE_FIELD "com.sun.star.form.binding.BindableDatabaseDateField" - #define BINDABLE_DATABASE_TIME_FIELD "com.sun.star.form.binding.BindableDatabaseTimeField" - - #define BINDABLE_CONTROL_MODEL "com.sun.star.form.binding.BindableControlModel" - #define BINDABLE_INTEGER_VALUE_RANGE "com.sun.star.form.binding.BindableIntegerValueRange" - #define BINDABLE_DATA_AWARE_CONTROL_MODEL "com.sun.star.form.binding.BindableDataAwareControlModel" - #define DATA_AWARE_CONTROL_MODEL "com.sun.star.form.binding.DataAwareControlModel" - #define VALIDATABLE_CONTROL_MODEL "com.sun.star.form.binding.ValidatableControlModel" - #define VALIDATABLE_BINDABLE_CONTROL_MODEL "com.sun.star.form.binding.ValidatableBindableControlModel" - - - // common - - #define FRM_SUN_FORMCOMPONENT "com.sun.star.form.FormComponent" - - - // misc - - #define SRV_AWT_IMAGEPRODUCER "com.sun.star.awt.ImageProducer" - - #define SRV_SDB_ROWSET "com.sun.star.sdb.RowSet" - #define SRV_SDB_CONNECTION "com.sun.star.sdb.Connection" - -css::uno::Reference<css::uno::XInterface> SAL_CALL OFixedTextModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL ORadioButtonModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL ORadioButtonControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OCheckBoxModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OCheckBoxControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OHiddenModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OGroupBoxModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OGroupBoxControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OListBoxControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OListBoxModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OComboBoxControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OComboBoxModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OEditControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OEditModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL ONumericControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL ONumericModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OPatternControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OPatternModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OCurrencyControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OCurrencyModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL ODateControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL ODateModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OTimeControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OTimeModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OFormattedControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OFormattedModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OFileControlModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OButtonControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OButtonModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OImageButtonControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OImageButtonModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OImageControlControl_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OImageControlModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OGridControlModel_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -// XForms objects - -css::uno::Reference<css::uno::XInterface> SAL_CALL Binding_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL Model_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL XForms_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -// some special handling for the FormattedFieldWrapper which can act as FormattedModel or as EditModel - -css::uno::Reference<css::uno::XInterface> SAL_CALL OFormattedFieldWrapper_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - - // this is for a service, which is instantiated through the EditModel service name - // and which acts mostly as Edit (mostly means : if somebody uses XPersistObject::read immediately after - // the object was instantiated and the stream contains a FormattedModel, it switches permanently to - // formatted.) -css::uno::Reference<css::uno::XInterface> SAL_CALL -OFormattedFieldWrapper_CreateInstance_ForceFormatted( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL OFormsCollection_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -css::uno::Reference<css::uno::XInterface> SAL_CALL ImageProducer_CreateInstance( - css::uno::Reference<css::lang::XMultiServiceFactory> const & _rxFactory); - -} // namespace frm +#define AWT_CONTROL_TEXTFIELD "com.sun.star.awt.TextField" + +#define VCL_CONTROL_EDIT "stardiv.vcl.control.Edit" +#define VCL_CONTROL_LISTBOX "stardiv.vcl.control.ListBox" +#define VCL_CONTROL_COMBOBOX "stardiv.vcl.control.ComboBox" +#define VCL_CONTROL_RADIOBUTTON "stardiv.vcl.control.RadioButton" +#define VCL_CONTROL_GROUPBOX "stardiv.vcl.control.GroupBox" +#define VCL_CONTROL_FIXEDTEXT "stardiv.vcl.control.FixedText" +#define VCL_CONTROL_COMMANDBUTTON "stardiv.vcl.control.Button" +#define VCL_CONTROL_CHECKBOX "stardiv.vcl.control.CheckBox" +#define VCL_CONTROL_IMAGEBUTTON "stardiv.vcl.control.ImageButton" +#define VCL_CONTROL_FILECONTROL "stardiv.vcl.control.FileControl" +#define VCL_CONTROL_TIMEFIELD "stardiv.vcl.control.TimeField" +#define VCL_CONTROL_DATEFIELD "stardiv.vcl.control.DateField" +#define VCL_CONTROL_NUMERICFIELD "stardiv.vcl.control.NumericField" +#define VCL_CONTROL_CURRENCYFIELD "stardiv.vcl.control.CurrencyField" +#define VCL_CONTROL_PATTERNFIELD "stardiv.vcl.control.PatternField" +#define VCL_CONTROL_FORMATTEDFIELD "stardiv.vcl.control.FormattedField" +#define VCL_CONTROL_IMAGECONTROL "stardiv.vcl.control.ImageControl" + +#define VCL_CONTROLMODEL_EDIT "stardiv.vcl.controlmodel.Edit" +#define VCL_CONTROLMODEL_LISTBOX "stardiv.vcl.controlmodel.ListBox" +#define VCL_CONTROLMODEL_COMBOBOX "stardiv.vcl.controlmodel.ComboBox" +#define VCL_CONTROLMODEL_RADIOBUTTON "stardiv.vcl.controlmodel.RadioButton" +#define VCL_CONTROLMODEL_GROUPBOX "stardiv.vcl.controlmodel.GroupBox" +#define VCL_CONTROLMODEL_FIXEDTEXT "stardiv.vcl.controlmodel.FixedText" +#define VCL_CONTROLMODEL_COMMANDBUTTON "stardiv.vcl.controlmodel.Button" +#define VCL_CONTROLMODEL_CHECKBOX "stardiv.vcl.controlmodel.CheckBox" +#define VCL_CONTROLMODEL_IMAGEBUTTON "stardiv.vcl.controlmodel.ImageButton" +#define VCL_CONTROLMODEL_FILECONTROL "stardiv.vcl.controlmodel.FileControl" +#define VCL_CONTROLMODEL_TIMEFIELD "stardiv.vcl.controlmodel.TimeField" +#define VCL_CONTROLMODEL_DATEFIELD "stardiv.vcl.controlmodel.DateField" +#define VCL_CONTROLMODEL_NUMERICFIELD "stardiv.vcl.controlmodel.NumericField" +#define VCL_CONTROLMODEL_CURRENCYFIELD "stardiv.vcl.controlmodel.CurrencyField" +#define VCL_CONTROLMODEL_PATTERNFIELD "stardiv.vcl.controlmodel.PatternField" +#define VCL_CONTROLMODEL_FORMATTEDFIELD "stardiv.vcl.controlmodel.FormattedField" +#define VCL_CONTROLMODEL_IMAGECONTROL "stardiv.vcl.controlmodel.ImageControl" + +#define VCL_CONTROLMODEL_SCROLLBAR "com.sun.star.awt.UnoControlScrollBarModel" +#define VCL_CONTROL_SCROLLBAR "com.sun.star.awt.UnoControlScrollBar" +#define VCL_CONTROLMODEL_SPINBUTTON "com.sun.star.awt.UnoControlSpinButtonModel" +#define VCL_CONTROL_SPINBUTTON "com.sun.star.awt.UnoControlSpinButton" + +// service names for compatibility + +#define FRM_COMPONENT_FORM "stardiv.one.form.component.Form" +#define FRM_COMPONENT_EDIT "stardiv.one.form.component.Edit" // compatibility +#define FRM_COMPONENT_TEXTFIELD "stardiv.one.form.component.TextField" +#define FRM_COMPONENT_LISTBOX "stardiv.one.form.component.ListBox" +#define FRM_COMPONENT_COMBOBOX "stardiv.one.form.component.ComboBox" +#define FRM_COMPONENT_RADIOBUTTON "stardiv.one.form.component.RadioButton" +#define FRM_COMPONENT_GROUPBOX "stardiv.one.form.component.GroupBox" // compatibility +#define FRM_COMPONENT_FIXEDTEXT "stardiv.one.form.component.FixedText" // compatibility +#define FRM_COMPONENT_COMMANDBUTTON "stardiv.one.form.component.CommandButton" +#define FRM_COMPONENT_CHECKBOX "stardiv.one.form.component.CheckBox" +#define FRM_COMPONENT_GRID "stardiv.one.form.component.Grid" // compatibility +#define FRM_COMPONENT_GRIDCONTROL "stardiv.one.form.component.GridControl" +#define FRM_COMPONENT_IMAGEBUTTON "stardiv.one.form.component.ImageButton" +#define FRM_COMPONENT_FILECONTROL "stardiv.one.form.component.FileControl" +#define FRM_COMPONENT_TIMEFIELD "stardiv.one.form.component.TimeField" +#define FRM_COMPONENT_DATEFIELD "stardiv.one.form.component.DateField" +#define FRM_COMPONENT_NUMERICFIELD "stardiv.one.form.component.NumericField" +#define FRM_COMPONENT_CURRENCYFIELD "stardiv.one.form.component.CurrencyField" +#define FRM_COMPONENT_PATTERNFIELD "stardiv.one.form.component.PatternField" +#define FRM_COMPONENT_HIDDEN "stardiv.one.form.component.Hidden" +#define FRM_COMPONENT_HIDDENCONTROL "stardiv.one.form.component.HiddenControl" +#define FRM_COMPONENT_IMAGECONTROL "stardiv.one.form.component.ImageControl" +#define FRM_COMPONENT_FORMATTEDFIELD "stardiv.one.form.component.FormattedField" + +// <compatibility_I> +#define STARDIV_ONE_FORM_CONTROL_COMMANDBUTTON "stardiv.one.form.control.CommandButton" +#define STARDIV_ONE_FORM_CONTROL_RADIOBUTTON "stardiv.one.form.control.RadioButton" +#define STARDIV_ONE_FORM_CONTROL_CHECKBOX "stardiv.one.form.control.CheckBox" +#define STARDIV_ONE_FORM_CONTROL_EDIT "stardiv.one.form.control.Edit" +#define STARDIV_ONE_FORM_CONTROL_LISTBOX "stardiv.one.form.control.ListBox" +#define STARDIV_ONE_FORM_CONTROL_COMBOBOX "stardiv.one.form.control.ComboBox" +#define STARDIV_ONE_FORM_CONTROL_GROUPBOX "stardiv.one.form.control.GroupBox" +#define STARDIV_ONE_FORM_CONTROL_TEXTFIELD "stardiv.one.form.control.TextField" +#define STARDIV_ONE_FORM_CONTROL_GRID "stardiv.one.form.control.Grid" +#define STARDIV_ONE_FORM_CONTROL_IMAGEBUTTON "stardiv.one.form.control.ImageButton" +#define STARDIV_ONE_FORM_CONTROL_TIMEFIELD "stardiv.one.form.control.TimeField" +#define STARDIV_ONE_FORM_CONTROL_DATEFIELD "stardiv.one.form.control.DateField" +#define STARDIV_ONE_FORM_CONTROL_NUMERICFIELD "stardiv.one.form.control.NumericField" +#define STARDIV_ONE_FORM_CONTROL_CURRENCYFIELD "stardiv.one.form.control.CurrencyField" +#define STARDIV_ONE_FORM_CONTROL_PATTERNFIELD "stardiv.one.form.control.PatternField" +#define STARDIV_ONE_FORM_CONTROL_IMAGECONTROL "stardiv.one.form.control.ImageControl" +#define STARDIV_ONE_FORM_CONTROL_FORMATTEDFIELD "stardiv.one.form.control.FormattedField" +// </compatibility_I> + +// new (sun) service names + +#define FRM_SUN_COMPONENT_FORM "com.sun.star.form.component.Form" +#define FRM_SUN_COMPONENT_HTMLFORM "com.sun.star.form.component.HTMLForm" +#define FRM_SUN_COMPONENT_DATAFORM "com.sun.star.form.component.DataForm" +#define FRM_SUN_COMPONENT_TEXTFIELD "com.sun.star.form.component.TextField" +#define FRM_SUN_COMPONENT_LISTBOX "com.sun.star.form.component.ListBox" +#define FRM_SUN_COMPONENT_COMBOBOX "com.sun.star.form.component.ComboBox" +#define FRM_SUN_COMPONENT_RADIOBUTTON "com.sun.star.form.component.RadioButton" +#define FRM_SUN_COMPONENT_GROUPBOX "com.sun.star.form.component.GroupBox" +#define FRM_SUN_COMPONENT_FIXEDTEXT "com.sun.star.form.component.FixedText" +#define FRM_SUN_COMPONENT_COMMANDBUTTON "com.sun.star.form.component.CommandButton" +#define FRM_SUN_COMPONENT_CHECKBOX "com.sun.star.form.component.CheckBox" +#define FRM_SUN_COMPONENT_GRIDCONTROL "com.sun.star.form.component.GridControl" +#define FRM_SUN_COMPONENT_IMAGEBUTTON "com.sun.star.form.component.ImageButton" +#define FRM_SUN_COMPONENT_FILECONTROL "com.sun.star.form.component.FileControl" +#define FRM_SUN_COMPONENT_TIMEFIELD "com.sun.star.form.component.TimeField" +#define FRM_SUN_COMPONENT_DATEFIELD "com.sun.star.form.component.DateField" +#define FRM_SUN_COMPONENT_NUMERICFIELD "com.sun.star.form.component.NumericField" +#define FRM_SUN_COMPONENT_CURRENCYFIELD "com.sun.star.form.component.CurrencyField" +#define FRM_SUN_COMPONENT_PATTERNFIELD "com.sun.star.form.component.PatternField" +#define FRM_SUN_COMPONENT_HIDDENCONTROL "com.sun.star.form.component.HiddenControl" +#define FRM_SUN_COMPONENT_FORMATTEDFIELD "com.sun.star.form.component.FormattedField" +#define FRM_SUN_COMPONENT_SCROLLBAR "com.sun.star.form.component.ScrollBar" +#define FRM_SUN_COMPONENT_SPINBUTTON "com.sun.star.form.component.SpinButton" +#define FRM_SUN_COMPONENT_RICHTEXTCONTROL "com.sun.star.form.component.RichTextControl" +#define FRM_SUN_COMPONENT_NAVTOOLBAR "com.sun.star.form.component.NavigationToolBar" +#define FRM_SUN_COMPONENT_SUBMITBUTTON "com.sun.star.form.component.SubmitButton" + +#define FRM_SUN_COMPONENT_IMAGECONTROL "com.sun.star.form.component.DatabaseImageControl" +#define FRM_SUN_COMPONENT_DATABASE_RADIOBUTTON "com.sun.star.form.component.DatabaseRadioButton" +#define FRM_SUN_COMPONENT_DATABASE_CHECKBOX "com.sun.star.form.component.DatabaseCheckBox" +#define FRM_SUN_COMPONENT_DATABASE_LISTBOX "com.sun.star.form.component.DatabaseListBox" +#define FRM_SUN_COMPONENT_DATABASE_COMBOBOX "com.sun.star.form.component.DatabaseComboBox" +#define FRM_SUN_COMPONENT_DATABASE_FORMATTEDFIELD "com.sun.star.form.component.DatabaseFormattedField" +#define FRM_SUN_COMPONENT_DATABASE_TEXTFIELD "com.sun.star.form.component.DatabaseTextField" +#define FRM_SUN_COMPONENT_DATABASE_DATEFIELD "com.sun.star.form.component.DatabaseDateField" +#define FRM_SUN_COMPONENT_DATABASE_TIMEFIELD "com.sun.star.form.component.DatabaseTimeField" +#define FRM_SUN_COMPONENT_DATABASE_NUMERICFIELD "com.sun.star.form.component.DatabaseNumericField" +#define FRM_SUN_COMPONENT_DATABASE_CURRENCYFIELD "com.sun.star.form.component.DatabaseCurrencyField" +#define FRM_SUN_COMPONENT_DATABASE_PATTERNFIELD "com.sun.star.form.component.DatabasePatternField" + +#define FRM_SUN_CONTROL_TEXTFIELD "com.sun.star.form.control.TextField" +#define FRM_SUN_CONTROL_LISTBOX "com.sun.star.form.control.ListBox" +#define FRM_SUN_CONTROL_COMBOBOX "com.sun.star.form.control.ComboBox" +#define FRM_SUN_CONTROL_RADIOBUTTON "com.sun.star.form.control.RadioButton" +#define FRM_SUN_CONTROL_GROUPBOX "com.sun.star.form.control.GroupBox" +#define FRM_SUN_CONTROL_FIXEDTEXT "com.sun.star.form.control.FixedText" +#define FRM_SUN_CONTROL_COMMANDBUTTON "com.sun.star.form.control.CommandButton" +#define FRM_SUN_CONTROL_CHECKBOX "com.sun.star.form.control.CheckBox" +#define FRM_SUN_CONTROL_GRIDCONTROL "com.sun.star.form.control.GridControl" +#define FRM_SUN_CONTROL_IMAGEBUTTON "com.sun.star.form.control.ImageButton" +#define FRM_SUN_CONTROL_TIMEFIELD "com.sun.star.form.control.TimeField" +#define FRM_SUN_CONTROL_DATEFIELD "com.sun.star.form.control.DateField" +#define FRM_SUN_CONTROL_NUMERICFIELD "com.sun.star.form.control.NumericField" +#define FRM_SUN_CONTROL_CURRENCYFIELD "com.sun.star.form.control.CurrencyField" +#define FRM_SUN_CONTROL_PATTERNFIELD "com.sun.star.form.control.PatternField" +#define FRM_SUN_CONTROL_IMAGECONTROL "com.sun.star.form.control.ImageControl" +#define FRM_SUN_CONTROL_FORMATTEDFIELD "com.sun.star.form.control.FormattedField" +#define FRM_SUN_CONTROL_RICHTEXTCONTROL "com.sun.star.form.control.RichTextControl" +#define FRM_SUN_CONTROL_SUBMITBUTTON "com.sun.star.form.control.SubmitButton" + +#define BINDABLE_DATABASE_CHECK_BOX "com.sun.star.form.binding.BindableDatabaseCheckBox" +#define BINDABLE_DATABASE_COMBO_BOX "com.sun.star.form.binding.BindableDatabaseComboBox" +#define BINDABLE_DATABASE_FORMATTED_FIELD "com.sun.star.form.binding.BindableDatabaseFormattedField" +#define BINDABLE_DATABASE_LIST_BOX "com.sun.star.form.binding.BindableDatabaseListBox" +#define BINDABLE_DATABASE_NUMERIC_FIELD "com.sun.star.form.binding.BindableDatabaseNumericField" +#define BINDABLE_DATABASE_RADIO_BUTTON "com.sun.star.form.binding.BindableDatabaseRadioButton" +#define BINDABLE_DATABASE_TEXT_FIELD "com.sun.star.form.binding.BindableDatabaseTextField" +#define BINDABLE_DATABASE_DATE_FIELD "com.sun.star.form.binding.BindableDatabaseDateField" +#define BINDABLE_DATABASE_TIME_FIELD "com.sun.star.form.binding.BindableDatabaseTimeField" + +#define BINDABLE_CONTROL_MODEL "com.sun.star.form.binding.BindableControlModel" +#define BINDABLE_INTEGER_VALUE_RANGE "com.sun.star.form.binding.BindableIntegerValueRange" +#define BINDABLE_DATA_AWARE_CONTROL_MODEL "com.sun.star.form.binding.BindableDataAwareControlModel" +#define DATA_AWARE_CONTROL_MODEL "com.sun.star.form.binding.DataAwareControlModel" +#define VALIDATABLE_CONTROL_MODEL "com.sun.star.form.binding.ValidatableControlModel" +#define VALIDATABLE_BINDABLE_CONTROL_MODEL "com.sun.star.form.binding.ValidatableBindableControlModel" + +// common + +#define FRM_SUN_FORMCOMPONENT "com.sun.star.form.FormComponent" + +// misc + +#define SRV_AWT_IMAGEPRODUCER "com.sun.star.awt.ImageProducer" + +#define SRV_SDB_ROWSET "com.sun.star.sdb.RowSet" +#define SRV_SDB_CONNECTION "com.sun.star.sdb.Connection" extern "C" { diff --git a/forms/source/misc/services.cxx b/forms/source/misc/services.cxx deleted file mode 100644 index 63a1b14..0000000 --- a/forms/source/misc/services.cxx +++ /dev/null @@ -1,148 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ -/* - * This file is part of the LibreOffice project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -#include <config_features.h> - -#include "services.hxx" -#include "frm_module.hxx" -#include <cppuhelper/factory.hxx> -#include <osl/diagnose.h> -#include <uno/mapping.hxx> - -using namespace ::com::sun::star::uno; -using namespace ::com::sun::star::lang; -using namespace ::com::sun::star::registry; - -static Sequence< OUString > s_aClassImplementationNames; -static Sequence<Sequence< OUString > > s_aClassServiceNames; - -// need to use sal_Int64 instead of ComponentInstantiation, as ComponentInstantiation has no cppuType, so -// it can't be used with sequences -static Sequence<sal_Int64> s_aFactories; - -void registerClassInfo( - const OUString& _rClassImplName, // the ImplName of the class - const Sequence< OUString >& _rServiceNames, // the services supported by this class - ::cppu::ComponentInstantiation _pCreateFunction // the method for instantiating such a class - ) -{ - sal_Int32 nCurrentLength = s_aClassImplementationNames.getLength(); - OSL_ENSURE((nCurrentLength == s_aClassServiceNames.getLength()) - && (nCurrentLength == s_aFactories.getLength()), - "forms::registerClassInfo : invalid class infos !"); - - s_aClassImplementationNames.realloc(nCurrentLength + 1); - s_aClassServiceNames.realloc(nCurrentLength + 1); - s_aFactories.realloc(nCurrentLength + 1); - - s_aClassImplementationNames.getArray()[nCurrentLength] = _rClassImplName; - s_aClassServiceNames.getArray()[nCurrentLength] = _rServiceNames; - s_aFactories.getArray()[nCurrentLength] = reinterpret_cast<sal_Int64>(_pCreateFunction); -} - - -void ensureClassInfos() -{ - if (s_aClassImplementationNames.getLength()) - // nothing to do - return; - Sequence< OUString > aServices; - - aServices.realloc(1); - aServices[0] = "com.sun.star.xforms.XForms"; - - registerClassInfo( - "com.sun.star.form.XForms", - aServices, - frm::XForms_CreateInstance); -} - - -extern "C" -{ - -SAL_DLLPUBLIC_EXPORT void* SAL_CALL frm_component_getFactory(const sal_Char* _pImplName, void* _pServiceManager, void* /*_pRegistryKey*/) -{ - if (!_pServiceManager || !_pImplName) - return NULL; - - - // a lot of stuff which is implemented "manually" here in this file - void* pRet = NULL; - - // collect the class infos - ensureClassInfos(); - - // both our static sequences should have the same length ... - sal_Int32 nClasses = s_aClassImplementationNames.getLength(); - OSL_ENSURE((s_aClassServiceNames.getLength() == nClasses) && - (s_aFactories.getLength() == nClasses), - "forms::component_getFactory : invalid class infos !"); - - // loop through the sequences and register the service providers - const OUString* pClasses = s_aClassImplementationNames.getConstArray(); - const Sequence< OUString >* pServices = s_aClassServiceNames.getConstArray(); - const sal_Int64* pFunctionsAsInts = s_aFactories.getConstArray(); - - for (sal_Int32 i=0; i<nClasses; ++i, ++pClasses, ++pServices, ++pFunctionsAsInts) - { - if (rtl_ustr_ascii_compare(pClasses->getStr(), _pImplName) == 0) - { - ::cppu::ComponentInstantiation aCurrentCreateFunction = - reinterpret_cast< ::cppu::ComponentInstantiation>(*pFunctionsAsInts); - - Reference<XSingleServiceFactory> xFactory( - ::cppu::createSingleFactory( - static_cast<css::lang::XMultiServiceFactory*>( - _pServiceManager), - *pClasses, - aCurrentCreateFunction, - *pServices - ) - ); - if (xFactory.is()) - { - xFactory->acquire(); - pRet = xFactory.get(); - break; - } - } - } - - - // the real way - use the OModule - if ( !pRet ) - { - // let the module look for the component - Reference< XInterface > xRet; - xRet = ::frm::OFormsModule::getComponentFactory( - OUString::createFromAscii( _pImplName ), - static_cast< XMultiServiceFactory* >( _pServiceManager ) ); - - if ( xRet.is() ) - xRet->acquire(); - pRet = xRet.get(); - } - - return pRet; -} - -} - -/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/xforms/xforms_services.cxx b/forms/source/xforms/xforms_services.cxx index 6d50f65..9637ae1 100644 --- a/forms/source/xforms/xforms_services.cxx +++ b/forms/source/xforms/xforms_services.cxx @@ -17,42 +17,21 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "services.hxx" - -#include "binding.hxx" #include "model.hxx" #include "NameContainer.hxx" +#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/uno/Reference.hxx> +#include <com/sun/star/uno/XComponentContext.hpp> #include <com/sun/star/uno/XInterface.hpp> -#include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/uno/RuntimeException.hpp> -#include <com/sun/star/container/XNameContainer.hpp> - -using com::sun::star::uno::Reference; -using com::sun::star::uno::XInterface; -using com::sun::star::lang::XMultiServiceFactory; -using com::sun::star::uno::RuntimeException; -using com::sun::star::form::binding::XValueBinding; -using com::sun::star::beans::XPropertySet; -using com::sun::star::container::XNameContainer; +using namespace ::com::sun::star; -namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* SAL_CALL +com_sun_star_form_XForms_get_implementation(uno::XComponentContext*, + uno::Sequence<uno::Any> const &) { - -Reference<XInterface> Model_CreateInstance( - const Reference<XMultiServiceFactory>& ) -{ - return static_cast<XPropertySet*>( static_cast<PropertySetBase*>( new xforms::Model ) ); -} - -Reference<XInterface> XForms_CreateInstance( - const Reference<XMultiServiceFactory>& ) -{ - return static_cast<XNameContainer*>( new NameContainer<Reference<XPropertySet> >() ); -} - + return cppu::acquire(new NameContainer<uno::Reference<beans::XPropertySet> >()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/util/frm.component b/forms/util/frm.component index 9a73886..7fac983 100644 --- a/forms/util/frm.component +++ b/forms/util/frm.component @@ -288,7 +288,8 @@ <service name="com.sun.star.form.component.TimeField"/> <service name="stardiv.one.form.component.TimeField"/> </implementation> - <implementation name="com.sun.star.form.XForms"> + <implementation name="com.sun.star.form.XForms" + constructor="com_sun_star_form_XForms_get_implementation"> <service name="com.sun.star.xforms.XForms"/> </implementation> </component> commit 6887a1474483a136758ad18327f1e3589d6e25d6 Author: Chris Sherlock <chris.sherl...@collabora.com> Date: Thu Feb 12 14:10:24 2015 +1100 forms: use constructor feature for form modules Change-Id: I8f1588cbd338e2f8b5bc6047d84b17c697a7d2d3 diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index a00f4d2..0b595ad 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -31,7 +31,6 @@ #include <vcl/svapp.hxx> #include <osl/mutex.hxx> - namespace frm { @@ -53,12 +52,6 @@ using ::com::sun::star::frame::XDispatchProviderInterceptor; //= OButtonModel -InterfaceRef SAL_CALL OButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OButtonModel( comphelper::getComponentContext(_rxFactory) )); -} - - OButtonModel::OButtonModel(const Reference<XComponentContext>& _rxFactory) :OClickableImageBaseModel( _rxFactory, VCL_CONTROLMODEL_COMMANDBUTTON, FRM_SUN_CONTROL_COMMANDBUTTON ) // use the old control name for compatibility reasons @@ -334,12 +327,6 @@ void OButtonModel::impl_resetNoBroadcast_nothrow() // OButtonControl -InterfaceRef SAL_CALL OButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OButtonControl( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OButtonControl::_getTypes() { return ::comphelper::concatSequences( @@ -759,8 +746,20 @@ void SAL_CALL OButtonControl::releaseDispatchProviderInterceptor( const Referenc OFormNavigationHelper::releaseDispatchProviderInterceptor( _rxInterceptor ); } - } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OButtonModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OButtonModel(component)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OButtonControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OButtonControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/CheckBox.cxx b/forms/source/component/CheckBox.cxx index 89ef88f..2c3ff8e 100644 --- a/forms/source/component/CheckBox.cxx +++ b/forms/source/component/CheckBox.cxx @@ -24,7 +24,6 @@ #include <comphelper/basicio.hxx> #include <comphelper/processfactory.hxx> - namespace frm { using namespace ::com::sun::star::uno; @@ -46,12 +45,6 @@ OCheckBoxControl::OCheckBoxControl(const Reference<XComponentContext>& _rxFactor } -InterfaceRef SAL_CALL OCheckBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OCheckBoxControl( comphelper::getComponentContext(_rxFactory) )); -} - - StringSequence SAL_CALL OCheckBoxControl::getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); @@ -65,15 +58,6 @@ StringSequence SAL_CALL OCheckBoxControl::getSupportedServiceNames() throw(::com //= OCheckBoxModel - - -InterfaceRef SAL_CALL OCheckBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OCheckBoxModel( comphelper::getComponentContext(_rxFactory) )); -} - - - OCheckBoxModel::OCheckBoxModel(const Reference<XComponentContext>& _rxFactory) :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_CHECKBOX, FRM_SUN_CONTROL_CHECKBOX, true ) // use the old control name for compytibility reasons @@ -281,8 +265,20 @@ bool OCheckBoxModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) return true; } +} +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OCheckBoxModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OCheckBoxModel(component)); } +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OCheckBoxControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OCheckBoxControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ComboBox.cxx b/forms/source/component/ComboBox.cxx index 76bc4cf..8d959ee 100644 --- a/forms/source/component/ComboBox.cxx +++ b/forms/source/component/ComboBox.cxx @@ -71,14 +71,6 @@ using namespace ::com::sun::star::form::binding; // class OComboBoxModel - - -InterfaceRef SAL_CALL OComboBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return (*new OComboBoxModel( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OComboBoxModel::_getTypes() { return ::comphelper::concatSequences( @@ -867,14 +859,6 @@ void SAL_CALL OComboBoxModel::disposing( const EventObject& _rSource ) throw ( R //= OComboBoxControl - - -InterfaceRef SAL_CALL OComboBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OComboBoxControl( comphelper::getComponentContext(_rxFactory) )); -} - - OComboBoxControl::OComboBoxControl(const Reference<XComponentContext>& _rxContext) :OBoundControl(_rxContext, VCL_CONTROL_COMBOBOX) { @@ -891,8 +875,20 @@ StringSequence SAL_CALL OComboBoxControl::getSupportedServiceNames() throw(Runti return aSupported; } +} +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OComboBoxModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OComboBoxModel(component)); } +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OComboBoxControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OComboBoxControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Currency.cxx b/forms/source/component/Currency.cxx index 80cf96a..cad851f 100644 --- a/forms/source/component/Currency.cxx +++ b/forms/source/component/Currency.cxx @@ -24,6 +24,7 @@ #include <unotools/syslocale.hxx> #include <comphelper/processfactory.hxx> + namespace frm { @@ -44,13 +45,6 @@ OCurrencyControl::OCurrencyControl(const Reference<XComponentContext>& _rxFactor { } - -InterfaceRef SAL_CALL OCurrencyControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OCurrencyControl( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OCurrencyControl::_getTypes() { return OBoundControl::_getTypes(); @@ -70,13 +64,6 @@ StringSequence SAL_CALL OCurrencyControl::getSupportedServiceNames() throw(std:: // OCurrencyModel - -InterfaceRef SAL_CALL OCurrencyModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OCurrencyModel( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OCurrencyModel::_getTypes() { return OEditBaseModel::_getTypes(); @@ -247,5 +234,18 @@ void OCurrencyModel::resetNoBroadcast() } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OCurrencyModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OCurrencyModel(component)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OCurrencyControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OCurrencyControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Date.cxx b/forms/source/component/Date.cxx index eaf6ab9..d446d09 100644 --- a/forms/source/component/Date.cxx +++ b/forms/source/component/Date.cxx @@ -26,7 +26,6 @@ using namespace dbtools; - namespace frm { @@ -51,12 +50,6 @@ ODateControl::ODateControl(const Reference<XComponentContext>& _rxFactory) } -InterfaceRef SAL_CALL ODateControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new ODateControl( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> ODateControl::_getTypes() { return OBoundControl::_getTypes(); @@ -73,11 +66,6 @@ StringSequence SAL_CALL ODateControl::getSupportedServiceNames() throw(std::exce return aSupported; } -InterfaceRef SAL_CALL ODateModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new ODateModel( comphelper::getComponentContext(_rxFactory) )); -} - Sequence<Type> ODateModel::_getTypes() { @@ -318,8 +306,20 @@ Sequence< Type > ODateModel::getSupportedBindingTypes() return Sequence< Type >( & cppu::UnoType<util::Date>::get(), 1 ); } - } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_ODateModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::ODateModel(component)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_ODateControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::ODateControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Edit.cxx b/forms/source/component/Edit.cxx index e543fd6..8bd967e 100644 --- a/forms/source/component/Edit.cxx +++ b/forms/source/component/Edit.cxx @@ -60,12 +60,6 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::form::binding; -InterfaceRef SAL_CALL OEditControl_CreateInstance(const Reference< XMultiServiceFactory > & _rxFactory) -{ - return *(new OEditControl( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OEditControl::_getTypes() { static Sequence<Type> aTypes; @@ -269,11 +263,6 @@ void SAL_CALL OEditControl::createPeer( const Reference< XToolkit>& _rxToolkit, OBoundControl::createPeer(_rxToolkit, _rxParent); } -InterfaceRef SAL_CALL OEditModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OEditModel( comphelper::getComponentContext(_rxFactory) )); -} - Sequence<Type> OEditModel::_getTypes() { @@ -734,8 +723,20 @@ Any OEditModel::getDefaultForReset() const return makeAny( m_aDefaultText ); } +} +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OEditModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OEditModel(component)); } +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OEditControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OEditControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Edit.hxx b/forms/source/component/Edit.hxx index fb34214..7656204 100644 --- a/forms/source/component/Edit.hxx +++ b/forms/source/component/Edit.hxx @@ -31,8 +31,7 @@ struct ImplSVEvent; namespace frm { -class OEditModel - :public OEditBaseModel +class OEditModel : public OEditBaseModel { ::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter; @@ -40,11 +39,12 @@ class OEditModel bool m_bWritingFormattedFake : 1; // are we writing something which should be interpreted as formatted upon reading? +public: + DECLARE_DEFAULT_LEAF_XTOR( OEditModel ); + protected: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes() SAL_OVERRIDE; - DECLARE_DEFAULT_LEAF_XTOR( OEditModel ); - void enableFormattedWriteFake() { m_bWritingFormattedFake = true; } void disableFormattedWriteFake() { m_bWritingFormattedFake = false; } bool lastReadWasFormattedFake() const { return (getLastReadVersion() & PF_FAKE_FORMATTED_FIELD) != 0; } @@ -168,10 +168,8 @@ private: DECL_LINK( OnKeyPressed, void* ); }; - } - #endif // INCLUDED_FORMS_SOURCE_COMPONENT_EDIT_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/File.cxx b/forms/source/component/File.cxx index 0139720..2c6f97d 100644 --- a/forms/source/component/File.cxx +++ b/forms/source/component/File.cxx @@ -47,12 +47,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; -InterfaceRef SAL_CALL OFileControlModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OFileControlModel( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OFileControlModel::_getTypes() { static Sequence<Type> aTypes; @@ -283,8 +277,13 @@ void OFileControlModel::_reset() } } - } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OFileControlModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OFileControlModel(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Filter.cxx b/forms/source/component/Filter.cxx index a13b784..53316db 100644 --- a/forms/source/component/Filter.cxx +++ b/forms/source/component/Filter.cxx @@ -66,16 +66,8 @@ #include <tools/wintypes.hxx> -extern "C" void SAL_CALL createRegistryInfo_OFilterControl() -{ - static ::frm::OMultiInstanceAutoRegistration< ::frm::OFilterControl > aAutoRegistration; -} - - namespace frm { - - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::awt; using namespace ::com::sun::star::lang; @@ -914,14 +906,18 @@ namespace frm return aNames; } - Reference< XInterface > SAL_CALL OFilterControl::Create( const Reference< XMultiServiceFactory >& _rxFactory ) { return static_cast< XServiceInfo* >( new OFilterControl( comphelper::getComponentContext(_rxFactory) ) ); } - } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +com_sun_star_comp_forms_OFilterControl_get_implementation(css::uno::XComponentContext* context, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OFilterControl(context)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FixedText.cxx b/forms/source/component/FixedText.cxx index 249eca8..ba34a72 100644 --- a/forms/source/component/FixedText.cxx +++ b/forms/source/component/FixedText.cxx @@ -23,6 +23,7 @@ #include "property.hxx" #include <comphelper/processfactory.hxx> + namespace frm { using namespace ::com::sun::star::uno; @@ -38,13 +39,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; -InterfaceRef SAL_CALL OFixedTextModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OFixedTextModel( comphelper::getComponentContext(_rxFactory) )); -} - - - OFixedTextModel::OFixedTextModel( const Reference<XComponentContext>& _rxFactory ) :OControlModel(_rxFactory, VCL_CONTROLMODEL_FIXEDTEXT) @@ -113,8 +107,13 @@ void SAL_CALL OFixedTextModel::read(const Reference<XObjectInputStream>& _rxInSt readHelpTextCompatibly(_rxInStream); } - } +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OFixedTextModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OFixedTextModel(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FormattedField.cxx b/forms/source/component/FormattedField.cxx index 1168206..61f009a 100644 --- a/forms/source/component/FormattedField.cxx +++ b/forms/source/component/FormattedField.cxx @@ -55,6 +55,8 @@ #include <unotools/desktopterminationobserver.hxx> #include <list> #include <algorithm> + + using namespace dbtools; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdb; @@ -68,12 +70,14 @@ using namespace ::com::sun::star::io; using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; using namespace ::com::sun::star::form::binding; + namespace { typedef com::sun::star::util::Date UNODate; typedef com::sun::star::util::Time UNOTime; typedef com::sun::star::util::DateTime UNODateTime; } + namespace frm { class StandardFormatsSupplier : protected SvNumberFormatsSupplierObj, public ::utl::ITerminationListener @@ -144,10 +148,6 @@ void StandardFormatsSupplier::notifyTermination() SetNumberFormatter( NULL ); DELETEZ( m_pMyPrivateFormatter ); } -InterfaceRef SAL_CALL OFormattedControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OFormattedControl( comphelper::getComponentContext(_rxFactory) )); -} Sequence<Type> OFormattedControl::_getTypes() { return ::comphelper::concatSequences( @@ -1039,6 +1039,14 @@ void OFormattedModel::resetNoBroadcast() OEditBaseModel::resetNoBroadcast(); m_aSaveValue.clear(); } + +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OFormattedControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OFormattedControl(component)); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FormattedFieldWrapper.cxx b/forms/source/component/FormattedFieldWrapper.cxx index 32ba7bc..ed949e0 100644 --- a/forms/source/component/FormattedFieldWrapper.cxx +++ b/forms/source/component/FormattedFieldWrapper.cxx @@ -355,5 +355,18 @@ void OFormattedFieldWrapper::ensureAggregate() } +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OFormattedFieldWrapper_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OFormattedFieldWrapper(component)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_comp_form_OFormattedFieldWrapper_ForcedFormatted_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OFormattedFieldWrapper(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/FormattedFieldWrapper.hxx b/forms/source/component/FormattedFieldWrapper.hxx index 1ea2290..7109d38 100644 --- a/forms/source/component/FormattedFieldWrapper.hxx +++ b/forms/source/component/FormattedFieldWrapper.hxx @@ -25,7 +25,6 @@ #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/util/XCloneable.hpp> - namespace frm { @@ -42,6 +41,9 @@ class OFormattedFieldWrapper : public OFormattedFieldWrapper_Base { ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_xContext; +public: + OFormattedFieldWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory); + protected: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation> m_xAggregate; @@ -54,9 +56,6 @@ protected: // ::read or does anything which requires a living aggregate static InterfaceRef createFormattedFieldWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory, bool bActAsFormatted); -private: - OFormattedFieldWrapper(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory); - protected: virtual ~OFormattedFieldWrapper(); @@ -86,10 +85,8 @@ protected: void ensureAggregate(); }; - } - #endif // INCLUDED_FORMS_SOURCE_COMPONENT_FORMATTEDFIELDWRAPPER_HXX /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Grid.cxx b/forms/source/component/Grid.cxx index 78860c8..524e129 100644 --- a/forms/source/component/Grid.cxx +++ b/forms/source/component/Grid.cxx @@ -35,7 +35,9 @@ #include <cppuhelper/queryinterface.hxx> #include <toolkit/helper/vclunohelper.hxx> #include <vcl/svapp.hxx> + using namespace ::com::sun::star::uno; + namespace frm { using namespace ::com::sun::star; @@ -61,10 +63,7 @@ const sal_uInt16 TEXTCOLOR = 0x0020; const sal_uInt16 FONTDESCRIPTOR = 0x0040; const sal_uInt16 RECORDMARKER = 0x0080; const sal_uInt16 BACKGROUNDCOLOR = 0x0100; -InterfaceRef SAL_CALL OGridControlModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OGridControlModel( comphelper::getComponentContext(_rxFactory) )); -} + OGridControlModel::OGridControlModel(const Reference<XComponentContext>& _rxFactory) :OControlModel(_rxFactory, OUString()) ,OInterfaceContainer(_rxFactory, m_aMutex, cppu::UnoType<XPropertySet>::get()) @@ -993,5 +992,14 @@ void OGridControlModel::read(const Reference<XObjectInputStream>& _rxInStream) t m_aBackgroundColor <<= (sal_Int32)nValue; } } + } + +extern "C" SAL_DLLPUBLIC_EXPORT XInterface* SAL_CALL +com_sun_star_form_OGridControlModel_get_implementation(XComponentContext* component, + Sequence<Any> const &) +{ + return cppu::acquire(new frm::OGridControlModel(component)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/GroupBox.cxx b/forms/source/component/GroupBox.cxx index b0e5109..93fdd4e 100644 --- a/forms/source/component/GroupBox.cxx +++ b/forms/source/component/GroupBox.cxx @@ -24,9 +24,9 @@ #include <tools/debug.hxx> #include <comphelper/processfactory.hxx> - namespace frm { + using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdb; using namespace ::com::sun::star::sdbc; @@ -43,14 +43,6 @@ using namespace ::com::sun::star::util; // OGroupBoxModel - -InterfaceRef SAL_CALL OGroupBoxModel_CreateInstance(const Reference<css::lang::XMultiServiceFactory>& _rxFactory) -{ - return *(new OGroupBoxModel( comphelper::getComponentContext(_rxFactory) )); -} - - - OGroupBoxModel::OGroupBoxModel(const Reference<XComponentContext>& _rxFactory) :OControlModel(_rxFactory, VCL_CONTROLMODEL_GROUPBOX, VCL_CONTROL_GROUPBOX) { @@ -129,14 +121,6 @@ void SAL_CALL OGroupBoxModel::read(const Reference< XObjectInputStream>& _rxInSt // OGroupBoxControl - - -InterfaceRef SAL_CALL OGroupBoxControl_CreateInstance(const Reference<css::lang::XMultiServiceFactory>& _rxFactory) -{ - return *(new OGroupBoxControl( comphelper::getComponentContext(_rxFactory) )); -} - - OGroupBoxControl::OGroupBoxControl(const Reference<XComponentContext>& _rxFactory) :OControl(_rxFactory, VCL_CONTROL_GROUPBOX) { @@ -153,8 +137,21 @@ StringSequence SAL_CALL OGroupBoxControl::getSupportedServiceNames() throw(Runti return aSupported; } +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OGroupBoxModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OGroupBoxModel(component)); } +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OGroupBoxControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OGroupBoxControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Hidden.cxx b/forms/source/component/Hidden.cxx index 5b84370..5e5eeeb 100644 --- a/forms/source/component/Hidden.cxx +++ b/forms/source/component/Hidden.cxx @@ -41,13 +41,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; -InterfaceRef SAL_CALL OHiddenModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OHiddenModel( comphelper::getComponentContext(_rxFactory) )); -} - - - OHiddenModel::OHiddenModel(const Reference<XComponentContext>& _rxFactory) :OControlModel(_rxFactory, OUString()) { @@ -169,8 +162,13 @@ void SAL_CALL OHiddenModel::read(const Reference<XObjectInputStream>& _rxInStrea OControlModel::read(_rxInStream); } - } +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OHiddenModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OHiddenModel(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ImageButton.cxx b/forms/source/component/ImageButton.cxx index 936c691..c9a0b5f 100644 --- a/forms/source/component/ImageButton.cxx +++ b/forms/source/component/ImageButton.cxx @@ -27,6 +27,7 @@ namespace frm { + using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::sdb; @@ -40,11 +41,6 @@ using namespace ::com::sun::star::lang; using namespace ::com::sun::star::util; // OImageButtonModel -InterfaceRef SAL_CALL OImageButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OImageButtonModel( comphelper::getComponentContext(_rxFactory) )); -} - OImageButtonModel::OImageButtonModel(const Reference<XComponentContext>& _rxFactory) :OClickableImageBaseModel( _rxFactory, VCL_CONTROLMODEL_IMAGEBUTTON, FRM_SUN_CONTROL_IMAGEBUTTON ) // use the old control name for compytibility reasons @@ -145,11 +141,6 @@ void OImageButtonModel::read(const Reference<XObjectInputStream>& _rxInStream) t } // OImageButtonControl -InterfaceRef SAL_CALL OImageButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OImageButtonControl( comphelper::getComponentContext(_rxFactory) )); -} - Sequence<Type> OImageButtonControl::_getTypes() { static Sequence<Type> aTypes; @@ -229,4 +220,18 @@ void SAL_CALL OImageButtonControl::mouseExited(const awt::MouseEvent& /*e*/) thr } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OImageButtonModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OImageButtonModel(component)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OImageButtonControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OImageButtonControl(component)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index fa12c3c..8646fd5 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -59,7 +59,6 @@ #define ID_OPEN_GRAPHICS 1 #define ID_CLEAR_GRAPHICS 2 - namespace frm { @@ -119,14 +118,6 @@ namespace // OImageControlModel - - -InterfaceRef SAL_CALL OImageControlModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OImageControlModel( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OImageControlModel::_getTypes() { return concatSequences( @@ -692,14 +683,6 @@ IMPL_LINK( OImageControlModel, OnImageImportDone, ::Graphic*, i_pGraphic ) // OImageControlControl - - -InterfaceRef SAL_CALL OImageControlControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OImageControlControl( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OImageControlControl::_getTypes() { return concatSequences( @@ -1000,8 +983,20 @@ void SAL_CALL OImageControlControl::mouseExited(const awt::MouseEvent& /*e*/) th { } - } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OImageControlModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OImageControlModel(component)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OImageControlControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OImageControlControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index e7f7e21..bf829c0 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -59,8 +59,6 @@ #include <functional> #include <iterator> - - namespace frm { using namespace ::com::sun::star::uno; @@ -134,13 +132,6 @@ namespace frm //= OListBoxModel - - InterfaceRef SAL_CALL OListBoxModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) - { - return *(new OListBoxModel( comphelper::getComponentContext(_rxFactory) )); - } - - Sequence< Type> OListBoxModel::_getTypes() { return TypeBag( @@ -1749,14 +1740,6 @@ namespace frm // OListBoxControl - - - InterfaceRef SAL_CALL OListBoxControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) - { - return *(new OListBoxControl( comphelper::getComponentContext(_rxFactory) )); - } - - Sequence< Type> OListBoxControl::_getTypes() { return TypeBag( @@ -2153,8 +2136,20 @@ namespace frm m_xAggregateListBox->makeVisible( nEntry ); } +} +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OListBoxModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OListBoxModel(component)); } +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OListBoxControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OListBoxControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Numeric.cxx b/forms/source/component/Numeric.cxx index 15c6b16..a8daa2e 100644 --- a/forms/source/component/Numeric.cxx +++ b/forms/source/component/Numeric.cxx @@ -53,13 +53,6 @@ StringSequence ONumericControl::getSupportedServiceNames() throw(std::exception) } - -InterfaceRef SAL_CALL ONumericControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new ONumericControl( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> ONumericControl::_getTypes() { return OBoundControl::_getTypes(); @@ -68,13 +61,6 @@ Sequence<Type> ONumericControl::_getTypes() // ONumericModel - -InterfaceRef SAL_CALL ONumericModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new ONumericModel( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> ONumericModel::_getTypes() { return OEditBaseModel::_getTypes(); @@ -196,8 +182,20 @@ void ONumericModel::resetNoBroadcast() m_aSaveValue.clear(); } - } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_ONumericModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::ONumericModel(component)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_ONumericControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::ONumericControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Pattern.cxx b/forms/source/component/Pattern.cxx index 8622f05..89a10a7 100644 --- a/forms/source/component/Pattern.cxx +++ b/forms/source/component/Pattern.cxx @@ -20,38 +20,30 @@ #include "Pattern.hxx" #include "comphelper/processfactory.hxx" +using ::com::sun::star::uno::Reference; +using ::com::sun::star::lang::XMultiServiceFactory; +using ::com::sun::star::uno::Sequence; +using ::com::sun::star::uno::Type; +using ::com::sun::star::uno::XComponentContext; +using ::com::sun::star::beans::Property; +using ::com::sun::star::uno::Exception; +using ::com::sun::star::uno::XInterface; +using ::com::sun::star::uno::Any; +using ::com::sun::star::uno::makeAny; +using ::com::sun::star::sdbc::XRowSet; +using ::com::sun::star::uno::UNO_QUERY; + +namespace FormComponentType = ::com::sun::star::form::FormComponentType; namespace frm { - - using ::com::sun::star::uno::Reference; - using ::com::sun::star::lang::XMultiServiceFactory; - using ::com::sun::star::uno::Sequence; - using ::com::sun::star::uno::Type; - using ::com::sun::star::uno::XComponentContext; - using ::com::sun::star::beans::Property; - using ::com::sun::star::uno::Exception; - using ::com::sun::star::uno::XInterface; - using ::com::sun::star::uno::Any; - using ::com::sun::star::uno::makeAny; - using ::com::sun::star::sdbc::XRowSet; - using ::com::sun::star::uno::UNO_QUERY; - - namespace FormComponentType = ::com::sun::star::form::FormComponentType; - OPatternControl::OPatternControl(const Reference<XComponentContext>& _rxFactory) :OBoundControl(_rxFactory, VCL_CONTROL_PATTERNFIELD) { } -InterfaceRef SAL_CALL OPatternControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OPatternControl( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OPatternControl::_getTypes() { return OBoundControl::_getTypes(); @@ -72,12 +64,6 @@ StringSequence OPatternControl::getSupportedServiceNames() throw(std::exception) // OPatternModel -InterfaceRef SAL_CALL OPatternModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OPatternModel( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OPatternModel::_getTypes() { return OEditBaseModel::_getTypes(); @@ -228,15 +214,26 @@ Any OPatternModel::getDefaultForReset() const return makeAny( m_aDefaultText ); } - void OPatternModel::resetNoBroadcast() { OEditBaseModel::resetNoBroadcast(); m_aLastKnownValue.clear(); } - } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OPatternModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OPatternModel(component)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OPatternControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OPatternControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/RadioButton.cxx b/forms/source/component/RadioButton.cxx index a07f9ac..abe62f0 100644 --- a/forms/source/component/RadioButton.cxx +++ b/forms/source/component/RadioButton.cxx @@ -27,7 +27,6 @@ #include <com/sun/star/container/XIndexAccess.hpp> #include <com/sun/star/awt/XVclWindowPeer.hpp> - namespace frm { using namespace ::com::sun::star::uno; @@ -44,13 +43,6 @@ using namespace ::com::sun::star::util; using namespace ::com::sun::star::form::binding; - -InterfaceRef SAL_CALL ORadioButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new ORadioButtonControl( comphelper::getComponentContext(_rxFactory) )); -} - - StringSequence SAL_CALL ORadioButtonControl::getSupportedServiceNames() throw(RuntimeException, std::exception) { StringSequence aSupported = OBoundControl::getSupportedServiceNames(); @@ -90,13 +82,6 @@ void SAL_CALL ORadioButtonControl::createPeer(const Reference<css::awt::XToolkit } -InterfaceRef SAL_CALL ORadioButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new ORadioButtonModel( comphelper::getComponentContext(_rxFactory) )); -} - - - ORadioButtonModel::ORadioButtonModel(const Reference<XComponentContext>& _rxFactory) :OReferenceValueComponent( _rxFactory, VCL_CONTROLMODEL_RADIOBUTTON, FRM_SUN_CONTROL_RADIOBUTTON,true ) // use the old control name for compytibility reasons @@ -413,8 +398,20 @@ bool ORadioButtonModel::commitControlValueToDbColumn( bool /*_bPostReset*/ ) return true; } +} +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_ORadioButtonModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::ORadioButtonModel(component)); } +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_ORadioButtonControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::ORadioButtonControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/Time.cxx b/forms/source/component/Time.cxx index 1381204..7c03a51 100644 --- a/forms/source/component/Time.cxx +++ b/forms/source/component/Time.cxx @@ -50,12 +50,6 @@ OTimeControl::OTimeControl(const Reference<XComponentContext>& _rxFactory) } -InterfaceRef SAL_CALL OTimeControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OTimeControl( comphelper::getComponentContext(_rxFactory) )); -} - - Sequence<Type> OTimeControl::_getTypes() { return OBoundControl::_getTypes(); @@ -75,12 +69,6 @@ StringSequence SAL_CALL OTimeControl::getSupportedServiceNames() throw(std::exce //= OTimeModel - -InterfaceRef SAL_CALL OTimeModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) -{ - return *(new OTimeModel( comphelper::getComponentContext(_rxFactory) )); -} - // XServiceInfo StringSequence SAL_CALL OTimeModel::getSupportedServiceNames() throw(std::exception) @@ -311,8 +299,20 @@ Sequence< Type > OTimeModel::getSupportedBindingTypes() return Sequence< Type >( & cppu::UnoType<util::Time>::get(), 1 ); } - } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OTimeModel_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OTimeModel(component)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_OTimeControl_get_implementation(::com::sun::star::uno::XComponentContext* component, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::OTimeControl(component)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/imgprod.cxx b/forms/source/component/imgprod.cxx index 64ea9f0..bf1cfe7 100644 --- a/forms/source/component/imgprod.cxx +++ b/forms/source/component/imgprod.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ - #include "imgprod.hxx" #include "services.hxx" @@ -33,7 +32,6 @@ #include "svtools/imageresourceaccess.hxx" #include <comphelper/processfactory.hxx> - // - ImgProdLockBytes - @@ -554,15 +552,11 @@ void ImageProducer::initialize( const ::com::sun::star::uno::Sequence< ::com::su } } -namespace frm -{ -::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > -SAL_CALL ImageProducer_CreateInstance( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ) +extern "C" SAL_DLLPUBLIC_EXPORT ::com::sun::star::uno::XInterface* SAL_CALL +com_sun_star_form_ImageProducer_get_implementation(::com::sun::star::uno::XComponentContext*, + ::com::sun::star::uno::Sequence<css::uno::Any> const &) { - return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( - ( ::cppu::OWeakObject* ) new ImageProducer ); + return cppu::acquire(new ImageProducer()); } -} // namespace frm /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/navigationbar.cxx b/forms/source/component/navigationbar.cxx index 6d34a1f..d784f03 100644 --- a/forms/source/component/navigationbar.cxx +++ b/forms/source/component/navigationbar.cxx @@ -26,17 +26,9 @@ #include <comphelper/basicio.hxx> #include <comphelper/processfactory.hxx> - -extern "C" void SAL_CALL createRegistryInfo_ONavigationBarModel() -{ - static ::frm::OMultiInstanceAutoRegistration< ::frm::ONavigationBarModel > aAutoRegistration; -} - - namespace frm { - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::beans; using namespace ::com::sun::star::form; @@ -482,8 +474,13 @@ namespace frm ); } - } // namespace frm +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* SAL_CALL +com_sun_star_comp_form_ONavigationBarModel_get_implementation(css::uno::XComponentContext* context, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new frm::ONavigationBarModel(context)); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/forms/source/component/scrollbar.cxx b/forms/source/component/scrollbar.cxx index 5fa5707..92f4181 100644 --- a/forms/source/component/scrollbar.cxx +++ b/forms/source/component/scrollbar.cxx @@ -22,17 +22,9 @@ ... etc. - the rest is truncated _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits