diff options
author | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-24 09:42:42 +0100 |
---|---|---|
committer | Matúš Kukan <matus.kukan@collabora.com> | 2014-01-24 12:21:21 +0100 |
commit | e626b730dfdd34a25bce1f0cd9b5889e2a8482af (patch) | |
tree | c4186e2136aa0758aed1da75577a9374131704e2 /toolkit | |
parent | 3961bcb5f46331a1e6b4ce7f334ba6bbde11c899 (diff) |
tk: Constructor feature for MutableTreeDataModel.
Change-Id: I9cd12e3bdfc20d4305e3daec6d0a6cffa599e000
Diffstat (limited to 'toolkit')
-rw-r--r-- | toolkit/source/controls/tree/treedatamodel.cxx | 12 | ||||
-rw-r--r-- | toolkit/source/helper/registerservices.cxx | 3 | ||||
-rw-r--r-- | toolkit/util/tk.component | 3 |
3 files changed, 9 insertions, 9 deletions
diff --git a/toolkit/source/controls/tree/treedatamodel.cxx b/toolkit/source/controls/tree/treedatamodel.cxx index 01fb0267a670..b9b77f0806d5 100644 --- a/toolkit/source/controls/tree/treedatamodel.cxx +++ b/toolkit/source/controls/tree/treedatamodel.cxx @@ -20,8 +20,8 @@ #include <com/sun/star/awt/tree/XMutableTreeDataModel.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/lang/XUnoTunnel.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/implbase2.hxx> -#include <cppuhelper/implbase3.hxx> #include <rtl/ref.hxx> #include <toolkit/helper/mutexandbroadcasthelper.hxx> #include <toolkit/helper/servicenames.hxx> @@ -32,8 +32,7 @@ using namespace ::com::sun::star::awt; using namespace ::com::sun::star::awt::tree; using namespace ::com::sun::star::lang; -namespace toolkit -{ +namespace { enum broadcast_type { nodes_changed, nodes_inserted, nodes_removed, structure_changed }; @@ -652,9 +651,12 @@ Sequence< OUString > SAL_CALL MutableTreeNode::getSupportedServiceNames( ) thro } -Reference< XInterface > SAL_CALL MutableTreeDataModel_CreateInstance( const Reference< XMultiServiceFactory >& ) +extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL +stardiv_Toolkit_MutableTreeDataModel_get_implementation( + css::uno::XComponentContext *, + css::uno::Sequence<css::uno::Any> const &) { - return Reference < XInterface >( ( ::cppu::OWeakObject* ) new ::toolkit::MutableTreeDataModel ); + return cppu::acquire(new MutableTreeDataModel()); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx index a4c1e857a43d..c6512caff30b 100644 --- a/toolkit/source/helper/registerservices.cxx +++ b/toolkit/source/helper/registerservices.cxx @@ -121,8 +121,6 @@ IMPL_CREATEINSTANCE( VCLXPrinterServer ) IMPL_CREATEINSTANCE( UnoRoadmapControl ) IMPL_CREATEINSTANCE_CTX( UnoControlRoadmapModel ) -extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL MutableTreeDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& ); - extern "C" { @@ -156,7 +154,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple GET_FACTORY( UnoPageControl, szServiceName_UnoPageControl, NULL ) GET_FACTORY( UnoFrameModel, szServiceName_UnoFrameModel, NULL ) GET_FACTORY( UnoFrameControl, szServiceName_UnoFrameControl, NULL ) - GET_FACTORY( MutableTreeDataModel, szServiceName_MutableTreeDataModel, NULL ) } return pRet; } diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component index cfaa1b733348..896042b96d94 100644 --- a/toolkit/util/tk.component +++ b/toolkit/util/tk.component @@ -67,7 +67,8 @@ constructor="stardiv_Toolkit_GridControlModel_get_implementation"> <service name="com.sun.star.awt.grid.UnoControlGridModel"/> </implementation> - <implementation name="stardiv.Toolkit.MutableTreeDataModel"> + <implementation name="stardiv.Toolkit.MutableTreeDataModel" + constructor="stardiv_Toolkit_MutableTreeDataModel_get_implementation"> <service name="com.sun.star.awt.tree.MutableTreeDataModel"/> </implementation> <implementation name="stardiv.Toolkit.StdTabController"> |