From c1fa1962ec165dca73e1ec3154ce8e8c90a5c16b Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Fri, 24 Jan 2014 11:01:14 +0100 Subject: tk: Ctor feature for VCLX classes. Change-Id: I717638a3df4d6ed71d19f7bf4c2e574b37260739 --- toolkit/source/awt/vclxmenu.cxx | 15 +++++++++++++++ toolkit/source/awt/vclxpointer.cxx | 9 ++++++++- toolkit/source/awt/vclxprinter.cxx | 7 +++++++ toolkit/source/helper/registerservices.cxx | 8 -------- toolkit/util/tk.component | 12 ++++++++---- 5 files changed, 38 insertions(+), 13 deletions(-) (limited to 'toolkit') 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 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 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 #include #include #include @@ -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 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 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 @@ - + - + - + - + -- cgit