LibreOffice Module chart2 (master) 1
|
DataTableView is responsible to create the table object, set the cell properties accordingly to the model and fill it with the chart series data. More...
#include <DataTableView.hxx>
Public Member Functions | |
DataTableView (rtl::Reference<::chart::ChartModel > const &xChartDoc, rtl::Reference< DataTable > const &rDataTableModel, css::uno::Reference< css::uno::XComponentContext > const &rComponentContext, bool bAlignAxisValuesWithColumns) | |
void | initializeShapes (const rtl::Reference< SvxShapeGroupAnyD > &xTarget) |
Initializes and prepares the target and data table shape. More... | |
void | initializeValues (std::vector< std::unique_ptr< VSeriesPlotter > > &rSeriesPlotterList) |
Prepares the values of the chart, which will be shown it the data table. More... | |
void | createShapes (basegfx::B2DVector const &rStart, basegfx::B2DVector const &rEnd, sal_Int32 nAxisStepWidth) |
Creates the data table and fills the values. More... | |
void | changePosition (sal_Int32 x, sal_Int32 y) |
Repositions the data table shape. More... | |
Private Member Functions | |
void | setCellCharAndParagraphProperties (css::uno::Reference< css::beans::XPropertySet > &xPropertySet) |
Set the char and paragraph properties for the input (value) cell. More... | |
void | setCellProperties (css::uno::Reference< css::beans::XPropertySet > &xPropertySet, bool bLeft, bool bTop, bool bRight, bool bBottom) |
Set the common cell properties (for all cells in the data table, including headers) More... | |
Private Attributes | |
rtl::Reference<::chart::ChartModel > | m_xChartModel |
rtl::Reference< SvxShapeGroupAnyD > | m_xTarget |
rtl::Reference< SvxTableShape > | m_xTableShape |
rtl::Reference< DataTable > | m_xDataTableModel |
css::uno::Reference< css::uno::XComponentContext > | m_xComponentContext |
css::uno::Reference< css::table::XTable > | m_xTable |
VLineProperties | m_aLineProperties |
std::vector< VSeriesPlotter * > | m_pSeriesPlotterList |
std::vector< OUString > | m_aDataSeriesNames |
std::vector< OUString > | m_aXValues |
std::vector< std::vector< OUString > > | m_pDataSeriesValues |
bool | m_bAlignAxisValuesWithColumns |
DataTableView is responsible to create the table object, set the cell properties accordingly to the model and fill it with the chart series data.
Definition at line 31 of file DataTableView.hxx.
chart::DataTableView::DataTableView | ( | rtl::Reference<::chart::ChartModel > const & | xChartDoc, |
rtl::Reference< DataTable > const & | rDataTableModel, | ||
css::uno::Reference< css::uno::XComponentContext > const & | rComponentContext, | ||
bool | bAlignAxisValuesWithColumns | ||
) |
Definition at line 87 of file DataTableView.cxx.
References chart::VLineProperties::initFromPropertySet(), m_aLineProperties, m_xComponentContext, and m_xDataTableModel.
void chart::DataTableView::changePosition | ( | sal_Int32 | x, |
sal_Int32 | y | ||
) |
Repositions the data table shape.
Definition at line 507 of file DataTableView.cxx.
References m_xTable, m_xTarget, x, and y.
Referenced by createShapes().
void chart::DataTableView::createShapes | ( | basegfx::B2DVector const & | rStart, |
basegfx::B2DVector const & | rEnd, | ||
sal_Int32 | nAxisStepWidth | ||
) |
Creates the data table and fills the values.
Definition at line 236 of file DataTableView.cxx.
References changePosition(), o3tl::convert(), chart::ObjectIdentifier::createClassifiedIdentifierForParticle(), chart::ObjectIdentifier::createParticleForDataTable(), chart::ShapeFactory::createTable(), basegfx::fround(), basegfx::Tuple2D< typename TYPE >::getX(), basegfx::Tuple2D< typename TYPE >::getY(), i, m_aDataSeriesNames, m_aXValues, m_bAlignAxisValuesWithColumns, m_pDataSeriesValues, m_pSeriesPlotterList, m_xChartModel, m_xComponentContext, m_xDataTableModel, m_xTable, m_xTableShape, m_xTarget, o3tl::mm100, o3tl::pt, chart::ShapeFactory::removeSubShapes(), setCellCharAndParagraphProperties(), and setCellProperties().
void chart::DataTableView::initializeShapes | ( | const rtl::Reference< SvxShapeGroupAnyD > & | xTarget | ) |
Initializes and prepares the target and data table shape.
Definition at line 521 of file DataTableView.cxx.
void chart::DataTableView::initializeValues | ( | std::vector< std::unique_ptr< VSeriesPlotter > > & | rSeriesPlotterList | ) |
Prepares the values of the chart, which will be shown it the data table.
Definition at line 526 of file DataTableView.cxx.
References i, m_aDataSeriesNames, m_aXValues, m_pDataSeriesValues, m_pSeriesPlotterList, and nValue.
|
private |
Set the char and paragraph properties for the input (value) cell.
Definition at line 101 of file DataTableView.cxx.
References m_xDataTableModel.
Referenced by createShapes().
|
private |
Set the common cell properties (for all cells in the data table, including headers)
Definition at line 159 of file DataTableView.cxx.
References chart::VLineProperties::Color, o3tl::convert(), chart::VLineProperties::DashName, chart::VLineProperties::LineStyle, m_aLineProperties, m_xChartModel, m_xDataTableModel, o3tl::mm100, o3tl::pt, o3tl::twip, and chart::VLineProperties::Width.
Referenced by createShapes().
|
private |
Definition at line 47 of file DataTableView.hxx.
Referenced by createShapes(), and initializeValues().
|
private |
Definition at line 43 of file DataTableView.hxx.
Referenced by DataTableView(), and setCellProperties().
|
private |
Definition at line 49 of file DataTableView.hxx.
Referenced by createShapes(), and initializeValues().
|
private |
Definition at line 54 of file DataTableView.hxx.
Referenced by createShapes().
|
private |
Definition at line 51 of file DataTableView.hxx.
Referenced by createShapes(), and initializeValues().
|
private |
Definition at line 44 of file DataTableView.hxx.
Referenced by createShapes(), and initializeValues().
|
private |
Definition at line 34 of file DataTableView.hxx.
Referenced by createShapes(), and setCellProperties().
|
private |
Definition at line 41 of file DataTableView.hxx.
Referenced by createShapes().
|
private |
Definition at line 40 of file DataTableView.hxx.
Referenced by createShapes(), DataTableView(), setCellCharAndParagraphProperties(), and setCellProperties().
|
private |
Definition at line 42 of file DataTableView.hxx.
Referenced by changePosition(), and createShapes().
|
private |
Definition at line 38 of file DataTableView.hxx.
Referenced by createShapes().
|
private |
Definition at line 36 of file DataTableView.hxx.
Referenced by changePosition(), createShapes(), and initializeShapes().