LibreOffice Module xmloff (master) 1
|
#include <xmlimppr.hxx>
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< XMLPropertySetMapper > | maPropMapper |
Protected Attributes inherited from salhelper::SimpleReferenceObject | |
oslInterlockedCount | m_nCount |
Private Member Functions | |
SvXMLImportPropertyMapper (SvXMLImportPropertyMapper const &)=delete | |
SvXMLImportPropertyMapper & | operator= (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< SvXMLImportPropertyMapper > | mxNextMapper |
SvXMLImport & | m_rImport |
Definition at line 64 of file xmlimppr.hxx.
|
privatedelete |
SvXMLImportPropertyMapper::SvXMLImportPropertyMapper | ( | rtl::Reference< XMLPropertySetMapper > | xMapper, |
SvXMLImport & | rImport | ||
) |
Definition at line 62 of file xmlimppr.cxx.
|
overridevirtual |
Definition at line 70 of file xmlimppr.cxx.
References mxNextMapper.
void SvXMLImportPropertyMapper::ChainImportMapper | ( | const rtl::Reference< SvXMLImportPropertyMapper > & | rMapper | ) |
Definition at line 75 of file xmlimppr.cxx.
References maPropMapper, and mxNextMapper.
Referenced by XMLTextImportHelper::CreateParaDefaultExtPropMapper(), XMLShapeImportHelper::CreateShapePropMapper(), and XMLChartImportPropertyMapper::XMLChartImportPropertyMapper().
void SvXMLImportPropertyMapper::CheckSpecialContext | ( | const ::std::vector< XMLPropertyState > & | rProperties, |
const css::uno::Reference< css::beans::XPropertySet > & | rPropSet, | ||
ContextID_Index_Pair * | pSpecialContextIds | ||
) | const |
Definition at line 388 of file xmlimppr.cxx.
References aProperties, i, maPropMapper, MID_FLAG_NO_PROPERTY_IMPORT, MID_FLAG_SPECIAL_ITEM_IMPORT, XMLPropertyState::mnIndex, n, ContextID_Index_Pair::nContextID, nCount, and ContextID_Index_Pair::nIndex.
|
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().
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.
bool SvXMLImportPropertyMapper::FillPropertySet | ( | const ::std::vector< XMLPropertyState > & | rProperties, |
const css::uno::Reference< css::beans::XPropertySet > & | rPropSet, | ||
ContextID_Index_Pair * | pSpecialContextIds = nullptr |
||
) | const |
Definition at line 431 of file xmlimppr.cxx.
References aProperties, FillMultiPropertySet_(), FillPropertySet_(), FillTolerantMultiPropertySet_(), m_rImport, and maPropMapper.
|
static |
implementation helper for FillPropertySet: fill an XPropertySet.
Exceptions will be asserted.
Definition at line 470 of file xmlimppr.cxx.
References aSeq, i, XMLPropertyState::maValue, MID_FLAG_MUST_EXIST, MID_FLAG_NO_PROPERTY, MID_FLAG_NO_PROPERTY_IMPORT, MID_FLAG_PROPERTY_MAY_THROW, MID_FLAG_SPECIAL_ITEM_IMPORT, XMLPropertyState::mnIndex, n, ContextID_Index_Pair::nContextID, nCount, ContextID_Index_Pair::nIndex, XMLERROR_FLAG_ERROR, XMLERROR_STYLE_PROP_OTHER, XMLERROR_STYLE_PROP_UNKNOWN, and XMLERROR_STYLE_PROP_VALUE.
Referenced by FillPropertySet().
|
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().
|
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().
|
inlineprotected |
Definition at line 76 of file xmlimppr.hxx.
References m_rImport.
Referenced by PageMasterImportPropertyMapper::finished(), and XMLTextImportPropertyMapper::handleSpecialItem().
|
inline |
Definition at line 197 of file xmlimppr.hxx.
References maPropMapper.
Referenced by XMLTextImportPropertyMapper::finished(), PageMasterImportPropertyMapper::finished(), XMLTextImportPropertyMapper::FontDefaultsCheck(), XMLTextImportPropertyMapper::handleSpecialItem(), and PageMasterImportPropertyMapper::handleSpecialItem().
|
virtual |
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set
Reimplemented in XMLTextImportPropertyMapper, XMLChartImportPropertyMapper, and PageMasterImportPropertyMapper.
Definition at line 346 of file xmlimppr.cxx.
References mxNextMapper.
Referenced by XMLTextImportPropertyMapper::handleSpecialItem(), XMLChartImportPropertyMapper::handleSpecialItem(), PageMasterImportPropertyMapper::handleSpecialItem(), and importXMLAttribute().
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.
|
private |
Definition at line 162 of file xmlimppr.cxx.
References aData, Any, SvXMLNamespaceMap::GetKeyByAttrName(), xmloff::token::GetXMLToken(), handleSpecialItem(), m_rImport, maPropMapper, MID_FLAG_ELEMENT_ITEM_IMPORT, MID_FLAG_MERGE_PROPERTY, MID_FLAG_MULTI_PROPERTY, MID_FLAG_SPECIAL_ITEM_IMPORT, XMLPropertyState::mnIndex, nIndex, SAL_INFO_IF, sName, SvUnoAttributeContainer_CreateInstance(), xmloff::token::XML_CDATA, XML_NAMESPACE_NONE, XML_NAMESPACE_TEXT, XML_NAMESPACE_UNKNOWN_FLAG, XML_TYPE_PROP_CHART, XML_TYPE_PROP_PARAGRAPH, XML_TYPE_PROP_TEXT, XMLERROR_FLAG_WARNING, and XMLERROR_STYLE_ATTR_VALUE.
Referenced by importXML().
|
privatedelete |
|
static |
Definition at line 586 of file xmlimppr.cxx.
References Any, i, XMLPropertyState::maValue, MID_FLAG_MUST_EXIST, MID_FLAG_NO_PROPERTY, MID_FLAG_NO_PROPERTY_IMPORT, MID_FLAG_SPECIAL_ITEM_IMPORT, XMLPropertyState::mnIndex, n, ContextID_Index_Pair::nContextID, nCount, and ContextID_Index_Pair::nIndex.
Referenced by FillMultiPropertySet_(), and FillTolerantMultiPropertySet_().
|
private |
Definition at line 68 of file xmlimppr.hxx.
Referenced by FillPropertySet(), and importXMLAttribute().
|
protected |
Definition at line 75 of file xmlimppr.hxx.
Referenced by ChainImportMapper(), CheckSpecialContext(), FillPropertySequence(), FillPropertySet(), getPropertySetMapper(), XMLChartImportPropertyMapper::handleSpecialItem(), importXML(), importXMLAttribute(), and XMLChartImportPropertyMapper::XMLChartImportPropertyMapper().
|
private |
Definition at line 66 of file xmlimppr.hxx.
Referenced by ChainImportMapper(), finished(), handleSpecialItem(), and ~SvXMLImportPropertyMapper().