summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-06-06 16:02:46 +0200
committerNoel Grandin <noel@peralex.com>2013-06-10 10:20:44 +0200
commit34e5e9c650ef8653b12d16a1d5de535b5f5b3ead (patch)
treeef14b1a9a94eb2d1d9ee79db05e75d78dc98719e
parent670e2329df5cccaacd0e43d3656aeb112488e8ef (diff)
fdo#46808, Convert awt::grid::DefaultGridColumnModel to new style
Change-Id: Id1b63847e21954c689dfa3c549713dbf5b1858c3
-rw-r--r--offapi/UnoApi_offapi.mk2
-rw-r--r--offapi/com/sun/star/awt/grid/DefaultGridColumnModel.idl5
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx4
3 files changed, 4 insertions, 7 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 081a0d3c799a..5835d63d0acc 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -64,6 +64,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt,\
UnoControlDialogModelProvider \
))
$(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,offapi/com/sun/star/awt/grid,\
+ DefaultGridColumnModel \
DefaultGridDataModel \
SortableGridDataModel \
))
@@ -579,7 +580,6 @@ $(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/awt,\
UnoControlTimeFieldModel \
))
$(eval $(call gb_UnoApi_add_idlfiles_noheader,offapi,offapi/com/sun/star/awt/grid,\
- DefaultGridColumnModel \
GridColumn \
UnoControlGrid \
UnoControlGridModel \
diff --git a/offapi/com/sun/star/awt/grid/DefaultGridColumnModel.idl b/offapi/com/sun/star/awt/grid/DefaultGridColumnModel.idl
index 3ff19f0128ad..4f7a9a8338a7 100644
--- a/offapi/com/sun/star/awt/grid/DefaultGridColumnModel.idl
+++ b/offapi/com/sun/star/awt/grid/DefaultGridColumnModel.idl
@@ -28,10 +28,7 @@
/** If you do not want to implement the XGridColumnModel yourself, use this service.
@since OOo 3.3
*/
-service DefaultGridColumnModel
-{
- interface com::sun::star::awt::grid::XGridColumnModel;
-};
+service DefaultGridColumnModel : com::sun::star::awt::grid::XGridColumnModel;
}; }; }; };};
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index 8b04f51f1dc3..939e6f16b610 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -27,7 +27,7 @@
#include <com/sun/star/awt/grid/XMutableGridDataModel.hpp>
#include <com/sun/star/awt/grid/DefaultGridDataModel.hpp>
#include <com/sun/star/awt/grid/SortableGridDataModel.hpp>
-#include <com/sun/star/awt/grid/XGridColumnModel.hpp>
+#include <com/sun/star/awt/grid/DefaultGridColumnModel.hpp>
#include <toolkit/helper/unopropertyarrayhelper.hxx>
#include <toolkit/helper/property.hxx>
#include <com/sun/star/awt/XVclWindowPeer.hpp>
@@ -61,7 +61,7 @@ namespace
Reference< XGridColumnModel > lcl_getDefaultColumnModel_throw( const Reference<XComponentContext> & i_context )
{
- Reference< XGridColumnModel > const xColumnModel( i_context->getServiceManager()->createInstanceWithContext( "com.sun.star.awt.grid.DefaultGridColumnModel", i_context ), UNO_QUERY_THROW );
+ Reference< XGridColumnModel > const xColumnModel = DefaultGridColumnModel::create( i_context );
return xColumnModel;
}
}