summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorMatúš Kukan <matus.kukan@collabora.com>2014-01-23 16:26:39 +0100
committerMatúš Kukan <matus.kukan@collabora.com>2014-01-23 23:39:06 +0100
commit4b36dcefe5f57ba257dc0c80551aef4596bf1258 (patch)
tree043da670a76b480078b80038ec0e4b2214ddbc84 /toolkit
parent624b7e586d79121d7bdce874a325eabde105f270 (diff)
tk: Constructor feature for toolkit::GridColumn.
Change-Id: I6eec5539fe36328ea30d08d611b3dfeffc56808b
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/grid/gridcolumn.cxx11
-rw-r--r--toolkit/source/helper/registerservices.cxx2
-rw-r--r--toolkit/util/tk.component3
3 files changed, 9 insertions, 7 deletions
diff --git a/toolkit/source/controls/grid/gridcolumn.cxx b/toolkit/source/controls/grid/gridcolumn.cxx
index bfaf53bfa97b..644d9cd1aa5d 100644
--- a/toolkit/source/controls/grid/gridcolumn.cxx
+++ b/toolkit/source/controls/grid/gridcolumn.cxx
@@ -19,10 +19,10 @@
#include "gridcolumn.hxx"
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <comphelper/sequence.hxx>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <toolkit/helper/servicenames.hxx>
namespace toolkit
{
@@ -272,7 +272,7 @@ namespace toolkit
::com::sun::star::uno::Sequence< OUString > SAL_CALL GridColumn::getSupportedServiceNames( ) throw (RuntimeException)
{
- const OUString aServiceName( OUString::createFromAscii( szServiceName_GridColumn ) );
+ const OUString aServiceName("com.sun.star.awt.grid.GridColumn");
const Sequence< OUString > aSeq( &aServiceName, 1 );
return aSeq;
}
@@ -308,9 +308,12 @@ namespace toolkit
}
}
-::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& )
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface * SAL_CALL
+org_openoffice_comp_toolkit_GridColumn_get_implementation(
+ css::uno::XComponentContext *,
+ css::uno::Sequence<css::uno::Any> const &)
{
- return *( new ::toolkit::GridColumn );
+ return cppu::acquire(new toolkit::GridColumn());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/toolkit/source/helper/registerservices.cxx b/toolkit/source/helper/registerservices.cxx
index 20d3475eb047..dc994c445083 100644
--- a/toolkit/source/helper/registerservices.cxx
+++ b/toolkit/source/helper/registerservices.cxx
@@ -176,7 +176,6 @@ extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL
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 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridDataModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL DefaultGridColumnModel_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
-extern ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL GridColumn_CreateInstance( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& );
extern "C"
{
@@ -258,7 +257,6 @@ TOOLKIT_DLLPUBLIC void* SAL_CALL tk_component_getFactory( const sal_Char* sImple
GET_FACTORY( UnoControlFixedHyperlinkModel, szServiceName_UnoControlFixedHyperlinkModel, NULL )
GET_FACTORY( DefaultGridDataModel, szServiceName_DefaultGridDataModel, NULL );
GET_FACTORY( DefaultGridColumnModel, szServiceName_DefaultGridColumnModel, NULL );
- GET_FACTORY_WITH_IMPL_PREFIX( GridColumn, "org.openoffice.comp.toolkit", szServiceName_GridColumn, NULL );
}
return pRet;
}
diff --git a/toolkit/util/tk.component b/toolkit/util/tk.component
index 9a09d0ebe791..683bb8fcdd23 100644
--- a/toolkit/util/tk.component
+++ b/toolkit/util/tk.component
@@ -49,7 +49,8 @@
<implementation name="stardiv.Toolkit.DefaultGridDataModel">
<service name="com.sun.star.awt.grid.DefaultGridDataModel"/>
</implementation>
- <implementation name="org.openoffice.comp.toolkit.GridColumn">
+ <implementation name="org.openoffice.comp.toolkit.GridColumn"
+ constructor="org_openoffice_comp_toolkit_GridColumn_get_implementation">
<service name="com.sun.star.awt.grid.GridColumn"/>
</implementation>
<implementation name="org.openoffice.comp.toolkit.SortableGridDataModel"