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

#include <GraphicPropertyItemConverter.hxx>

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

Public Member Functions

 GraphicPropertyItemConverter (const css::uno::Reference< css::beans::XPropertySet > &rPropertySet, SfxItemPool &rItemPool, SdrModel &rDrawModel, css::uno::Reference< css::lang::XMultiServiceFactory > xNamedPropertyContainerFactory, GraphicObjectType eObjectType)
 
virtual ~GraphicPropertyItemConverter () override
 
- 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 WhichRangesContainer & GetWhichPairs () 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 WhichRangesContainer & GetWhichPairs () 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...
 
SfxItemPool & GetItemPool () 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

GraphicObjectType m_GraphicObjectType
 
SdrModel & m_rDrawModel
 
css::uno::Reference< css::lang::XMultiServiceFactory > m_xNamedPropertyTableFactory
 

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, tMemberIdType > tPropertyNameWithMemberId
 
- 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 38 of file GraphicPropertyItemConverter.hxx.

Constructor & Destructor Documentation

◆ GraphicPropertyItemConverter()

chart::wrapper::GraphicPropertyItemConverter::GraphicPropertyItemConverter ( const css::uno::Reference< css::beans::XPropertySet > &  rPropertySet,
SfxItemPool &  rItemPool,
SdrModel &  rDrawModel,
css::uno::Reference< css::lang::XMultiServiceFactory >  xNamedPropertyContainerFactory,
GraphicObjectType  eObjectType 
)

Definition at line 136 of file GraphicPropertyItemConverter.cxx.

◆ ~GraphicPropertyItemConverter()

chart::wrapper::GraphicPropertyItemConverter::~GraphicPropertyItemConverter ( )
overridevirtual

Definition at line 149 of file GraphicPropertyItemConverter.cxx.

Member Function Documentation

◆ ApplySpecialItem()

bool chart::wrapper::GraphicPropertyItemConverter::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 417 of file GraphicPropertyItemConverter.cxx.

References chart::PropertyHelper::addBitmapUniqueNameToTable(), chart::PropertyHelper::addGradientUniqueNameToTable(), chart::PropertyHelper::addHatchUniqueNameToTable(), chart::PropertyHelper::addLineDashUniqueNameToTable(), chart::PropertyHelper::addTransparencyGradientUniqueNameToTable(), aName, aPropName, DBG_UNHANDLED_EXCEPTION, chart::wrapper::FilledDataPoint, SfxItemSet::Get(), chart::wrapper::ItemConverter::GetPropertySet(), getPropertyValue(), GetValue, XFillFloatTransparenceItem::IsEnabled(), chart::wrapper::LineDataPoint, m_GraphicObjectType, m_xNamedPropertyTableFactory, MID_BITMAP, MID_FILLGRADIENT, MID_FILLHATCH, MID_LINEDASH, MID_NAME, nValue, XFillBitmapItem::QueryValue(), XFillFloatTransparenceItem::QueryValue(), XFillGradientItem::QueryValue(), XFillHatchItem::QueryValue(), XLineDashItem::QueryValue(), SAL_MAX_INT16, u, XATTR_FILLBITMAP(), XATTR_FILLBMP_STRETCH(), XATTR_FILLBMP_TILE(), XATTR_FILLFLOATTRANSPARENCE(), XATTR_FILLGRADIENT(), XATTR_FILLHATCH(), XATTR_FILLTRANSPARENCE(), XATTR_GRADIENTSTEPCOUNT(), XATTR_LINEDASH(), and XATTR_LINETRANSPARENCE().

◆ FillSpecialItem()

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

◆ GetItemProperty()

bool chart::wrapper::GraphicPropertyItemConverter::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 169 of file GraphicPropertyItemConverter.cxx.

References chart::wrapper::FilledDataPoint, chart::wrapper::LineAndFillProperties, chart::wrapper::LineDataPoint, chart::wrapper::LineProperties, and m_GraphicObjectType.

◆ GetWhichPairs()

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

Member Data Documentation

◆ m_GraphicObjectType

GraphicObjectType chart::wrapper::GraphicPropertyItemConverter::m_GraphicObjectType
private

◆ m_rDrawModel

SdrModel& chart::wrapper::GraphicPropertyItemConverter::m_rDrawModel
private

Definition at line 58 of file GraphicPropertyItemConverter.hxx.

Referenced by FillSpecialItem().

◆ m_xNamedPropertyTableFactory

css::uno::Reference< css::lang::XMultiServiceFactory > chart::wrapper::GraphicPropertyItemConverter::m_xNamedPropertyTableFactory
private

Definition at line 59 of file GraphicPropertyItemConverter.hxx.

Referenced by ApplySpecialItem(), and FillSpecialItem().


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