From 6531aff8404bb4a26f4dfeaf9c253c0147e3fa34 Mon Sep 17 00:00:00 2001 From: "Frank Schoenheit [fs]" Date: Fri, 17 Dec 2010 13:38:24 +0100 Subject: gridsort: more refactoring of the relationship (especially with respect to listeners) between the various table/grid classes. Now we're not as strict as before with respect to the construction order. Also, updating various aspects of a column model (e.g. inserting a new column) will work now even if there already is a control for the model. Still a long way to go to fix some more obvious problems, which make using the grid control API a PITA (you're lost if you do now know *exactly* which things to do in which order). --- toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | 6 ++++++ toolkit/source/controls/grid/gridcontrol.cxx | 4 ++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'toolkit/source') diff --git a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx index a48f75966bde..2a5b5683efad 100644 --- a/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx +++ b/toolkit/source/controls/grid/defaultgridcolumnmodel.cxx @@ -36,6 +36,7 @@ #include #include +#include #include //...................................................................................................................... @@ -156,6 +157,11 @@ namespace toolkit for ( sal_Int32 i=0; i xColumn( m_aContext.createComponent( "com.sun.star.awt.grid.GridColumn" ), UNO_QUERY_THROW ); + ::rtl::OUStringBuffer colTitle; + colTitle.appendAscii( "Column " ); + colTitle.append( i ); + xColumn->setTitle( colTitle.makeStringAndClear() ); + xColumn->setPreferredWidth( 80 /* APPFONT */ ); ContainerEvent aEvent; aEvent.Source = *this; diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx index 57b5086e2272..cc16d1f2c355 100644 --- a/toolkit/source/controls/grid/gridcontrol.cxx +++ b/toolkit/source/controls/grid/gridcontrol.cxx @@ -127,9 +127,9 @@ Any UnoGridModel::ImplGetDefaultValue( sal_uInt16 nPropId ) const case BASEPROPERTY_GRID_SELECTIONMODE: return uno::makeAny( SelectionType(1) ); case BASEPROPERTY_GRID_SHOWROWHEADER: - return uno::makeAny( (sal_Bool)sal_False ); + return uno::makeAny( (sal_Bool)sal_True ); case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: - return uno::makeAny( (sal_Bool)sal_False ); + return uno::makeAny( (sal_Bool)sal_True ); case BASEPROPERTY_GRID_DATAMODEL: return uno::makeAny( Reference ()); case BASEPROPERTY_GRID_COLUMNMODEL: -- cgit