LibreOffice Module xmloff (master) 1
|
#include <xmlexppr.hxx>
Classes | |
struct | Impl |
Public Member Functions | |
SvXMLExportPropertyMapper (const rtl::Reference< XMLPropertySetMapper > &rMapper) | |
virtual | ~SvXMLExportPropertyMapper () override |
void | ChainExportMapper (const rtl::Reference< SvXMLExportPropertyMapper > &rMapper) |
std::vector< XMLPropertyState > | 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. More... | |
std::vector< XMLPropertyState > | FilterDefaults (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< XMLPropertyState > | Filter_ (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< Impl > | mpImpl |
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 |
Definition at line 53 of file xmlexppr.hxx.
SvXMLExportPropertyMapper::SvXMLExportPropertyMapper | ( | const rtl::Reference< XMLPropertySetMapper > & | rMapper | ) |
Definition at line 472 of file xmlexppr.cxx.
References mpImpl.
|
overridevirtual |
Definition at line 479 of file xmlexppr.cxx.
|
protected |
Definition at line 950 of file xmlexppr.cxx.
References aData, SvXMLNamespaceMap::Add(), comphelper::AttributeList::AddAttribute(), SvXMLNamespaceMap::GetKeyByName(), SvXMLNamespaceMap::GetKeyByPrefix(), SvXMLNamespaceMap::GetNameByKey(), SvXMLNamespaceMap::GetPrefixByKey(), SvXMLNamespaceMap::GetQNameByKey(), SvXMLUnitConverter::getSaneDefaultVersion(), comphelper::AttributeList::getValueByName(), xmloff::token::GetXMLToken(), handleSpecialItem(), XMLPropertyState::maValue, MID_FLAG_ELEMENT_ITEM_EXPORT, MID_FLAG_MERGE_ATTRIBUTE, MID_FLAG_SPECIAL_ITEM_EXPORT, XMLPropertyState::mnIndex, mpImpl, n, comphelper::AttributeList::RemoveAttribute(), sName, sPrefix, xmloff::token::XML_CDATA, XML_NAMESPACE_LO_EXT, and XML_NAMESPACE_UNKNOWN.
|
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().
void SvXMLExportPropertyMapper::ChainExportMapper | ( | const rtl::Reference< SvXMLExportPropertyMapper > & | rMapper | ) |
Definition at line 483 of file xmlexppr.cxx.
References mpImpl.
Referenced by XMLChartExportPropertyMapper::XMLChartExportPropertyMapper().
|
protectedvirtual |
Application-specific filter.
By default do nothing.
Reimplemented in XMLChartExportPropertyMapper, XMLShapeExportPropertyMapper, XMLPageExportPropertyMapper, XMLPageMasterExportPropMapper, and XMLTextExportPropertySetMapper.
Definition at line 663 of file xmlexppr.cxx.
References mpImpl.
Referenced by XMLChartExportPropertyMapper::ContextFilter(), XMLShapeExportPropertyMapper::ContextFilter(), XMLPageExportPropertyMapper::ContextFilter(), XMLPageMasterExportPropMapper::ContextFilter(), XMLTextExportPropertySetMapper::ContextFilter(), and Filter_().
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.
|
protected |
Definition at line 1087 of file xmlexppr.cxx.
References handleElementItem(), SvXMLExport::IgnorableWhitespace(), MID_FLAG_ELEMENT_ITEM_EXPORT, and mpImpl.
Referenced by exportXML().
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
bExtensionNamespace | use 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.
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().
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_().
|
protected |
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.
standard ODF namespaces for elements and attributes
Definition at line 527 of file xmlexppr.cxx.
References ContextFilter(), GetODFDefaultVersion(), SvXMLExport::getSaneDefaultVersion(), xmloff::token::GetXMLToken(), i, MID_FLAG_MUST_EXIST, MID_FLAG_NO_PROPERTY_EXPORT, mpImpl, ns, SvtSaveOptions::ODFSVER_EXTENDED, SvtSaveOptions::ODFSVER_FUTURE_EXTENDED, SvtSaveOptions::ODFSVER_LATEST_EXTENDED, SvtSaveOptions::ODFVER_UNKNOWN, TOOLS_WARN_EXCEPTION, xmloff::token::XML_HYPERLINK, XML_NAMESPACE_ANIMATION, XML_NAMESPACE_CHART, XML_NAMESPACE_CONFIG, XML_NAMESPACE_DB, XML_NAMESPACE_DC, XML_NAMESPACE_DR3D, XML_NAMESPACE_DRAW, XML_NAMESPACE_FO, XML_NAMESPACE_FORM, XML_NAMESPACE_GRDDL, XML_NAMESPACE_MATH, XML_NAMESPACE_META, XML_NAMESPACE_NUMBER, XML_NAMESPACE_OFFICE, XML_NAMESPACE_PRESENTATION, XML_NAMESPACE_SCRIPT, XML_NAMESPACE_SMIL, XML_NAMESPACE_STYLE, XML_NAMESPACE_SVG, XML_NAMESPACE_TABLE, XML_NAMESPACE_TEXT, XML_NAMESPACE_XFORMS, XML_NAMESPACE_XHTML, XML_NAMESPACE_XLINK, and XML_NAMESPACE_XML.
Referenced by Filter(), and FilterDefaults().
std::vector< XMLPropertyState > SvXMLExportPropertyMapper::FilterDefaults | ( | SvXMLExport const & | rExport, |
const css::uno::Reference< css::beans::XPropertySet > & | rPropSet | ||
) | const |
Like Filter(), except that:
Definition at line 520 of file xmlexppr.cxx.
References Filter_().
const rtl::Reference< XMLPropertySetMapper > & SvXMLExportPropertyMapper::getPropertySetMapper | ( | ) | const |
Definition at line 1110 of file xmlexppr.cxx.
References mpImpl.
Referenced by XMLChartExportPropertyMapper::ContextFilter(), XMLShapeExportPropertyMapper::ContextFilter(), XMLPageExportPropertyMapper::ContextFilter(), XMLPageMasterExportPropMapper::ContextFilter(), XMLTextExportPropertySetMapper::ContextFilter(), SvXMLAutoStylePoolP::exportStyleAttributes(), SvXMLAutoStylePoolP::exportStyleContent(), XMLChartExportPropertyMapper::handleElementItem(), XMLShapeExportPropertyMapper::handleElementItem(), XMLPageExportPropertyMapper::handleElementItem(), XMLPageMasterExportPropMapper::handleElementItem(), XMLTextExportPropertySetMapper::handleElementItem(), xmloff::OFormComponentStyleExportMapper::handleSpecialItem(), XMLChartExportPropertyMapper::handleSpecialItem(), XMLShapeExportPropertyMapper::handleSpecialItem(), and XMLTextExportPropertySetMapper::handleSpecialItem().
const OUString & SvXMLExportPropertyMapper::GetStyleName | ( | ) | const |
Definition at line 1120 of file xmlexppr.cxx.
References mpImpl.
Referenced by XMLShapeExportPropertyMapper::handleElementItem().
|
virtual |
this method is called for every item that has the MID_FLAG_ELEMENT_EXPORT flag set
Reimplemented in XMLChartExportPropertyMapper, XMLShapeExportPropertyMapper, XMLPageExportPropertyMapper, XMLPageMasterExportPropMapper, and XMLTextExportPropertySetMapper.
Definition at line 864 of file xmlexppr.cxx.
References mpImpl.
Referenced by exportElementItems(), XMLChartExportPropertyMapper::handleElementItem(), XMLShapeExportPropertyMapper::handleElementItem(), XMLPageExportPropertyMapper::handleElementItem(), and XMLTextExportPropertySetMapper::handleElementItem().
|
virtual |
this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_EXPORT flag set
Reimplemented in xmloff::OFormComponentStyleExportMapper, XMLChartExportPropertyMapper, XMLShapeExportPropertyMapper, XMLPageMasterExportPropMapper, and XMLTextExportPropertySetMapper.
Definition at line 848 of file xmlexppr.cxx.
References mpImpl.
Referenced by _exportXML(), xmloff::OFormComponentStyleExportMapper::handleSpecialItem(), XMLChartExportPropertyMapper::handleSpecialItem(), XMLShapeExportPropertyMapper::handleSpecialItem(), and XMLTextExportPropertySetMapper::handleSpecialItem().
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.
void SvXMLExportPropertyMapper::SetStyleName | ( | const OUString & | rStyleName | ) |
Definition at line 1115 of file xmlexppr.cxx.
References mpImpl.
|
private |
Definition at line 56 of file xmlexppr.hxx.
Referenced by _exportXML(), ChainExportMapper(), ContextFilter(), Equals(), exportElementItems(), Filter_(), getPropertySetMapper(), GetStyleName(), handleElementItem(), handleSpecialItem(), LessPartial(), SetStyleName(), and SvXMLExportPropertyMapper().