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

#include <AxisItemConverter.hxx>

Inheritance diagram for chart::wrapper::AxisItemConverter:
[legend]
Collaboration diagram for chart::wrapper::AxisItemConverter:
[legend]

Public Member Functions

 AxisItemConverter (const css::uno::Reference< css::beans::XPropertySet > &rPropertySet, SfxItemPool &rItemPool, SdrModel &rDrawModel, const rtl::Reference<::chart::ChartModel > &xChartDoc, ExplicitScaleData const *pScale, ExplicitIncrementData const *pIncrement, const css::awt::Size *pRefSize)
 
virtual ~AxisItemConverter () override
 
virtual void FillItemSet (SfxItemSet &rOutItemSet) const override
 applies all properties that can be mapped to items into the given item set. More...
 
virtual bool ApplyItemSet (const SfxItemSet &rItemSet) override
 applies all properties that are results of a conversion from all items in rItemSet to the internal XPropertySet. More...
 
- Public Member Functions inherited from chart::wrapper::ItemConverter
 ItemConverter (css::uno::Reference< css::beans::XPropertySet > xPropertySet, SfxItemPool &rItemPool)
 Construct an item converter that uses the given property set for reading/writing converted items. More...
 
virtual ~ItemConverter () override
 
virtual void FillItemSet (SfxItemSet &rOutItemSet) const
 applies all properties that can be mapped to items into the given item set. More...
 
virtual bool ApplyItemSet (const SfxItemSet &rItemSet)
 applies all properties that are results of a conversion from all items in rItemSet to the internal XPropertySet. More...
 
SfxItemSet CreateEmptyItemSet () const
 creates an empty item set using the given pool or a common pool if empty (see GetItemPool) and allowing all items given in the ranges returned by GetWhichPairs. More...
 

Protected Member Functions

virtual const WhichRangesContainerGetWhichPairs () const override
 implement this method to provide an array of which-ranges More...
 
virtual bool GetItemProperty (tWhichIdType nWhichId, tPropertyNameWithMemberId &rOutProperty) const override
 implement this method to return a Property object for a given which id. More...
 
virtual void FillSpecialItem (sal_uInt16 nWhichId, SfxItemSet &rOutItemSet) const override
 for items that can not be mapped directly to a property. More...
 
virtual bool ApplySpecialItem (sal_uInt16 nWhichId, const SfxItemSet &rItemSet) override
 for items that can not be mapped directly to a property. More...
 
- Protected Member Functions inherited from chart::wrapper::ItemConverter
virtual const WhichRangesContainerGetWhichPairs () const =0
 implement this method to provide an array of which-ranges More...
 
virtual bool GetItemProperty (tWhichIdType nWhichId, tPropertyNameWithMemberId &rOutProperty) const =0
 implement this method to return a Property object for a given which id. More...
 
virtual void FillSpecialItem (sal_uInt16 nWhichId, SfxItemSet &rOutItemSet) const
 for items that can not be mapped directly to a property. More...
 
virtual bool ApplySpecialItem (sal_uInt16 nWhichId, const SfxItemSet &rItemSet)
 for items that can not be mapped directly to a property. More...
 
SfxItemPoolGetItemPool () const
 Returns the pool. More...
 
const css::uno::Reference< css::beans::XPropertySet > & GetPropertySet () const
 Returns the XPropertySet that was given in the CTOR and is used to apply items in ApplyItemSet(). More...
 
virtual void _disposing (const css::lang::EventObject &rSource) override
 
void resetPropertySet (const css::uno::Reference< css::beans::XPropertySet > &xPropSet)
 sets a new property set, that you get with GetPropertySet(). More...
 
- Protected Member Functions inherited from utl::OEventListenerAdapter
 OEventListenerAdapter ()
 
virtual ~OEventListenerAdapter ()
 
void startComponentListening (const css::uno::Reference< css::lang::XComponent > &_rxComp)
 
void stopComponentListening (const css::uno::Reference< css::lang::XComponent > &_rxComp)
 
void stopAllComponentListening ()
 
virtual void _disposing (const css::lang::EventObject &_rSource)=0
 

Private Attributes

std::vector< std::unique_ptr< ItemConverter > > m_aConverters
 
rtl::Reference<::chart::Axism_xAxis
 
rtl::Reference<::chart::ChartModel > m_xChartDoc
 
std::unique_ptr< ExplicitScaleDatam_pExplicitScale
 
std::unique_ptr< ExplicitIncrementDatam_pExplicitIncrement
 

Additional Inherited Members

- Public Types inherited from chart::wrapper::ItemConverter
typedef sal_uInt16 tWhichIdType
 
typedef OUString tPropertyNameType
 
typedef sal_uInt8 tMemberIdType
 
typedef std::pair< tPropertyNameType, tMemberIdTypetPropertyNameWithMemberId
 
- Static Public Member Functions inherited from chart::wrapper::ItemConverter
static void InvalidateUnequalItems (SfxItemSet &rDestSet, const SfxItemSet &rSourceSet)
 Invalidates all items in rDestSet, that are set (state SfxItemState::SET) in both item sets (rDestSet and rSourceSet) and have differing content. More...
 

Detailed Description

Definition at line 39 of file AxisItemConverter.hxx.

Constructor & Destructor Documentation

◆ AxisItemConverter()

chart::wrapper::AxisItemConverter::AxisItemConverter ( const css::uno::Reference< css::beans::XPropertySet > &  rPropertySet,
SfxItemPool rItemPool,
SdrModel rDrawModel,
const rtl::Reference<::chart::ChartModel > &  xChartDoc,
ExplicitScaleData const *  pScale,
ExplicitIncrementData const *  pIncrement,
const css::awt::Size *  pRefSize 
)

◆ ~AxisItemConverter()

chart::wrapper::AxisItemConverter::~AxisItemConverter ( )
overridevirtual

Definition at line 108 of file AxisItemConverter.cxx.

Member Function Documentation

◆ ApplyItemSet()

bool chart::wrapper::AxisItemConverter::ApplyItemSet ( const SfxItemSet rItemSet)
overridevirtual

applies all properties that are results of a conversion from all items in rItemSet to the internal XPropertySet.

Call this method after a dialog was closed with OK

Returns
true, if any properties have been changed, false otherwise.

Reimplemented from chart::wrapper::ItemConverter.

Definition at line 121 of file AxisItemConverter.cxx.

References chart::wrapper::ItemConverter::ApplyItemSet(), and m_aConverters.

◆ ApplySpecialItem()

bool chart::wrapper::AxisItemConverter::ApplySpecialItem ( sal_uInt16  nWhichId,
const SfxItemSet rItemSet 
)
overrideprotectedvirtual

for items that can not be mapped directly to a property.

This method is called from ApplyItemSet(), if GetItemProperty() returns false.

The default implementation returns just false and shows an assertion

Returns
true if the item changed a property, false otherwise.
Exceptions
css::uno::Exception

Reimplemented from chart::wrapper::ItemConverter.

Definition at line 465 of file AxisItemConverter.cxx.

References CHART_UNONAME_LINK_TO_SRC_NUMFMT, CHART_UNONAME_NUMFMT, chart::AxisHelper::createLinearScaling(), chart::AxisHelper::createLogarithmicScaling(), ePos, SfxItemSet::Get(), chart::AxisHelper::getCoordinateSystemOfAxis(), chart::AxisHelper::getCrossingMainAxis(), chart::AxisHelper::getIndicesForAxis(), SfxItemSet::GetItemState(), chart::AxisHelper::getParallelAxis(), chart::wrapper::ItemConverter::GetPropertySet(), SfxBoolItem::GetValue(), GetValue, chart::AxisHelper::isAxisPositioningEnabled(), chart::AxisHelper::isLogarithmic(), chart::wrapper::lcl_isAutoMajor(), chart::wrapper::lcl_isAutoMinor(), chart::wrapper::lcl_isDateAxis(), m_pExplicitScale, m_xAxis, m_xChartDoc, SfxPoolItem::QueryValue(), SCHATTR_AXIS_AUTO_DATEAXIS(), SCHATTR_AXIS_AUTO_MAX(), SCHATTR_AXIS_AUTO_MIN(), SCHATTR_AXIS_AUTO_ORIGIN(), SCHATTR_AXIS_AUTO_STEP_HELP(), SCHATTR_AXIS_AUTO_STEP_MAIN(), SCHATTR_AXIS_AUTO_TIME_RESOLUTION(), SCHATTR_AXIS_HELP_TIME_UNIT(), SCHATTR_AXIS_LABEL_POSITION(), SCHATTR_AXIS_LOGARITHM(), SCHATTR_AXIS_MAIN_TIME_UNIT(), SCHATTR_AXIS_MARK_POSITION(), SCHATTR_AXIS_MAX(), SCHATTR_AXIS_MIN(), SCHATTR_AXIS_ORIGIN(), SCHATTR_AXIS_POSITION(), SCHATTR_AXIS_POSITION_VALUE(), SCHATTR_AXIS_REVERSE(), SCHATTR_AXIS_SHIFTED_CATEGORY_POSITION(), SCHATTR_AXIS_STEP_HELP(), SCHATTR_AXIS_STEP_MAIN(), SCHATTR_AXIS_TIME_RESOLUTION(), SCHATTR_AXISTYPE(), SCHATTR_TEXT_DEGREES(), and toDegrees().

◆ FillItemSet()

void chart::wrapper::AxisItemConverter::FillItemSet ( SfxItemSet rOutItemSet) const
overridevirtual

applies all properties that can be mapped to items into the given item set.

Call this method before opening a dialog.

Parameters
rOutItemSetthe SfxItemSet is filled with all items that are a result of a conversion from a property of the internal XPropertySet.

Reimplemented from chart::wrapper::ItemConverter.

Definition at line 112 of file AxisItemConverter.cxx.

References chart::wrapper::ItemConverter::FillItemSet(), and m_aConverters.

◆ FillSpecialItem()

void chart::wrapper::AxisItemConverter::FillSpecialItem ( sal_uInt16  nWhichId,
SfxItemSet rOutItemSet 
) const
overrideprotectedvirtual

for items that can not be mapped directly to a property.

This method is called from FillItemSet(), if GetItemProperty() returns false.

The default implementation does nothing except showing an assertion

Exceptions
css::uno::Exception

Reimplemented from chart::wrapper::ItemConverter.

Definition at line 160 of file AxisItemConverter.cxx.

References CHART_UNONAME_LINK_TO_SRC_NUMFMT, ePos, chart::AxisHelper::getChartTypeByIndex(), chart::AxisHelper::getCoordinateSystemOfAxis(), chart::AxisHelper::getCrossingMainAxis(), chart::AxisHelper::getIndicesForAxis(), chart::wrapper::ItemConverter::GetPropertySet(), getPropertyValue(), chart::hasDoubleValue(), chart::AxisHelper::isLogarithmic(), chart::ChartTypeHelper::isSupportingDateAxis(), chart::wrapper::lcl_hasTimeIntervalValue(), m_pExplicitIncrement, m_pExplicitScale, m_xAxis, m_xChartDoc, SfxItemSet::Put(), SCHATTR_AXIS_ALLOW_DATEAXIS(), SCHATTR_AXIS_AUTO_DATEAXIS(), SCHATTR_AXIS_AUTO_MAX(), SCHATTR_AXIS_AUTO_MIN(), SCHATTR_AXIS_AUTO_ORIGIN(), SCHATTR_AXIS_AUTO_STEP_HELP(), SCHATTR_AXIS_AUTO_STEP_MAIN(), SCHATTR_AXIS_AUTO_TIME_RESOLUTION(), SCHATTR_AXIS_CROSSING_MAIN_AXIS_NUMBERFORMAT(), SCHATTR_AXIS_HELP_TIME_UNIT(), SCHATTR_AXIS_LABEL_POSITION(), SCHATTR_AXIS_LOGARITHM(), SCHATTR_AXIS_MAIN_TIME_UNIT(), SCHATTR_AXIS_MARK_POSITION(), SCHATTR_AXIS_MAX(), SCHATTR_AXIS_MIN(), SCHATTR_AXIS_ORIGIN(), SCHATTR_AXIS_POSITION(), SCHATTR_AXIS_POSITION_VALUE(), SCHATTR_AXIS_REVERSE(), SCHATTR_AXIS_SHIFTED_CATEGORY_POSITION(), SCHATTR_AXIS_STEP_HELP(), SCHATTR_AXIS_STEP_MAIN(), SCHATTR_AXIS_TIME_RESOLUTION(), SCHATTR_AXISTYPE(), and SCHATTR_TEXT_DEGREES().

◆ GetItemProperty()

bool chart::wrapper::AxisItemConverter::GetItemProperty ( tWhichIdType  nWhichId,
tPropertyNameWithMemberId rOutProperty 
) const
overrideprotectedvirtual

implement this method to return a Property object for a given which id.

Parameters
rOutPropertyIf true is returned, this contains the property name and the corresponding Member-Id.
Returns
true, if the item can be mapped to a property.

Implements chart::wrapper::ItemConverter.

Definition at line 138 of file AxisItemConverter.cxx.

◆ GetWhichPairs()

const WhichRangesContainer & chart::wrapper::AxisItemConverter::GetWhichPairs ( ) const
overrideprotectedvirtual

implement this method to provide an array of which-ranges

Implements chart::wrapper::ItemConverter.

Definition at line 132 of file AxisItemConverter.cxx.

References nAxisWhichPairs.

Member Data Documentation

◆ m_aConverters

std::vector< std::unique_ptr<ItemConverter> > chart::wrapper::AxisItemConverter::m_aConverters
private

Definition at line 63 of file AxisItemConverter.hxx.

Referenced by ApplyItemSet(), AxisItemConverter(), and FillItemSet().

◆ m_pExplicitIncrement

std::unique_ptr<ExplicitIncrementData> chart::wrapper::AxisItemConverter::m_pExplicitIncrement
private

Definition at line 69 of file AxisItemConverter.hxx.

Referenced by AxisItemConverter(), and FillSpecialItem().

◆ m_pExplicitScale

std::unique_ptr<ExplicitScaleData> chart::wrapper::AxisItemConverter::m_pExplicitScale
private

Definition at line 68 of file AxisItemConverter.hxx.

Referenced by ApplySpecialItem(), AxisItemConverter(), and FillSpecialItem().

◆ m_xAxis

rtl::Reference<::chart::Axis> chart::wrapper::AxisItemConverter::m_xAxis
private

Definition at line 64 of file AxisItemConverter.hxx.

Referenced by ApplySpecialItem(), AxisItemConverter(), and FillSpecialItem().

◆ m_xChartDoc

rtl::Reference<::chart::ChartModel> chart::wrapper::AxisItemConverter::m_xChartDoc
private

Definition at line 66 of file AxisItemConverter.hxx.

Referenced by ApplySpecialItem(), and FillSpecialItem().


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