LibreOffice Module chart2 (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
chart::StockDataInterpreter Class Reference

#include <StockDataInterpreter.hxx>

Inheritance diagram for chart::StockDataInterpreter:
[legend]
Collaboration diagram for chart::StockDataInterpreter:
[legend]

Public Member Functions

 StockDataInterpreter (StockChartTypeTemplate::StockVariant eVariant)
 
virtual ~StockDataInterpreter () override
 
- Public Member Functions inherited from chart::DataInterpreter
 DataInterpreter ()
 
virtual ~DataInterpreter () override
 
virtual OUString SAL_CALL getImplementationName () override
 XServiceInfo declarations. More...
 
virtual sal_Bool SAL_CALL supportsService (const OUString &ServiceName) override
 
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames () override
 
virtual InterpretedData interpretDataSource (const css::uno::Reference< css::chart2::data::XDataSource > &xSource, const css::uno::Sequence< css::beans::PropertyValue > &aArguments, const std::vector< rtl::Reference< ::chart::DataSeries > > &aSeriesToReUse)
 Interprets the given data. More...
 
virtual InterpretedData reinterpretDataSeries (const InterpretedData &aInterpretedData)
 Re-interprets the data given in aInterpretedData while keeping the number of data series and the categories. More...
 
virtual bool isDataCompatible (const InterpretedData &aInterpretedData)
 parses the given data and states, if a reinterpretDataSeries() call can be done without data loss. More...
 
virtual css::uno::Any getChartTypeSpecificData (const OUString &sKey)
 Get chart information that is specific to a particular chart type, by key. More...
 

Protected Member Functions

virtual InterpretedData interpretDataSource (const css::uno::Reference< css::chart2::data::XDataSource > &xSource, const css::uno::Sequence< css::beans::PropertyValue > &aArguments, const std::vector< rtl::Reference< ::chart::DataSeries > > &aSeriesToReUse) override
 Interprets the given data. More...
 
virtual bool isDataCompatible (const InterpretedData &aInterpretedData) override
 parses the given data and states, if a reinterpretDataSeries() call can be done without data loss. More...
 
virtual InterpretedData reinterpretDataSeries (const InterpretedData &aInterpretedData) override
 Re-interprets the data given in aInterpretedData while keeping the number of data series and the categories. More...
 
virtual css::uno::Any getChartTypeSpecificData (const OUString &sKey) override
 Get chart information that is specific to a particular chart type, by key. More...
 

Private Member Functions

StockChartTypeTemplate::StockVariant GetStockVariant () const
 

Private Attributes

StockChartTypeTemplate::StockVariant m_eStockVariant
 

Additional Inherited Members

- Static Public Member Functions inherited from chart::DataInterpreter
static OUString GetRole (const css::uno::Reference< css::chart2::data::XDataSequence > &xSeq)
 
static void SetRole (const css::uno::Reference< css::chart2::data::XDataSequence > &xSeq, const OUString &rRole)
 
static css::uno::Any GetProperty (const css::uno::Sequence< css::beans::PropertyValue > &aArguments, std::u16string_view rName)
 
static bool HasCategories (const css::uno::Sequence< css::beans::PropertyValue > &rArguments, const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > &rData)
 
static bool UseCategoriesAsX (const css::uno::Sequence< css::beans::PropertyValue > &rArguments)
 
static std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > getDataSequences (const css::uno::Reference< css::chart2::data::XDataSource > &xSource)
 
static rtl::Reference< ::chart::DataSourcemergeInterpretedData (const InterpretedData &aInterpretedData)
 Try to reverse the operation done in interpretDataSource(). More...
 

Detailed Description

Definition at line 28 of file StockDataInterpreter.hxx.

Constructor & Destructor Documentation

◆ StockDataInterpreter()

chart::StockDataInterpreter::StockDataInterpreter ( StockChartTypeTemplate::StockVariant  eVariant)
explicit

Definition at line 39 of file StockDataInterpreter.cxx.

◆ ~StockDataInterpreter()

chart::StockDataInterpreter::~StockDataInterpreter ( )
overridevirtual

Definition at line 44 of file StockDataInterpreter.cxx.

Member Function Documentation

◆ getChartTypeSpecificData()

uno::Any chart::StockDataInterpreter::getChartTypeSpecificData ( const OUString &  sKey)
overrideprotectedvirtual

Get chart information that is specific to a particular chart type, by key.

Parameters
sKeyname of the piece of data to retrieve.

Supported key strings:

  • "stock variant": stock chart variant, with 0 = neither Open Values nor volume, 1 = Open Values, 2 = volume, 3 = both. Valid for candlestick charts.
Returns
The value requested, or nothing if not present.

Reimplemented from chart::DataInterpreter.

Definition at line 322 of file StockDataInterpreter.cxx.

References GetStockVariant(), chart::StockChartTypeTemplate::NONE, chart::StockChartTypeTemplate::Open, chart::StockChartTypeTemplate::Volume, and chart::StockChartTypeTemplate::VolumeOpen.

◆ GetStockVariant()

StockChartTypeTemplate::StockVariant chart::StockDataInterpreter::GetStockVariant ( ) const
inlineprivate

◆ interpretDataSource()

InterpretedData chart::StockDataInterpreter::interpretDataSource ( const css::uno::Reference< css::chart2::data::XDataSource > &  xSource,
const css::uno::Sequence< css::beans::PropertyValue > &  aArguments,
const std::vector< rtl::Reference< ::chart::DataSeries > > &  aSeriesToReUse 
)
overrideprotectedvirtual

Interprets the given data.

Parameters
xSourcethe data source.
aArgumentsArguments that tell the template how to slice the given range. The properties should be defined in a separate service.

For standard parameters that may be used, see the service StandardDiagramCreationParameters.

Parameters
aSeriesToReUseuse all the data series given here for the result before creating new ones.

Reimplemented from chart::DataInterpreter.

Definition at line 48 of file StockDataInterpreter.cxx.

References aData, DBG_UNHANDLED_EXCEPTION, chart::DataInterpreter::getDataSequences(), GetStockVariant(), chart::DataInterpreter::HasCategories(), chart::StockChartTypeTemplate::Open, chart::DataInterpreter::SetRole(), chart::StockChartTypeTemplate::Volume, and chart::StockChartTypeTemplate::VolumeOpen.

◆ isDataCompatible()

bool chart::StockDataInterpreter::isDataCompatible ( const InterpretedData aInterpretedData)
overrideprotectedvirtual

parses the given data and states, if a reinterpretDataSeries() call can be done without data loss.

Returns
TRUE, if the data given in aInterpretedData has a similar structure than the one required is used as output of the data interpreter.

Reimplemented from chart::DataInterpreter.

Definition at line 261 of file StockDataInterpreter.cxx.

References chart::InterpretedData::Categories, DBG_UNHANDLED_EXCEPTION, GetStockVariant(), chart::DataInterpreter::isDataCompatible(), chart::StockChartTypeTemplate::Open, chart::InterpretedData::Series, U, chart::StockChartTypeTemplate::Volume, and chart::StockChartTypeTemplate::VolumeOpen.

◆ reinterpretDataSeries()

InterpretedData chart::StockDataInterpreter::reinterpretDataSeries ( const InterpretedData aInterpretedData)
overrideprotectedvirtual

Re-interprets the data given in aInterpretedData while keeping the number of data series and the categories.

Reimplemented from chart::DataInterpreter.

Definition at line 315 of file StockDataInterpreter.cxx.

Member Data Documentation

◆ m_eStockVariant

StockChartTypeTemplate::StockVariant chart::StockDataInterpreter::m_eStockVariant
private

Definition at line 49 of file StockDataInterpreter.hxx.

Referenced by GetStockVariant().


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