summaryrefslogtreecommitdiff
path: root/toolkit/source
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-12-07 09:51:15 +0100
committerFrank Schoenheit [fs] <frank.schoenheit@oracle.com>2010-12-07 09:51:15 +0100
commit2d8c797828962d0a5fb0725c15d1de6b33a04e8b (patch)
tree8e7004642e703cafe273b0e86707630ea7e8ce59 /toolkit/source
parentbbef9c4dba3edbf69052229fc02f57301a1545e9 (diff)
gridsort: no reason to burden each and every client with creating a default Data/Column model - do this in the ctor of the grid model. If clients want to override this, they of course still can do
Diffstat (limited to 'toolkit/source')
-rw-r--r--toolkit/source/controls/grid/gridcontrol.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/toolkit/source/controls/grid/gridcontrol.cxx b/toolkit/source/controls/grid/gridcontrol.cxx
index 491e5b8bb5cc..e15e6683a902 100644
--- a/toolkit/source/controls/grid/gridcontrol.cxx
+++ b/toolkit/source/controls/grid/gridcontrol.cxx
@@ -85,6 +85,15 @@ UnoGridModel::UnoGridModel( const ::com::sun::star::uno::Reference< ::com::sun::
ImplRegisterProperty( BASEPROPERTY_GRID_HEADER_BACKGROUND );
ImplRegisterProperty( BASEPROPERTY_GRID_LINE_COLOR );
ImplRegisterProperty( BASEPROPERTY_GRID_ROW_BACKGROUND );
+
+ osl_incrementInterlockedCount( &m_refCount );
+ {
+ setFastPropertyValue( BASEPROPERTY_GRID_COLUMNMODEL,
+ makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridColumnModel" ) ) );
+ setFastPropertyValue( BASEPROPERTY_GRID_DATAMODEL,
+ makeAny( maContext.createComponent( "com.sun.star.awt.grid.DefaultGridDataModel" ) ) );
+ }
+ osl_decrementInterlockedCount( &m_refCount );
}
UnoGridModel::UnoGridModel( const UnoGridModel& rModel )