diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-24 11:01:14 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-24 12:21:23 +0100 |
commit | c1fa1962ec165dca73e1ec3154ce8e8c90a5c16b (patch) | |
tree | 9639a6128a3355e7481ccfba1270850e5b1aa709 /toolkit | |
parent | cbdc2cfc1a7231234d5a5fc4855627c048b6fcea (diff) |
tk: Ctor feature for VCLX classes.
Change-Id: I717638a3df4d6ed71d19f7bf4c2e574b37260739
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/awt/vclxmenu.cxx | 15 | ||||
-rw-r--r-- | toolkit/source/awt/vclxpointer.cxx | 9 | ||||
-rw-r--r-- | toolkit/source/awt/vclxprinter.cxx | 7 | ||||
-rw-r--r-- | toolkit/source/helper/registerservices.cxx | 8 | ||||
-rw-r--r-- | toolkit/util/tk.component | 12 |
5 files changed, 38 insertions, 13 deletions
diff --git a/toolkit/source/awt/vclxmenu.cxx b/toolkit/source/awt/vclxmenu.cxx index 48d52dc29530..ab25dfdf518a 100644 --- a/toolkit/source/awt/vclxmenu.cxx +++ b/toolkit/source/awt/vclxmenu.cxx @@ -936,6 +936,13 @@ VCLXMenuBar::VCLXMenuBar( MenuBar* pMenuBar ) : VCLXMenu( (Menu *)pMenuBar ) DBG_CTOR( VCLXMenuBar, 0 ); } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +stardiv_Toolkit_VCLXMenuBar_get_implementation( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new VCLXMenuBar()); +} DBG_NAME(VCLXPopupMenu); @@ -950,4 +957,12 @@ VCLXPopupMenu::VCLXPopupMenu( PopupMenu* pPopMenu ) : VCLXMenu( (Menu *)pPopMenu DBG_CTOR( VCLXPopupMenu, 0 ); } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +stardiv_Toolkit_VCLXPopupMenu_get_implementation( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new VCLXPopupMenu()); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxpointer.cxx b/toolkit/source/awt/vclxpointer.cxx index 316e4463845a..b556d1bbdacf 100644 --- a/toolkit/source/awt/vclxpointer.cxx +++ b/toolkit/source/awt/vclxpointer.cxx @@ -17,6 +17,7 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include <com/sun/star/uno/XComponentContext.hpp> #include <toolkit/awt/vclxpointer.hxx> #include <toolkit/helper/macros.hxx> #include <cppuhelper/typeprovider.hxx> @@ -64,6 +65,12 @@ sal_Int32 VCLXPointer::getType() throw(::com::sun::star::uno::RuntimeException) return (sal_Int32)maPointer.GetStyle(); } - +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +stardiv_Toolkit_VCLXPointer_get_implementation( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new VCLXPointer()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/awt/vclxprinter.cxx b/toolkit/source/awt/vclxprinter.cxx index 0532e6272879..9e452a6ea3a4 100644 --- a/toolkit/source/awt/vclxprinter.cxx +++ b/toolkit/source/awt/vclxprinter.cxx @@ -380,5 +380,12 @@ VCLXInfoPrinter::~VCLXInfoPrinter() return xP; } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +stardiv_Toolkit_VCLXPrinterServer_get_implementation( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) +{ + return cppu::acquire(new VCLXPrinterServer()); +} /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index ebf938496039..2662ebd4d311 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -108,10 +108,6 @@ IMPL_CREATEINSTANCE( UnoFormattedFieldControl ) IMPL_CREATEINSTANCE_CTX( UnoMultiPageControl ) IMPL_CREATEINSTANCE_CTX( UnoPageControl ) IMPL_CREATEINSTANCE_CTX( UnoFrameControl ) -IMPL_CREATEINSTANCE( VCLXMenuBar ) -IMPL_CREATEINSTANCE( VCLXPointer ) -IMPL_CREATEINSTANCE( VCLXPopupMenu ) -IMPL_CREATEINSTANCE( VCLXPrinterServer ) extern "C" { @@ -125,13 +121,9 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple { ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xServiceFactory = static_cast< ::com::sun::star::lang::XMultiServiceFactory* >( _pServiceManager ); - GET_FACTORY( VCLXPopupMenu, szServiceName_PopupMenu, szServiceName2_PopupMenu ) - GET_FACTORY( VCLXMenuBar, szServiceName_MenuBar, szServiceName2_MenuBar ) - GET_FACTORY( VCLXPointer, szServiceName_Pointer, szServiceName2_Pointer ) GET_FACTORY( UnoDialogControl, szServiceName_UnoControlDialog, szServiceName2_UnoControlDialog ) GET_FACTORY( UnoFormattedFieldControl, szServiceName_UnoControlFormattedField, szServiceName2_UnoControlFormattedField ) GET_FACTORY( UnoControlFormattedFieldModel, szServiceName_UnoControlFormattedFieldModel, szServiceName2_UnoControlFormattedFieldModel ) - GET_FACTORY( VCLXPrinterServer, szServiceName_PrinterServer, szServiceName2_PrinterServer ) GET_FACTORY( UnoMultiPageModel, szServiceName_UnoMultiPageModel, NULL ) GET_FACTORY( UnoMultiPageControl, szServiceName_UnoMultiPageControl, NULL ) GET_FACTORY( UnoPageModel, szServiceName_UnoPageModel, NULL ) diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component index 9d5b21c757f4..8ca92f0d4ec3 100644 --- a/toolkit/util/tk.component +++ b/toolkit/util/tk.component @@ -338,19 +338,23 @@ <service name="com.sun.star.awt.UnoControlTimeField"/> <service name="stardiv.vcl.control.TimeField"/> </implementation> - <implementation name="stardiv.Toolkit.VCLXMenuBar"> + <implementation name="stardiv.Toolkit.VCLXMenuBar" + constructor="stardiv_Toolkit_VCLXMenuBar_get_implementation"> <service name="com.sun.star.awt.MenuBar"/> <service name="stardiv.vcl.MenuBar"/> </implementation> - <implementation name="stardiv.Toolkit.VCLXPointer"> + <implementation name="stardiv.Toolkit.VCLXPointer" + constructor="stardiv_Toolkit_VCLXPointer_get_implementation"> <service name="com.sun.star.awt.Pointer"/> <service name="stardiv.vcl.Pointer"/> </implementation> - <implementation name="stardiv.Toolkit.VCLXPopupMenu"> + <implementation name="stardiv.Toolkit.VCLXPopupMenu" + constructor="stardiv_Toolkit_VCLXPopupMenu_get_implementation"> <service name="com.sun.star.awt.PopupMenu"/> <service name="stardiv.vcl.PopupMenu"/> </implementation> - <implementation name="stardiv.Toolkit.VCLXPrinterServer"> + <implementation name="stardiv.Toolkit.VCLXPrinterServer" + constructor="stardiv_Toolkit_VCLXPrinterServer_get_implementation"> <service name="com.sun.star.awt.PrinterServer"/> <service name="stardiv.vcl.PrinterServer"/> </implementation> |