From 08d10512b4c67ab0a90d7985dc22cc681094393c Mon Sep 17 00:00:00 2001 From: Matúš Kukan Date: Thu, 23 Jan 2014 14:06:12 +0100 Subject: tk: Constructor feature for UnoControlTabPageContainer(Model). Change-Id: I0e32eb49235a1769f8dacc1af95ee863ee514621 --- .../source/controls/controlmodelcontainerbase.cxx | 4 ++-- toolkit/source/controls/tabpagecontainer.cxx | 21 ++++++++++++++++++--- toolkit/source/helper/registerservices.cxx | 5 ----- toolkit/source/helper/servicenames.cxx | 2 -- 4 files changed, 20 insertions(+), 12 deletions(-) (limited to 'toolkit/source') diff --git a/toolkit/source/controls/controlmodelcontainerbase.cxx b/toolkit/source/controls/controlmodelcontainerbase.cxx index 5fc067916021..77ff5753ea68 100644 --- a/toolkit/source/controls/controlmodelcontainerbase.cxx +++ b/toolkit/source/controls/controlmodelcontainerbase.cxx @@ -377,7 +377,7 @@ Reference< XInterface > ControlModelContainerBase::createInstance( const OUStrin pNewModel = new OGeometryControlModel< UnoTreeModel >( m_xContext ); else if ( aServiceSpecifier.equalsAscii( szServiceName_GridControlModel ) ) pNewModel = new OGeometryControlModel< UnoGridModel >( m_xContext ); - else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoControlTabPageContainerModel ) ) + else if ( aServiceSpecifier == "com.sun.star.awt.tab.UnoControlTabPageContainerModel" ) pNewModel = new OGeometryControlModel< UnoControlTabPageContainerModel >( m_xContext ); else if ( aServiceSpecifier.equalsAscii( szServiceName_UnoMultiPageModel ) ) pNewModel = new OGeometryControlModel< UnoMultiPageModel >( m_xContext ); @@ -450,7 +450,7 @@ Sequence< OUString > ControlModelContainerBase::getAvailableServiceNames() throw pNames[19] = OUString::createFromAscii( szServiceName2_UnoControlRoadmapModel ); pNames[20] = OUString::createFromAscii( szServiceName_TreeControlModel ); pNames[21] = OUString::createFromAscii( szServiceName_GridControlModel ); - pNames[22] = OUString::createFromAscii( szServiceName_UnoControlTabPageContainerModel ); + pNames[22] = OUString( "com.sun.star.awt.tab.UnoControlTabPageContainerModel"); pNames[23] = OUString( "com.sun.star.awt.tab.UnoControlTabPageModel" ); pNames[24] = OUString::createFromAscii( szServiceName_UnoMultiPageModel ); pNames[25] = OUString::createFromAscii( szServiceName_UnoFrameModel ); diff --git a/toolkit/source/controls/tabpagecontainer.cxx b/toolkit/source/controls/tabpagecontainer.cxx index cdb038ceff69..7ddecc262ef8 100644 --- a/toolkit/source/controls/tabpagecontainer.cxx +++ b/toolkit/source/controls/tabpagecontainer.cxx @@ -28,7 +28,6 @@ #include #include -#include #include #include #include @@ -62,7 +61,7 @@ UnoControlTabPageContainerModel::UnoControlTabPageContainerModel( const Referenc OUString UnoControlTabPageContainerModel::getServiceName() throw(RuntimeException) { - return OUString::createFromAscii( szServiceName_UnoControlTabPageContainerModel ); + return OUString("com.sun.star.awt.tab.UnoControlTabPageContainerModel"); } uno::Any UnoControlTabPageContainerModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const @@ -70,7 +69,7 @@ uno::Any UnoControlTabPageContainerModel::ImplGetDefaultValue( sal_uInt16 nPropI switch(nPropId) { case BASEPROPERTY_DEFAULTCONTROL: - return uno::makeAny( OUString::createFromAscii( szServiceName_UnoControlTabPageContainer ) ); + return uno::makeAny( OUString("com.sun.star.awt.tab.UnoControlTabPageContainer") ); case BASEPROPERTY_BORDER: return uno::makeAny((sal_Int16) 0); // No Border default: @@ -333,4 +332,20 @@ void SAL_CALL UnoControlTabPageContainer::addControl( const OUString& Name, cons xContainerListener->elementInserted( aEvent ); } +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +stardiv_Toolkit_UnoControlTabPageContainerModel_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence const &) +{ + return cppu::acquire(new UnoControlTabPageContainerModel(context)); +} + +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +stardiv_Toolkit_UnoControlTabPageContainer_get_implementation( + css::uno::XComponentContext *context, + css::uno::Sequence const &) +{ + return cppu::acquire(new UnoControlTabPageContainer(context)); +} + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index e84f45de3405..0bbecd76ac36 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -41,7 +41,6 @@ #include #include #include "toolkit/controls/tkspinbutton.hxx" -#include #include "toolkit/dllapi.h" #include #include @@ -169,8 +168,6 @@ IMPL_CREATEINSTANCE( VCLXPopupMenu ) IMPL_CREATEINSTANCE( VCLXPrinterServer ) IMPL_CREATEINSTANCE( UnoRoadmapControl ) IMPL_CREATEINSTANCE_CTX( UnoControlRoadmapModel ) -IMPL_CREATEINSTANCE_CTX( UnoControlTabPageContainer ) -IMPL_CREATEINSTANCE_CTX( UnoControlTabPageContainerModel ) IMPL_CREATE_INSTANCE_WITH_GEOMETRY( UnoControlDialogModel ) @@ -270,8 +267,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple GET_FACTORY( DefaultGridColumnModel, szServiceName_DefaultGridColumnModel, NULL ); GET_FACTORY_WITH_IMPL_PREFIX( GridColumn, "org.openoffice.comp.toolkit", szServiceName_GridColumn, NULL ); GET_FACTORY_WITH_IMPL_PREFIX( SortableGridDataModel, "org.openoffice.comp.toolkit", szServiceName_SortableGridDataModel, NULL ); - GET_FACTORY( UnoControlTabPageContainerModel, szServiceName_UnoControlTabPageContainerModel, NULL ) - GET_FACTORY( UnoControlTabPageContainer, szServiceName_UnoControlTabPageContainer, NULL ) if ( rtl_str_compare( sImplementationName, "com.sun.star.awt.comp.AsyncCallback" ) == 0 ) return comp_AsyncCallback_component_getFactory( sImplementationName, _pServiceManager, _pRegistryKey ); diff --git a/toolkit/source/helper/servicenames.cxx b/toolkit/source/helper/servicenames.cxx index 3610daaf45bf..6d20891a164f 100644 --- a/toolkit/source/helper/servicenames.cxx +++ b/toolkit/source/helper/servicenames.cxx @@ -94,8 +94,6 @@ const sal_Char szServiceName_GridControlModel[] = "com.sun.star.awt.grid.UnoCont const sal_Char szServiceName_DefaultGridDataModel[] = "com.sun.star.awt.grid.DefaultGridDataModel"; const sal_Char szServiceName_DefaultGridColumnModel[] = "com.sun.star.awt.grid.DefaultGridColumnModel"; const sal_Char szServiceName_GridColumn[] = "com.sun.star.awt.grid.GridColumn"; -const sal_Char szServiceName_UnoControlTabPageContainerModel[] = "com.sun.star.awt.tab.UnoControlTabPageContainerModel"; -const sal_Char szServiceName_UnoControlTabPageContainer[] = "com.sun.star.awt.tab.UnoControlTabPageContainer"; const sal_Char szServiceName_SortableGridDataModel[] = "com.sun.star.awt.grid.SortableGridDataModel"; /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit