LibreOffice Module xmloff (master) 1
Classes | Public Member Functions | Protected Member Functions | Private Attributes | List of all members
SvXMLExportPropertyMapper Class Reference

#include <xmlexppr.hxx>

Inheritance diagram for SvXMLExportPropertyMapper:
[legend]
Collaboration diagram for SvXMLExportPropertyMapper:
[legend]

Classes

struct  Impl
 

Public Member Functions

 SvXMLExportPropertyMapper (const rtl::Reference< XMLPropertySetMapper > &rMapper)
 
virtual ~SvXMLExportPropertyMapper () override
 
void ChainExportMapper (const rtl::Reference< SvXMLExportPropertyMapper > &rMapper)
 
std::vector< XMLPropertyStateFilter (SvXMLExport const &rExport, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, bool bEnableFoFontFamily=false) const
 Filter all properties we don't want to export: Take all properties of the XPropertySet which are also found in the XMLPropertyMapEntry-array and which are not set directly (so, the value isn't default and isn't inherited) After this process It'll called 'Contextfilter' for application-specific filter-processes. More...
 
std::vector< XMLPropertyStateFilterDefaults (SvXMLExport const &rExport, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const
 Like Filter(), except that: More...
 
bool LessPartial (const ::std::vector< XMLPropertyState > &aProperties1, const ::std::vector< XMLPropertyState > &aProperties2) const
 Provides a partial ordering over two arrays of XMLPropertyState, Partial because implementing a full order requires quite a lot of code. More...
 
bool Equals (const ::std::vector< XMLPropertyState > &aProperties1, const ::std::vector< XMLPropertyState > &aProperties2) const
 Compare two arrays of XMLPropertyState. More...
 
void exportXML (SvXMLExport &rExport, const ::std::vector< XMLPropertyState > &rProperties, SvXmlExportFlags nFlags, bool bUseExtensionNamespaceForGraphicProperties=false) const
 fills the given attribute list with the items in the given set void SvXMLExportPropertyMapper::exportXML( SvXMLAttributeList& rAttrList, const ::std::vector< XMLPropertyState >& rProperties, const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap, sal_uInt16 nFlags ) const { _exportXML( rAttrList, rProperties, rUnitConverter, rNamespaceMap, nFlags, 0, -1, -1 ); } More...
 
void exportXML (SvXMLExport &rExport, const ::std::vector< XMLPropertyState > &rProperties, sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx, SvXmlExportFlags nFlags, bool bExtensionNamespace=false) const
 like above but only properties whose property map index is within the specified range are exported More...
 
virtual void handleElementItem (SvXMLExport &rExport, const XMLPropertyState &rProperty, SvXmlExportFlags nFlags, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const
 this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set More...
 
virtual void handleSpecialItem (comphelper::AttributeList &rAttrList, const XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const
 this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set More...
 
const rtl::Reference< XMLPropertySetMapper > & getPropertySetMapper () const
 
void SetStyleName (const OUString &rStyleName)
 
const OUString & GetStyleName () const
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Protected Member Functions

std::vector< XMLPropertyStateFilter_ (SvXMLExport const &rExport, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, bool bDefault, bool bDisableFoFontFamily) const
 Filter all properties we don't want to export: Take all properties of the XPropertySet which are also found in the XMLPropertyMapEntry-array and which are not set directly (so, the value isn't default and isn't inherited, apart from bDefault is true) After this process It'll called 'Contextfilter' for application-specific filter-processes. More...
 
virtual void ContextFilter (bool bEnableFoFontFamily, ::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet) const
 Application-specific filter. More...
 
void _exportXML (sal_uInt16 nPropType, sal_uInt16 &rPropTypeFlags, comphelper::AttributeList &rAttrList, const ::std::vector< XMLPropertyState > &rProperties, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, std::vector< sal_uInt16 > *pIndexArray, sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx) const
 fills the given attribute list with the items in the given set More...
 
void _exportXML (comphelper::AttributeList &rAttrList, const XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, const ::std::vector< XMLPropertyState > *pProperties, sal_uInt32 nIdx) const
 
void exportElementItems (SvXMLExport &rExport, const ::std::vector< XMLPropertyState > &rProperties, SvXmlExportFlags nFlags, const std::vector< sal_uInt16 > &rIndexArray) const
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 

Private Attributes

std::unique_ptr< ImplmpImpl
 

Additional Inherited Members

- Static Public Member Functions inherited from salhelper::SimpleReferenceObject
static void * operator new (std::size_t nSize)
 
static void * operator new (std::size_t nSize, std::nothrow_t const &rNothrow)
 
static void operator delete (void *pPtr)
 
static void operator delete (void *pPtr, std::nothrow_t const &rNothrow)
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Definition at line 53 of file xmlexppr.hxx.

Constructor & Destructor Documentation

◆ SvXMLExportPropertyMapper()

SvXMLExportPropertyMapper::SvXMLExportPropertyMapper ( const rtl::Reference< XMLPropertySetMapper > &  rMapper)

Definition at line 472 of file xmlexppr.cxx.

References mpImpl.

◆ ~SvXMLExportPropertyMapper()

SvXMLExportPropertyMapper::~SvXMLExportPropertyMapper ( )
overridevirtual

Definition at line 479 of file xmlexppr.cxx.

Member Function Documentation

◆ _exportXML() [1/2]

void SvXMLExportPropertyMapper::_exportXML ( comphelper::AttributeList rAttrList,
const XMLPropertyState rProperty,
const SvXMLUnitConverter rUnitConverter,
const SvXMLNamespaceMap rNamespaceMap,
const ::std::vector< XMLPropertyState > *  pProperties,
sal_uInt32  nIdx 
) const
protected

◆ _exportXML() [2/2]

void SvXMLExportPropertyMapper::_exportXML ( sal_uInt16  nPropType,
sal_uInt16 &  rPropTypeFlags,
comphelper::AttributeList rAttrList,
const ::std::vector< XMLPropertyState > &  rProperties,
const SvXMLUnitConverter rUnitConverter,
const SvXMLNamespaceMap rNamespaceMap,
std::vector< sal_uInt16 > *  pIndexArray,
sal_Int32  nPropMapStartIdx,
sal_Int32  nPropMapEndIdx 
) const
protected

fills the given attribute list with the items in the given set

Definition at line 879 of file xmlexppr.cxx.

References _exportXML(), GET_PROP_TYPE, MID_FLAG_ELEMENT_ITEM_EXPORT, mpImpl, nCount, nIndex, XML_TYPE_PROP_SHIFT, and XML_TYPE_PROP_START.

Referenced by _exportXML(), and exportXML().

◆ ChainExportMapper()

void SvXMLExportPropertyMapper::ChainExportMapper ( const rtl::Reference< SvXMLExportPropertyMapper > &  rMapper)

Definition at line 483 of file xmlexppr.cxx.

References mpImpl.

Referenced by XMLChartExportPropertyMapper::XMLChartExportPropertyMapper().

◆ ContextFilter()

void SvXMLExportPropertyMapper::ContextFilter ( bool  bEnableFoFontFamily,
::std::vector< XMLPropertyState > &  rProperties,
const css::uno::Reference< css::beans::XPropertySet > &  rPropSet 
) const
protectedvirtual

◆ Equals()

bool SvXMLExportPropertyMapper::Equals ( const ::std::vector< XMLPropertyState > &  aProperties1,
const ::std::vector< XMLPropertyState > &  aProperties2 
) const

Compare two arrays of XMLPropertyState.

Definition at line 677 of file xmlexppr.cxx.

References XMLPropertyState::maValue, XMLPropertyState::mnIndex, mpImpl, nCount, nIndex, and XML_TYPE_BUILDIN_CMP.

◆ exportElementItems()

void SvXMLExportPropertyMapper::exportElementItems ( SvXMLExport rExport,
const ::std::vector< XMLPropertyState > &  rProperties,
SvXmlExportFlags  nFlags,
const std::vector< sal_uInt16 > &  rIndexArray 
) const
protected

◆ exportXML() [1/2]

void SvXMLExportPropertyMapper::exportXML ( SvXMLExport rExport,
const ::std::vector< XMLPropertyState > &  rProperties,
sal_Int32  nPropMapStartIdx,
sal_Int32  nPropMapEndIdx,
SvXmlExportFlags  nFlags,
bool  bExtensionNamespace = false 
) const

like above but only properties whose property map index is within the specified range are exported

Parameters
bExtensionNamespaceuse the extension namespace for graphic-properties

Definition at line 800 of file xmlexppr.cxx.

References _exportXML(), aPropTokens, eToken, exportElementItems(), SvXMLExport::GetAttrList(), comphelper::AttributeList::getLength(), SvXMLExport::GetMM100UnitConverter(), SvXMLExport::GetNamespaceMap(), SvXMLExport::getSaneDefaultVersion(), i, IGN_WS, MAX_PROP_TYPES, nNamespace, SvtSaveOptions::ODFSVER_EXTENDED, xmloff::token::XML_GRAPHIC_PROPERTIES, XML_NAMESPACE_LO_EXT, and XML_NAMESPACE_STYLE.

◆ exportXML() [2/2]

void SvXMLExportPropertyMapper::exportXML ( SvXMLExport rExport,
const ::std::vector< XMLPropertyState > &  rProperties,
SvXmlExportFlags  nFlags,
bool  bUseExtensionNamespaceForGraphicProperties = false 
) const

fills the given attribute list with the items in the given set void SvXMLExportPropertyMapper::exportXML( SvXMLAttributeList& rAttrList, const ::std::vector< XMLPropertyState >& rProperties, const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap, sal_uInt16 nFlags ) const { _exportXML( rAttrList, rProperties, rUnitConverter, rNamespaceMap, nFlags, 0, -1, -1 ); }

void SvXMLExportPropertyMapper::exportXML( SvXMLAttributeList& rAttrList, const ::std::vector< XMLPropertyState >& rProperties, const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap, sal_Int32 nPropMapStartIdx, sal_Int32 nPropMapEndIdx, sal_uInt16 nFlags ) const { _exportXML( rAttrList, rProperties, rUnitConverter, rNamespaceMap, nFlags, 0, nPropMapStartIdx, nPropMapEndIdx ); }

Definition at line 790 of file xmlexppr.cxx.

References exportXML().

Referenced by SvXMLAutoStylePoolP::exportStyleContent(), and exportXML().

◆ Filter()

std::vector< XMLPropertyState > SvXMLExportPropertyMapper::Filter ( SvXMLExport const &  rExport,
const css::uno::Reference< css::beans::XPropertySet > &  rPropSet,
bool  bEnableFoFontFamily = false 
) const

Filter all properties we don't want to export: Take all properties of the XPropertySet which are also found in the XMLPropertyMapEntry-array and which are not set directly (so, the value isn't default and isn't inherited) After this process It'll called 'Contextfilter' for application-specific filter-processes.

Definition at line 513 of file xmlexppr.cxx.

References Filter_().

◆ Filter_()

std::vector< XMLPropertyState > SvXMLExportPropertyMapper::Filter_ ( SvXMLExport const &  rExport,
const css::uno::Reference< css::beans::XPropertySet > &  rPropSet,
bool  bDefault,
bool  bDisableFoFontFamily 
) const
protected

◆ FilterDefaults()

std::vector< XMLPropertyState > SvXMLExportPropertyMapper::FilterDefaults ( SvXMLExport const &  rExport,
const css::uno::Reference< css::beans::XPropertySet > &  rPropSet 
) const

Like Filter(), except that:

  • only properties that have the map flag MID_FLAG_DEFAULT_ITEM_EXPORT set are exported,
  • instead of the property's value, its default value is exported.

Definition at line 520 of file xmlexppr.cxx.

References Filter_().

◆ getPropertySetMapper()

const rtl::Reference< XMLPropertySetMapper > & SvXMLExportPropertyMapper::getPropertySetMapper ( ) const

◆ GetStyleName()

const OUString & SvXMLExportPropertyMapper::GetStyleName ( ) const

Definition at line 1120 of file xmlexppr.cxx.

References mpImpl.

Referenced by XMLShapeExportPropertyMapper::handleElementItem().

◆ handleElementItem()

void SvXMLExportPropertyMapper::handleElementItem ( SvXMLExport rExport,
const XMLPropertyState rProperty,
SvXmlExportFlags  nFlags,
const ::std::vector< XMLPropertyState > *  pProperties,
sal_uInt32  nIdx 
) const
virtual

◆ handleSpecialItem()

void SvXMLExportPropertyMapper::handleSpecialItem ( comphelper::AttributeList rAttrList,
const XMLPropertyState rProperty,
const SvXMLUnitConverter rUnitConverter,
const SvXMLNamespaceMap rNamespaceMap,
const ::std::vector< XMLPropertyState > *  pProperties,
sal_uInt32  nIdx 
) const
virtual

◆ LessPartial()

bool SvXMLExportPropertyMapper::LessPartial ( const ::std::vector< XMLPropertyState > &  aProperties1,
const ::std::vector< XMLPropertyState > &  aProperties2 
) const

Provides a partial ordering over two arrays of XMLPropertyState, Partial because implementing a full order requires quite a lot of code.

Definition at line 727 of file xmlexppr.cxx.

References comphelper::anyLess(), XMLPropertyState::maValue, XMLPropertyState::mnIndex, mpImpl, nCount, nIndex, and XML_TYPE_BUILDIN_CMP.

◆ SetStyleName()

void SvXMLExportPropertyMapper::SetStyleName ( const OUString &  rStyleName)

Definition at line 1115 of file xmlexppr.cxx.

References mpImpl.

Member Data Documentation

◆ mpImpl

std::unique_ptr<Impl> SvXMLExportPropertyMapper::mpImpl
private

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