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 (const rtl::Reference< XMLPropertySetMapper > &rMapper, 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 voidoperator new (std::size_t nSize)
 
static voidoperator 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

SvXMLImportGetImport () 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
 
SvXMLImportrImport
 

Detailed Description

Definition at line 62 of file xmlimppr.hxx.

Constructor & Destructor Documentation

SvXMLImportPropertyMapper::SvXMLImportPropertyMapper ( SvXMLImportPropertyMapper const &  )
privatedelete
SvXMLImportPropertyMapper::SvXMLImportPropertyMapper ( const rtl::Reference< XMLPropertySetMapper > &  rMapper,
SvXMLImport rImport 
)

Definition at line 63 of file xmlimppr.cxx.

SvXMLImportPropertyMapper::~SvXMLImportPropertyMapper ( )
overridevirtual

Definition at line 71 of file xmlimppr.cxx.

References mxNextMapper.

Member Function Documentation

void SvXMLImportPropertyMapper::ChainImportMapper ( const rtl::Reference< SvXMLImportPropertyMapper > &  rMapper)
void SvXMLImportPropertyMapper::CheckSpecialContext ( const ::std::vector< XMLPropertyState > &  rProperties,
const css::uno::Reference< css::beans::XPropertySet > &  rPropSet,
ContextID_Index_Pair pSpecialContextIds 
) const
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 671 of file xmlimppr.cxx.

References PrepareForMultiPropertySet_().

Referenced by FillPropertySet().

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

Definition at line 365 of file xmlimppr.cxx.

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

bool SvXMLImportPropertyMapper::FillPropertySet ( const ::std::vector< XMLPropertyState > &  rProperties,
const css::uno::Reference< css::beans::XPropertySet > &  rPropSet,
ContextID_Index_Pair pSpecialContextIds = nullptr 
) const
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
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 703 of file xmlimppr.cxx.

References aSeq, PrepareForMultiPropertySet_(), SvXMLImport::SetError(), sMessage, XMLERROR_FLAG_ERROR, and XMLERROR_STYLE_PROP_OTHER.

Referenced by FillPropertySet().

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 XMLChartImportPropertyMapper, XMLTextImportPropertyMapper, and PageMasterImportPropertyMapper.

Definition at line 757 of file xmlimppr.cxx.

References mxNextMapper.

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

SvXMLImport& SvXMLImportPropertyMapper::GetImport ( ) const
inlineprotected

Definition at line 74 of file xmlimppr.hxx.

Referenced by XMLTextImportPropertyMapper::handleSpecialItem().

const rtl::Reference< XMLPropertySetMapper > & SvXMLImportPropertyMapper::getPropertySetMapper ( ) const
inline
bool SvXMLImportPropertyMapper::handleSpecialItem ( XMLPropertyState rProperty,
::std::vector< XMLPropertyState > &  rProperties,
const OUString &  rValue,
const SvXMLUnitConverter rUnitConverter,
const SvXMLNamespaceMap rNamespaceMap 
) const
virtual
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 107 of file xmlimppr.cxx.

References SvXMLImport::aNamespaceSeparator, sax_fastparser::castToFastAttributeList(), finished(), SvXMLNamespaceMap::GetKeyByPrefix(), SvXMLImport::getNameFromToken(), SvXMLImport::getNamespacePrefixFromToken(), SvXMLImport::getNamespaceURIFromToken(), importXMLAttribute(), IsTokenInNamespace(), maPropMapper, nToken, USHRT_MAX, XML_NAMESPACE_UNKNOWN_FLAG, and XML_NAMESPACE_XMLNS.

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
SvXMLImportPropertyMapper& SvXMLImportPropertyMapper::operator= ( SvXMLImportPropertyMapper const &  )
privatedelete
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

rtl::Reference< XMLPropertySetMapper > SvXMLImportPropertyMapper::maPropMapper
protected
rtl::Reference< SvXMLImportPropertyMapper> SvXMLImportPropertyMapper::mxNextMapper
private
SvXMLImport& SvXMLImportPropertyMapper::rImport
private

Definition at line 66 of file xmlimppr.hxx.

Referenced by FillPropertySet(), and importXMLAttribute().


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