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

#include <xmlimppr.hxx>

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

Public Member Functions

 SvXMLImportPropertyMapper (rtl::Reference< XMLPropertySetMapper > xMapper, SvXMLImport &rImport)
 
virtual ~SvXMLImportPropertyMapper () override
 
void ChainImportMapper (const rtl::Reference< SvXMLImportPropertyMapper > &rMapper)
 
void importXML (::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, sal_uInt32 nPropType, sal_Int32 nStartIdx, sal_Int32 nEndIdx) const
 fills the given itemset with the attributes in the given list the map is only searched within the range [nStartIdx, nEndIdx[ More...
 
virtual bool handleSpecialItem (XMLPropertyState &rProperty, ::std::vector< XMLPropertyState > &rProperties, const OUString &rValue, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const
 this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set More...
 
virtual void finished (::std::vector< XMLPropertyState > &rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex) const
 This method is called when all attributes have benn processed. More...
 
void CheckSpecialContext (const ::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, ContextID_Index_Pair *pSpecialContextIds) const
 
bool FillPropertySet (const ::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, ContextID_Index_Pair *pSpecialContextIds=nullptr) const
 
void FillPropertySequence (const ::std::vector< XMLPropertyState > &aProperties, css::uno::Sequence< css::beans::PropertyValue > &rValues) const
 
const rtl::Reference< XMLPropertySetMapper > & getPropertySetMapper () const
 
- Public Member Functions inherited from salhelper::SimpleReferenceObject
 SimpleReferenceObject ()
 
void acquire ()
 
void release ()
 

Static Public Member Functions

static bool FillPropertySet_ (const ::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySet > &rPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo, const rtl::Reference< XMLPropertySetMapper > &rPropMapper, SvXMLImport &rImport, ContextID_Index_Pair *pSpecialContextIds)
 implementation helper for FillPropertySet: fill an XPropertySet. More...
 
static bool FillMultiPropertySet_ (const ::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XMultiPropertySet > &rMultiPropSet, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo, const rtl::Reference< XMLPropertySetMapper > &rPropMapper, ContextID_Index_Pair *pSpecialContextIds)
 implementation helper for FillPropertySet: fill an XMultiPropertySet. More...
 
static bool FillTolerantMultiPropertySet_ (const ::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XTolerantMultiPropertySet > &rTolPropSet, const rtl::Reference< XMLPropertySetMapper > &rPropMapper, SvXMLImport &rImport, ContextID_Index_Pair *pSpecialContextIds)
 implementation helper for FillPropertySet: fill an XTolerantMultiPropertySet. More...
 
static void PrepareForMultiPropertySet_ (const ::std::vector< XMLPropertyState > &rProperties, const css::uno::Reference< css::beans::XPropertySetInfo > &rPropSetInfo, const rtl::Reference< XMLPropertySetMapper > &rPropMapper, ContextID_Index_Pair *pSpecialContextIds, css::uno::Sequence< OUString > &rNames, css::uno::Sequence< css::uno::Any > &rValues)
 
- 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 Member Functions

SvXMLImport & GetImport () const
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 

Protected Attributes

rtl::Reference< XMLPropertySetMappermaPropMapper
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Private Member Functions

 SvXMLImportPropertyMapper (SvXMLImportPropertyMapper const &)=delete
 
SvXMLImportPropertyMapperoperator= (SvXMLImportPropertyMapper const &)=delete
 
void importXMLAttribute (std::vector< XMLPropertyState > &rProperties, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap, sal_uInt32 nPropType, sal_Int32 nStartIdx, sal_Int32 nEndIdx, css::uno::Reference< css::container::XNameContainer > &xAttrContainer, const OUString &sAttrName, const OUString &aNamespaceURI, const OUString &sValue) const
 

Private Attributes

rtl::Reference< SvXMLImportPropertyMappermxNextMapper
 
SvXMLImport & m_rImport
 

Detailed Description

Definition at line 64 of file xmlimppr.hxx.

Constructor & Destructor Documentation

◆ SvXMLImportPropertyMapper() [1/2]

SvXMLImportPropertyMapper::SvXMLImportPropertyMapper ( SvXMLImportPropertyMapper const &  )
privatedelete

◆ SvXMLImportPropertyMapper() [2/2]

SvXMLImportPropertyMapper::SvXMLImportPropertyMapper ( rtl::Reference< XMLPropertySetMapper xMapper,
SvXMLImport &  rImport 
)

Definition at line 62 of file xmlimppr.cxx.

◆ ~SvXMLImportPropertyMapper()

SvXMLImportPropertyMapper::~SvXMLImportPropertyMapper ( )
overridevirtual

Definition at line 70 of file xmlimppr.cxx.

References mxNextMapper.

Member Function Documentation

◆ ChainImportMapper()

void SvXMLImportPropertyMapper::ChainImportMapper ( const rtl::Reference< SvXMLImportPropertyMapper > &  rMapper)

◆ CheckSpecialContext()

void SvXMLImportPropertyMapper::CheckSpecialContext ( const ::std::vector< XMLPropertyState > &  rProperties,
const css::uno::Reference< css::beans::XPropertySet > &  rPropSet,
ContextID_Index_Pair pSpecialContextIds 
) const

◆ FillMultiPropertySet_()

bool SvXMLImportPropertyMapper::FillMultiPropertySet_ ( const ::std::vector< XMLPropertyState > &  rProperties,
const css::uno::Reference< css::beans::XMultiPropertySet > &  rMultiPropSet,
const css::uno::Reference< css::beans::XPropertySetInfo > &  rPropSetInfo,
const rtl::Reference< XMLPropertySetMapper > &  rPropMapper,
ContextID_Index_Pair pSpecialContextIds 
)
static

implementation helper for FillPropertySet: fill an XMultiPropertySet.

If unsuccessful, set return value.

Definition at line 666 of file xmlimppr.cxx.

References PrepareForMultiPropertySet_().

Referenced by FillPropertySet().

◆ FillPropertySequence()

void SvXMLImportPropertyMapper::FillPropertySequence ( const ::std::vector< XMLPropertyState > &  aProperties,
css::uno::Sequence< css::beans::PropertyValue > &  rValues 
) const

Definition at line 361 of file xmlimppr.cxx.

References i, maPropMapper, XMLPropertyState::maValue, XMLPropertyState::mnIndex, and nCount.

◆ FillPropertySet()

bool SvXMLImportPropertyMapper::FillPropertySet ( const ::std::vector< XMLPropertyState > &  rProperties,
const css::uno::Reference< css::beans::XPropertySet > &  rPropSet,
ContextID_Index_Pair pSpecialContextIds = nullptr 
) const

◆ FillPropertySet_()

bool SvXMLImportPropertyMapper::FillPropertySet_ ( const ::std::vector< XMLPropertyState > &  rProperties,
const css::uno::Reference< css::beans::XPropertySet > &  rPropSet,
const css::uno::Reference< css::beans::XPropertySetInfo > &  rPropSetInfo,
const rtl::Reference< XMLPropertySetMapper > &  rPropMapper,
SvXMLImport &  rImport,
ContextID_Index_Pair pSpecialContextIds 
)
static

◆ FillTolerantMultiPropertySet_()

bool SvXMLImportPropertyMapper::FillTolerantMultiPropertySet_ ( const ::std::vector< XMLPropertyState > &  rProperties,
const css::uno::Reference< css::beans::XTolerantMultiPropertySet > &  rTolPropSet,
const rtl::Reference< XMLPropertySetMapper > &  rPropMapper,
SvXMLImport &  rImport,
ContextID_Index_Pair pSpecialContextIds 
)
static

implementation helper for FillPropertySet: fill an XTolerantMultiPropertySet.

If unsuccessful, set return value.

Definition at line 698 of file xmlimppr.cxx.

References aSeq, PrepareForMultiPropertySet_(), sMessage, XMLERROR_FLAG_ERROR, and XMLERROR_STYLE_PROP_OTHER.

Referenced by FillPropertySet().

◆ finished()

void SvXMLImportPropertyMapper::finished ( ::std::vector< XMLPropertyState > &  rProperties,
sal_Int32  nStartIndex,
sal_Int32  nEndIndex 
) const
virtual

This method is called when all attributes have benn processed.

It may be used to remove items that are incomplete

Reimplemented in XMLTextImportPropertyMapper, XMLChartImportPropertyMapper, and PageMasterImportPropertyMapper.

Definition at line 752 of file xmlimppr.cxx.

References mxNextMapper.

Referenced by PageMasterImportPropertyMapper::finished(), and importXML().

◆ GetImport()

SvXMLImport & SvXMLImportPropertyMapper::GetImport ( ) const
inlineprotected

◆ getPropertySetMapper()

const rtl::Reference< XMLPropertySetMapper > & SvXMLImportPropertyMapper::getPropertySetMapper ( ) const
inline

◆ handleSpecialItem()

bool SvXMLImportPropertyMapper::handleSpecialItem ( XMLPropertyState rProperty,
::std::vector< XMLPropertyState > &  rProperties,
const OUString &  rValue,
const SvXMLUnitConverter rUnitConverter,
const SvXMLNamespaceMap rNamespaceMap 
) const
virtual

◆ importXML()

void SvXMLImportPropertyMapper::importXML ( ::std::vector< XMLPropertyState > &  rProperties,
const css::uno::Reference< css::xml::sax::XFastAttributeList > &  xAttrList,
const SvXMLUnitConverter rUnitConverter,
const SvXMLNamespaceMap rNamespaceMap,
sal_uInt32  nPropType,
sal_Int32  nStartIdx,
sal_Int32  nEndIdx 
) const

fills the given itemset with the attributes in the given list the map is only searched within the range [nStartIdx, nEndIdx[

fills the given itemset with the attributes in the given list

Definition at line 106 of file xmlimppr.cxx.

References sax_fastparser::castToFastAttributeList(), finished(), SvXMLNamespaceMap::GetKeyByPrefix(), importXMLAttribute(), IsTokenInNamespace(), maPropMapper, nToken, XML_NAMESPACE_UNKNOWN_FLAG, and XML_NAMESPACE_XMLNS.

◆ importXMLAttribute()

void SvXMLImportPropertyMapper::importXMLAttribute ( std::vector< XMLPropertyState > &  rProperties,
const SvXMLUnitConverter rUnitConverter,
const SvXMLNamespaceMap rNamespaceMap,
sal_uInt32  nPropType,
sal_Int32  nStartIdx,
sal_Int32  nEndIdx,
css::uno::Reference< css::container::XNameContainer > &  xAttrContainer,
const OUString &  sAttrName,
const OUString &  aNamespaceURI,
const OUString &  sValue 
) const
private

◆ operator=()

SvXMLImportPropertyMapper & SvXMLImportPropertyMapper::operator= ( SvXMLImportPropertyMapper const &  )
privatedelete

◆ PrepareForMultiPropertySet_()

void SvXMLImportPropertyMapper::PrepareForMultiPropertySet_ ( const ::std::vector< XMLPropertyState > &  rProperties,
const css::uno::Reference< css::beans::XPropertySetInfo > &  rPropSetInfo,
const rtl::Reference< XMLPropertySetMapper > &  rPropMapper,
ContextID_Index_Pair pSpecialContextIds,
css::uno::Sequence< OUString > &  rNames,
css::uno::Sequence< css::uno::Any > &  rValues 
)
static

Member Data Documentation

◆ m_rImport

SvXMLImport& SvXMLImportPropertyMapper::m_rImport
private

Definition at line 68 of file xmlimppr.hxx.

Referenced by FillPropertySet(), and importXMLAttribute().

◆ maPropMapper

rtl::Reference< XMLPropertySetMapper > SvXMLImportPropertyMapper::maPropMapper
protected

◆ mxNextMapper

rtl::Reference< SvXMLImportPropertyMapper> SvXMLImportPropertyMapper::mxNextMapper
private

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