diff options
author | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-12 12:34:24 +0100 |
---|---|---|
committer | Frank Schoenheit [fs] <frank.schoenheit@oracle.com> | 2011-01-12 12:34:24 +0100 |
commit | 6c8d7babb69985bf3f676b59cf767952c971ebc5 (patch) | |
tree | f8eee940fabd76bb2e80c9b95806dd98722b9aac /svtools/source/uno | |
parent | 76365bac02b0ee3ffc3755699034b8d790d2c97a (diff) |
gridsort: reworked the color model for grid controls. Now supporting more than two alternating colors,
having more reasonable defaults for the colors (VOID instead of some hard-coded values, which thus are unusable).
Also, introduced new property UseGridLines controlling whether or not to paint the table grid.
Diffstat (limited to 'svtools/source/uno')
-rw-r--r-- | svtools/source/uno/svtxgridcontrol.cxx | 169 | ||||
-rw-r--r-- | svtools/source/uno/unocontroltablemodel.cxx | 161 | ||||
-rw-r--r-- | svtools/source/uno/unocontroltablemodel.hxx | 66 |
3 files changed, 262 insertions, 134 deletions
diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 69df1c929218..ea0a41688355 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -31,6 +31,7 @@ #include "accessibletableimp.hxx" #include <com/sun/star/view/SelectionType.hpp> #include "svtools/table/tablecontrolinterface.hxx" +#include "svtools/table/gridtablerenderer.hxx" #include "svtools/table/tablecontrol.hxx" #include "unocontroltablemodel.hxx" #include <comphelper/sequence.hxx> @@ -155,7 +156,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An switch( GetPropertyId( PropertyName ) ) { - case BASEPROPERTY_ROW_HEADER_WIDTH: + case BASEPROPERTY_ROW_HEADER_WIDTH: { sal_Int32 rowHeaderWidth( -1 ); aValue >>= rowHeaderWidth; @@ -184,6 +185,18 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } break; + case BASEPROPERTY_USE_GRID_LINES: + { + GridTableRenderer* pGridRenderer = dynamic_cast< GridTableRenderer* >( + m_pTableModel->getRenderer().get() ); + ENSURE_OR_BREAK( pGridRenderer != NULL, "SVTXGridControl::setProperty(UseGridLines): invalid renderer!" ); + sal_Bool bUseGridLines = sal_False; + OSL_VERIFY( aValue >>= bUseGridLines ); + pGridRenderer->useGridLines( bUseGridLines ); + pTable->Invalidate(); + } + break; + case BASEPROPERTY_ROW_HEIGHT: { sal_Int32 rowHeight = 0; @@ -239,6 +252,7 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An m_pTableModel->setHorizontalScrollbarVisibility( bHScroll ? ScrollbarShowAlways : ScrollbarShowSmart ); break; } + case BASEPROPERTY_VSCROLL: { sal_Bool bVScroll = true; @@ -258,51 +272,37 @@ void SVTXGridControl::setProperty( const ::rtl::OUString& PropertyName, const An } break; } - case BASEPROPERTY_GRID_HEADER_BACKGROUND: - { - sal_Int32 colorHeader = COL_TRANSPARENT; - if( aValue >>= colorHeader ) - { - m_pTableModel->setHeaderBackgroundColor(colorHeader); - } + + case BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS: + m_pTableModel->setRowBackgroundColors( aValue ); + pTable->Invalidate(); break; - } + case BASEPROPERTY_GRID_LINE_COLOR: - { - sal_Int32 colorLine = COL_TRANSPARENT; - if( aValue >>= colorLine ) - { - m_pTableModel->setLineColor(colorLine); - } + m_pTableModel->setLineColor( aValue ); + pTable->Invalidate(); break; - } - case BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND: - { - sal_Int32 colorEvenRow = COL_TRANSPARENT; - if( aValue >>= colorEvenRow ) - { - m_pTableModel->setEvenRowBackgroundColor(colorEvenRow); - } + + case BASEPROPERTY_GRID_HEADER_BACKGROUND: + m_pTableModel->setHeaderBackgroundColor( aValue ); + pTable->Invalidate(); break; - } - case BASEPROPERTY_GRID_ROW_BACKGROUND: - { - sal_Int32 colorBackground = COL_TRANSPARENT; - if( aValue >>= colorBackground ) - { - m_pTableModel->setOddRowBackgroundColor(colorBackground); - } + + case BASEPROPERTY_GRID_HEADER_TEXT_COLOR: + m_pTableModel->setHeaderTextColor( aValue ); + pTable->Invalidate(); break; - } + case BASEPROPERTY_TEXTCOLOR: - { - sal_Int32 colorText = 0x000000; - if( aValue >>= colorText ) - { - m_pTableModel->setTextColor(colorText); - } + m_pTableModel->setTextColor( aValue ); + pTable->Invalidate(); break; - } + + case BASEPROPERTY_TEXTLINECOLOR: + m_pTableModel->setTextLineColor( aValue ); + pTable->Invalidate(); + break; + case BASEPROPERTY_VERTICALALIGN: { VerticalAlignment eAlign( VerticalAlignment_TOP ); @@ -377,6 +377,17 @@ void SVTXGridControl::impl_checkTableModelInit() } } +namespace +{ + void lcl_convertColor( ::boost::optional< ::Color > const & i_color, Any & o_colorValue ) + { + if ( !i_color ) + o_colorValue.clear(); + else + o_colorValue <<= i_color->GetColor(); + } +} + Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(RuntimeException) { ::vos::OGuard aGuard( GetMutex() ); @@ -384,6 +395,8 @@ Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru TableControl* pTable = dynamic_cast< TableControl* >( GetWindow() ); ENSURE_OR_RETURN( pTable != NULL, "SVTXGridControl::getProperty: no control (anymore)!", Any() ); + Any aPropertyValue; + const sal_uInt16 nPropId = GetPropertyId( PropertyName ); switch(nPropId) { @@ -399,34 +412,92 @@ Any SVTXGridControl::getProperty( const ::rtl::OUString& PropertyName ) throw(Ru case MULTIPLE_SELECTION:eSelectionType = SelectionType_MULTI; break; default: eSelectionType = SelectionType_NONE; break; } - return Any( eSelectionType ); + aPropertyValue <<= eSelectionType; + break; } + case BASEPROPERTY_GRID_SHOWROWHEADER: - return Any ((sal_Bool) m_pTableModel->hasRowHeaders()); + aPropertyValue <<= sal_Bool( m_pTableModel->hasRowHeaders() ); + break; case BASEPROPERTY_GRID_SHOWCOLUMNHEADER: - return Any ((sal_Bool) m_pTableModel->hasColumnHeaders()); + aPropertyValue <<= sal_Bool( m_pTableModel->hasColumnHeaders() ); + break; case BASEPROPERTY_GRID_DATAMODEL: - return Any ( m_pTableModel->getDataModel() ); + aPropertyValue <<= m_pTableModel->getDataModel(); + break; case BASEPROPERTY_GRID_COLUMNMODEL: - return Any ( m_xColumnModel); + aPropertyValue <<= m_xColumnModel; + break; case BASEPROPERTY_HSCROLL: { sal_Bool const bHasScrollbar = ( m_pTableModel->getHorizontalScrollbarVisibility() != ScrollbarShowNever ); - return makeAny( bHasScrollbar ); + aPropertyValue <<= bHasScrollbar; + break; } case BASEPROPERTY_VSCROLL: { sal_Bool const bHasScrollbar = ( m_pTableModel->getVerticalScrollbarVisibility() != ScrollbarShowNever ); - return makeAny( bHasScrollbar ); + aPropertyValue <<= bHasScrollbar; + break; + } + + case BASEPROPERTY_USE_GRID_LINES: + { + GridTableRenderer* pGridRenderer = dynamic_cast< GridTableRenderer* >( + m_pTableModel->getRenderer().get() ); + ENSURE_OR_BREAK( pGridRenderer != NULL, "SVTXGridControl::getProperty(UseGridLines): invalid renderer!" ); + aPropertyValue <<= pGridRenderer->useGridLines(); + } + break; + + case BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS: + { + ::boost::optional< ::std::vector< ::Color > > aColors( m_pTableModel->getRowBackgroundColors() ); + if ( !aColors ) + aPropertyValue.clear(); + else + { + Sequence< ::com::sun::star::util::Color > aAPIColors( aColors->size() ); + for ( size_t i=0; i<aColors->size(); ++i ) + { + aAPIColors[i] = aColors->at(i).GetColor(); + } + aPropertyValue <<= aAPIColors; } } + break; + + case BASEPROPERTY_GRID_LINE_COLOR: + lcl_convertColor( m_pTableModel->getLineColor(), aPropertyValue ); + break; + + case BASEPROPERTY_GRID_HEADER_BACKGROUND: + lcl_convertColor( m_pTableModel->getHeaderBackgroundColor(), aPropertyValue ); + break; + + case BASEPROPERTY_GRID_HEADER_TEXT_COLOR: + lcl_convertColor( m_pTableModel->getHeaderTextColor(), aPropertyValue ); + break; + + case BASEPROPERTY_TEXTCOLOR: + lcl_convertColor( m_pTableModel->getTextColor(), aPropertyValue ); + break; + + case BASEPROPERTY_TEXTLINECOLOR: + lcl_convertColor( m_pTableModel->getTextLineColor(), aPropertyValue ); + break; + + default: + aPropertyValue = VCLXWindow::getProperty( PropertyName ); + break; + } - return VCLXWindow::getProperty( PropertyName ); + return aPropertyValue; } void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) @@ -437,10 +508,10 @@ void SVTXGridControl::ImplGetPropertyIds( std::list< sal_uInt16 > &rIds ) BASEPROPERTY_GRID_DATAMODEL, BASEPROPERTY_GRID_COLUMNMODEL, BASEPROPERTY_GRID_SELECTIONMODE, - BASEPROPERTY_GRID_EVEN_ROW_BACKGROUND, BASEPROPERTY_GRID_HEADER_BACKGROUND, + BASEPROPERTY_GRID_HEADER_TEXT_COLOR, BASEPROPERTY_GRID_LINE_COLOR, - BASEPROPERTY_GRID_ROW_BACKGROUND, + BASEPROPERTY_GRID_ROW_BACKGROUND_COLORS, 0 ); VCLXWindow::ImplGetPropertyIds( rIds, true ); diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index f7b2ca07eb22..66f7f518dab4 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -79,43 +79,45 @@ namespace svt { namespace table typedef ::std::vector< PColumnModel > ColumnModels; struct UnoControlTableModel_Impl { - ColumnModels aColumns; - bool bHasColumnHeaders; - bool bHasRowHeaders; - ScrollbarVisibility eVScrollMode; - ScrollbarVisibility eHScrollMode; - PTableRenderer pRenderer; - PTableInputHandler pInputHandler; - TableMetrics nRowHeight; - TableMetrics nColumnHeaderHeight; - TableMetrics nRowHeaderWidth; - ::com::sun::star::util::Color m_nLineColor; - ::com::sun::star::util::Color m_nHeaderColor; - ::com::sun::star::util::Color m_nTextColor; - ::com::sun::star::util::Color m_nRowColor1; - ::com::sun::star::util::Color m_nRowColor2; - ::com::sun::star::style::VerticalAlignment m_eVerticalAlign; - ModellListeners m_aListeners; - WeakReference< XGridDataModel > m_aDataModel; - WeakReference< XGridColumnModel > m_aColumnModel; + ColumnModels aColumns; + bool bHasColumnHeaders; + bool bHasRowHeaders; + ScrollbarVisibility eVScrollMode; + ScrollbarVisibility eHScrollMode; + PTableRenderer pRenderer; + PTableInputHandler pInputHandler; + TableMetrics nRowHeight; + TableMetrics nColumnHeaderHeight; + TableMetrics nRowHeaderWidth; + ::boost::optional< ::Color > m_aGridLineColor; + ::boost::optional< ::Color > m_aHeaderBackgroundColor; + ::boost::optional< ::Color > m_aHeaderTextColor; + ::boost::optional< ::Color > m_aTextColor; + ::boost::optional< ::Color > m_aTextLineColor; + ::boost::optional< ::std::vector< ::Color > > m_aRowColors; + ::com::sun::star::style::VerticalAlignment m_eVerticalAlign; + ModellListeners m_aListeners; + WeakReference< XGridDataModel > m_aDataModel; + WeakReference< XGridColumnModel > m_aColumnModel; UnoControlTableModel_Impl() - :aColumns ( ) - ,bHasColumnHeaders ( true ) - ,bHasRowHeaders ( false ) - ,eVScrollMode ( ScrollbarShowNever ) - ,eHScrollMode ( ScrollbarShowNever ) - ,pRenderer ( ) - ,pInputHandler ( ) - ,nRowHeight ( 10 ) - ,nColumnHeaderHeight( 10 ) - ,nRowHeaderWidth ( 10 ) - ,m_nLineColor ( COL_TRANSPARENT ) - ,m_nHeaderColor ( COL_TRANSPARENT ) - ,m_nTextColor ( 0 )//black as default - ,m_nRowColor1 ( COL_TRANSPARENT ) - ,m_nRowColor2 ( COL_TRANSPARENT ) - ,m_eVerticalAlign ( com::sun::star::style::VerticalAlignment_TOP ) + :aColumns ( ) + ,bHasColumnHeaders ( true ) + ,bHasRowHeaders ( false ) + ,eVScrollMode ( ScrollbarShowNever ) + ,eHScrollMode ( ScrollbarShowNever ) + ,pRenderer ( ) + ,pInputHandler ( ) + ,nRowHeight ( 10 ) + ,nColumnHeaderHeight ( 10 ) + ,nRowHeaderWidth ( 10 ) + ,m_aGridLineColor ( ) + ,m_aHeaderBackgroundColor ( ) + ,m_aHeaderTextColor ( ) + ,m_aTextColor ( ) + ,m_aTextLineColor ( ) + ,m_aRowColors ( ) + ,m_eVerticalAlign ( com::sun::star::style::VerticalAlignment_TOP ) { } }; @@ -557,77 +559,124 @@ namespace svt { namespace table } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::util::Color UnoControlTableModel::getLineColor() + namespace + { + void lcl_setColor( Any const & i_color, ::boost::optional< ::Color > & o_convertedColor ) + { + if ( !i_color.hasValue() ) + o_convertedColor.reset(); + else + { + sal_Int32 nColor = COL_TRANSPARENT; + if ( i_color >>= nColor ) + { + o_convertedColor.reset( ::Color( nColor ) ); + } + else + { + OSL_ENSURE( false, "lcl_setColor: could not extract color value!" ); + } + } + } + } + + //------------------------------------------------------------------------------------------------------------------ + ::boost::optional< ::Color > UnoControlTableModel::getLineColor() const { DBG_CHECK_ME(); - return m_pImpl->m_nLineColor; + return m_pImpl->m_aGridLineColor; } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setLineColor( ::com::sun::star::util::Color _rColor ) + void UnoControlTableModel::setLineColor( Any const & i_color ) { DBG_CHECK_ME(); - m_pImpl->m_nLineColor = _rColor; + lcl_setColor( i_color, m_pImpl->m_aGridLineColor ); } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::util::Color UnoControlTableModel::getHeaderBackgroundColor() + ::boost::optional< ::Color > UnoControlTableModel::getHeaderBackgroundColor() const { DBG_CHECK_ME(); - return m_pImpl->m_nHeaderColor; + return m_pImpl->m_aHeaderBackgroundColor; } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setHeaderBackgroundColor( ::com::sun::star::util::Color _rColor ) + void UnoControlTableModel::setHeaderBackgroundColor( Any const & i_color ) { DBG_CHECK_ME(); - m_pImpl->m_nHeaderColor = _rColor; + lcl_setColor( i_color, m_pImpl->m_aHeaderBackgroundColor ); } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::util::Color UnoControlTableModel::getTextColor() + ::boost::optional< ::Color > UnoControlTableModel::getHeaderTextColor() const { DBG_CHECK_ME(); - return m_pImpl->m_nTextColor; + return m_pImpl->m_aHeaderTextColor; } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setTextColor( ::com::sun::star::util::Color _rColor ) + void UnoControlTableModel::setHeaderTextColor( Any const & i_color ) { DBG_CHECK_ME(); - m_pImpl->m_nTextColor = _rColor; + lcl_setColor( i_color, m_pImpl->m_aHeaderTextColor ); } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::util::Color UnoControlTableModel::getOddRowBackgroundColor() + ::boost::optional< ::Color > UnoControlTableModel::getTextColor() const { DBG_CHECK_ME(); - return m_pImpl->m_nRowColor1; + return m_pImpl->m_aTextColor; } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setOddRowBackgroundColor( ::com::sun::star::util::Color _rColor ) + void UnoControlTableModel::setTextColor( Any const & i_color ) { DBG_CHECK_ME(); - m_pImpl->m_nRowColor1 = _rColor; + lcl_setColor( i_color, m_pImpl->m_aTextColor ); } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::util::Color UnoControlTableModel::getEvenRowBackgroundColor() + ::boost::optional< ::Color > UnoControlTableModel::getTextLineColor() const { DBG_CHECK_ME(); - return m_pImpl->m_nRowColor2; + return m_pImpl->m_aTextColor; } //------------------------------------------------------------------------------------------------------------------ - void UnoControlTableModel::setEvenRowBackgroundColor( ::com::sun::star::util::Color _rColor ) + void UnoControlTableModel::setTextLineColor( Any const & i_color ) { DBG_CHECK_ME(); - m_pImpl->m_nRowColor2 = _rColor; + lcl_setColor( i_color, m_pImpl->m_aTextLineColor ); + } + + //------------------------------------------------------------------------------------------------------------------ + ::boost::optional< ::std::vector< ::Color > > UnoControlTableModel::getRowBackgroundColors() const + { + DBG_CHECK_ME(); + return m_pImpl->m_aRowColors; + } + + //------------------------------------------------------------------------------------------------------------------ + void UnoControlTableModel::setRowBackgroundColors( ::com::sun::star::uno::Any const & i_APIValue ) + { + DBG_CHECK_ME(); + Sequence< ::com::sun::star::util::Color > aAPIColors; + if ( !( i_APIValue >>= aAPIColors ) ) + m_pImpl->m_aRowColors.reset(); + else + { + ::std::vector< ::Color > aColors( aAPIColors.getLength() ); + for ( sal_Int32 i=0; i<aAPIColors.getLength(); ++i ) + { + aColors[i] = ::Color( aAPIColors[i] ); + } + m_pImpl->m_aRowColors.reset( aColors ); + } } //------------------------------------------------------------------------------------------------------------------ - ::com::sun::star::style::VerticalAlignment UnoControlTableModel::getVerticalAlign() + ::com::sun::star::style::VerticalAlignment UnoControlTableModel::getVerticalAlign() const { DBG_CHECK_ME(); return m_pImpl->m_eVerticalAlign; diff --git a/svtools/source/uno/unocontroltablemodel.hxx b/svtools/source/uno/unocontroltablemodel.hxx index a6cd858ed34f..c1abe2c88e3a 100644 --- a/svtools/source/uno/unocontroltablemodel.hxx +++ b/svtools/source/uno/unocontroltablemodel.hxx @@ -87,30 +87,33 @@ namespace svt { namespace table public: // ITableModel overridables - virtual TableSize getColumnCount() const; - virtual TableSize getRowCount() const; - virtual bool hasColumnHeaders() const; - virtual bool hasRowHeaders() const; - virtual bool isCellEditable( ColPos col, RowPos row ) const; - virtual PColumnModel getColumnModel( ColPos column ); - virtual PTableRenderer getRenderer() const; - virtual PTableInputHandler getInputHandler() const; - virtual TableMetrics getRowHeight() const; - virtual TableMetrics getColumnHeaderHeight() const; - virtual TableMetrics getRowHeaderWidth() const; - virtual ScrollbarVisibility getVerticalScrollbarVisibility() const; - virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const; - virtual void addTableModelListener( const PTableModelListener& i_listener ); - virtual void removeTableModelListener( const PTableModelListener& i_listener ); - virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ); - virtual void getCellToolTip( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any & o_cellToolTip ); - virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const; - virtual ::com::sun::star::util::Color getLineColor(); - virtual ::com::sun::star::util::Color getHeaderBackgroundColor(); - virtual ::com::sun::star::util::Color getTextColor(); - virtual ::com::sun::star::util::Color getOddRowBackgroundColor(); - virtual ::com::sun::star::util::Color getEvenRowBackgroundColor(); - virtual ::com::sun::star::style::VerticalAlignment getVerticalAlign(); + virtual TableSize getColumnCount() const; + virtual TableSize getRowCount() const; + virtual bool hasColumnHeaders() const; + virtual bool hasRowHeaders() const; + virtual bool isCellEditable( ColPos col, RowPos row ) const; + virtual PColumnModel getColumnModel( ColPos column ); + virtual PTableRenderer getRenderer() const; + virtual PTableInputHandler getInputHandler() const; + virtual TableMetrics getRowHeight() const; + virtual TableMetrics getColumnHeaderHeight() const; + virtual TableMetrics getRowHeaderWidth() const; + virtual ScrollbarVisibility getVerticalScrollbarVisibility() const; + virtual ScrollbarVisibility getHorizontalScrollbarVisibility() const; + virtual void addTableModelListener( const PTableModelListener& i_listener ); + virtual void removeTableModelListener( const PTableModelListener& i_listener ); + virtual void getCellContent( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any& o_cellContent ); + virtual void getCellToolTip( ColPos const i_col, RowPos const i_row, ::com::sun::star::uno::Any & o_cellToolTip ); + virtual ::rtl::OUString getRowHeader( RowPos const i_rowPos ) const; + virtual ::boost::optional< ::Color > getLineColor() const; + virtual ::boost::optional< ::Color > getHeaderBackgroundColor() const; + virtual ::boost::optional< ::Color > getHeaderTextColor() const; + virtual ::boost::optional< ::Color > getTextColor() const; + virtual ::boost::optional< ::Color > getTextLineColor() const; + virtual ::boost::optional< ::std::vector< ::Color > > + getRowBackgroundColors() const; + virtual ::com::sun::star::style::VerticalAlignment + getVerticalAlign() const; // column write access void appendColumn( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumn > const & i_column ); @@ -121,19 +124,24 @@ namespace svt { namespace table // other operations void setVerticalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; void setHorizontalScrollbarVisibility( ScrollbarVisibility const i_visibility ) const; + void setDataModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > const & i_gridDataModel ); bool hasDataModel() const; ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridDataModel > getDataModel() const; void setColumnModel( ::com::sun::star::uno::Reference< ::com::sun::star::awt::grid::XGridColumnModel > const & i_gridColumnModel ); bool hasColumnModel() const; + void setRowHeaders(bool _bRowHeaders); void setColumnHeaders(bool _bColumnHeaders); - void setLineColor(::com::sun::star::util::Color _rColor); - void setHeaderBackgroundColor(::com::sun::star::util::Color _rColor); - void setTextColor(::com::sun::star::util::Color _rColor); - void setOddRowBackgroundColor(::com::sun::star::util::Color _rColor); - void setEvenRowBackgroundColor(::com::sun::star::util::Color _rColor); + + void setLineColor( ::com::sun::star::uno::Any const & i_color ); + void setHeaderBackgroundColor( ::com::sun::star::uno::Any const & i_color ); + void setHeaderTextColor( ::com::sun::star::uno::Any const & i_color ); + void setTextColor( ::com::sun::star::uno::Any const & i_color ); + void setTextLineColor( ::com::sun::star::uno::Any const & i_color ); + void setRowBackgroundColors( ::com::sun::star::uno::Any const & i_APIValue ); + void setVerticalAlign(::com::sun::star::style::VerticalAlignment _rAlign); /// retrieves the index of a column within the model |