diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-12-17 13:38:24 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2010-12-17 13:38:24 +0100 |
commit | 6531aff8404bb4a26f4dfeaf9c253c0147e3fa34 (patch) | |
tree | 7eadf1fdd6672c0f20651607f8ca6c5b8d099c90 /toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | |
parent | 89b5dccad85eb95058d127108734ae02ab27bc9a (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/source/controls/grid/defaultgridcolumnmodel.cxx')
-rw-r--r-- | toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | 6 |
1 files changed, 6 insertions, 0 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; |