tk: Ctor feature for VCLX classes.

Change-Id: I717638a3df4d6ed71d19f7bf4c2e574b37260739
This commit is contained in:
Matúš Kukan
2014-01-24 11:01:14 +01:00
parent cbdc2cfc1a
commit c1fa1962ec
5 changed files with 38 additions and 13 deletions

View File

@@ -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: */

View File

@@ -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: */

View File

@@ -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: */

View File

@@ -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 )

View File

@@ -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>