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

#include <VCoordinateSystem.hxx>

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

Public Member Functions

virtual ~VCoordinateSystem ()
 
void initPlottingTargets (const rtl::Reference< SvxShapeGroupAnyD > &xLogicTarget, const rtl::Reference< SvxShapeGroupAnyD > &xFinalTarget, rtl::Reference< SvxShapeGroupAnyD > &xLogicTargetForSeriesBehindAxis)
 
void setParticle (const OUString &rCooSysParticle)
 
void setTransformationSceneToScreen (const css::drawing::HomogenMatrix &rMatrix)
 
const css::drawing::HomogenMatrix & getTransformationSceneToScreen () const
 
virtual css::uno::Sequence< sal_Int32 > getCoordinateSystemResolution (const css::awt::Size &rPageSize, const css::awt::Size &rPageResolution)
 
ExplicitScaleData getExplicitScale (sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex) const
 
ExplicitIncrementData getExplicitIncrement (sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex) const
 
void setExplicitCategoriesProvider (ExplicitCategoriesProvider *)
 
ExplicitCategoriesProvidergetExplicitCategoriesProvider ()
 
std::vector< ExplicitScaleDatagetExplicitScales (sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex) const
 
std::vector< ExplicitIncrementDatagetExplicitIncrements (sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex) const
 
void addMinimumAndMaximumSupplier (MinimumAndMaximumSupplier *pMinimumAndMaximumSupplier)
 
bool hasMinimumAndMaximumSupplier (MinimumAndMaximumSupplier *pMinimumAndMaximumSupplier)
 
void clearMinimumAndMaximumSupplierList ()
 
void prepareAutomaticAxisScaling (ScaleAutomatism &rScaleAutomatism, sal_Int32 nDimIndex, sal_Int32 nAxisIndex)
 It sets the scaling parameters for the passed ScaleAutomatism object. More...
 
void setExplicitScaleAndIncrement (sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex, const ExplicitScaleData &rExplicitScale, const ExplicitIncrementData &rExplicitIncrement)
 
void set3DWallPositions (CuboidPlanePosition eLeftWallPos, CuboidPlanePosition eBackWallPos, CuboidPlanePosition eBottomPos)
 
const rtl::Reference< ::chart::BaseCoordinateSystem > & getModel () const
 
virtual void createVAxisList (const rtl::Reference<::chart::ChartModel > &xChartDoc, const css::awt::Size &rFontReferenceSize, const css::awt::Rectangle &rMaximumSpaceForLabels, bool bLimitSpaceForLabels, std::vector< std::unique_ptr< VSeriesPlotter > > &rSeriesPlotterList, css::uno::Reference< css::uno::XComponentContext > const &rComponentContext)
 Create "view" axis objects 'VAxis' from the coordinate system model. More...
 
virtual void initVAxisInList ()
 
virtual void updateScalesAndIncrementsOnAxes ()
 
void createMaximumAxesLabels ()
 
void createAxesLabels ()
 
void updatePositions ()
 
void createAxesShapes ()
 
virtual void createGridShapes ()
 
bool getPropertySwapXAndYAxis () const
 
sal_Int32 getMaximumAxisIndexByDimension (sal_Int32 nDimensionIndex) const
 
bool needSeriesNamesForAxis () const
 
void setSeriesNamesForAxis (const css::uno::Sequence< OUString > &rSeriesNames)
 

Static Public Member Functions

static std::unique_ptr< VCoordinateSystemcreateCoordinateSystem (const rtl::Reference< ::chart::BaseCoordinateSystem > &xCooSysModel)
 

Protected Types

typedef std::pair< sal_Int32, sal_Int32 > tFullAxisIndex
 
typedef std::map< tFullAxisIndex, std::shared_ptr< VAxisBase > > tVAxisMap
 

Protected Member Functions

 VCoordinateSystem (rtl::Reference< ::chart::BaseCoordinateSystem > xCooSys)
 
rtl::Reference< ::chart::AxisgetAxisByDimension (sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex) const
 
VAxisBasegetVAxis (sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex)
 
OUString createCIDForAxis (sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex)
 
OUString createCIDForGrid (sal_Int32 nDimensionIndex, sal_Int32 nAxisIndex)
 
sal_Int32 getNumberFormatKeyForAxis (const rtl::Reference< ::chart::Axis > &xAxis, const rtl::Reference<::chart::ChartModel > &xChartDoc)
 

Static Protected Member Functions

static std::vector< rtl::Reference< ::chart::GridProperties > > getGridListFromAxis (const rtl::Reference< ::chart::Axis > &xAxis)
 

Protected Attributes

rtl::Reference< ::chart::BaseCoordinateSystemm_xCooSysModel
 
OUString m_aCooSysParticle
 
rtl::Reference< SvxShapeGroupAnyDm_xLogicTargetForGrids
 
rtl::Reference< SvxShapeGroupAnyDm_xLogicTargetForAxes
 
rtl::Reference< SvxShapeGroupAnyDm_xFinalTarget
 
css::drawing::HomogenMatrix m_aMatrixSceneToScreen
 
CuboidPlanePosition m_eLeftWallPos
 
CuboidPlanePosition m_eBackWallPos
 
CuboidPlanePosition m_eBottomPos
 
MergedMinimumAndMaximumSupplier m_aMergedMinMaxSupplier
 Collection of min-max suppliers which are basically different chart types present in the same coordinate system. More...
 
css::uno::Sequence< OUString > m_aSeriesNamesForZAxis
 
tVAxisMap m_aAxisMap
 

Private Types

typedef std::map< tFullAxisIndex, ExplicitScaleDatatFullExplicitScaleMap
 
typedef std::map< tFullAxisIndex, ExplicitIncrementDatatFullExplicitIncrementMap
 

Private Member Functions

void impl_adjustDimensionAndIndex (sal_Int32 &rDimensionIndex, sal_Int32 &rAxisIndex) const
 

Static Private Member Functions

static void impl_adjustDimension (sal_Int32 &rDimensionIndex)
 

Private Attributes

std::vector< ExplicitScaleDatam_aExplicitScales
 
std::vector< ExplicitIncrementDatam_aExplicitIncrements
 
tFullExplicitScaleMap m_aSecondaryExplicitScales
 
tFullExplicitIncrementMap m_aSecondaryExplicitIncrements
 
std::unique_ptr< ExplicitCategoriesProviderm_apExplicitCategoriesProvider
 

Detailed Description

Definition at line 54 of file VCoordinateSystem.hxx.

Member Typedef Documentation

◆ tFullAxisIndex

typedef std::pair< sal_Int32, sal_Int32 > chart::VCoordinateSystem::tFullAxisIndex
protected

Definition at line 170 of file VCoordinateSystem.hxx.

◆ tFullExplicitIncrementMap

Definition at line 199 of file VCoordinateSystem.hxx.

◆ tFullExplicitScaleMap

Definition at line 198 of file VCoordinateSystem.hxx.

◆ tVAxisMap

typedef std::map< tFullAxisIndex, std::shared_ptr< VAxisBase > > chart::VCoordinateSystem::tVAxisMap
protected

Definition at line 190 of file VCoordinateSystem.hxx.

Constructor & Destructor Documentation

◆ ~VCoordinateSystem()

chart::VCoordinateSystem::~VCoordinateSystem ( )
virtual

Definition at line 88 of file VCoordinateSystem.cxx.

◆ VCoordinateSystem()

chart::VCoordinateSystem::VCoordinateSystem ( rtl::Reference< ::chart::BaseCoordinateSystem xCooSys)
protected

Definition at line 73 of file VCoordinateSystem.cxx.

References m_aExplicitScales, and m_xCooSysModel.

Referenced by createCoordinateSystem().

Member Function Documentation

◆ addMinimumAndMaximumSupplier()

void chart::VCoordinateSystem::addMinimumAndMaximumSupplier ( MinimumAndMaximumSupplier pMinimumAndMaximumSupplier)

◆ clearMinimumAndMaximumSupplierList()

void chart::VCoordinateSystem::clearMinimumAndMaximumSupplierList ( )

◆ createAxesLabels()

void chart::VCoordinateSystem::createAxesLabels ( )

◆ createAxesShapes()

void chart::VCoordinateSystem::createAxesShapes ( )

Definition at line 497 of file VCoordinateSystem.cxx.

References m_aAxisMap, m_aExplicitScales, and m_aMatrixSceneToScreen.

◆ createCIDForAxis()

OUString chart::VCoordinateSystem::createCIDForAxis ( sal_Int32  nDimensionIndex,
sal_Int32  nAxisIndex 
)
protected

◆ createCIDForGrid()

OUString chart::VCoordinateSystem::createCIDForGrid ( sal_Int32  nDimensionIndex,
sal_Int32  nAxisIndex 
)
protected

◆ createCoordinateSystem()

std::unique_ptr< VCoordinateSystem > chart::VCoordinateSystem::createCoordinateSystem ( const rtl::Reference< ::chart::BaseCoordinateSystem > &  xCooSysModel)
static

◆ createGridShapes()

void chart::VCoordinateSystem::createGridShapes ( )
virtual

◆ createMaximumAxesLabels()

void chart::VCoordinateSystem::createMaximumAxesLabels ( )

◆ createVAxisList()

void chart::VCoordinateSystem::createVAxisList ( const rtl::Reference<::chart::ChartModel > &  xChartDoc,
const css::awt::Size &  rFontReferenceSize,
const css::awt::Rectangle &  rMaximumSpaceForLabels,
bool  bLimitSpaceForLabels,
std::vector< std::unique_ptr< VSeriesPlotter > > &  rSeriesPlotterList,
css::uno::Reference< css::uno::XComponentContext > const &  rComponentContext 
)
virtual

Create "view" axis objects 'VAxis' from the coordinate system model.

Reimplemented in chart::VCartesianCoordinateSystem, and chart::VPolarCoordinateSystem.

Definition at line 326 of file VCoordinateSystem.cxx.

◆ getAxisByDimension()

rtl::Reference< Axis > chart::VCoordinateSystem::getAxisByDimension ( sal_Int32  nDimensionIndex,
sal_Int32  nAxisIndex 
) const
protected

Definition at line 190 of file VCoordinateSystem.cxx.

References m_xCooSysModel.

◆ getCoordinateSystemResolution()

uno::Sequence< sal_Int32 > chart::VCoordinateSystem::getCoordinateSystemResolution ( const css::awt::Size &  rPageSize,
const css::awt::Size &  rPageResolution 
)
virtual

◆ getExplicitCategoriesProvider()

ExplicitCategoriesProvider * chart::VCoordinateSystem::getExplicitCategoriesProvider ( )

◆ getExplicitIncrement()

ExplicitIncrementData chart::VCoordinateSystem::getExplicitIncrement ( sal_Int32  nDimensionIndex,
sal_Int32  nAxisIndex 
) const

◆ getExplicitIncrements()

std::vector< ExplicitIncrementData > chart::VCoordinateSystem::getExplicitIncrements ( sal_Int32  nDimensionIndex,
sal_Int32  nAxisIndex 
) const

◆ getExplicitScale()

ExplicitScaleData chart::VCoordinateSystem::getExplicitScale ( sal_Int32  nDimensionIndex,
sal_Int32  nAxisIndex 
) const

◆ getExplicitScales()

std::vector< ExplicitScaleData > chart::VCoordinateSystem::getExplicitScales ( sal_Int32  nDimensionIndex,
sal_Int32  nAxisIndex 
) const

◆ getGridListFromAxis()

std::vector< rtl::Reference<::chart::GridProperties > > chart::VCoordinateSystem::getGridListFromAxis ( const rtl::Reference< ::chart::Axis > &  xAxis)
staticprotected

Definition at line 197 of file VCoordinateSystem.cxx.

◆ getMaximumAxisIndexByDimension()

sal_Int32 chart::VCoordinateSystem::getMaximumAxisIndexByDimension ( sal_Int32  nDimensionIndex) const

◆ getModel()

const rtl::Reference< ::chart::BaseCoordinateSystem > & chart::VCoordinateSystem::getModel ( ) const
inline

◆ getNumberFormatKeyForAxis()

sal_Int32 chart::VCoordinateSystem::getNumberFormatKeyForAxis ( const rtl::Reference< ::chart::Axis > &  xAxis,
const rtl::Reference<::chart::ChartModel > &  xChartDoc 
)
protected

Definition at line 569 of file VCoordinateSystem.cxx.

References m_xCooSysModel.

◆ getPropertySwapXAndYAxis()

bool chart::VCoordinateSystem::getPropertySwapXAndYAxis ( ) const

◆ getTransformationSceneToScreen()

const css::drawing::HomogenMatrix & chart::VCoordinateSystem::getTransformationSceneToScreen ( ) const
inline

◆ getVAxis()

VAxisBase * chart::VCoordinateSystem::getVAxis ( sal_Int32  nDimensionIndex,
sal_Int32  nAxisIndex 
)
protected

Definition at line 415 of file VCoordinateSystem.cxx.

References m_aAxisMap.

Referenced by prepareAutomaticAxisScaling().

◆ hasMinimumAndMaximumSupplier()

bool chart::VCoordinateSystem::hasMinimumAndMaximumSupplier ( MinimumAndMaximumSupplier pMinimumAndMaximumSupplier)

◆ impl_adjustDimension()

void chart::VCoordinateSystem::impl_adjustDimension ( sal_Int32 &  rDimensionIndex)
staticprivate

◆ impl_adjustDimensionAndIndex()

void chart::VCoordinateSystem::impl_adjustDimensionAndIndex ( sal_Int32 &  rDimensionIndex,
sal_Int32 &  rAxisIndex 
) const
private

◆ initPlottingTargets()

void chart::VCoordinateSystem::initPlottingTargets ( const rtl::Reference< SvxShapeGroupAnyD > &  xLogicTarget,
const rtl::Reference< SvxShapeGroupAnyD > &  xFinalTarget,
rtl::Reference< SvxShapeGroupAnyD > &  xLogicTargetForSeriesBehindAxis 
)

◆ initVAxisInList()

void chart::VCoordinateSystem::initVAxisInList ( )
virtual

◆ needSeriesNamesForAxis()

bool chart::VCoordinateSystem::needSeriesNamesForAxis ( ) const

Definition at line 560 of file VCoordinateSystem.cxx.

References m_xCooSysModel.

◆ prepareAutomaticAxisScaling()

void chart::VCoordinateSystem::prepareAutomaticAxisScaling ( ScaleAutomatism rScaleAutomatism,
sal_Int32  nDimIndex,
sal_Int32  nAxisIndex 
)

It sets the scaling parameters for the passed ScaleAutomatism object.

Especially it sets the m_fValueMinimum and the m_fValueMaximum parameters (see ScaleAutomatism::expandValueRange). The value to be assigned to these two parameters is retrieved by invoking the getMinimum and getMaximum methods of the minimum-maximum supplier object that belongs to the given coordinate system. The minimum-maximum supplier object is set in the SeriesPlotterContainer::initializeCooSysAndSeriesPlotter method to the series plotter which is based on the coordinate system (see notes for the method). For instance for a pie chart the m_fValueMinimum and the m_fValueMaximum parameters are initialized by the PieChart::getMinimum and PieChart::getMaximum methods.

Definition at line 343 of file VCoordinateSystem.cxx.

References Date::AddDays(), chart::ExplicitScaleData::AxisType, chart::MergedMinimumAndMaximumSupplier::calculateTimeResolutionOnXAxis(), chart::VAxisBase::estimateMaximumAutoMainIncrementCount(), chart::ScaleAutomatism::expandValueRange(), chart::DateHelper::GetDateSomeMonthsAway(), chart::DateHelper::GetDateSomeYearsAway(), getExplicitScale(), chart::MergedMinimumAndMaximumSupplier::getMaximumX(), chart::MergedMinimumAndMaximumSupplier::getMaximumYInRange(), chart::MergedMinimumAndMaximumSupplier::getMaximumZ(), chart::MergedMinimumAndMaximumSupplier::getMinimumX(), chart::MergedMinimumAndMaximumSupplier::getMinimumYInRange(), chart::MergedMinimumAndMaximumSupplier::getMinimumZ(), chart::ScaleAutomatism::getNullDate(), chart::ScaleAutomatism::getScale(), getVAxis(), chart::MergedMinimumAndMaximumSupplier::isExpandBorderToIncrementRhythm(), chart::MergedMinimumAndMaximumSupplier::isExpandIfValuesCloseToBorder(), chart::MergedMinimumAndMaximumSupplier::isExpandNarrowValuesTowardZero(), chart::MergedMinimumAndMaximumSupplier::isExpandWideValuesToZero(), m_aMergedMinMaxSupplier, chart::ExplicitScaleData::m_bShiftedCategoryPosition, chart::ExplicitScaleData::Maximum, chart::ExplicitScaleData::Minimum, chart::ExplicitScaleData::NullDate, chart::ScaleAutomatism::setAutomaticTimeResolution(), chart::ScaleAutomatism::setAutoScalingOptions(), chart::ScaleAutomatism::setMaximumAutoMainIncrementCount(), chart::MergedMinimumAndMaximumSupplier::setTimeResolutionOnXAxis(), and chart::ExplicitScaleData::TimeResolution.

◆ set3DWallPositions()

void chart::VCoordinateSystem::set3DWallPositions ( CuboidPlanePosition  eLeftWallPos,
CuboidPlanePosition  eBackWallPos,
CuboidPlanePosition  eBottomPos 
)

Definition at line 449 of file VCoordinateSystem.cxx.

References m_eBackWallPos, m_eBottomPos, and m_eLeftWallPos.

◆ setExplicitCategoriesProvider()

void chart::VCoordinateSystem::setExplicitCategoriesProvider ( ExplicitCategoriesProvider pExplicitCategoriesProvider)

Definition at line 224 of file VCoordinateSystem.cxx.

References m_apExplicitCategoriesProvider.

◆ setExplicitScaleAndIncrement()

void chart::VCoordinateSystem::setExplicitScaleAndIncrement ( sal_Int32  nDimensionIndex,
sal_Int32  nAxisIndex,
const ExplicitScaleData rExplicitScale,
const ExplicitIncrementData rExplicitIncrement 
)

◆ setParticle()

void chart::VCoordinateSystem::setParticle ( const OUString &  rCooSysParticle)

Definition at line 118 of file VCoordinateSystem.cxx.

References m_aCooSysParticle.

◆ setSeriesNamesForAxis()

void chart::VCoordinateSystem::setSeriesNamesForAxis ( const css::uno::Sequence< OUString > &  rSeriesNames)

Definition at line 564 of file VCoordinateSystem.cxx.

References m_aSeriesNamesForZAxis.

◆ setTransformationSceneToScreen()

void chart::VCoordinateSystem::setTransformationSceneToScreen ( const css::drawing::HomogenMatrix &  rMatrix)

◆ updatePositions()

void chart::VCoordinateSystem::updatePositions ( )

◆ updateScalesAndIncrementsOnAxes()

void chart::VCoordinateSystem::updateScalesAndIncrementsOnAxes ( )
virtual

Member Data Documentation

◆ m_aAxisMap

tVAxisMap chart::VCoordinateSystem::m_aAxisMap
protected

◆ m_aCooSysParticle

OUString chart::VCoordinateSystem::m_aCooSysParticle
protected

Definition at line 168 of file VCoordinateSystem.hxx.

Referenced by createCIDForAxis(), createCIDForGrid(), and setParticle().

◆ m_aExplicitIncrements

std::vector< ExplicitIncrementData > chart::VCoordinateSystem::m_aExplicitIncrements
private

◆ m_aExplicitScales

std::vector< ExplicitScaleData > chart::VCoordinateSystem::m_aExplicitScales
private

◆ m_aMatrixSceneToScreen

css::drawing::HomogenMatrix chart::VCoordinateSystem::m_aMatrixSceneToScreen
protected

◆ m_aMergedMinMaxSupplier

MergedMinimumAndMaximumSupplier chart::VCoordinateSystem::m_aMergedMinMaxSupplier
protected

Collection of min-max suppliers which are basically different chart types present in the same coordinate system.

This is used only for auto-scaling purposes.

Definition at line 186 of file VCoordinateSystem.hxx.

Referenced by addMinimumAndMaximumSupplier(), clearMinimumAndMaximumSupplierList(), hasMinimumAndMaximumSupplier(), and prepareAutomaticAxisScaling().

◆ m_apExplicitCategoriesProvider

std::unique_ptr< ExplicitCategoriesProvider > chart::VCoordinateSystem::m_apExplicitCategoriesProvider
private

◆ m_aSecondaryExplicitIncrements

tFullExplicitIncrementMap chart::VCoordinateSystem::m_aSecondaryExplicitIncrements
private

Definition at line 202 of file VCoordinateSystem.hxx.

Referenced by getExplicitIncrement(), and setExplicitScaleAndIncrement().

◆ m_aSecondaryExplicitScales

tFullExplicitScaleMap chart::VCoordinateSystem::m_aSecondaryExplicitScales
private

◆ m_aSeriesNamesForZAxis

css::uno::Sequence< OUString > chart::VCoordinateSystem::m_aSeriesNamesForZAxis
protected

Definition at line 188 of file VCoordinateSystem.hxx.

Referenced by setSeriesNamesForAxis().

◆ m_eBackWallPos

CuboidPlanePosition chart::VCoordinateSystem::m_eBackWallPos
protected

Definition at line 178 of file VCoordinateSystem.hxx.

Referenced by set3DWallPositions().

◆ m_eBottomPos

CuboidPlanePosition chart::VCoordinateSystem::m_eBottomPos
protected

Definition at line 179 of file VCoordinateSystem.hxx.

Referenced by set3DWallPositions().

◆ m_eLeftWallPos

CuboidPlanePosition chart::VCoordinateSystem::m_eLeftWallPos
protected

Definition at line 177 of file VCoordinateSystem.hxx.

Referenced by set3DWallPositions().

◆ m_xCooSysModel

rtl::Reference< ::chart::BaseCoordinateSystem > chart::VCoordinateSystem::m_xCooSysModel
protected

◆ m_xFinalTarget

rtl::Reference<SvxShapeGroupAnyD> chart::VCoordinateSystem::m_xFinalTarget
protected

Definition at line 174 of file VCoordinateSystem.hxx.

Referenced by initPlottingTargets().

◆ m_xLogicTargetForAxes

rtl::Reference<SvxShapeGroupAnyD> chart::VCoordinateSystem::m_xLogicTargetForAxes
protected

Definition at line 173 of file VCoordinateSystem.hxx.

Referenced by initPlottingTargets().

◆ m_xLogicTargetForGrids

rtl::Reference<SvxShapeGroupAnyD> chart::VCoordinateSystem::m_xLogicTargetForGrids
protected

Definition at line 172 of file VCoordinateSystem.hxx.

Referenced by initPlottingTargets().


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