diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-23 14:06:12 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-23 23:39:02 +0100 |
commit | 08d10512b4c67ab0a90d7985dc22cc681094393c (patch) | |
tree | 203ad649f71c3f9b0363b69782c860a834f8e490 | |
parent | badc48eb755e2cd9eaa96c228987948a68de8a63 (diff) |
tk: Constructor feature for UnoControlTabPageContainer(Model).
Change-Id: I0e32eb49235a1769f8dacc1af95ee863ee514621
-rw-r--r-- | include/toolkit/controls/tabpagecontainer.hxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/controlmodelcontainerbase.cxx | 4 | ||||
-rw-r--r-- | toolkit/source/controls/tabpagecontainer.cxx | 21 | ||||
-rw-r--r-- | toolkit/source/helper/registerservices.cxx | 5 | ||||
-rw-r--r-- | toolkit/source/helper/servicenames.cxx | 2 | ||||
-rw-r--r-- | toolkit/util/tk.component | 6 |
6 files changed, 26 insertions, 16 deletions
diff --git a/include/toolkit/controls/tabpagecontainer.hxx b/include/toolkit/controls/tabpagecontainer.hxx index 502ff9f97a19..2a56b03f6385 100644 --- a/include/toolkit/controls/tabpagecontainer.hxx +++ b/include/toolkit/controls/tabpagecontainer.hxx @@ -60,7 +60,7 @@ public: OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainerModel, UnoControlModel, szServiceName_UnoControlTabPageContainerModel ) + DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainerModel, UnoControlModel, "com.sun.star.awt.tab.UnoControlTabPageContainerModel" ) // XTabPageContainerModel virtual ::com::sun::star::uno::Reference< ::com::sun::star::awt::tab::XTabPageModel > SAL_CALL createTabPage( ::sal_Int16 TabPageID ) throw (::com::sun::star::uno::RuntimeException); @@ -120,7 +120,7 @@ public: virtual void SAL_CALL addControl( const OUString& Name, const ::com::sun::star::uno::Reference< ::com::sun::star::awt::XControl >& Control ) throw (::com::sun::star::uno::RuntimeException); // ::com::sun::star::lang::XServiceInfo - DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainer, UnoControlBase, szServiceName_UnoControlTabPageContainer ) + DECLIMPL_SERVICEINFO_DERIVED( UnoControlTabPageContainer, UnoControlBase, "com.sun.star.awt.tab.UnoControlTabPageContainer" ) // using UnoControl::getPeer; protected: 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 <com/sun/star/awt/XVclWindowPeer.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <comphelper/processfactory.hxx> #include <osl/diagnose.h> #include <tools/diagnose_ex.h> #include <vcl/svapp.hxx> @@ -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<css::uno::Any> 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<css::uno::Any> 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 <toolkit/controls/roadmapcontrol.hxx> #include <toolkit/controls/tkscrollbar.hxx> #include "toolkit/controls/tkspinbutton.hxx" -#include <toolkit/controls/tabpagecontainer.hxx> #include "toolkit/dllapi.h" #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/uno/XComponentContext.hpp> @@ -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: */ diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component index 07de282fb56c..1abea8c5a524 100644 --- a/toolkit/util/tk.component +++ b/toolkit/util/tk.component @@ -34,10 +34,12 @@ constructor="stardiv_Toolkit_UnoControlTabPageModel_get_implementation"> <service name="com.sun.star.awt.tab.UnoControlTabPageModel"/> </implementation> - <implementation name="stardiv.Toolkit.UnoControlTabPageContainerModel"> + <implementation name="stardiv.Toolkit.UnoControlTabPageContainerModel" + constructor="stardiv_Toolkit_UnoControlTabPageContainerModel_get_implementation"> <service name="com.sun.star.awt.tab.UnoControlTabPageContainerModel"/> </implementation> - <implementation name="stardiv.Toolkit.UnoControlTabPageContainer"> + <implementation name="stardiv.Toolkit.UnoControlTabPageContainer" + constructor="stardiv_Toolkit_UnoControlTabPageContainer_get_implementation"> <service name="com.sun.star.awt.tab.UnoControlTabPageContainer"/> </implementation> <implementation name="stardiv.Toolkit.DefaultGridColumnModel"> |