summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-12-17 13:38:24 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-12-17 13:38:24 +0100
commit6531aff8404bb4a26f4dfeaf9c253c0147e3fa34 (patch)
tree7eadf1fdd6672c0f20651607f8ca6c5b8d099c90 /toolkit
parent89b5dccad85eb95058d127108734ae02ab27bc9a (diff)
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).
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/controls/grid/defaultgridcolumnmodel.cxx6
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx4
2 files changed, 8 insertions, 2 deletions
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 <comphelper/sequence.hxx>
#include <toolkit/helper/servicenames.hxx>
+#include <rtl/ustrbuf.hxx>
#include <tools/diagnose_ex.h>
//......................................................................................................................
@@ -156,6 +157,11 @@ namespace toolkit
for ( sal_Int32 i=0; i<rowElements; ++i )
{
const Reference< XGridColumn > 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<XGridDataModel> ());
case BASEPROPERTY_GRID_COLUMNMODEL: