LibreOffice Module toolkit (master) 1
Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
svt::table::UnoControlTableModel Class Reference

#include <unocontroltablemodel.hxx>

Inheritance diagram for svt::table::UnoControlTableModel:
[legend]
Collaboration diagram for svt::table::UnoControlTableModel:
[legend]

Public Member Functions

 UnoControlTableModel ()
 
virtual ~UnoControlTableModel () override
 
virtual TableSize getColumnCount () const override
 returns the number of columns in the table More...
 
virtual TableSize getRowCount () const override
 returns the number of rows in the table More...
 
virtual bool hasColumnHeaders () const override
 determines whether the table has column headers More...
 
virtual bool hasRowHeaders () const override
 determines whether the table has row headers More...
 
virtual PColumnModel getColumnModel (ColPos column) override
 returns a model for a certain column More...
 
virtual PTableRenderer getRenderer () const override
 returns a renderer which is able to paint the table represented by this table model More...
 
virtual PTableInputHandler getInputHandler () const override
 returns the component handling input in a view associated with the model More...
 
virtual TableMetrics getRowHeight () const override
 determines the height of rows in the table. More...
 
virtual TableMetrics getColumnHeaderHeight () const override
 determines the height of the column header row More...
 
virtual TableMetrics getRowHeaderWidth () const override
 determines the width of the row header column More...
 
virtual ScrollbarVisibility getVerticalScrollbarVisibility () const override
 returns the visibility mode of the vertical scrollbar More...
 
virtual ScrollbarVisibility getHorizontalScrollbarVisibility () const override
 returns the visibility mode of the horizontal scrollbar More...
 
virtual void addTableModelListener (const PTableModelListener &i_listener) override
 adds a listener to be notified of changes in the table model More...
 
virtual void removeTableModelListener (const PTableModelListener &i_listener) override
 remove a listener to be notified of changes in the table model More...
 
virtual void getCellContent (ColPos const i_col, RowPos const i_row, css::uno::Any &o_cellContent) override
 retrieves the content of the given cell More...
 
virtual void getCellToolTip (ColPos const i_col, RowPos const i_row, css::uno::Any &o_cellToolTip) override
 returns an object which should be displayed as tooltip for the given cell More...
 
virtual css::uno::Any getRowHeading (RowPos const i_rowPos) const override
 retrieves title of a given row More...
 
virtual ::std::optional< ::ColorgetLineColor () const override
 returns the color to be used for rendering the grid lines. More...
 
virtual ::std::optional< ::ColorgetHeaderBackgroundColor () const override
 returns the color to be used for rendering the header background. More...
 
virtual ::std::optional< ::ColorgetHeaderTextColor () const override
 returns the color to be used for rendering the header text. More...
 
virtual ::std::optional< ::ColorgetActiveSelectionBackColor () const override
 returns the color to be used for the background of selected cells, when the control has the focus More...
 
virtual ::std::optional< ::ColorgetInactiveSelectionBackColor () const override
 returns the color to be used for the background of selected cells, when the control does not have the focus More...
 
virtual ::std::optional< ::ColorgetActiveSelectionTextColor () const override
 returns the color to be used for the text of selected cells, when the control has the focus More...
 
virtual ::std::optional< ::ColorgetInactiveSelectionTextColor () const override
 returns the color to be used for the text of selected cells, when the control does not have the focus More...
 
virtual ::std::optional< ::ColorgetTextColor () const override
 returns the color to be used for rendering cell texts. More...
 
virtual ::std::optional< ::ColorgetTextLineColor () const override
 returns the color to be used for text lines (underline, strikethrough) when rendering cell text. More...
 
virtual ::std::optional< ::std::vector< ::Color > > getRowBackgroundColors () const override
 returns the colors to be used for the row backgrounds. More...
 
virtual css::style::VerticalAlignment getVerticalAlign () const override
 determines the vertical alignment of content within a cell More...
 
virtual ITableDataSortgetSortAdapter () override
 returns an adapter to the sorting functionality of the model More...
 
virtual bool isEnabled () const override
 returns enabled state. More...
 
virtual void sortByColumn (ColPos const i_column, ColumnSortDirection const i_sortDirection) override
 sorts the rows in the model by the given column's data, in the given direction. More...
 
virtual ColumnSort getCurrentSortOrder () const override
 retrieves the current sort order of the data More...
 
void appendColumn (css::uno::Reference< css::awt::grid::XGridColumn > const &i_column)
 
void insertColumn (ColPos const i_position, css::uno::Reference< css::awt::grid::XGridColumn > const &i_column)
 
void removeColumn (ColPos const i_position)
 
void removeAllColumns ()
 
void setVerticalScrollbarVisibility (ScrollbarVisibility const i_visibility)
 
void setHorizontalScrollbarVisibility (ScrollbarVisibility const i_visibility)
 
void setDataModel (css::uno::Reference< css::awt::grid::XGridDataModel > const &i_gridDataModel)
 
bool hasDataModel () const
 
css::uno::Reference< css::awt::grid::XGridDataModel > getDataModel () const
 
void setColumnModel (css::uno::Reference< css::awt::grid::XGridColumnModel > const &i_gridColumnModel)
 
bool hasColumnModel () const
 
css::uno::Reference< css::awt::grid::XGridColumnModel > getColumnModel () const
 
void setRowHeaders (bool _bRowHeaders)
 
void setColumnHeaders (bool _bColumnHeaders)
 
void setRowHeight (TableMetrics _nHeight)
 
void setRowHeaderWidth (TableMetrics _nWidth)
 
void setColumnHeaderHeight (TableMetrics _nHeight)
 
void setLineColor (css::uno::Any const &i_color)
 
void setHeaderBackgroundColor (css::uno::Any const &i_color)
 
void setHeaderTextColor (css::uno::Any const &i_color)
 
void setActiveSelectionBackColor (css::uno::Any const &i_color)
 
void setInactiveSelectionBackColor (css::uno::Any const &i_color)
 
void setActiveSelectionTextColor (css::uno::Any const &i_color)
 
void setInactiveSelectionTextColor (css::uno::Any const &i_color)
 
void setTextColor (css::uno::Any const &i_color)
 
void setTextLineColor (css::uno::Any const &i_color)
 
void setRowBackgroundColors (css::uno::Any const &i_APIValue)
 
void setVerticalAlign (css::style::VerticalAlignment _rAlign)
 
void setEnabled (bool _bEnabled)
 
void notifyRowsInserted (css::awt::grid::GridDataEvent const &i_event) const
 
void notifyRowsRemoved (css::awt::grid::GridDataEvent const &i_event) const
 
void notifyDataChanged (css::awt::grid::GridDataEvent const &i_event) const
 
ColPos getColumnPos (UnoGridColumnFacade const &i_column) const
 retrieves the index of a column within the model More...
 
void notifyColumnChange (ColPos const i_columnPos, ColumnAttributeGroup const i_attributeGroup) const
 notifies a change in a column belonging to the model More...
 
void notifyAllDataChanged () const
 notifies a change in all data represented by the model. More...
 
- Public Member Functions inherited from svt::table::ITableModel
virtual TableSize getColumnCount () const =0
 returns the number of columns in the table More...
 
virtual TableSize getRowCount () const =0
 returns the number of rows in the table More...
 
virtual bool hasColumnHeaders () const =0
 determines whether the table has column headers More...
 
virtual bool hasRowHeaders () const =0
 determines whether the table has row headers More...
 
virtual PColumnModel getColumnModel (ColPos column)=0
 returns a model for a certain column More...
 
virtual PTableRenderer getRenderer () const =0
 returns a renderer which is able to paint the table represented by this table model More...
 
virtual PTableInputHandler getInputHandler () const =0
 returns the component handling input in a view associated with the model More...
 
virtual TableMetrics getRowHeight () const =0
 determines the height of rows in the table. More...
 
virtual TableMetrics getColumnHeaderHeight () const =0
 determines the height of the column header row More...
 
virtual TableMetrics getRowHeaderWidth () const =0
 determines the width of the row header column More...
 
virtual ScrollbarVisibility getVerticalScrollbarVisibility () const =0
 returns the visibility mode of the vertical scrollbar More...
 
virtual ScrollbarVisibility getHorizontalScrollbarVisibility () const =0
 returns the visibility mode of the horizontal scrollbar More...
 
virtual void addTableModelListener (const PTableModelListener &i_listener)=0
 adds a listener to be notified of changes in the table model More...
 
virtual void removeTableModelListener (const PTableModelListener &i_listener)=0
 remove a listener to be notified of changes in the table model More...
 
virtual void getCellContent (ColPos const i_col, RowPos const i_row, css::uno::Any &o_cellContent)=0
 retrieves the content of the given cell More...
 
virtual void getCellToolTip (ColPos const i_col, RowPos const i_row, css::uno::Any &o_cellToolTip)=0
 returns an object which should be displayed as tooltip for the given cell More...
 
virtual css::uno::Any getRowHeading (RowPos const i_rowPos) const =0
 retrieves title of a given row More...
 
virtual ::std::optional< ::ColorgetLineColor () const =0
 returns the color to be used for rendering the grid lines. More...
 
virtual ::std::optional< ::ColorgetHeaderBackgroundColor () const =0
 returns the color to be used for rendering the header background. More...
 
virtual ::std::optional< ::ColorgetHeaderTextColor () const =0
 returns the color to be used for rendering the header text. More...
 
virtual ::std::optional< ::ColorgetActiveSelectionBackColor () const =0
 returns the color to be used for the background of selected cells, when the control has the focus More...
 
virtual ::std::optional< ::ColorgetInactiveSelectionBackColor () const =0
 returns the color to be used for the background of selected cells, when the control does not have the focus More...
 
virtual ::std::optional< ::ColorgetActiveSelectionTextColor () const =0
 returns the color to be used for the text of selected cells, when the control has the focus More...
 
virtual ::std::optional< ::ColorgetInactiveSelectionTextColor () const =0
 returns the color to be used for the text of selected cells, when the control does not have the focus More...
 
virtual ::std::optional< ::ColorgetTextColor () const =0
 returns the color to be used for rendering cell texts. More...
 
virtual ::std::optional< ::ColorgetTextLineColor () const =0
 returns the color to be used for text lines (underline, strikethrough) when rendering cell text. More...
 
virtual ::std::optional< ::std::vector< ::Color > > getRowBackgroundColors () const =0
 returns the colors to be used for the row backgrounds. More...
 
virtual css::style::VerticalAlignment getVerticalAlign () const =0
 determines the vertical alignment of content within a cell More...
 
virtual ITableDataSortgetSortAdapter ()=0
 returns an adapter to the sorting functionality of the model More...
 
virtual bool isEnabled () const =0
 returns enabled state. More...
 
virtual ~ITableModel ()
 destroys the table model instance More...
 
virtual void sortByColumn (ColPos const i_column, ColumnSortDirection const i_sortDirection)=0
 sorts the rows in the model by the given column's data, in the given direction. More...
 
virtual ColumnSort getCurrentSortOrder () const =0
 retrieves the current sort order of the data More...
 

Private Types

typedef ::std::vector< PTableModelListenerModellListeners
 
typedef ::std::vector< PColumnModelColumnModels
 

Private Member Functions

void impl_notifyTableMetricsChanged () const
 

Private Attributes

ColumnModels aColumns
 
bool bHasColumnHeaders
 
bool bHasRowHeaders
 
ScrollbarVisibility eVScrollMode
 
ScrollbarVisibility eHScrollMode
 
PTableRenderer pRenderer
 
PTableInputHandler pInputHandler
 
TableMetrics nRowHeight
 
TableMetrics nColumnHeaderHeight
 
TableMetrics nRowHeaderWidth
 
::std::optional< ::Colorm_aGridLineColor
 
::std::optional< ::Colorm_aHeaderBackgroundColor
 
::std::optional< ::Colorm_aHeaderTextColor
 
::std::optional< ::Colorm_aActiveSelectionBackColor
 
::std::optional< ::Colorm_aInactiveSelectionBackColor
 
::std::optional< ::Colorm_aActiveSelectionTextColor
 
::std::optional< ::Colorm_aInactiveSelectionTextColor
 
::std::optional< ::Colorm_aTextColor
 
::std::optional< ::Colorm_aTextLineColor
 
::std::optional< ::std::vector< ::Color > > m_aRowColors
 
css::style::VerticalAlignment m_eVerticalAlign
 
bool bEnabled
 
ModellListeners m_aListeners
 
css::uno::WeakReference< css::awt::grid::XGridDataModel > m_aDataModel
 
css::uno::WeakReference< css::awt::grid::XGridColumnModel > m_aColumnModel
 

Additional Inherited Members

- Protected Member Functions inherited from svt::table::ITableDataSort
 ~ITableDataSort ()
 

Detailed Description

Definition at line 42 of file unocontroltablemodel.hxx.

Member Typedef Documentation

◆ ColumnModels

Definition at line 147 of file unocontroltablemodel.hxx.

◆ ModellListeners

Definition at line 146 of file unocontroltablemodel.hxx.

Constructor & Destructor Documentation

◆ UnoControlTableModel()

svt::table::UnoControlTableModel::UnoControlTableModel ( )

Definition at line 59 of file unocontroltablemodel.cxx.

References nRowHeaderWidth, pInputHandler, and pRenderer.

◆ ~UnoControlTableModel()

svt::table::UnoControlTableModel::~UnoControlTableModel ( )
overridevirtual

Definition at line 88 of file unocontroltablemodel.cxx.

Member Function Documentation

◆ addTableModelListener()

void svt::table::UnoControlTableModel::addTableModelListener ( const PTableModelListener i_listener)
overridevirtual

adds a listener to be notified of changes in the table model

Implements svt::table::ITableModel.

Definition at line 337 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, ENSURE_OR_RETURN_VOID, and m_aListeners.

◆ appendColumn()

void svt::table::UnoControlTableModel::appendColumn ( css::uno::Reference< css::awt::grid::XGridColumn > const &  i_column)

Definition at line 164 of file unocontroltablemodel.cxx.

References aColumns, DBG_CHECK_ME, and insertColumn().

◆ getActiveSelectionBackColor()

std::optional<::Color > svt::table::UnoControlTableModel::getActiveSelectionBackColor ( ) const
overridevirtual

returns the color to be used for the background of selected cells, when the control has the focus

If this value is not set, a default color from the style settings will be used.

Implements svt::table::ITableModel.

Definition at line 547 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aActiveSelectionBackColor.

◆ getActiveSelectionTextColor()

std::optional<::Color > svt::table::UnoControlTableModel::getActiveSelectionTextColor ( ) const
overridevirtual

returns the color to be used for the text of selected cells, when the control has the focus

If this value is not set, a default color from the style settings will be used.

Implements svt::table::ITableModel.

Definition at line 561 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aActiveSelectionTextColor.

◆ getCellContent()

void svt::table::UnoControlTableModel::getCellContent ( ColPos const  i_col,
RowPos const  i_row,
css::uno::Any &  o_cellContent 
)
overridevirtual

◆ getCellToolTip()

void svt::table::UnoControlTableModel::getCellToolTip ( ColPos const  i_col,
RowPos const  i_row,
css::uno::Any &  o_cellToolTip 
)
overridevirtual

returns an object which should be displayed as tooltip for the given cell

At the moment, only string-convertible values are supported here. In the future, one might imagine displaying scaled-down versions of a graphic in a cell, and a larger version of that very graphic as tooltip.

If no tooltip object is provided, then the cell content is used, and displayed as tooltip for the cell if and only if it doesn't fit into the cell's space itself.

Parameters
i_colThe column index of the cell in question. COL_ROW_HEADERS is a valid argument here.
i_rowThe row index of the cell in question.
o_cellToolTiptakes the tooltip object upon return.

Implements svt::table::ITableModel.

Definition at line 452 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, DBG_UNHANDLED_EXCEPTION, ENSURE_OR_THROW, Exception, and m_aDataModel.

◆ getColumnCount()

TableSize svt::table::UnoControlTableModel::getColumnCount ( ) const
overridevirtual

returns the number of columns in the table

Implements svt::table::ITableModel.

Definition at line 93 of file unocontroltablemodel.cxx.

References aColumns, and DBG_CHECK_ME.

Referenced by getCellContent(), getColumnModel(), and notifyColumnChange().

◆ getColumnHeaderHeight()

TableMetrics svt::table::UnoControlTableModel::getColumnHeaderHeight ( ) const
overridevirtual

determines the height of the column header row

This method is not to be called if ->hasColumnHeaders() returned <FALSE>.

Returns
the logical height of the column header row, in app-font units. Must be greater than 0.

Implements svt::table::ITableModel.

Definition at line 286 of file unocontroltablemodel.cxx.

References DBG_ASSERT, DBG_CHECK_ME, hasColumnHeaders(), and nColumnHeaderHeight.

◆ getColumnModel() [1/2]

Reference< XGridColumnModel > svt::table::UnoControlTableModel::getColumnModel ( ) const

Definition at line 401 of file unocontroltablemodel.cxx.

References m_aColumnModel.

Referenced by getCellContent(), and hasColumnModel().

◆ getColumnModel() [2/2]

PColumnModel svt::table::UnoControlTableModel::getColumnModel ( ColPos  column)
overridevirtual

returns a model for a certain column

Parameters
columnthe index of the column in question. Must be greater than or equal 0, and smaller than the return value of ->getColumnCount()
Returns
the model of the column in question. Must not be <NULL>

Implements svt::table::ITableModel.

Definition at line 155 of file unocontroltablemodel.cxx.

References aColumns, DBG_CHECK_ME, ENSURE_OR_RETURN, and getColumnCount().

◆ getColumnPos()

ColPos svt::table::UnoControlTableModel::getColumnPos ( UnoGridColumnFacade const &  i_column) const

retrieves the index of a column within the model

Definition at line 675 of file unocontroltablemodel.cxx.

References aColumns, col, COL_INVALID, DBG_CHECK_ME, and nPos.

Referenced by svt::table::UnoGridColumnFacade::columnChanged().

◆ getCurrentSortOrder()

ColumnSort svt::table::UnoControlTableModel::getCurrentSortOrder ( ) const
overridevirtual

retrieves the current sort order of the data

If the nColumnIndex member of the returned structure is COL_INVALID, then the data is currently not sorted.

Implements svt::table::ITableDataSort.

Definition at line 731 of file unocontroltablemodel.cxx.

References svt::table::ColumnSortAscending, svt::table::ColumnSortDescending, DBG_CHECK_ME, DBG_UNHANDLED_EXCEPTION, svt::table::ColumnSort::eSortDirection, Exception, getDataModel(), and svt::table::ColumnSort::nColumnPos.

◆ getDataModel()

Reference< XGridDataModel > svt::table::UnoControlTableModel::getDataModel ( ) const

Definition at line 381 of file unocontroltablemodel.cxx.

References m_aDataModel.

Referenced by getCurrentSortOrder(), getSortAdapter(), hasDataModel(), and sortByColumn().

◆ getHeaderBackgroundColor()

std::optional<::Color > svt::table::UnoControlTableModel::getHeaderBackgroundColor ( ) const
overridevirtual

returns the color to be used for rendering the header background.

If this value is not set, a default color from the style settings will be used.

Implements svt::table::ITableModel.

Definition at line 526 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aHeaderBackgroundColor.

◆ getHeaderTextColor()

std::optional<::Color > svt::table::UnoControlTableModel::getHeaderTextColor ( ) const
overridevirtual

returns the color to be used for rendering the header text.

If this value is not set, a default color from the style settings will be used.

Implements svt::table::ITableModel.

Definition at line 540 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aHeaderTextColor.

◆ getHorizontalScrollbarVisibility()

ScrollbarVisibility svt::table::UnoControlTableModel::getHorizontalScrollbarVisibility ( ) const
overridevirtual

returns the visibility mode of the horizontal scrollbar

Implements svt::table::ITableModel.

Definition at line 330 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and eHScrollMode.

◆ getInactiveSelectionBackColor()

std::optional<::Color > svt::table::UnoControlTableModel::getInactiveSelectionBackColor ( ) const
overridevirtual

returns the color to be used for the background of selected cells, when the control does not have the focus

If this value is not set, a default color from the style settings will be used.

Implements svt::table::ITableModel.

Definition at line 554 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aInactiveSelectionBackColor.

◆ getInactiveSelectionTextColor()

std::optional<::Color > svt::table::UnoControlTableModel::getInactiveSelectionTextColor ( ) const
overridevirtual

returns the color to be used for the text of selected cells, when the control does not have the focus

If this value is not set, a default color from the style settings will be used.

Implements svt::table::ITableModel.

Definition at line 568 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aInactiveSelectionTextColor.

◆ getInputHandler()

PTableInputHandler svt::table::UnoControlTableModel::getInputHandler ( ) const
overridevirtual

returns the component handling input in a view associated with the model

Implements svt::table::ITableModel.

Definition at line 261 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and pInputHandler.

◆ getLineColor()

std::optional<::Color > svt::table::UnoControlTableModel::getLineColor ( ) const
overridevirtual

returns the color to be used for rendering the grid lines.

If this value is not set, a default color from the style settings will be used.

Implements svt::table::ITableModel.

Definition at line 512 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aGridLineColor.

◆ getRenderer()

PTableRenderer svt::table::UnoControlTableModel::getRenderer ( ) const
overridevirtual

returns a renderer which is able to paint the table represented by this table model

Returns
the renderer to use. Must not be <NULL>

Implements svt::table::ITableModel.

Definition at line 254 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and pRenderer.

◆ getRowBackgroundColors()

std::optional<::std::vector<::Color > > svt::table::UnoControlTableModel::getRowBackgroundColors ( ) const
overridevirtual

returns the colors to be used for the row backgrounds.

If this value is not set, every second row will have a background color derived from the style settings's selection color, the other rows will not have a special background at all.

If this value is an empty sequence, the rows will not have a special background at all, instead the normal background of the complete control will be used.

If value is a non-empty sequence, then rows will have the background colors as specified in the sequence, in alternating order.

Implements svt::table::ITableModel.

Definition at line 638 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aRowColors.

◆ getRowCount()

TableSize svt::table::UnoControlTableModel::getRowCount ( ) const
overridevirtual

returns the number of rows in the table

Implements svt::table::ITableModel.

Definition at line 100 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, DBG_UNHANDLED_EXCEPTION, ENSURE_OR_THROW, Exception, and m_aDataModel.

Referenced by notifyAllDataChanged(), and notifyDataChanged().

◆ getRowHeaderWidth()

TableMetrics svt::table::UnoControlTableModel::getRowHeaderWidth ( ) const
overridevirtual

determines the width of the row header column

This method is not to be called if ->hasRowHeaders() returned <FALSE>.

Returns
the logical width of the row header column, in app-font units. Must be greater than 0.

Implements svt::table::ITableModel.

Definition at line 294 of file unocontroltablemodel.cxx.

References DBG_ASSERT, DBG_CHECK_ME, hasRowHeaders(), and nRowHeaderWidth.

◆ getRowHeading()

Any svt::table::UnoControlTableModel::getRowHeading ( RowPos const  i_rowPos) const
overridevirtual

retrieves title of a given row

Implements svt::table::ITableModel.

Definition at line 469 of file unocontroltablemodel.cxx.

References Any, DBG_CHECK_ME, DBG_UNHANDLED_EXCEPTION, ENSURE_OR_RETURN, Exception, and m_aDataModel.

◆ getRowHeight()

TableMetrics svt::table::UnoControlTableModel::getRowHeight ( ) const
overridevirtual

determines the height of rows in the table.

Returns
the logical height of rows in the table, in app-font units. The height must be greater 0.

Implements svt::table::ITableModel.

Definition at line 268 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and nRowHeight.

◆ getSortAdapter()

ITableDataSort * svt::table::UnoControlTableModel::getSortAdapter ( )
overridevirtual

returns an adapter to the sorting functionality of the model

It is legitimate to return <NULL> here, in this case, the table model does not support sorting.

Implements svt::table::ITableModel.

Definition at line 690 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and getDataModel().

◆ getTextColor()

std::optional<::Color > svt::table::UnoControlTableModel::getTextColor ( ) const
overridevirtual

returns the color to be used for rendering cell texts.

If this value is not set, a default color from the style settings will be used.

Implements svt::table::ITableModel.

Definition at line 610 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aTextColor.

◆ getTextLineColor()

std::optional<::Color > svt::table::UnoControlTableModel::getTextLineColor ( ) const
overridevirtual

returns the color to be used for text lines (underline, strikethrough) when rendering cell text.

If this value is not set, a default color from the style settings will be used.

Implements svt::table::ITableModel.

Definition at line 624 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aTextColor.

◆ getVerticalAlign()

VerticalAlignment svt::table::UnoControlTableModel::getVerticalAlign ( ) const
overridevirtual

determines the vertical alignment of content within a cell

Implements svt::table::ITableModel.

Definition at line 661 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_eVerticalAlign.

◆ getVerticalScrollbarVisibility()

ScrollbarVisibility svt::table::UnoControlTableModel::getVerticalScrollbarVisibility ( ) const
overridevirtual

returns the visibility mode of the vertical scrollbar

Implements svt::table::ITableModel.

Definition at line 323 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and eVScrollMode.

◆ hasColumnHeaders()

bool svt::table::UnoControlTableModel::hasColumnHeaders ( ) const
overridevirtual

determines whether the table has column headers

If this method returns <TRUE>, the renderer returned by ->getRenderer must be able to render column headers.

See also
IColumnRenderer

Implements svt::table::ITableModel.

Definition at line 119 of file unocontroltablemodel.cxx.

References bHasColumnHeaders, and DBG_CHECK_ME.

Referenced by getColumnHeaderHeight().

◆ hasColumnModel()

bool svt::table::UnoControlTableModel::hasColumnModel ( ) const

Definition at line 408 of file unocontroltablemodel.cxx.

References getColumnModel().

◆ hasDataModel()

bool svt::table::UnoControlTableModel::hasDataModel ( ) const

Definition at line 388 of file unocontroltablemodel.cxx.

References getDataModel().

◆ hasRowHeaders()

bool svt::table::UnoControlTableModel::hasRowHeaders ( ) const
overridevirtual

determines whether the table has row headers

If this method returns <TRUE>, the renderer returned by ->getRenderer must be able to render row headers.

See also
IColumnRenderer

Implements svt::table::ITableModel.

Definition at line 126 of file unocontroltablemodel.cxx.

References bHasRowHeaders, and DBG_CHECK_ME.

Referenced by getRowHeaderWidth().

◆ impl_notifyTableMetricsChanged()

void svt::table::UnoControlTableModel::impl_notifyTableMetricsChanged ( ) const
private

◆ insertColumn()

void svt::table::UnoControlTableModel::insertColumn ( ColPos const  i_position,
css::uno::Reference< css::awt::grid::XGridColumn > const &  i_column 
)

◆ isEnabled()

bool svt::table::UnoControlTableModel::isEnabled ( ) const
overridevirtual

returns enabled state.

Implements svt::table::ITableModel.

Definition at line 701 of file unocontroltablemodel.cxx.

References bEnabled, and DBG_CHECK_ME.

◆ notifyAllDataChanged()

void svt::table::UnoControlTableModel::notifyAllDataChanged ( ) const

notifies a change in all data represented by the model.

To be used if you cannot specified the changed data in more detail.

Definition at line 822 of file unocontroltablemodel.cxx.

References aListeners, getRowCount(), and m_aListeners.

Referenced by svt::table::UnoGridColumnFacade::dataColumnIndexChanged().

◆ notifyColumnChange()

void svt::table::UnoControlTableModel::notifyColumnChange ( ColPos const  i_columnPos,
ColumnAttributeGroup const  i_attributeGroup 
) const

notifies a change in a column belonging to the model

Definition at line 751 of file unocontroltablemodel.cxx.

References aListeners, DBG_CHECK_ME, ENSURE_OR_RETURN_VOID, getColumnCount(), and m_aListeners.

Referenced by svt::table::UnoGridColumnFacade::columnChanged().

◆ notifyDataChanged()

void svt::table::UnoControlTableModel::notifyDataChanged ( css::awt::grid::GridDataEvent const &  i_event) const

Definition at line 809 of file unocontroltablemodel.cxx.

References aListeners, getRowCount(), and m_aListeners.

◆ notifyRowsInserted()

void svt::table::UnoControlTableModel::notifyRowsInserted ( css::awt::grid::GridDataEvent const &  i_event) const

◆ notifyRowsRemoved()

void svt::table::UnoControlTableModel::notifyRowsRemoved ( css::awt::grid::GridDataEvent const &  i_event) const

Definition at line 799 of file unocontroltablemodel.cxx.

References aListeners, and m_aListeners.

◆ removeAllColumns()

void svt::table::UnoControlTableModel::removeAllColumns ( )

◆ removeColumn()

void svt::table::UnoControlTableModel::removeColumn ( ColPos const  i_position)

◆ removeTableModelListener()

void svt::table::UnoControlTableModel::removeTableModelListener ( const PTableModelListener i_listener)
overridevirtual

remove a listener to be notified of changes in the table model

Implements svt::table::ITableModel.

Definition at line 345 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aListeners.

◆ setActiveSelectionBackColor()

void svt::table::UnoControlTableModel::setActiveSelectionBackColor ( css::uno::Any const &  i_color)

Definition at line 582 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aActiveSelectionBackColor.

◆ setActiveSelectionTextColor()

void svt::table::UnoControlTableModel::setActiveSelectionTextColor ( css::uno::Any const &  i_color)

Definition at line 596 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aActiveSelectionTextColor.

◆ setColumnHeaderHeight()

void svt::table::UnoControlTableModel::setColumnHeaderHeight ( TableMetrics  _nHeight)

◆ setColumnHeaders()

void svt::table::UnoControlTableModel::setColumnHeaders ( bool  _bColumnHeaders)

◆ setColumnModel()

void svt::table::UnoControlTableModel::setColumnModel ( css::uno::Reference< css::awt::grid::XGridColumnModel > const &  i_gridColumnModel)

Definition at line 394 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aColumnModel.

◆ setDataModel()

void svt::table::UnoControlTableModel::setDataModel ( css::uno::Reference< css::awt::grid::XGridDataModel > const &  i_gridDataModel)

Definition at line 372 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aDataModel.

◆ setEnabled()

void svt::table::UnoControlTableModel::setEnabled ( bool  _bEnabled)

Definition at line 708 of file unocontroltablemodel.cxx.

References bEnabled, and DBG_CHECK_ME.

◆ setHeaderBackgroundColor()

void svt::table::UnoControlTableModel::setHeaderBackgroundColor ( css::uno::Any const &  i_color)

Definition at line 533 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aHeaderBackgroundColor.

◆ setHeaderTextColor()

void svt::table::UnoControlTableModel::setHeaderTextColor ( css::uno::Any const &  i_color)

Definition at line 575 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aHeaderTextColor.

◆ setHorizontalScrollbarVisibility()

void svt::table::UnoControlTableModel::setHorizontalScrollbarVisibility ( ScrollbarVisibility const  i_visibility)

Definition at line 365 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and eHScrollMode.

◆ setInactiveSelectionBackColor()

void svt::table::UnoControlTableModel::setInactiveSelectionBackColor ( css::uno::Any const &  i_color)

Definition at line 589 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aInactiveSelectionBackColor.

◆ setInactiveSelectionTextColor()

void svt::table::UnoControlTableModel::setInactiveSelectionTextColor ( css::uno::Any const &  i_color)

Definition at line 603 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aInactiveSelectionTextColor.

◆ setLineColor()

void svt::table::UnoControlTableModel::setLineColor ( css::uno::Any const &  i_color)

Definition at line 519 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aGridLineColor.

◆ setRowBackgroundColors()

void svt::table::UnoControlTableModel::setRowBackgroundColors ( css::uno::Any const &  i_APIValue)

Definition at line 645 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aRowColors.

◆ setRowHeaders()

void svt::table::UnoControlTableModel::setRowHeaders ( bool  _bRowHeaders)

◆ setRowHeaderWidth()

void svt::table::UnoControlTableModel::setRowHeaderWidth ( TableMetrics  _nWidth)

◆ setRowHeight()

void svt::table::UnoControlTableModel::setRowHeight ( TableMetrics  _nHeight)

◆ setTextColor()

void svt::table::UnoControlTableModel::setTextColor ( css::uno::Any const &  i_color)

Definition at line 617 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aTextColor.

◆ setTextLineColor()

void svt::table::UnoControlTableModel::setTextLineColor ( css::uno::Any const &  i_color)

Definition at line 631 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_aTextLineColor.

◆ setVerticalAlign()

void svt::table::UnoControlTableModel::setVerticalAlign ( css::style::VerticalAlignment  _rAlign)

Definition at line 668 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and m_eVerticalAlign.

◆ setVerticalScrollbarVisibility()

void svt::table::UnoControlTableModel::setVerticalScrollbarVisibility ( ScrollbarVisibility const  i_visibility)

Definition at line 358 of file unocontroltablemodel.cxx.

References DBG_CHECK_ME, and eVScrollMode.

◆ sortByColumn()

void svt::table::UnoControlTableModel::sortByColumn ( ColPos const  i_column,
ColumnSortDirection const  i_sortDirection 
)
overridevirtual

sorts the rows in the model by the given column's data, in the given direction.

Implements svt::table::ITableDataSort.

Definition at line 715 of file unocontroltablemodel.cxx.

References svt::table::ColumnSortAscending, DBG_CHECK_ME, DBG_UNHANDLED_EXCEPTION, Exception, and getDataModel().

Member Data Documentation

◆ aColumns

ColumnModels svt::table::UnoControlTableModel::aColumns
private

◆ bEnabled

bool svt::table::UnoControlTableModel::bEnabled
private

Definition at line 170 of file unocontroltablemodel.hxx.

Referenced by isEnabled(), and setEnabled().

◆ bHasColumnHeaders

bool svt::table::UnoControlTableModel::bHasColumnHeaders
private

Definition at line 150 of file unocontroltablemodel.hxx.

Referenced by hasColumnHeaders(), and setColumnHeaders().

◆ bHasRowHeaders

bool svt::table::UnoControlTableModel::bHasRowHeaders
private

Definition at line 151 of file unocontroltablemodel.hxx.

Referenced by hasRowHeaders(), and setRowHeaders().

◆ eHScrollMode

ScrollbarVisibility svt::table::UnoControlTableModel::eHScrollMode
private

◆ eVScrollMode

ScrollbarVisibility svt::table::UnoControlTableModel::eVScrollMode
private

◆ m_aActiveSelectionBackColor

::std::optional< ::Color > svt::table::UnoControlTableModel::m_aActiveSelectionBackColor
private

◆ m_aActiveSelectionTextColor

::std::optional< ::Color > svt::table::UnoControlTableModel::m_aActiveSelectionTextColor
private

◆ m_aColumnModel

css::uno::WeakReference< css::awt::grid::XGridColumnModel > svt::table::UnoControlTableModel::m_aColumnModel
private

◆ m_aDataModel

css::uno::WeakReference< css::awt::grid::XGridDataModel > svt::table::UnoControlTableModel::m_aDataModel
private

◆ m_aGridLineColor

::std::optional< ::Color > svt::table::UnoControlTableModel::m_aGridLineColor
private

Definition at line 159 of file unocontroltablemodel.hxx.

Referenced by getLineColor(), and setLineColor().

◆ m_aHeaderBackgroundColor

::std::optional< ::Color > svt::table::UnoControlTableModel::m_aHeaderBackgroundColor
private

Definition at line 160 of file unocontroltablemodel.hxx.

Referenced by getHeaderBackgroundColor(), and setHeaderBackgroundColor().

◆ m_aHeaderTextColor

::std::optional< ::Color > svt::table::UnoControlTableModel::m_aHeaderTextColor
private

Definition at line 161 of file unocontroltablemodel.hxx.

Referenced by getHeaderTextColor(), and setHeaderTextColor().

◆ m_aInactiveSelectionBackColor

::std::optional< ::Color > svt::table::UnoControlTableModel::m_aInactiveSelectionBackColor
private

◆ m_aInactiveSelectionTextColor

::std::optional< ::Color > svt::table::UnoControlTableModel::m_aInactiveSelectionTextColor
private

◆ m_aListeners

ModellListeners svt::table::UnoControlTableModel::m_aListeners
private

◆ m_aRowColors

::std::optional< ::std::vector< ::Color > > svt::table::UnoControlTableModel::m_aRowColors
private

Definition at line 168 of file unocontroltablemodel.hxx.

Referenced by getRowBackgroundColors(), and setRowBackgroundColors().

◆ m_aTextColor

::std::optional< ::Color > svt::table::UnoControlTableModel::m_aTextColor
private

Definition at line 166 of file unocontroltablemodel.hxx.

Referenced by getTextColor(), getTextLineColor(), and setTextColor().

◆ m_aTextLineColor

::std::optional< ::Color > svt::table::UnoControlTableModel::m_aTextLineColor
private

Definition at line 167 of file unocontroltablemodel.hxx.

Referenced by setTextLineColor().

◆ m_eVerticalAlign

css::style::VerticalAlignment svt::table::UnoControlTableModel::m_eVerticalAlign
private

Definition at line 169 of file unocontroltablemodel.hxx.

Referenced by getVerticalAlign(), and setVerticalAlign().

◆ nColumnHeaderHeight

TableMetrics svt::table::UnoControlTableModel::nColumnHeaderHeight
private

Definition at line 157 of file unocontroltablemodel.hxx.

Referenced by getColumnHeaderHeight(), and setColumnHeaderHeight().

◆ nRowHeaderWidth

TableMetrics svt::table::UnoControlTableModel::nRowHeaderWidth
private

Definition at line 158 of file unocontroltablemodel.hxx.

Referenced by getRowHeaderWidth(), and setRowHeaderWidth().

◆ nRowHeight

TableMetrics svt::table::UnoControlTableModel::nRowHeight
private

Definition at line 156 of file unocontroltablemodel.hxx.

Referenced by getRowHeight(), and setRowHeight().

◆ pInputHandler

PTableInputHandler svt::table::UnoControlTableModel::pInputHandler
private

Definition at line 155 of file unocontroltablemodel.hxx.

Referenced by getInputHandler(), and UnoControlTableModel().

◆ pRenderer

PTableRenderer svt::table::UnoControlTableModel::pRenderer
private

Definition at line 154 of file unocontroltablemodel.hxx.

Referenced by getRenderer(), and UnoControlTableModel().


The documentation for this class was generated from the following files: