[Libreoffice-commits] core.git: 16 commits - include/toolkit toolkit/source toolkit/util

Matúš Kukan matus.kukan at collabora.com
Thu Jan 23 14:40:13 PST 2014


 include/toolkit/controls/animatedimages.hxx             |   42 --
 include/toolkit/controls/dialogcontrol.hxx              |   29 -
 include/toolkit/controls/spinningprogress.hxx           |   62 ---
 include/toolkit/controls/tabpagecontainer.hxx           |    4 
 include/toolkit/controls/tabpagemodel.hxx               |   12 
 include/toolkit/controls/tkspinbutton.hxx               |  121 ------
 toolkit/source/awt/asynccallback.cxx                    |   70 ---
 toolkit/source/controls/animatedimages.cxx              |  144 ++++----
 toolkit/source/controls/controlmodelcontainerbase.cxx   |   20 -
 toolkit/source/controls/dialogcontrol.cxx               |   43 ++
 toolkit/source/controls/grid/defaultgridcolumnmodel.cxx |  124 ++++---
 toolkit/source/controls/grid/defaultgridcolumnmodel.hxx |   80 ----
 toolkit/source/controls/grid/defaultgriddatamodel.cxx   |  125 +++++--
 toolkit/source/controls/grid/defaultgriddatamodel.hxx   |  117 ------
 toolkit/source/controls/grid/gridcolumn.cxx             |   11 
 toolkit/source/controls/grid/gridcontrol.cxx            |   41 +-
 toolkit/source/controls/grid/gridcontrol.hxx            |    4 
 toolkit/source/controls/grid/sortablegriddatamodel.cxx  |  223 ++++++++++--
 toolkit/source/controls/grid/sortablegriddatamodel.hxx  |  205 -----------
 toolkit/source/controls/spinningprogress.cxx            |   78 ++--
 toolkit/source/controls/tabpagecontainer.cxx            |   21 +
 toolkit/source/controls/tabpagemodel.cxx                |  101 +++--
 toolkit/source/controls/tkspinbutton.cxx                |  126 ++++++-
 toolkit/source/controls/tree/treecontrol.cxx            |   99 ++++-
 toolkit/source/controls/tree/treecontrol.hxx            |   73 ----
 toolkit/source/controls/unocontrols.cxx                 |  281 +++++++++++++++-
 toolkit/source/helper/registerservices.cxx              |  130 -------
 toolkit/source/helper/servicenames.cxx                  |    7 
 toolkit/util/tk.component                               |  165 ++++++---
 29 files changed, 1242 insertions(+), 1316 deletions(-)

New commits:
commit 671ddc6f21a402699a1240e5c09b8ea2ecb5f98b
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Jan 23 19:07:24 2014 +0100

    tk: Constructor feature for UnoSpinButton(Control|Model).
    
    Change-Id: If01abff3f07b4b79247e8ee7100f2c34c46c001a

diff --git a/include/toolkit/controls/tkspinbutton.hxx b/include/toolkit/controls/tkspinbutton.hxx
deleted file mode 100644
index cc39df9..0000000
--- a/include/toolkit/controls/tkspinbutton.hxx
+++ /dev/null
@@ -1,121 +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 .
- */
-#ifndef INCLUDED_TOOLKIT_CONTROLS_TKSPINBUTTON_HXX
-#define INCLUDED_TOOLKIT_CONTROLS_TKSPINBUTTON_HXX
-
-#include <toolkit/controls/unocontrolmodel.hxx>
-#include <toolkit/helper/servicenames.hxx>
-#include <toolkit/controls/unocontrolbase.hxx>
-#include <toolkit/helper/macros.hxx>
-#include <com/sun/star/awt/XSpinValue.hpp>
-#include <com/sun/star/awt/XAdjustmentListener.hpp>
-#include <comphelper/uno3.hxx>
-#include <cppuhelper/implbase2.hxx>
-
-//........................................................................
-namespace toolkit
-{
-//........................................................................
-
-    //====================================================================
-    //= UnoSpinButtonModel
-    //====================================================================
-    class UnoSpinButtonModel : public UnoControlModel
-    {
-    protected:
-        ::com::sun::star::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
-        ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
-
-    public:
-                            UnoSpinButtonModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& i_factory );
-                            UnoSpinButtonModel( const UnoSpinButtonModel& rModel ) : UnoControlModel( rModel ) {;}
-
-        UnoControlModel*    Clone() const { return new UnoSpinButtonModel( *this ); }
-
-        // XMultiPropertySet
-        ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
-
-        // XPersistObject
-        OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
-
-        // XServiceInfo
-        OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
-        ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
-    };
-
-    //====================================================================
-    //= UnoSpinButtonControl
-    //====================================================================
-
-    typedef ::cppu::ImplHelper2 <   ::com::sun::star::awt::XAdjustmentListener
-                                ,   ::com::sun::star::awt::XSpinValue
-                                >   UnoSpinButtonControl_Base;
-
-    class UnoSpinButtonControl :public UnoControlBase
-                               ,public UnoSpinButtonControl_Base
-    {
-    private:
-        AdjustmentListenerMultiplexer maAdjustmentListeners;
-
-    public:
-                                    UnoSpinButtonControl();
-        OUString             GetComponentServiceName();
-
-        DECLARE_UNO3_AGG_DEFAULTS( UnoSpinButtonControl, UnoControlBase );
-        ::com::sun::star::uno::Any  SAL_CALL queryAggregation( const ::com::sun::star::uno::Type & rType ) throw(::com::sun::star::uno::RuntimeException);
-
-        void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
-        void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw(::com::sun::star::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
-        void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
-
-        // XTypeProvider
-        DECLARE_XTYPEPROVIDER()
-
-        // XAdjustmentListener
-        void SAL_CALL adjustmentValueChanged( const ::com::sun::star::awt::AdjustmentEvent& rEvent ) throw(::com::sun::star::uno::RuntimeException);
-
-        // XSpinValue
-        virtual void SAL_CALL addAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
-        virtual void SAL_CALL removeAdjustmentListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XAdjustmentListener >& listener ) throw (::com::sun::star::uno::RuntimeException);
-        virtual void SAL_CALL setValue( sal_Int32 value ) throw (::com::sun::star::uno::RuntimeException);
-        virtual void SAL_CALL setValues( sal_Int32 minValue, sal_Int32 maxValue, sal_Int32 currentValue ) throw (::com::sun::star::uno::RuntimeException);
-        virtual sal_Int32 SAL_CALL getValue(  ) throw (::com::sun::star::uno::RuntimeException);
-        virtual void SAL_CALL setMinimum( sal_Int32 minValue ) throw (::com::sun::star::uno::RuntimeException);
-        virtual void SAL_CALL setMaximum( sal_Int32 maxValue ) throw (::com::sun::star::uno::RuntimeException);
-        virtual sal_Int32 SAL_CALL getMinimum(  ) throw (::com::sun::star::uno::RuntimeException);
-        virtual sal_Int32 SAL_CALL getMaximum(  ) throw (::com::sun::star::uno::RuntimeException);
-        virtual void SAL_CALL setSpinIncrement( sal_Int32 spinIncrement ) throw (::com::sun::star::uno::RuntimeException);
-        virtual sal_Int32 SAL_CALL getSpinIncrement(  ) throw (::com::sun::star::uno::RuntimeException);
-        virtual void SAL_CALL setOrientation( sal_Int32 orientation ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
-        virtual sal_Int32 SAL_CALL getOrientation(  ) throw (::com::sun::star::uno::RuntimeException);
-
-        // XServiceInfo
-        OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
-        ::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
-    };
-
-
-
-//........................................................................
-} // namespacetoolkit
-//........................................................................
-
-#endif // INCLUDED_TOOLKIT_CONTROLS_TKSPINBUTTON_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/controls/tkspinbutton.cxx b/toolkit/source/controls/tkspinbutton.cxx
index ad20b0f..871f29d 100644
--- a/toolkit/source/controls/tkspinbutton.cxx
+++ b/toolkit/source/controls/tkspinbutton.cxx
@@ -17,23 +17,99 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "toolkit/controls/tkspinbutton.hxx"
-#include "toolkit/helper/property.hxx"
-#include "toolkit/helper/unopropertyarrayhelper.hxx"
 #include <com/sun/star/awt/ScrollBarOrientation.hpp>
+#include <com/sun/star/awt/XSpinValue.hpp>
+#include <com/sun/star/awt/XAdjustmentListener.hpp>
 
-
+#include <comphelper/uno3.hxx>
+#include <cppuhelper/implbase2.hxx>
 #include <cppuhelper/typeprovider.hxx>
+#include <toolkit/controls/unocontrolmodel.hxx>
+#include <toolkit/controls/unocontrolbase.hxx>
+#include <toolkit/helper/macros.hxx>
+#include <toolkit/helper/property.hxx>
+#include <toolkit/helper/unopropertyarrayhelper.hxx>
+
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::awt;
+using namespace ::com::sun::star::lang;
+using namespace ::com::sun::star::beans;
 
-//........................................................................
-namespace toolkit
+namespace {
+
+class UnoSpinButtonModel : public UnoControlModel
 {
-//........................................................................
+protected:
+    css::uno::Any      ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+    ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
+
+public:
+                        UnoSpinButtonModel( const css::uno::Reference< css::uno::XComponentContext >& i_factory );
+                        UnoSpinButtonModel( const UnoSpinButtonModel& rModel ) : UnoControlModel( rModel ) {;}
+
+    UnoControlModel*    Clone() const { return new UnoSpinButtonModel( *this ); }
+
+    // XMultiPropertySet
+    css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(css::uno::RuntimeException);
+
+    // XPersistObject
+    OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException);
+
+    // XServiceInfo
+    OUString SAL_CALL getImplementationName(  ) throw(css::uno::RuntimeException);
+    css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException);
+};
 
-    using namespace ::com::sun::star::uno;
-    using namespace ::com::sun::star::awt;
-    using namespace ::com::sun::star::lang;
-    using namespace ::com::sun::star::beans;
+//====================================================================
+//= UnoSpinButtonControl
+//====================================================================
+
+typedef ::cppu::ImplHelper2 <   css::awt::XAdjustmentListener
+                            ,   css::awt::XSpinValue
+                            >   UnoSpinButtonControl_Base;
+
+class UnoSpinButtonControl :public UnoControlBase
+                           ,public UnoSpinButtonControl_Base
+{
+private:
+    AdjustmentListenerMultiplexer maAdjustmentListeners;
+
+public:
+                                UnoSpinButtonControl();
+    OUString             GetComponentServiceName();
+
+    DECLARE_UNO3_AGG_DEFAULTS( UnoSpinButtonControl, UnoControlBase );
+    css::uno::Any  SAL_CALL queryAggregation( const css::uno::Type & rType ) throw(css::uno::RuntimeException);
+
+    void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException);
+    void SAL_CALL disposing( const css::lang::EventObject& Source ) throw(css::uno::RuntimeException) { UnoControlBase::disposing( Source ); }
+    void SAL_CALL dispose(  ) throw(css::uno::RuntimeException);
+
+    // XTypeProvider
+    DECLARE_XTYPEPROVIDER()
+
+    // XAdjustmentListener
+    void SAL_CALL adjustmentValueChanged( const css::awt::AdjustmentEvent& rEvent ) throw(css::uno::RuntimeException);
+
+    // XSpinValue
+    virtual void SAL_CALL addAdjustmentListener( const css::uno::Reference< css::awt::XAdjustmentListener >& listener ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL removeAdjustmentListener( const css::uno::Reference< css::awt::XAdjustmentListener >& listener ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setValue( sal_Int32 value ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setValues( sal_Int32 minValue, sal_Int32 maxValue, sal_Int32 currentValue ) throw (css::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getValue(  ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setMinimum( sal_Int32 minValue ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setMaximum( sal_Int32 maxValue ) throw (css::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getMinimum(  ) throw (css::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getMaximum(  ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setSpinIncrement( sal_Int32 spinIncrement ) throw (css::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getSpinIncrement(  ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setOrientation( sal_Int32 orientation ) throw (css::lang::NoSupportException, css::uno::RuntimeException);
+    virtual sal_Int32 SAL_CALL getOrientation(  ) throw (css::uno::RuntimeException);
+
+    // XServiceInfo
+    OUString SAL_CALL getImplementationName(  ) throw(css::uno::RuntimeException);
+    css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(css::uno::RuntimeException);
+};
 
     //====================================================================
     //= UnoSpinButtonModel
@@ -67,7 +143,7 @@ namespace toolkit
     //--------------------------------------------------------------------
     OUString UnoSpinButtonModel::getServiceName( ) throw (RuntimeException)
     {
-        return OUString::createFromAscii( szServiceName_UnoSpinButtonModel );
+        return OUString("com.sun.star.awt.UnoControlSpinButtonModel");
     }
 
     //--------------------------------------------------------------------
@@ -76,7 +152,7 @@ namespace toolkit
         switch ( nPropId )
         {
         case BASEPROPERTY_DEFAULTCONTROL:
-            return makeAny( OUString::createFromAscii( szServiceName_UnoSpinButtonControl ) );
+            return makeAny( OUString("com.sun.star.awt.UnoControlSpinButton") );
 
         case BASEPROPERTY_BORDER:
             return makeAny( (sal_Int16) 0 );
@@ -119,7 +195,7 @@ namespace toolkit
     {
         Sequence< OUString > aServices( UnoControlModel::getSupportedServiceNames() );
         aServices.realloc( aServices.getLength() + 1 );
-        aServices[ aServices.getLength() - 1 ] = OUString::createFromAscii( szServiceName_UnoSpinButtonModel );
+        aServices[ aServices.getLength() - 1 ] = OUString("com.sun.star.awt.UnoControlSpinButtonModel");
         return aServices;
     }
 
@@ -182,7 +258,7 @@ namespace toolkit
     {
         Sequence< OUString > aServices( UnoControlBase::getSupportedServiceNames() );
         aServices.realloc( aServices.getLength() + 1 );
-        aServices[ aServices.getLength() - 1 ] = OUString::createFromAscii( szServiceName_UnoSpinButtonControl );
+        aServices[ aServices.getLength() - 1 ] = OUString("com.sun.star.awt.UnoControlSpinButton");
         return aServices;
     }
 
@@ -335,8 +411,22 @@ namespace toolkit
         return nOrientation;
     }
 
-//........................................................................
-}  // namespace toolkit
-//........................................................................
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoSpinButtonModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoSpinButtonModel(context));
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoSpinButtonControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoSpinButtonControl());
+}
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx
index 20ca895..64525d9 100644
--- a/toolkit/source/helper/registerservices.cxx
+++ b/toolkit/source/helper/registerservices.cxx
@@ -39,7 +39,6 @@
 #include <toolkit/controls/formattedcontrol.hxx>
 #include <toolkit/controls/roadmapcontrol.hxx>
 #include <toolkit/controls/tkscrollbar.hxx>
-#include "toolkit/controls/tkspinbutton.hxx"
 #include "toolkit/dllapi.h"
 #include <com/sun/star/beans/XPropertySet.hpp>
 #include <com/sun/star/uno/XComponentContext.hpp>
@@ -108,14 +107,12 @@ IMPL_CREATEINSTANCE( UnoControlContainer )
 IMPL_CREATEINSTANCE_CTX( UnoControlContainerModel )
 IMPL_CREATEINSTANCE_CTX( UnoControlFormattedFieldModel )
 IMPL_CREATEINSTANCE_CTX( UnoControlScrollBarModel )
-IMPL_CREATEINSTANCE_CTX( UnoSpinButtonModel )
 IMPL_CREATEINSTANCE_CTX( UnoMultiPageModel )
 IMPL_CREATEINSTANCE_CTX( UnoPageModel )
 IMPL_CREATEINSTANCE_CTX( UnoFrameModel )
 IMPL_CREATEINSTANCE_CTX( UnoDialogControl )
 IMPL_CREATEINSTANCE( UnoFormattedFieldControl )
 IMPL_CREATEINSTANCE( UnoScrollBarControl )
-IMPL_CREATEINSTANCE( UnoSpinButtonControl )
 IMPL_CREATEINSTANCE_CTX( UnoMultiPageControl )
 IMPL_CREATEINSTANCE_CTX( UnoPageControl )
 IMPL_CREATEINSTANCE_CTX( UnoFrameControl )
@@ -162,8 +159,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple
         GET_FACTORY( UnoPageControl, szServiceName_UnoPageControl, NULL )
         GET_FACTORY( UnoFrameModel, szServiceName_UnoFrameModel, NULL )
         GET_FACTORY( UnoFrameControl, szServiceName_UnoFrameControl, NULL )
-        GET_FACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL )
-        GET_FACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL )
         GET_FACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL )
     }
     return pRet;
diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component
index ee1d376..5a0fbaa 100644
--- a/toolkit/util/tk.component
+++ b/toolkit/util/tk.component
@@ -316,10 +316,12 @@
       constructor="org_openoffice_comp_toolkit_AnimatedImagesControl_get_implementation">
     <service name="com.sun.star.awt.AnimatedImagesControl"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoSpinButtonControl">
+  <implementation name="stardiv.Toolkit.UnoSpinButtonControl"
+      constructor="stardiv_Toolkit_UnoSpinButtonControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlSpinButton"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoSpinButtonModel">
+  <implementation name="stardiv.Toolkit.UnoSpinButtonModel"
+      constructor="stardiv_Toolkit_UnoSpinButtonModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlSpinButtonModel"/>
   </implementation>
   <implementation name="stardiv.Toolkit.UnoTimeFieldControl"
commit 334248a08ab0e6b0e8631253fe3906afa20db441
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Jan 23 18:33:29 2014 +0100

    tk: Constructor feature for unocontrols.cxx.
    
    Change-Id: Ia7bae618724f3d16774a3a7794d0ae59fb79cfc6

diff --git a/toolkit/source/controls/unocontrols.cxx b/toolkit/source/controls/unocontrols.cxx
index 3a4c59a..bc7e6ad 100644
--- a/toolkit/source/controls/unocontrols.cxx
+++ b/toolkit/source/controls/unocontrols.cxx
@@ -169,6 +169,13 @@ uno::Reference< beans::XPropertySetInfo > UnoControlEditModel::getPropertySetInf
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlEditModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlEditModel(context));
+}
 
 //  ----------------------------------------------------
 //  class UnoEditControl
@@ -488,6 +495,14 @@ uno::Sequence< OUString > UnoEditControl::getSupportedServiceNames() throw(uno::
     return aNames;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoEditControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoEditControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlFileControlModel
 //  ----------------------------------------------------
@@ -548,6 +563,14 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFileControlModel::getPropert
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlFileControlModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlFileControlModel(context));
+}
+
 //  ----------------------------------------------------
 //  class UnoFileControl
 //  ----------------------------------------------------
@@ -561,6 +584,14 @@ OUString UnoFileControl::GetComponentServiceName()
     return OUString("filecontrol");
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoFileControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoFileControl());
+}
+
 //  ----------------------------------------------------
 //  class GraphicControlModel
 //  ----------------------------------------------------
@@ -689,6 +720,14 @@ uno::Reference< beans::XPropertySetInfo > UnoControlButtonModel::getPropertySetI
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlButtonModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlButtonModel(context));
+}
+
 //  ----------------------------------------------------
 //  class UnoButtonControl
 //  ----------------------------------------------------
@@ -829,6 +868,14 @@ awt::Size UnoButtonControl::calcAdjustedSize( const awt::Size& rNewSize ) throw(
     return Impl_calcAdjustedSize( rNewSize );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoButtonControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoButtonControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlImageControlModel
 //  ----------------------------------------------------
@@ -911,6 +958,14 @@ void SAL_CALL UnoControlImageControlModel::setFastPropertyValue_NoBroadcast( sal
     }
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlImageControlModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlImageControlModel(context));
+}
+
 //  ----------------------------------------------------
 //  class UnoImageControlControl
 //  ----------------------------------------------------
@@ -956,6 +1011,14 @@ awt::Size UnoImageControlControl::calcAdjustedSize( const awt::Size& rNewSize )
     return Impl_calcAdjustedSize( rNewSize );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoImageControlControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoImageControlControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlRadioButtonModel
 //  ----------------------------------------------------
@@ -1002,7 +1065,13 @@ uno::Reference< beans::XPropertySetInfo > UnoControlRadioButtonModel::getPropert
     return xInfo;
 }
 
-
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlRadioButtonModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlRadioButtonModel(context));
+}
 
 //  ----------------------------------------------------
 //  class UnoRadioButtonControl
@@ -1166,6 +1235,14 @@ awt::Size UnoRadioButtonControl::calcAdjustedSize( const awt::Size& rNewSize ) t
     return Impl_calcAdjustedSize( rNewSize );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoRadioButtonControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoRadioButtonControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlCheckBoxModel
 //  ----------------------------------------------------
@@ -1212,7 +1289,13 @@ uno::Reference< beans::XPropertySetInfo > UnoControlCheckBoxModel::getPropertySe
     return xInfo;
 }
 
-
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlCheckBoxModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlCheckBoxModel(context));
+}
 
 //  ----------------------------------------------------
 //  class UnoCheckBoxControl
@@ -1351,6 +1434,14 @@ awt::Size UnoCheckBoxControl::calcAdjustedSize( const awt::Size& rNewSize ) thro
     return Impl_calcAdjustedSize( rNewSize );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoCheckBoxControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoCheckBoxControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlFixedHyperlinkModel
 //  ----------------------------------------------------
@@ -1407,6 +1498,14 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedHyperlinkModel::getProp
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlFixedHyperlinkModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlFixedHyperlinkModel(context));
+}
+
 //  ----------------------------------------------------
 //  class UnoFixedHyperlinkControl
 //  ----------------------------------------------------
@@ -1538,6 +1637,14 @@ void UnoFixedHyperlinkControl::removeActionListener(const uno::Reference< awt::X
     maActionListeners.removeInterface( l );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoFixedHyperlinkControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoFixedHyperlinkControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlFixedTextModel
 //  ----------------------------------------------------
@@ -1588,6 +1695,13 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedTextModel::getPropertyS
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlFixedTextModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlFixedTextModel(context));
+}
 
 //  ----------------------------------------------------
 //  class UnoFixedTextControl
@@ -1670,6 +1784,14 @@ awt::Size UnoFixedTextControl::calcAdjustedSize( const awt::Size& rNewSize ) thr
     return Impl_calcAdjustedSize( rNewSize );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoFixedTextControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoFixedTextControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlGroupBoxModel
 //  ----------------------------------------------------
@@ -1722,6 +1844,14 @@ uno::Reference< beans::XPropertySetInfo > UnoControlGroupBoxModel::getPropertySe
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlGroupBoxModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlGroupBoxModel(context));
+}
+
 //  ----------------------------------------------------
 //  class UnoGroupBoxControl
 //  ----------------------------------------------------
@@ -1742,6 +1872,14 @@ sal_Bool UnoGroupBoxControl::isTransparent() throw(uno::RuntimeException)
     return sal_True;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoGroupBoxControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoGroupBoxControl());
+}
+
 // =====================================================================================================================
 // = UnoControlListBoxModel_Data
 // =====================================================================================================================
@@ -2288,6 +2426,14 @@ void UnoControlListBoxModel::impl_notifyItemListEvent_nolck( const sal_Int32 i_n
     m_aItemListListeners.notifyEach( NotificationMethod, aEvent );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlListBoxModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlListBoxModel(context));
+}
+
 //  ----------------------------------------------------
 //  class UnoListBoxControl
 //  ----------------------------------------------------
@@ -2712,6 +2858,14 @@ void SAL_CALL UnoListBoxControl::itemListChanged( const lang::EventObject& i_rEv
         xPeerListener->itemListChanged( i_rEvent );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoListBoxControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoListBoxControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlComboBoxModel
 //  ----------------------------------------------------
@@ -2788,6 +2942,14 @@ uno::Any UnoControlComboBoxModel::ImplGetDefaultValue( sal_uInt16 nPropId ) cons
     return UnoControlModel::ImplGetDefaultValue( nPropId );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlComboBoxModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlComboBoxModel(context));
+}
+
 //  ----------------------------------------------------
 //  class UnoComboBoxControl
 //  ----------------------------------------------------
@@ -3101,6 +3263,13 @@ sal_Int16 UnoComboBoxControl::getDropDownLineCount() throw(uno::RuntimeException
     return ImplGetPropertyValue_INT16( BASEPROPERTY_LINECOUNT );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoComboBoxControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoComboBoxControl());
+}
 
 //  ----------------------------------------------------
 //  UnoSpinFieldControl
@@ -3238,7 +3407,13 @@ uno::Reference< beans::XPropertySetInfo > UnoControlDateFieldModel::getPropertyS
     return xInfo;
 }
 
-
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlDateFieldModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlDateFieldModel(context));
+}
 
 //  ----------------------------------------------------
 //  class UnoDateFieldControl
@@ -3436,6 +3611,14 @@ sal_Bool UnoDateFieldControl::isStrictFormat() throw(uno::RuntimeException)
     return ImplGetPropertyValue_BOOL( BASEPROPERTY_STRICTFORMAT );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoDateFieldControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoDateFieldControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlTimeFieldModel
 //  ----------------------------------------------------
@@ -3480,7 +3663,13 @@ uno::Reference< beans::XPropertySetInfo > UnoControlTimeFieldModel::getPropertyS
     return xInfo;
 }
 
-
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlTimeFieldModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlTimeFieldModel(context));
+}
 
 //  ----------------------------------------------------
 //  class UnoTimeFieldControl
@@ -3637,6 +3826,14 @@ sal_Bool UnoTimeFieldControl::isStrictFormat() throw(uno::RuntimeException)
     return ImplGetPropertyValue_BOOL( BASEPROPERTY_STRICTFORMAT );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoTimeFieldControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoTimeFieldControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlNumericFieldModel
 //  ----------------------------------------------------
@@ -3681,7 +3878,13 @@ uno::Reference< beans::XPropertySetInfo > UnoControlNumericFieldModel::getProper
     return xInfo;
 }
 
-
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlNumericFieldModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlNumericFieldModel(context));
+}
 
 //  ----------------------------------------------------
 //  class UnoNumericFieldControl
@@ -3835,6 +4038,14 @@ sal_Int16 UnoNumericFieldControl::getDecimalDigits() throw(uno::RuntimeException
     return ImplGetPropertyValue_INT16( BASEPROPERTY_DECIMALACCURACY );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoNumericFieldControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoNumericFieldControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlCurrencyFieldModel
 //  ----------------------------------------------------
@@ -3885,6 +4096,14 @@ uno::Reference< beans::XPropertySetInfo > UnoControlCurrencyFieldModel::getPrope
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlCurrencyFieldModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlCurrencyFieldModel(context));
+}
+
 //  ----------------------------------------------------
 //  class UnoCurrencyFieldControl
 //  ----------------------------------------------------
@@ -4036,6 +4255,14 @@ sal_Int16 UnoCurrencyFieldControl::getDecimalDigits() throw(uno::RuntimeExceptio
     return ImplGetPropertyValue_INT16( BASEPROPERTY_DECIMALACCURACY );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoCurrencyFieldControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoCurrencyFieldControl());
+}
+
 //  ----------------------------------------------------
 //  class UnoControlPatternFieldModel
 //  ----------------------------------------------------
@@ -4079,6 +4306,13 @@ uno::Reference< beans::XPropertySetInfo > UnoControlPatternFieldModel::getProper
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlPatternFieldModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlPatternFieldModel(context));
+}
 
 //  ----------------------------------------------------
 //  class UnoPatternFieldControl
@@ -4169,6 +4403,13 @@ sal_Bool UnoPatternFieldControl::isStrictFormat() throw(uno::RuntimeException)
     return ImplGetPropertyValue_BOOL( BASEPROPERTY_STRICTFORMAT );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoPatternFieldControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoPatternFieldControl());
+}
 
 //  ----------------------------------------------------
 //  class UnoControlProgressBarModel
@@ -4226,6 +4467,13 @@ uno::Reference< beans::XPropertySetInfo > UnoControlProgressBarModel::getPropert
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlProgressBarModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlProgressBarModel(context));
+}
 
 //  ----------------------------------------------------
 //  class UnoProgressBarControl
@@ -4303,6 +4551,13 @@ sal_Int32 UnoProgressBarControl::getValue() throw(::com::sun::star::uno::Runtime
     return ImplGetPropertyValue_INT32( BASEPROPERTY_PROGRESSVALUE );
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoProgressBarControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoProgressBarControl());
+}
 
 //  ----------------------------------------------------
 //  class UnoControlFixedLineModel
@@ -4356,6 +4611,14 @@ uno::Reference< beans::XPropertySetInfo > UnoControlFixedLineModel::getPropertyS
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlFixedLineModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoControlFixedLineModel(context));
+}
+
 //  ----------------------------------------------------
 //  class UnoFixedLineControl
 //  ----------------------------------------------------
@@ -4376,4 +4639,12 @@ sal_Bool UnoFixedLineControl::isTransparent() throw(uno::RuntimeException)
     return sal_True;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoFixedLineControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoFixedLineControl());
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx
index b49c20a..20ca895 100644
--- a/toolkit/source/helper/registerservices.cxx
+++ b/toolkit/source/helper/registerservices.cxx
@@ -31,7 +31,6 @@
 #include <toolkit/awt/vclxmenu.hxx>
 #include <toolkit/awt/vclxpointer.hxx>
 #include <toolkit/awt/vclxprinter.hxx>
-#include <toolkit/controls/unocontrols.hxx>
 #include <toolkit/controls/dialogcontrol.hxx>
 #include <toolkit/controls/unocontrolcontainer.hxx>
 #include <toolkit/controls/unocontrolcontainermodel.hxx>
@@ -105,54 +104,18 @@ using namespace toolkit;
 IMPL_CREATEINSTANCE( VCLXToolkit )
 IMPL_CREATEINSTANCE( StdTabController )
 IMPL_CREATEINSTANCE( StdTabControllerModel )
-IMPL_CREATEINSTANCE( UnoButtonControl )
-IMPL_CREATEINSTANCE( UnoCheckBoxControl )
-IMPL_CREATEINSTANCE( UnoComboBoxControl )
-IMPL_CREATEINSTANCE_CTX( UnoControlButtonModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlCheckBoxModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlComboBoxModel )
 IMPL_CREATEINSTANCE( UnoControlContainer )
 IMPL_CREATEINSTANCE_CTX( UnoControlContainerModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlCurrencyFieldModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlDateFieldModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlEditModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlFileControlModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlFixedHyperlinkModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlFixedTextModel )
 IMPL_CREATEINSTANCE_CTX( UnoControlFormattedFieldModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlGroupBoxModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlImageControlModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlListBoxModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlNumericFieldModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlPatternFieldModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlRadioButtonModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlTimeFieldModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlProgressBarModel )
 IMPL_CREATEINSTANCE_CTX( UnoControlScrollBarModel )
 IMPL_CREATEINSTANCE_CTX( UnoSpinButtonModel )
 IMPL_CREATEINSTANCE_CTX( UnoMultiPageModel )
 IMPL_CREATEINSTANCE_CTX( UnoPageModel )
 IMPL_CREATEINSTANCE_CTX( UnoFrameModel )
-IMPL_CREATEINSTANCE_CTX( UnoControlFixedLineModel )
-IMPL_CREATEINSTANCE( UnoCurrencyFieldControl )
-IMPL_CREATEINSTANCE( UnoDateFieldControl )
 IMPL_CREATEINSTANCE_CTX( UnoDialogControl )
-IMPL_CREATEINSTANCE( UnoEditControl )
-IMPL_CREATEINSTANCE( UnoFileControl )
-IMPL_CREATEINSTANCE( UnoFixedHyperlinkControl )
-IMPL_CREATEINSTANCE( UnoFixedTextControl )
 IMPL_CREATEINSTANCE( UnoFormattedFieldControl )
-IMPL_CREATEINSTANCE( UnoGroupBoxControl )
-IMPL_CREATEINSTANCE( UnoImageControlControl )
-IMPL_CREATEINSTANCE( UnoListBoxControl )
-IMPL_CREATEINSTANCE( UnoNumericFieldControl )
-IMPL_CREATEINSTANCE( UnoPatternFieldControl )
-IMPL_CREATEINSTANCE( UnoRadioButtonControl )
-IMPL_CREATEINSTANCE( UnoTimeFieldControl )
-IMPL_CREATEINSTANCE( UnoProgressBarControl )
 IMPL_CREATEINSTANCE( UnoScrollBarControl )
 IMPL_CREATEINSTANCE( UnoSpinButtonControl )
-IMPL_CREATEINSTANCE( UnoFixedLineControl )
 IMPL_CREATEINSTANCE_CTX( UnoMultiPageControl )
 IMPL_CREATEINSTANCE_CTX( UnoPageControl )
 IMPL_CREATEINSTANCE_CTX( UnoFrameControl )
@@ -186,46 +149,10 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple
         GET_FACTORY( StdTabController, szServiceName_TabController, szServiceName2_TabController )
         GET_FACTORY( StdTabControllerModel, szServiceName_TabControllerModel, szServiceName2_TabControllerModel )
         GET_FACTORY( UnoDialogControl, szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog )
-        GET_FACTORY( UnoEditControl, szServiceName_UnoControlEdit, szServiceName2_UnoControlEdit )
-        GET_FACTORY( UnoControlEditModel, szServiceName_UnoControlEditModel, szServiceName2_UnoControlEditModel )
-        GET_FACTORY( UnoDateFieldControl, szServiceName_UnoControlDateField, szServiceName2_UnoControlDateField )
-        GET_FACTORY( UnoControlDateFieldModel, szServiceName_UnoControlDateFieldModel, szServiceName2_UnoControlDateFieldModel )
-        GET_FACTORY( UnoTimeFieldControl, szServiceName_UnoControlTimeField, szServiceName2_UnoControlTimeField )
-        GET_FACTORY( UnoControlTimeFieldModel, szServiceName_UnoControlTimeFieldModel, szServiceName2_UnoControlTimeFieldModel )
-        GET_FACTORY( UnoNumericFieldControl, szServiceName_UnoControlNumericField, szServiceName2_UnoControlNumericField )
-        GET_FACTORY( UnoControlNumericFieldModel, szServiceName_UnoControlNumericFieldModel, szServiceName2_UnoControlNumericFieldModel )
-        GET_FACTORY( UnoCurrencyFieldControl, szServiceName_UnoControlCurrencyField, szServiceName2_UnoControlCurrencyField )
-        GET_FACTORY( UnoControlCurrencyFieldModel, szServiceName_UnoControlCurrencyFieldModel, szServiceName2_UnoControlCurrencyFieldModel )
-        GET_FACTORY( UnoPatternFieldControl, szServiceName_UnoControlPatternField, szServiceName2_UnoControlPatternField )
-        GET_FACTORY( UnoControlPatternFieldModel, szServiceName_UnoControlPatternFieldModel, szServiceName2_UnoControlPatternFieldModel )
         GET_FACTORY( UnoFormattedFieldControl, szServiceName_UnoControlFormattedField, szServiceName2_UnoControlFormattedField )
         GET_FACTORY( UnoControlFormattedFieldModel, szServiceName_UnoControlFormattedFieldModel, szServiceName2_UnoControlFormattedFieldModel )
-        GET_FACTORY( UnoFileControl, szServiceName_UnoControlFileControl, szServiceName2_UnoControlFileControl )
-        GET_FACTORY( UnoControlFileControlModel, szServiceName_UnoControlFileControlModel, szServiceName2_UnoControlFileControlModel )
-        GET_FACTORY( UnoButtonControl, szServiceName_UnoControlButton, szServiceName2_UnoControlButton )
-        GET_FACTORY( UnoControlButtonModel, szServiceName_UnoControlButtonModel, szServiceName2_UnoControlButtonModel )
-        GET_FACTORY( UnoImageControlControl, szServiceName_UnoControlImageButton, szServiceName2_UnoControlImageButton )
-        GET_FACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageButtonModel, szServiceName2_UnoControlImageButtonModel )
-        GET_FACTORY( UnoImageControlControl, szServiceName_UnoControlImageControl, szServiceName2_UnoControlImageControl )
-        GET_FACTORY( UnoControlImageControlModel, szServiceName_UnoControlImageControlModel, szServiceName2_UnoControlImageControlModel )
-        GET_FACTORY( UnoRadioButtonControl, szServiceName_UnoControlRadioButton, szServiceName2_UnoControlRadioButton )
-        GET_FACTORY( UnoControlRadioButtonModel, szServiceName_UnoControlRadioButtonModel, szServiceName2_UnoControlRadioButtonModel )
-        GET_FACTORY( UnoCheckBoxControl, szServiceName_UnoControlCheckBox, szServiceName2_UnoControlCheckBox )
-        GET_FACTORY( UnoControlCheckBoxModel, szServiceName_UnoControlCheckBoxModel, szServiceName2_UnoControlCheckBoxModel )
-        GET_FACTORY( UnoListBoxControl, szServiceName_UnoControlListBox, szServiceName2_UnoControlListBox )
-        GET_FACTORY( UnoControlListBoxModel, szServiceName_UnoControlListBoxModel, szServiceName2_UnoControlListBoxModel )
-        GET_FACTORY( UnoComboBoxControl, szServiceName_UnoControlComboBox, szServiceName2_UnoControlComboBox )
-        GET_FACTORY( UnoControlComboBoxModel, szServiceName_UnoControlComboBoxModel, szServiceName2_UnoControlComboBoxModel )
-        GET_FACTORY( UnoFixedTextControl, szServiceName_UnoControlFixedText, szServiceName2_UnoControlFixedText )
-        GET_FACTORY( UnoControlFixedTextModel, szServiceName_UnoControlFixedTextModel, szServiceName2_UnoControlFixedTextModel )
-        GET_FACTORY( UnoGroupBoxControl, szServiceName_UnoControlGroupBox, szServiceName2_UnoControlGroupBox )
-        GET_FACTORY( UnoControlGroupBoxModel, szServiceName_UnoControlGroupBoxModel, szServiceName2_UnoControlGroupBoxModel )
-        GET_FACTORY( UnoProgressBarControl, szServiceName_UnoControlProgressBar, szServiceName2_UnoControlProgressBar )
-        GET_FACTORY( UnoControlProgressBarModel, szServiceName_UnoControlProgressBarModel, szServiceName2_UnoControlProgressBarModel )
         GET_FACTORY( UnoScrollBarControl, szServiceName_UnoControlScrollBar, szServiceName2_UnoControlScrollBar )
         GET_FACTORY( UnoControlScrollBarModel, szServiceName_UnoControlScrollBarModel, szServiceName2_UnoControlScrollBarModel )
-        GET_FACTORY( UnoFixedLineControl, szServiceName_UnoControlFixedLine, szServiceName2_UnoControlFixedLine )
-        GET_FACTORY( UnoControlFixedLineModel, szServiceName_UnoControlFixedLineModel, szServiceName2_UnoControlFixedLineModel )
         GET_FACTORY( VCLXPrinterServer, szServiceName_PrinterServer, szServiceName2_PrinterServer )
         GET_FACTORY( UnoRoadmapControl, szServiceName_UnoControlRoadmap, szServiceName2_UnoControlRoadmap )
         GET_FACTORY( UnoControlRoadmapModel, szServiceName_UnoControlRoadmapModel, szServiceName2_UnoControlRoadmapModel )
@@ -238,8 +165,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple
         GET_FACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL )
         GET_FACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL )
         GET_FACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL )
-        GET_FACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL )
-        GET_FACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL )
     }
     return pRet;
 }
diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component
index 291a1c0..ee1d376 100644
--- a/toolkit/util/tk.component
+++ b/toolkit/util/tk.component
@@ -86,27 +86,33 @@
       constructor="stardiv_Toolkit_TreeControlModel_get_implementation">
     <service name="com.sun.star.awt.tree.TreeControlModel"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoButtonControl">
+  <implementation name="stardiv.Toolkit.UnoButtonControl"
+      constructor="stardiv_Toolkit_UnoButtonControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlButton"/>
     <service name="stardiv.vcl.control.Button"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoCheckBoxControl">
+  <implementation name="stardiv.Toolkit.UnoCheckBoxControl"
+      constructor="stardiv_Toolkit_UnoCheckBoxControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlCheckBox"/>
     <service name="stardiv.vcl.control.CheckBox"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoComboBoxControl">
+  <implementation name="stardiv.Toolkit.UnoComboBoxControl"
+      constructor="stardiv_Toolkit_UnoComboBoxControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlComboBox"/>
     <service name="stardiv.vcl.control.ComboBox"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlButtonModel">
+  <implementation name="stardiv.Toolkit.UnoControlButtonModel"
+      constructor="stardiv_Toolkit_UnoControlButtonModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlButtonModel"/>
     <service name="stardiv.vcl.controlmodel.Button"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlCheckBoxModel">
+  <implementation name="stardiv.Toolkit.UnoControlCheckBoxModel"
+      constructor="stardiv_Toolkit_UnoControlCheckBoxModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlCheckBoxModel"/>
     <service name="stardiv.vcl.controlmodel.CheckBox"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlComboBoxModel">
+  <implementation name="stardiv.Toolkit.UnoControlComboBoxModel"
+      constructor="stardiv_Toolkit_UnoControlComboBoxModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlComboBoxModel"/>
     <service name="stardiv.vcl.controlmodel.ComboBox"/>
   </implementation>
@@ -118,11 +124,13 @@
     <service name="com.sun.star.awt.UnoControlContainerModel"/>
     <service name="stardiv.vcl.controlmodel.ControlContainer"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlCurrencyFieldModel">
+  <implementation name="stardiv.Toolkit.UnoControlCurrencyFieldModel"
+      constructor="stardiv_Toolkit_UnoControlCurrencyFieldModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlCurrencyFieldModel"/>
     <service name="stardiv.vcl.controlmodel.CurrencyField"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlDateFieldModel">
+  <implementation name="stardiv.Toolkit.UnoControlDateFieldModel"
+      constructor="stardiv_Toolkit_UnoControlDateFieldModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlDateFieldModel"/>
     <service name="stardiv.vcl.controlmodel.DateField"/>
   </implementation>
@@ -131,22 +139,27 @@
     <service name="com.sun.star.awt.UnoControlDialogModel"/>
     <service name="stardiv.vcl.controlmodel.Dialog"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlEditModel">
+  <implementation name="stardiv.Toolkit.UnoControlEditModel"
+      constructor="stardiv_Toolkit_UnoControlEditModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlEditModel"/>
     <service name="stardiv.vcl.controlmodel.Edit"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlFileControlModel">
+  <implementation name="stardiv.Toolkit.UnoControlFileControlModel"
+      constructor="stardiv_Toolkit_UnoControlFileControlModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlFileControlModel"/>
     <service name="stardiv.vcl.controlmodel.FileControl"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlFixedHyperlinkModel">
+  <implementation name="stardiv.Toolkit.UnoControlFixedHyperlinkModel"
+      constructor="stardiv_Toolkit_UnoControlFixedHyperlinkModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlFixedHyperlinkModel"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlFixedLineModel">
+  <implementation name="stardiv.Toolkit.UnoControlFixedLineModel"
+      constructor="stardiv_Toolkit_UnoControlFixedLineModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlFixedLineModel"/>
     <service name="stardiv.vcl.controlmodel.FixedLine"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlFixedTextModel">
+  <implementation name="stardiv.Toolkit.UnoControlFixedTextModel"
+      constructor="stardiv_Toolkit_UnoControlFixedTextModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlFixedTextModel"/>
     <service name="stardiv.vcl.controlmodel.FixedText"/>
   </implementation>
@@ -154,33 +167,40 @@
     <service name="com.sun.star.awt.UnoControlFormattedFieldModel"/>
     <service name="stardiv.vcl.controlmodel.FormattedField"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlGroupBoxModel">
+  <implementation name="stardiv.Toolkit.UnoControlGroupBoxModel"
+      constructor="stardiv_Toolkit_UnoControlGroupBoxModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlGroupBoxModel"/>
     <service name="stardiv.vcl.controlmodel.GroupBox"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlImageControlModel">
+  <implementation name="stardiv.Toolkit.UnoControlImageControlModel"
+      constructor="stardiv_Toolkit_UnoControlImageControlModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlImageButtonModel"/>
     <service name="com.sun.star.awt.UnoControlImageControlModel"/>
     <service name="stardiv.vcl.controlmodel.ImageButton"/>
     <service name="stardiv.vcl.controlmodel.ImageControl"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlListBoxModel">
+  <implementation name="stardiv.Toolkit.UnoControlListBoxModel"
+      constructor="stardiv_Toolkit_UnoControlListBoxModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlListBoxModel"/>
     <service name="stardiv.vcl.controlmodel.ListBox"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlNumericFieldModel">
+  <implementation name="stardiv.Toolkit.UnoControlNumericFieldModel"
+      constructor="stardiv_Toolkit_UnoControlNumericFieldModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlNumericFieldModel"/>
     <service name="stardiv.vcl.controlmodel.NumericField"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlPatternFieldModel">
+  <implementation name="stardiv.Toolkit.UnoControlPatternFieldModel"
+      constructor="stardiv_Toolkit_UnoControlPatternFieldModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlPatternFieldModel"/>
     <service name="stardiv.vcl.controlmodel.PatternField"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlProgressBarModel">
+  <implementation name="stardiv.Toolkit.UnoControlProgressBarModel"
+      constructor="stardiv_Toolkit_UnoControlProgressBarModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlProgressBarModel"/>
     <service name="stardiv.vcl.controlmodel.ProgressBar"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlRadioButtonModel">
+  <implementation name="stardiv.Toolkit.UnoControlRadioButtonModel"
+      constructor="stardiv_Toolkit_UnoControlRadioButtonModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlRadioButtonModel"/>
     <service name="stardiv.vcl.controlmodel.RadioButton"/>
   </implementation>
@@ -192,15 +212,18 @@
     <service name="com.sun.star.awt.UnoControlScrollBarModel"/>
     <service name="stardiv.vcl.controlmodel.ScrollBar"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlTimeFieldModel">
+  <implementation name="stardiv.Toolkit.UnoControlTimeFieldModel"
+      constructor="stardiv_Toolkit_UnoControlTimeFieldModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlTimeFieldModel"/>
     <service name="stardiv.vcl.controlmodel.TimeField"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoCurrencyFieldControl">
+  <implementation name="stardiv.Toolkit.UnoCurrencyFieldControl"
+      constructor="stardiv_Toolkit_UnoCurrencyFieldControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlCurrencyField"/>
     <service name="stardiv.vcl.control.CurrencyField"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoDateFieldControl">
+  <implementation name="stardiv.Toolkit.UnoDateFieldControl"
+      constructor="stardiv_Toolkit_UnoDateFieldControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlDateField"/>
     <service name="stardiv.vcl.control.DateField"/>
   </implementation>
@@ -208,22 +231,27 @@
     <service name="com.sun.star.awt.UnoControlDialog"/>
     <service name="stardiv.vcl.control.Dialog"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoEditControl">
+  <implementation name="stardiv.Toolkit.UnoEditControl"
+      constructor="stardiv_Toolkit_UnoEditControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlEdit"/>
     <service name="stardiv.vcl.control.Edit"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoFileControl">
+  <implementation name="stardiv.Toolkit.UnoFileControl"
+      constructor="stardiv_Toolkit_UnoFileControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlFileControl"/>
     <service name="stardiv.vcl.control.FileControl"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoFixedHyperlinkControl">
+  <implementation name="stardiv.Toolkit.UnoFixedHyperlinkControl"
+      constructor="stardiv_Toolkit_UnoFixedHyperlinkControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlFixedHyperlink"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoFixedLineControl">
+  <implementation name="stardiv.Toolkit.UnoFixedLineControl"
+      constructor="stardiv_Toolkit_UnoFixedLineControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlFixedLine"/>
     <service name="stardiv.vcl.control.FixedLine"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoFixedTextControl">
+  <implementation name="stardiv.Toolkit.UnoFixedTextControl"
+      constructor="stardiv_Toolkit_UnoFixedTextControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlFixedText"/>
     <service name="stardiv.vcl.control.FixedText"/>
   </implementation>
@@ -231,33 +259,40 @@
     <service name="com.sun.star.awt.UnoControlFormattedField"/>
     <service name="stardiv.vcl.control.FormattedField"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoGroupBoxControl">
+  <implementation name="stardiv.Toolkit.UnoGroupBoxControl"
+      constructor="stardiv_Toolkit_UnoGroupBoxControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlGroupBox"/>
     <service name="stardiv.vcl.control.GroupBox"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoImageControlControl">
+  <implementation name="stardiv.Toolkit.UnoImageControlControl"
+      constructor="stardiv_Toolkit_UnoImageControlControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlImageButton"/>
     <service name="com.sun.star.awt.UnoControlImageControl"/>
     <service name="stardiv.vcl.control.ImageButton"/>
     <service name="stardiv.vcl.control.ImageControl"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoListBoxControl">
+  <implementation name="stardiv.Toolkit.UnoListBoxControl"
+      constructor="stardiv_Toolkit_UnoListBoxControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlListBox"/>
     <service name="stardiv.vcl.control.ListBox"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoNumericFieldControl">
+  <implementation name="stardiv.Toolkit.UnoNumericFieldControl"
+      constructor="stardiv_Toolkit_UnoNumericFieldControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlNumericField"/>
     <service name="stardiv.vcl.control.NumericField"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoPatternFieldControl">
+  <implementation name="stardiv.Toolkit.UnoPatternFieldControl"
+      constructor="stardiv_Toolkit_UnoPatternFieldControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlPatternField"/>
     <service name="stardiv.vcl.control.PatternField"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoProgressBarControl">
+  <implementation name="stardiv.Toolkit.UnoProgressBarControl"
+      constructor="stardiv_Toolkit_UnoProgressBarControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlProgressBar"/>
     <service name="stardiv.vcl.control.ProgressBar"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoRadioButtonControl">
+  <implementation name="stardiv.Toolkit.UnoRadioButtonControl"
+      constructor="stardiv_Toolkit_UnoRadioButtonControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlRadioButton"/>
     <service name="stardiv.vcl.control.RadioButton"/>
   </implementation>
@@ -287,7 +322,8 @@
   <implementation name="stardiv.Toolkit.UnoSpinButtonModel">
     <service name="com.sun.star.awt.UnoControlSpinButtonModel"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoTimeFieldControl">
+  <implementation name="stardiv.Toolkit.UnoTimeFieldControl"
+      constructor="stardiv_Toolkit_UnoTimeFieldControl_get_implementation">
     <service name="com.sun.star.awt.UnoControlTimeField"/>
     <service name="stardiv.vcl.control.TimeField"/>
   </implementation>
commit dec6d3e93503d805c74adc04b07758a8a44d74a6
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Jan 23 17:28:44 2014 +0100

    tk: Constructor feature for OGeometryControlModel<UnoControlDialogModel>.
    
    Change-Id: I9afc83610ccc06ea090a10588fb8240159715197

diff --git a/include/toolkit/controls/dialogcontrol.hxx b/include/toolkit/controls/dialogcontrol.hxx
index f606720..293ce9d 100644
--- a/include/toolkit/controls/dialogcontrol.hxx
+++ b/include/toolkit/controls/dialogcontrol.hxx
@@ -35,35 +35,6 @@
 #include <cppuhelper/implbase3.hxx>
 #include <list>
 
-//  ----------------------------------------------------
-//  class UnoControlDialogModel
-//  ----------------------------------------------------
-
-class UnoControlDialogModel :   public ControlModelContainerBase
-{
-protected:
-    ::com::sun::star::uno::Reference< ::com::sun::star::graphic::XGraphicObject > mxGrfObj;
-    ::com::sun::star::uno::Any          ImplGetDefaultValue( sal_uInt16 nPropId ) const;
-    ::cppu::IPropertyArrayHelper&       SAL_CALL getInfoHelper();
-    // ::cppu::OPropertySetHelper
-	void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) throw (::com::sun::star::uno::Exception);
-public:
-                        UnoControlDialogModel( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& rxContext );
-                        UnoControlDialogModel( const UnoControlDialogModel& rModel );
-                        ~UnoControlDialogModel();
-
-    UnoControlModel*    Clone() const;
-    // ::com::sun::star::beans::XMultiPropertySet
-    ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(::com::sun::star::uno::RuntimeException);
-
-    // ::com::sun::star::io::XPersistObject
-    OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
-
-    // XServiceInfo
-    DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel, ControlModelContainerBase, szServiceName2_UnoControlDialogModel )
-
-};
-
 typedef ::cppu::AggImplInheritanceHelper2   <   ControlContainerBase
                                             ,   ::com::sun::star::awt::XUnoControlDialog
                                             ,   ::com::sun::star::awt::XWindowListener
diff --git a/toolkit/source/controls/dialogcontrol.cxx b/toolkit/source/controls/dialogcontrol.cxx
index 8f32532..491ec62 100644
--- a/toolkit/source/controls/dialogcontrol.cxx
+++ b/toolkit/source/controls/dialogcontrol.cxx
@@ -23,6 +23,7 @@
 #include <vcl/wall.hxx>
 #include <osl/mutex.hxx>
 #include <toolkit/controls/dialogcontrol.hxx>
+#include <toolkit/controls/geometrycontrolmodel.hxx>
 #include <toolkit/helper/property.hxx>
 #include <toolkit/helper/unopropertyarrayhelper.hxx>
 #include <toolkit/controls/stdtabcontroller.hxx>
@@ -142,9 +143,32 @@ public:
 ////HELPER
 OUString getPhysicalLocation( const ::com::sun::star::uno::Any& rbase, const ::com::sun::star::uno::Any& rUrl );
 
-//  ----------------------------------------------------
-//  class UnoControlDialogModel
-//  ----------------------------------------------------
+namespace {
+
+class UnoControlDialogModel :   public ControlModelContainerBase
+{
+protected:
+    css::uno::Reference< css::graphic::XGraphicObject > mxGrfObj;
+    css::uno::Any          ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+    ::cppu::IPropertyArrayHelper&       SAL_CALL getInfoHelper();
+    // ::cppu::OPropertySetHelper
+    void SAL_CALL setFastPropertyValue_NoBroadcast( sal_Int32 nHandle, const css::uno::Any& rValue ) throw (css::uno::Exception);
+public:
+    UnoControlDialogModel( const css::uno::Reference< css::uno::XComponentContext >& rxContext );
+    UnoControlDialogModel( const UnoControlDialogModel& rModel );
+    ~UnoControlDialogModel();
+
+    UnoControlModel*    Clone() const;
+    // css::beans::XMultiPropertySet
+    css::uno::Reference< css::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo(  ) throw(css::uno::RuntimeException);
+
+    // css::io::XPersistObject
+    OUString SAL_CALL getServiceName() throw(css::uno::RuntimeException);
+
+    // XServiceInfo
+    DECLIMPL_SERVICEINFO_DERIVED( UnoControlDialogModel, ControlModelContainerBase, "com.sun.star.awt.UnoControlDialogModel" )
+};
+
 UnoControlDialogModel::UnoControlDialogModel( const Reference< XComponentContext >& rxContext )
     :ControlModelContainerBase( rxContext )
 {
@@ -214,7 +238,7 @@ UnoControlModel* UnoControlDialogModel::Clone() const
 
 OUString UnoControlDialogModel::getServiceName( ) throw(RuntimeException)
 {
-    return OUString::createFromAscii( szServiceName_UnoControlDialogModel );
+    return OUString("stardiv.vcl.controlmodel.Dialog");
 }
 
 Any UnoControlDialogModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const
@@ -274,6 +298,9 @@ void SAL_CALL UnoControlDialogModel::setFastPropertyValue_NoBroadcast( sal_Int32
         OSL_ENSURE( sal_False, "UnoControlDialogModel::setFastPropertyValue_NoBroadcast: caught an exception while setting ImageURL properties!" );
     }
 }
+
+}
+
 // ============================================================================
 // = class UnoDialogControl
 // ============================================================================
@@ -1202,4 +1229,12 @@ uno::Reference< beans::XPropertySetInfo > UnoFrameModel::getPropertySetInfo(  )
     return xInfo;
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_UnoControlDialogModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new OGeometryControlModel<UnoControlDialogModel>(context));
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx
index 933500d..b49c20a 100644
--- a/toolkit/source/helper/registerservices.cxx
+++ b/toolkit/source/helper/registerservices.cxx
@@ -89,12 +89,6 @@ namespace toolkit
     ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) \
     { return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new ImplName( comphelper::getComponentContext(i_factory) ) ); }
 
-#define IMPL_CREATE_INSTANCE_WITH_GEOMETRY( ImplName ) \
-    ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL ImplName##_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& i_factory ) \
-{ \
-    return ::com::sun::star::uno::Reference < ::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) new OGeometryControlModel< ImplName >( comphelper::getComponentContext( i_factory ) ) ); \
-}
-
 #define GET_FACTORY_WITH_IMPL_PREFIX( ClassName, ImplNamePrefix, ServiceName1, ServiceName2 ) \
     pRet = tryCreateFactory( sImplementationName, ImplNamePrefix "." #ClassName, \
                 ServiceName1, ServiceName2, \
@@ -169,8 +163,6 @@ IMPL_CREATEINSTANCE( VCLXPrinterServer )
 IMPL_CREATEINSTANCE( UnoRoadmapControl )
 IMPL_CREATEINSTANCE_CTX( UnoControlRoadmapModel )
 
-IMPL_CREATE_INSTANCE_WITH_GEOMETRY( UnoControlDialogModel )
-
 extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL MutableTreeDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
 
 extern "C"
@@ -194,7 +186,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple
         GET_FACTORY( StdTabController, szServiceName_TabController, szServiceName2_TabController )
         GET_FACTORY( StdTabControllerModel, szServiceName_TabControllerModel, szServiceName2_TabControllerModel )
         GET_FACTORY( UnoDialogControl, szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog )
-        GET_FACTORY( UnoControlDialogModel, szServiceName_UnoControlDialogModel, szServiceName2_UnoControlDialogModel )
         GET_FACTORY( UnoEditControl, szServiceName_UnoControlEdit, szServiceName2_UnoControlEdit )
         GET_FACTORY( UnoControlEditModel, szServiceName_UnoControlEditModel, szServiceName2_UnoControlEditModel )
         GET_FACTORY( UnoDateFieldControl, szServiceName_UnoControlDateField, szServiceName2_UnoControlDateField )
diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component
index 588e0f2..291a1c0 100644
--- a/toolkit/util/tk.component
+++ b/toolkit/util/tk.component
@@ -126,7 +126,8 @@
     <service name="com.sun.star.awt.UnoControlDateFieldModel"/>
     <service name="stardiv.vcl.controlmodel.DateField"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.UnoControlDialogModel">
+  <implementation name="stardiv.Toolkit.UnoControlDialogModel"
+      constructor="stardiv_Toolkit_UnoControlDialogModel_get_implementation">
     <service name="com.sun.star.awt.UnoControlDialogModel"/>
     <service name="stardiv.vcl.controlmodel.Dialog"/>
   </implementation>
commit 6dbff3aae9cb727fab74a3b2d8ebf7cb136ce215
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Jan 23 17:18:29 2014 +0100

    typo: wrong name
    
    Change-Id: I7e041add4adc0f84dd7d9d9d74ccaf80ecc57776

diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx
index 77ff575..1721349 100644
--- a/toolkit/source/controls/controlmodelcontainerbase.cxx
+++ b/toolkit/source/controls/controlmodelcontainerbase.cxx
@@ -672,7 +672,7 @@ sal_Bool SAL_CALL ControlModelContainerBase::getGroupControl(  ) throw (RuntimeE
 // ----------------------------------------------------------------------------
 void SAL_CALL ControlModelContainerBase::setGroupControl( sal_Bool ) throw (RuntimeException)
 {
-    OSL_TRACE( "UnoControlDialogModel::setGroupControl: explicit grouping not supported" );
+    OSL_TRACE( "ControlModelContainerBase::setGroupControl: explicit grouping not supported" );
 }
 
 // ----------------------------------------------------------------------------
@@ -732,7 +732,7 @@ Sequence< Reference< XControlModel > > SAL_CALL ControlModelContainerBase::getCo
         Reference< XPropertySetInfo > xPSI;
         if ( xControlProps.is() )
             xPSI = xControlProps->getPropertySetInfo( );
-        DBG_ASSERT( xPSI.is(), "UnoControlDialogModel::getControlModels: invalid child model!" );
+        DBG_ASSERT( xPSI.is(), "ControlModelContainerBase::getControlModels: invalid child model!" );
 
         // has it?
         if ( xPSI.is() && xPSI->hasPropertyByName( getTabIndexPropertyName() ) )
@@ -767,7 +767,7 @@ void SAL_CALL ControlModelContainerBase::setGroup( const Sequence< Reference< XC
     // We only have a sequence of control models, and we _know_ (yes, that's a HACK relying on
     // implementation details) that VCL does grouping according to the order of controls automatically
     // At least VCL does this for all we're interested in: Radio buttons.
-    OSL_TRACE( "UnoControlDialogModel::setGroup: grouping not supported" );
+    OSL_TRACE( "ControlModelContainerBase::setGroup: grouping not supported" );
 }
 
 ////----- XInitialization -------------------------------------------------------------------
@@ -871,7 +871,7 @@ void SAL_CALL ControlModelContainerBase::getGroup( sal_Int32 _nGroup, Sequence<
 
     if ( ( _nGroup < 0 ) || ( _nGroup >= (sal_Int32)maGroups.size() ) )
     {
-        OSL_TRACE( "UnoControlDialogModel::getGroup: invalid argument and I am not allowed to throw an exception!" );
+        OSL_TRACE( "ControlModelContainerBase::getGroup: invalid argument and I am not allowed to throw an exception!" );
         _rGroup.realloc( 0 );
         _rName = OUString();
     }
@@ -1072,7 +1072,7 @@ void SAL_CALL ControlModelContainerBase::propertyChange( const PropertyChangeEve
     SolarMutexGuard aGuard;
 
     DBG_ASSERT( _rEvent.PropertyName.equalsAscii( "TabIndex" ),
-        "UnoControlDialogModel::propertyChange: not listening for this property!" );
+        "ControlModelContainerBase::propertyChange: not listening for this property!" );
 
     // the accessor for the changed element
     OUString sAccessor;
@@ -1081,7 +1081,7 @@ void SAL_CALL ControlModelContainerBase::propertyChange( const PropertyChangeEve
             maModels.begin(), maModels.end(),
             CompareControlModel( Reference< XControlModel >( _rEvent.Source, UNO_QUERY ) )
         );
-    OSL_ENSURE( maModels.end() != aPos, "UnoControlDialogModel::propertyChange: don't know this model!" );
+    OSL_ENSURE( maModels.end() != aPos, "ControlModelContainerBase::propertyChange: don't know this model!" );
     if ( maModels.end() != aPos )
         sAccessor = aPos->second;
 
commit 11f63d1a614089c83b1ea93f8e93b1e7f7b2035d
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Jan 23 17:08:45 2014 +0100

    tk: Constructor feature for UnoTree(Control|Model).
    
    Change-Id: I83a9e621199b15672cd680e847d78dfb11437885

diff --git a/toolkit/source/controls/tree/treecontrol.cxx b/toolkit/source/controls/tree/treecontrol.cxx
index a3fc00d..2bd5888 100644
--- a/toolkit/source/controls/tree/treecontrol.cxx
+++ b/toolkit/source/controls/tree/treecontrol.cxx
@@ -20,17 +20,16 @@
 
 #include <treecontrol.hxx>
 
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-#include <com/sun/star/view/SelectionType.hpp>
+#include <com/sun/star/awt/tree/XTreeControl.hpp>
 #include <com/sun/star/awt/tree/XTreeDataModel.hpp>
+#include <com/sun/star/view/SelectionType.hpp>
 #include <toolkit/helper/unopropertyarrayhelper.hxx>
 #include <toolkit/helper/property.hxx>
-#include <com/sun/star/awt/XVclWindowPeer.hpp>
-#include <comphelper/processfactory.hxx>
 #include <osl/diagnose.h>
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::awt::tree;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::beans;
@@ -124,10 +123,70 @@ Reference< XPropertySetInfo > UnoTreeModel::getPropertySetInfo(  ) throw(Runtime
     return xInfo;
 }
 
+}
+
+namespace {
+
+typedef ::cppu::ImplInheritanceHelper1< UnoControlBase, css::awt::tree::XTreeControl > UnoTreeControl_Base;
+class UnoTreeControl : public UnoTreeControl_Base
+{
+public:
+    UnoTreeControl();
+    OUString GetComponentServiceName();
+
+    // css::lang::XComponent
+    void SAL_CALL dispose(  ) throw(css::uno::RuntimeException);
+
+    // css::awt::XControl
+    void SAL_CALL createPeer( const css::uno::Reference< css::awt::XToolkit >& Toolkit, const css::uno::Reference< css::awt::XWindowPeer >& Parent ) throw(css::uno::RuntimeException);
+
+    // css::view::XSelectionSupplier
+    virtual ::sal_Bool SAL_CALL select( const css::uno::Any& xSelection ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+    virtual css::uno::Any SAL_CALL getSelection(  ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL addSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL removeSelectionChangeListener( const css::uno::Reference< css::view::XSelectionChangeListener >& xListener ) throw (css::uno::RuntimeException);
+
+    // css::view::XMultiSelectionSupplier
+    virtual ::sal_Bool SAL_CALL addSelection( const css::uno::Any& Selection ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+    virtual void SAL_CALL removeSelection( const css::uno::Any& Selection ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+    virtual void SAL_CALL clearSelection(  ) throw (css::uno::RuntimeException);
+    virtual ::sal_Int32 SAL_CALL getSelectionCount(  ) throw (css::uno::RuntimeException);
+    virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createSelectionEnumeration(  ) throw (css::uno::RuntimeException);
+    virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createReverseSelectionEnumeration(  ) throw (css::uno::RuntimeException);
+
+    // css::awt::XTreeControl
+    virtual OUString SAL_CALL getDefaultExpandedGraphicURL() throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setDefaultExpandedGraphicURL( const OUString& _defaultexpandedgraphicurl ) throw (css::uno::RuntimeException);
+    virtual OUString SAL_CALL getDefaultCollapsedGraphicURL() throw (css::uno::RuntimeException);
+    virtual void SAL_CALL setDefaultCollapsedGraphicURL( const OUString& _defaultcollapsedgraphicurl ) throw (css::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL isNodeExpanded( const css::uno::Reference< css::awt::tree::XTreeNode >& Node ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL isNodeCollapsed( const css::uno::Reference< css::awt::tree::XTreeNode >& Node ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+    virtual void SAL_CALL makeNodeVisible( const css::uno::Reference< css::awt::tree::XTreeNode >& Node ) throw (css::lang::IllegalArgumentException, css::awt::tree::ExpandVetoException, css::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL isNodeVisible( const css::uno::Reference< css::awt::tree::XTreeNode >& Node ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+    virtual void SAL_CALL expandNode( const css::uno::Reference< css::awt::tree::XTreeNode >& Node ) throw (css::lang::IllegalArgumentException, css::awt::tree::ExpandVetoException, css::uno::RuntimeException);
+    virtual void SAL_CALL collapseNode( const css::uno::Reference< css::awt::tree::XTreeNode >& Node ) throw (css::lang::IllegalArgumentException, css::awt::tree::ExpandVetoException, css::uno::RuntimeException);
+    virtual void SAL_CALL addTreeExpansionListener( const css::uno::Reference< css::awt::tree::XTreeExpansionListener >& Listener ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL removeTreeExpansionListener( const css::uno::Reference< css::awt::tree::XTreeExpansionListener >& Listener ) throw (css::uno::RuntimeException);
+    virtual css::uno::Reference< css::awt::tree::XTreeNode > SAL_CALL getNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (css::uno::RuntimeException);
+    virtual css::uno::Reference< css::awt::tree::XTreeNode > SAL_CALL getClosestNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (css::uno::RuntimeException);
+    virtual css::awt::Rectangle SAL_CALL getNodeRect( const css::uno::Reference< css::awt::tree::XTreeNode >& Node ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL isEditing(  ) throw (css::uno::RuntimeException);
+    virtual ::sal_Bool SAL_CALL stopEditing(  ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL cancelEditing(  ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL startEditingAtNode( const css::uno::Reference< css::awt::tree::XTreeNode >& Node ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException);
+    virtual void SAL_CALL addTreeEditListener( const css::uno::Reference< css::awt::tree::XTreeEditListener >& Listener ) throw (css::uno::RuntimeException);
+    virtual void SAL_CALL removeTreeEditListener( const css::uno::Reference< css::awt::tree::XTreeEditListener >& Listener ) throw (css::uno::RuntimeException);
+
+    // css::lang::XServiceInfo
+    DECLIMPL_SERVICEINFO_DERIVED( UnoTreeControl, UnoControlBase, szServiceName_TreeControl )
+
+    using UnoControl::getPeer;
+private:
+    TreeSelectionListenerMultiplexer maSelectionListeners;
+    TreeExpansionListenerMultiplexer maTreeExpansionListeners;
+    TreeEditListenerMultiplexer maTreeEditListeners;
+};
 
-//  ----------------------------------------------------
-//  class UnoTreeControl
-//  ----------------------------------------------------
 UnoTreeControl::UnoTreeControl()
 : UnoTreeControl_Base()
 , maSelectionListeners( *this )
@@ -441,16 +500,6 @@ void UnoTreeControl::createPeer( const uno::Reference< awt::XToolkit > & rxToolk
 
 }
 
-Reference< XInterface > SAL_CALL TreeControl_CreateInstance( const Reference< XMultiServiceFactory >& )
-{
-    return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeControl() );
-}
-
-Reference< XInterface > SAL_CALL TreeControlModel_CreateInstance( const Reference< XMultiServiceFactory >& i_factory )
-{
-    return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::UnoTreeModel( comphelper::getComponentContext(i_factory) ) );
-}
-
 void SAL_CALL TreeEditListenerMultiplexer::nodeEditing( const Reference< XTreeNode >& Node ) throw (RuntimeException, ::com::sun::star::util::VetoException)
 {
     ::cppu::OInterfaceIteratorHelper aIt( *this );
@@ -499,4 +548,20 @@ void SAL_CALL TreeEditListenerMultiplexer::nodeEdited( const Reference< XTreeNod
     }
 }
 
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_TreeControlModel_get_implementation(
+    css::uno::XComponentContext *context,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new toolkit::UnoTreeModel(context));
+}
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+stardiv_Toolkit_TreeControl_get_implementation(
+    css::uno::XComponentContext *,
+    css::uno::Sequence<css::uno::Any> const &)
+{
+    return cppu::acquire(new UnoTreeControl());
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/controls/tree/treecontrol.hxx b/toolkit/source/controls/tree/treecontrol.hxx
index 208b066..1da2846 100644
--- a/toolkit/source/controls/tree/treecontrol.hxx
+++ b/toolkit/source/controls/tree/treecontrol.hxx
@@ -20,7 +20,6 @@
 #ifndef TOOLKIT_TREE_CONTROL_HXX
 #define TOOLKIT_TREE_CONTROL_HXX
 
-#include <com/sun/star/awt/tree/XTreeControl.hpp>
 #include <toolkit/controls/unocontrols.hxx>
 #include <toolkit/controls/unocontrolmodel.hxx>
 #include <toolkit/helper/servicenames.hxx>
@@ -30,19 +29,13 @@
 
 namespace toolkit {
 
-using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::awt;
-using namespace ::com::sun::star::lang;
-using namespace ::com::sun::star::beans;
-using namespace ::com::sun::star::container;
-
 // ===================================================================
 // = UnoTreeModel
 // ===================================================================
 class UnoTreeModel : public UnoControlModel
 {
 protected:
-    Any     ImplGetDefaultValue( sal_uInt16 nPropId ) const;
+    css::uno::Any ImplGetDefaultValue( sal_uInt16 nPropId ) const;
     ::cppu::IPropertyArrayHelper&   SAL_CALL getInfoHelper();
 
 public:
@@ -61,70 +54,6 @@ public:
     DECLIMPL_SERVICEINFO_DERIVED( UnoTreeModel, UnoControlModel, szServiceName_TreeControlModel )
 };
 
-
-// ===================================================================
-// = UnoTreeControl
-// ===================================================================
-typedef ::cppu::ImplInheritanceHelper1< UnoControlBase, ::com::sun::star::awt::tree::XTreeControl > UnoTreeControl_Base;
-class UnoTreeControl : public UnoTreeControl_Base
-{
-public:
-    UnoTreeControl();
-    OUString             GetComponentServiceName();
-
-    // ::com::sun::star::lang::XComponent
-    void SAL_CALL dispose(  ) throw(::com::sun::star::uno::RuntimeException);
-
-    // ::com::sun::star::awt::XControl
-    void SAL_CALL createPeer( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XToolkit >& Toolkit, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindowPeer >& Parent ) throw(::com::sun::star::uno::RuntimeException);
-
-    // ::com::sun::star::view::XSelectionSupplier
-    virtual ::sal_Bool SAL_CALL select( const ::com::sun::star::uno::Any& xSelection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Any SAL_CALL getSelection(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL addSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL removeSelectionChangeListener( const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionChangeListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
-
-    // ::com::sun::star::view::XMultiSelectionSupplier
-    virtual ::sal_Bool SAL_CALL addSelection( const ::com::sun::star::uno::Any& Selection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL removeSelection( const ::com::sun::star::uno::Any& Selection ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL clearSelection(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::sal_Int32 SAL_CALL getSelectionCount(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createSelectionEnumeration(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createReverseSelectionEnumeration(  ) throw (::com::sun::star::uno::RuntimeException);
-
-    // ::com::sun::star::awt::XTreeControl
-    virtual OUString SAL_CALL getDefaultExpandedGraphicURL() throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setDefaultExpandedGraphicURL( const OUString& _defaultexpandedgraphicurl ) throw (::com::sun::star::uno::RuntimeException);
-    virtual OUString SAL_CALL getDefaultCollapsedGraphicURL() throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL setDefaultCollapsedGraphicURL( const OUString& _defaultcollapsedgraphicurl ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::sal_Bool SAL_CALL isNodeExpanded( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-    virtual ::sal_Bool SAL_CALL isNodeCollapsed( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL makeNodeVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::awt::tree::ExpandVetoException, ::com::sun::star::uno::RuntimeException);
-    virtual ::sal_Bool SAL_CALL isNodeVisible( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL expandNode( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::awt::tree::ExpandVetoException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL collapseNode( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::awt::tree::ExpandVetoException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL addTreeExpansionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeExpansionListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL removeTreeExpansionListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeExpansionListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode > SAL_CALL getNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode > SAL_CALL getClosestNodeForLocation( ::sal_Int32 x, ::sal_Int32 y ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::com::sun::star::awt::Rectangle SAL_CALL getNodeRect( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-    virtual ::sal_Bool SAL_CALL isEditing(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual ::sal_Bool SAL_CALL stopEditing(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL cancelEditing(  ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL startEditingAtNode( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeNode >& Node ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL addTreeEditListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeEditListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
-    virtual void SAL_CALL removeTreeEditListener( const ::com::sun::star::uno::Reference< ::com::sun::star::awt::tree::XTreeEditListener >& Listener ) throw (::com::sun::star::uno::RuntimeException);
-
-    // ::com::sun::star::lang::XServiceInfo
-    DECLIMPL_SERVICEINFO_DERIVED( UnoTreeControl, UnoControlBase, szServiceName_TreeControl )
-
-    using UnoControl::getPeer;
-private:
-    TreeSelectionListenerMultiplexer maSelectionListeners;
-    TreeExpansionListenerMultiplexer maTreeExpansionListeners;
-    TreeEditListenerMultiplexer maTreeEditListeners;
-};
-
 } // toolkit
 
 #endif // _TOOLKIT_TREE_CONTROL_HXX
diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx
index 58ea373..933500d 100644
--- a/toolkit/source/helper/registerservices.cxx
+++ b/toolkit/source/helper/registerservices.cxx
@@ -171,8 +171,6 @@ IMPL_CREATEINSTANCE_CTX( UnoControlRoadmapModel )
 
 IMPL_CREATE_INSTANCE_WITH_GEOMETRY( UnoControlDialogModel )
 
-extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControl_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
-extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL TreeControlModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
 extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL MutableTreeDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
 
 extern "C"
@@ -248,8 +246,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple
         GET_FACTORY( UnoFrameControl, szServiceName_UnoFrameControl, NULL )
         GET_FACTORY( UnoSpinButtonModel, szServiceName_UnoSpinButtonModel, NULL )
         GET_FACTORY( UnoSpinButtonControl, szServiceName_UnoSpinButtonControl, NULL )
-        GET_FACTORY( TreeControl, szServiceName_TreeControl, NULL )
-        GET_FACTORY( TreeControlModel, szServiceName_TreeControlModel, NULL )
         GET_FACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL )
         GET_FACTORY( UnoFixedHyperlinkControl, szServiceName_UnoControlFixedHyperlink, NULL )
         GET_FACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL )
diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component
index ff15583..588e0f2 100644
--- a/toolkit/util/tk.component
+++ b/toolkit/util/tk.component
@@ -78,10 +78,12 @@
     <service name="com.sun.star.awt.TabControllerModel"/>
     <service name="stardiv.vcl.controlmodel.TabController"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.TreeControl">
+  <implementation name="stardiv.Toolkit.TreeControl"
+      constructor="stardiv_Toolkit_TreeControl_get_implementation">
     <service name="com.sun.star.awt.tree.TreeControl"/>
   </implementation>
-  <implementation name="stardiv.Toolkit.TreeControlModel">
+  <implementation name="stardiv.Toolkit.TreeControlModel"
+      constructor="stardiv_Toolkit_TreeControlModel_get_implementation">
     <service name="com.sun.star.awt.tree.TreeControlModel"/>
   </implementation>
   <implementation name="stardiv.Toolkit.UnoButtonControl">
commit 2bc11eb5f42a7ac7e54ce06eb4270998ed293cfd
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Jan 23 16:46:45 2014 +0100

    tk: Constructor feature for DefaultGridColumnModel.
    
    Change-Id: Ia4d20eb2a3c91fbdb1dd85c37b8162c6856d0f28

diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
index 5e89ab0..271b30d 100644
--- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
+++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
@@ -24,6 +24,7 @@
 #include <com/sun/star/awt/grid/XGridColumnModel.hpp>
 #include <com/sun/star/awt/grid/XGridColumn.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
 
 #include <comphelper/sequence.hxx>
 #include <comphelper/componentguard.hxx>
@@ -38,6 +39,7 @@
 using namespace css::awt;
 using namespace css::awt::grid;
 using namespace css::container;
+using namespace css::lang;
 using namespace css::uno;
 using namespace toolkit;
 
@@ -108,7 +110,7 @@ private:
                     ++col
                 )
             {
-                Reference< XCloneable > const xCloneable( *col, UNO_QUERY_THROW );
+                Reference< css::util::XCloneable > const xCloneable( *col, UNO_QUERY_THROW );
                 Reference< XGridColumn > const xClone( xCloneable->createClone(), UNO_QUERY_THROW );
 
                 GridColumn* const pGridColumn = GridColumn::getImplementation( xClone );
@@ -390,7 +392,7 @@ private:
     }
 
     //------------------------------------------------------------------------------------------------------------------
-    Reference< XCloneable > SAL_CALL DefaultGridColumnModel::createClone(  ) throw (RuntimeException)
+    Reference< css::util::XCloneable > SAL_CALL DefaultGridColumnModel::createClone(  ) throw (RuntimeException)
     {
         ::comphelper::ComponentGuard aGuard( *this, rBHelper );
         return new DefaultGridColumnModel( *this );
commit a9f94e571cb5797413d2d03f709084779fcfc914
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Jan 23 16:45:43 2014 +0100

    tk: Constructor feature for DefaultGridColumnModel.
    
    Change-Id: Id790c7af17b4b38de889a44ba1258dd1020054e3

diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
index 558907f..5e89ab0 100644
--- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
+++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx
@@ -18,45 +18,74 @@
  */
 
 
-#include "defaultgridcolumnmodel.hxx"
 #include "gridcolumn.hxx"
 
 #include <com/sun/star/awt/XVclWindowPeer.hpp>
+#include <com/sun/star/awt/grid/XGridColumnModel.hpp>
+#include <com/sun/star/awt/grid/XGridColumn.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
 
 #include <comphelper/sequence.hxx>
 #include <comphelper/componentguard.hxx>
-#include <comphelper/processfactory.hxx>
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/compbase2.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include <toolkit/helper/servicenames.hxx>
 #include <rtl/ustrbuf.hxx>
 #include <tools/diagnose_ex.h>
 
-//......................................................................................................................
-namespace toolkit
-//......................................................................................................................
+#include <vector>
+
+using namespace css::awt;
+using namespace css::awt::grid;
+using namespace css::container;
+using namespace css::uno;
+using namespace toolkit;
+
+namespace {
+
+typedef ::cppu::WeakComponentImplHelper2    <   css::awt::grid::XGridColumnModel
+                                            ,   css::lang::XServiceInfo
+                                            >   DefaultGridColumnModel_Base;
+
+class DefaultGridColumnModel    :public ::cppu::BaseMutex
+                                ,public DefaultGridColumnModel_Base
 {
-    using ::com::sun::star::uno::Reference;
-    using ::com::sun::star::uno::XComponentContext;
-    using ::com::sun::star::lang::XMultiServiceFactory;
-    using ::com::sun::star::uno::RuntimeException;
-    using ::com::sun::star::uno::Sequence;
-    using ::com::sun::star::uno::UNO_QUERY_THROW;
-    using ::com::sun::star::uno::UNO_QUERY;

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list