LibreOffice Module chart2 (master) 1
Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
chart::DataBrowserModel Class Referencefinal

#include <DataBrowserModel.hxx>

Collaboration diagram for chart::DataBrowserModel:
[legend]

Classes

struct  implColumnLess
 
struct  tDataColumn
 
struct  tDataHeader
 

Public Types

enum  eCellType {
  NUMBER ,
  TEXT ,
  TEXTORDATE
}
 
typedef std::vector< tDataHeadertDataHeaderVector
 

Public Member Functions

 DataBrowserModel (const rtl::Reference<::chart::ChartModel > &xChartDoc)
 
 ~DataBrowserModel ()
 
void insertDataSeries (sal_Int32 nAfterColumnIndex)
 Inserts a new data series after the data series to which the data column with index nAfterColumnIndex belongs. More...
 
void insertComplexCategoryLevel (sal_Int32 nAfterColumnIndex)
 Inserts a new text column for complex categories. More...
 
void removeDataSeriesOrComplexCategoryLevel (sal_Int32 nAtColumnIndex)
 Removes a data series to which the data column with index nAtColumnIndex belongs. More...
 
void swapDataSeries (sal_Int32 nFirstIndex)
 Swaps the series to which the data column with index nFirstIndex belongs with the next series (which starts at an index >= nFirstIndex + 1) More...
 
void swapDataPointForAllSeries (sal_Int32 nFirstIndex)
 
void insertDataPointForAllSeries (sal_Int32 nAfterIndex)
 
void removeDataPointForAllSeries (sal_Int32 nAtIndex)
 
eCellType getCellType (sal_Int32 nAtColumn) const
 
double getCellNumber (sal_Int32 nAtColumn, sal_Int32 nAtRow)
 If getCellType( nAtColumn, nAtRow ) returns TEXT, the result will be Nan. More...
 
OUString getCellText (sal_Int32 nAtColumn, sal_Int32 nAtRow)
 
css::uno::Any getCellAny (sal_Int32 nAtColumn, sal_Int32 nAtRow)
 
sal_uInt32 getNumberFormatKey (sal_Int32 nAtColumn)
 
bool setCellNumber (sal_Int32 nAtColumn, sal_Int32 nAtRow, double fValue)
 returns </sal_True> if the number could successfully be set at the given position More...
 
bool setCellText (sal_Int32 nAtColumn, sal_Int32 nAtRow, const OUString &rText)
 returns </sal_True> if the text could successfully be set at the given position More...
 
bool setCellAny (sal_Int32 nAtColumn, sal_Int32 nAtRow, const css::uno::Any &aValue)
 
sal_Int32 getColumnCount () const
 
sal_Int32 getMaxRowCount () const
 
OUString getRoleOfColumn (sal_Int32 nColumnIndex) const
 
bool isCategoriesColumn (sal_Int32 nColumnIndex) const
 
const tDataHeaderVectorgetDataHeaders () const
 
tDataHeader getHeaderForSeries (const css::uno::Reference< css::chart2::XDataSeries > &xSeries) const
 
rtl::Reference< ::chart::DataSeriesgetDataSeriesByColumn (sal_Int32 nColumn) const
 

Private Types

typedef std::vector< tDataColumntDataColumnVector
 

Private Member Functions

void updateFromModel ()
 
void removeComplexCategoryLevel (sal_Int32 nAtColumnIndex)
 
void addErrorBarRanges (const rtl::Reference<::chart::DataSeries > &xDataSeries, sal_Int32 nNumberFormatKey, sal_Int32 &rInOutSequenceIndex, sal_Int32 &rInOutHeaderEnd, bool bYError)
 
sal_Int32 getCategoryColumnCount ()
 

Private Attributes

rtl::Reference<::chart::ChartModel > m_xChartDocument
 
std::unique_ptr< DialogModelm_apDialogModel
 
tDataColumnVector m_aColumns
 
tDataHeaderVector m_aHeaders
 

Detailed Description

Definition at line 47 of file DataBrowserModel.hxx.

Member Typedef Documentation

◆ tDataColumnVector

Definition at line 162 of file DataBrowserModel.hxx.

◆ tDataHeaderVector

Definition at line 133 of file DataBrowserModel.hxx.

Member Enumeration Documentation

◆ eCellType

Enumerator
NUMBER 
TEXT 
TEXTORDATE 

Definition at line 77 of file DataBrowserModel.hxx.

Constructor & Destructor Documentation

◆ DataBrowserModel()

chart::DataBrowserModel::DataBrowserModel ( const rtl::Reference<::chart::ChartModel > &  xChartDoc)
explicit

Definition at line 247 of file DataBrowserModel.cxx.

References updateFromModel().

◆ ~DataBrowserModel()

chart::DataBrowserModel::~DataBrowserModel ( )

Definition at line 255 of file DataBrowserModel.cxx.

Member Function Documentation

◆ addErrorBarRanges()

void chart::DataBrowserModel::addErrorBarRanges ( const rtl::Reference<::chart::DataSeries > &  xDataSeries,
sal_Int32  nNumberFormatKey,
sal_Int32 &  rInOutSequenceIndex,
sal_Int32 &  rInOutHeaderEnd,
bool  bYError 
)
private

◆ getCategoryColumnCount()

sal_Int32 chart::DataBrowserModel::getCategoryColumnCount ( )
private

Definition at line 732 of file DataBrowserModel.cxx.

References m_aColumns.

Referenced by insertComplexCategoryLevel(), and insertDataSeries().

◆ getCellAny()

uno::Any chart::DataBrowserModel::getCellAny ( sal_Int32  nAtColumn,
sal_Int32  nAtRow 
)

Definition at line 588 of file DataBrowserModel.cxx.

References m_aColumns, and nIndex.

◆ getCellNumber()

double chart::DataBrowserModel::getCellNumber ( sal_Int32  nAtColumn,
sal_Int32  nAtRow 
)

If getCellType( nAtColumn, nAtRow ) returns TEXT, the result will be Nan.

Definition at line 570 of file DataBrowserModel.cxx.

References m_aColumns, and nIndex.

◆ getCellText()

OUString chart::DataBrowserModel::getCellText ( sal_Int32  nAtColumn,
sal_Int32  nAtRow 
)

Definition at line 608 of file DataBrowserModel.cxx.

References m_aColumns, and nIndex.

◆ getCellType()

DataBrowserModel::eCellType chart::DataBrowserModel::getCellType ( sal_Int32  nAtColumn) const

Definition at line 561 of file DataBrowserModel.cxx.

References m_aColumns, nIndex, and TEXT.

Referenced by setCellNumber(), and setCellText().

◆ getColumnCount()

sal_Int32 chart::DataBrowserModel::getColumnCount ( ) const

Definition at line 687 of file DataBrowserModel.cxx.

References m_aColumns.

◆ getDataHeaders()

const tDataHeaderVector & chart::DataBrowserModel::getDataHeaders ( ) const
inline

Definition at line 135 of file DataBrowserModel.hxx.

References m_aHeaders.

◆ getDataSeriesByColumn()

rtl::Reference< DataSeries > chart::DataBrowserModel::getDataSeriesByColumn ( sal_Int32  nColumn) const

Definition at line 553 of file DataBrowserModel.cxx.

References m_aColumns, and nIndex.

◆ getHeaderForSeries()

DataBrowserModel::tDataHeader chart::DataBrowserModel::getHeaderForSeries ( const css::uno::Reference< css::chart2::XDataSeries > &  xSeries) const

Definition at line 539 of file DataBrowserModel.cxx.

References m_aHeaders.

Referenced by removeDataSeriesOrComplexCategoryLevel().

◆ getMaxRowCount()

sal_Int32 chart::DataBrowserModel::getMaxRowCount ( ) const

Definition at line 692 of file DataBrowserModel.cxx.

References m_aColumns, and nLength.

◆ getNumberFormatKey()

sal_uInt32 chart::DataBrowserModel::getNumberFormatKey ( sal_Int32  nAtColumn)

Definition at line 628 of file DataBrowserModel.cxx.

References m_aColumns, and nIndex.

◆ getRoleOfColumn()

OUString chart::DataBrowserModel::getRoleOfColumn ( sal_Int32  nColumnIndex) const

Definition at line 712 of file DataBrowserModel.cxx.

References m_aColumns, and o3tl::make_unsigned().

◆ insertComplexCategoryLevel()

void chart::DataBrowserModel::insertComplexCategoryLevel ( sal_Int32  nAfterColumnIndex)

Inserts a new text column for complex categories.

Definition at line 384 of file DataBrowserModel.cxx.

References getCategoryColumnCount(), isCategoriesColumn(), m_apDialogModel, m_xChartDocument, and updateFromModel().

◆ insertDataPointForAllSeries()

void chart::DataBrowserModel::insertDataPointForAllSeries ( sal_Int32  nAfterIndex)

Definition at line 517 of file DataBrowserModel.cxx.

References m_apDialogModel.

◆ insertDataSeries()

void chart::DataBrowserModel::insertDataSeries ( sal_Int32  nAfterColumnIndex)

Inserts a new data series after the data series to which the data column with index nAfterColumnIndex belongs.

Definition at line 275 of file DataBrowserModel.cxx.

References CHART_UNONAME_NUMFMT, getCategoryColumnCount(), isCategoriesColumn(), m_aColumns, m_aHeaders, m_apDialogModel, m_xChartDocument, o3tl::make_unsigned(), nIndex, and updateFromModel().

◆ isCategoriesColumn()

bool chart::DataBrowserModel::isCategoriesColumn ( sal_Int32  nColumnIndex) const

◆ removeComplexCategoryLevel()

void chart::DataBrowserModel::removeComplexCategoryLevel ( sal_Int32  nAtColumnIndex)
private

◆ removeDataPointForAllSeries()

void chart::DataBrowserModel::removeDataPointForAllSeries ( sal_Int32  nAtIndex)

Definition at line 528 of file DataBrowserModel.cxx.

References m_apDialogModel.

◆ removeDataSeriesOrComplexCategoryLevel()

void chart::DataBrowserModel::removeDataSeriesOrComplexCategoryLevel ( sal_Int32  nAtColumnIndex)

Removes a data series to which the data column with index nAtColumnIndex belongs.

Definition at line 424 of file DataBrowserModel.cxx.

References chart::DataSeriesHelper::getAllDataSequences(), getHeaderForSeries(), isCategoriesColumn(), m_aColumns, m_apDialogModel, o3tl::make_unsigned(), removeComplexCategoryLevel(), and updateFromModel().

◆ setCellAny()

bool chart::DataBrowserModel::setCellAny ( sal_Int32  nAtColumn,
sal_Int32  nAtRow,
const css::uno::Any &  aValue 
)

Definition at line 636 of file DataBrowserModel.cxx.

References m_aColumns, m_apDialogModel, m_xChartDocument, and nIndex.

Referenced by setCellNumber(), and setCellText().

◆ setCellNumber()

bool chart::DataBrowserModel::setCellNumber ( sal_Int32  nAtColumn,
sal_Int32  nAtRow,
double  fValue 
)

returns </sal_True> if the number could successfully be set at the given position

Definition at line 675 of file DataBrowserModel.cxx.

References getCellType(), NUMBER, and setCellAny().

◆ setCellText()

bool chart::DataBrowserModel::setCellText ( sal_Int32  nAtColumn,
sal_Int32  nAtRow,
const OUString &  rText 
)

returns </sal_True> if the text could successfully be set at the given position

Definition at line 681 of file DataBrowserModel.cxx.

References getCellType(), setCellAny(), and TEXT.

◆ swapDataPointForAllSeries()

void chart::DataBrowserModel::swapDataPointForAllSeries ( sal_Int32  nFirstIndex)

Definition at line 505 of file DataBrowserModel.cxx.

References m_apDialogModel.

◆ swapDataSeries()

void chart::DataBrowserModel::swapDataSeries ( sal_Int32  nFirstIndex)

Swaps the series to which the data column with index nFirstIndex belongs with the next series (which starts at an index >= nFirstIndex + 1)

Definition at line 491 of file DataBrowserModel.cxx.

References chart::DialogModel::Down, m_aColumns, m_apDialogModel, o3tl::make_unsigned(), and updateFromModel().

◆ updateFromModel()

void chart::DataBrowserModel::updateFromModel ( )
private

Member Data Documentation

◆ m_aColumns

tDataColumnVector chart::DataBrowserModel::m_aColumns
private

◆ m_aHeaders

tDataHeaderVector chart::DataBrowserModel::m_aHeaders
private

◆ m_apDialogModel

std::unique_ptr< DialogModel > chart::DataBrowserModel::m_apDialogModel
private

◆ m_xChartDocument

rtl::Reference<::chart::ChartModel> chart::DataBrowserModel::m_xChartDocument
private

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