LibreOffice Module xmloff (master) 1
Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
XMLTextImportPropertyMapper Class Referencefinal

#include <txtimppr.hxx>

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

Public Member Functions

 XMLTextImportPropertyMapper (const rtl::Reference< XMLPropertySetMapper > &rMapper, SvXMLImport &rImport)
 
virtual ~XMLTextImportPropertyMapper () override
 
virtual void finished (::std::vector< XMLPropertyState > &rProperties, sal_Int32 nStartIndex, sal_Int32 nEndIndex) const override
 This method is called when all attributes have benn processed. More...
 
- Public Member Functions inherited from SvXMLImportPropertyMapper
 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 ()
 

Private Member Functions

void FontDefaultsCheck (XMLPropertyState const *pFontFamilyName, XMLPropertyState const *pFontStyleName, XMLPropertyState const *pFontFamily, XMLPropertyState const *pFontPitch, XMLPropertyState const *pFontCharSet, std::optional< XMLPropertyState > *ppNewFontStyleName, std::optional< XMLPropertyState > *ppNewFontFamily, std::optional< XMLPropertyState > *ppNewFontPitch, std::optional< XMLPropertyState > *ppNewFontCharSet) const
 since the properties "CharFontFamilyName", "CharFontStyleName", "CharFontFamily", "CharFontPitch" and "CharFontSet" and their CJK and CTL counterparts are only usable as a union, we add defaults to all values that are not set as long as we have an "CharFontFamilyName" More...
 
virtual bool handleSpecialItem (XMLPropertyState &rProperty, ::std::vector< XMLPropertyState > &rProperties, const OUString &rValue, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) const override
 this method is called for every item that has the MID_FLAG_SPECIAL_ITEM_IMPORT flag set More...
 

Static Private Member Functions

static void FontFinished (XMLPropertyState *pFontFamilyNameState, XMLPropertyState *pFontStyleNameState, XMLPropertyState *pFontFamilyState, XMLPropertyState *pFontPitchState, XMLPropertyState *pFontCharsetState)
 

Private Attributes

sal_Int32 m_nSizeTypeIndex
 
sal_Int32 m_nWidthTypeIndex
 

Additional Inherited Members

- Static Public Member Functions inherited from SvXMLImportPropertyMapper
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 inherited from SvXMLImportPropertyMapper
SvXMLImport & GetImport () const
 
- Protected Member Functions inherited from salhelper::SimpleReferenceObject
virtual ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE
 
- Protected Attributes inherited from SvXMLImportPropertyMapper
rtl::Reference< XMLPropertySetMappermaPropMapper
 
- Protected Attributes inherited from salhelper::SimpleReferenceObject
oslInterlockedCount m_nCount
 

Detailed Description

Definition at line 26 of file txtimppr.hxx.

Constructor & Destructor Documentation

◆ XMLTextImportPropertyMapper()

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

Definition at line 138 of file txtimppr.cxx.

◆ ~XMLTextImportPropertyMapper()

XMLTextImportPropertyMapper::~XMLTextImportPropertyMapper ( )
overridevirtual

Definition at line 147 of file txtimppr.cxx.

Member Function Documentation

◆ finished()

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

This method is called when all attributes have benn processed.

It may be used to remove items that are incomplete

Reimplemented from SvXMLImportPropertyMapper.

Definition at line 351 of file txtimppr.cxx.

References CTF_ALLBORDER, CTF_ALLBORDERDISTANCE, CTF_ALLBORDERWIDTH, CTF_ANCHORTYPE, CTF_BACKGROUND_TRANSPARENCY, CTF_BACKGROUND_TRANSPARENT, CTF_BOTTOMBORDER, CTF_BOTTOMBORDERDISTANCE, CTF_BOTTOMBORDERWIDTH, CTF_CHARALLBORDER, CTF_CHARALLBORDERDISTANCE, CTF_CHARALLBORDERWIDTH, CTF_CHARBOTTOMBORDER, CTF_CHARBOTTOMBORDERDISTANCE, CTF_CHARBOTTOMBORDERWIDTH, CTF_CHARLEFTBORDER, CTF_CHARLEFTBORDERDISTANCE, CTF_CHARLEFTBORDERWIDTH, CTF_CHARRIGHTBORDER, CTF_CHARRIGHTBORDERDISTANCE, CTF_CHARRIGHTBORDERWIDTH, CTF_CHARTOPBORDER, CTF_CHARTOPBORDERDISTANCE, CTF_CHARTOPBORDERWIDTH, CTF_FILLCOLOR, CTF_FILLSTYLE, CTF_FONTCHARSET, CTF_FONTCHARSET_CJK, CTF_FONTCHARSET_CTL, CTF_FONTFAMILY, CTF_FONTFAMILY_CJK, CTF_FONTFAMILY_CTL, CTF_FONTFAMILYNAME, CTF_FONTFAMILYNAME_CJK, CTF_FONTFAMILYNAME_CTL, CTF_FONTPITCH, CTF_FONTPITCH_CJK, CTF_FONTPITCH_CTL, CTF_FONTSTYLENAME, CTF_FONTSTYLENAME_CJK, CTF_FONTSTYLENAME_CTL, CTF_FRAMEHEIGHT_ABS, CTF_FRAMEHEIGHT_MIN_ABS, CTF_FRAMEHEIGHT_MIN_REL, CTF_FRAMEHEIGHT_REL, CTF_FRAMEWIDTH_ABS, CTF_FRAMEWIDTH_MIN_ABS, CTF_FRAMEWIDTH_MIN_REL, CTF_FRAMEWIDTH_REL, CTF_FRAMEWIDTH_TYPE, CTF_LEFTBORDER, CTF_LEFTBORDERDISTANCE, CTF_LEFTBORDERWIDTH, CTF_MARGINALL, CTF_MARGINBOTTOM, CTF_MARGINLEFT, CTF_MARGINRIGHT, CTF_MARGINTOP, CTF_PARABOTTOMMARGIN, CTF_PARABOTTOMMARGIN_REL, CTF_PARALEFTMARGIN, CTF_PARALEFTMARGIN_REL, CTF_PARAMARGINALL, CTF_PARAMARGINALL_REL, CTF_PARARIGHTMARGIN, CTF_PARARIGHTMARGIN_REL, CTF_PARATOPMARGIN, CTF_PARATOPMARGIN_REL, CTF_RIGHTBORDER, CTF_RIGHTBORDERDISTANCE, CTF_RIGHTBORDERWIDTH, CTF_SIZETYPE, CTF_TOPBORDER, CTF_TOPBORDERDISTANCE, CTF_TOPBORDERWIDTH, CTF_VERTICALPOS, CTF_VERTICALREL_ASCHAR, com::sun::star::drawing::FillStyle, FontDefaultsCheck(), FontFinished(), SvXMLImportPropertyMapper::getPropertySetMapper(), i, m_nSizeTypeIndex, m_nWidthTypeIndex, XMLPropertyState::maValue, XMLPropertyState::mnIndex, nCount, XML_LINE_BOTTOM, XML_LINE_LEFT, XML_LINE_RIGHT, and XML_LINE_TOP.

◆ FontDefaultsCheck()

void XMLTextImportPropertyMapper::FontDefaultsCheck ( XMLPropertyState const *  pFontFamilyName,
XMLPropertyState const *  pFontStyleName,
XMLPropertyState const *  pFontFamily,
XMLPropertyState const *  pFontPitch,
XMLPropertyState const *  pFontCharSet,
std::optional< XMLPropertyState > *  ppNewFontStyleName,
std::optional< XMLPropertyState > *  ppNewFontFamily,
std::optional< XMLPropertyState > *  ppNewFontPitch,
std::optional< XMLPropertyState > *  ppNewFontCharSet 
) const
private

since the properties "CharFontFamilyName", "CharFontStyleName", "CharFontFamily", "CharFontPitch" and "CharFontSet" and their CJK and CTL counterparts are only usable as a union, we add defaults to all values that are not set as long as we have an "CharFontFamilyName"

#99928# CL

Definition at line 184 of file txtimppr.cxx.

References Any, CTF_FONTCHARSET, CTF_FONTCHARSET_CJK, CTF_FONTCHARSET_CTL, CTF_FONTFAMILY, CTF_FONTFAMILY_CJK, CTF_FONTFAMILY_CTL, CTF_FONTPITCH, CTF_FONTPITCH_CJK, CTF_FONTPITCH_CTL, CTF_FONTSTYLENAME, CTF_FONTSTYLENAME_CJK, CTF_FONTSTYLENAME_CTL, SvXMLImportPropertyMapper::getPropertySetMapper(), and XMLPropertyState::mnIndex.

Referenced by finished().

◆ FontFinished()

void XMLTextImportPropertyMapper::FontFinished ( XMLPropertyState pFontFamilyNameState,
XMLPropertyState pFontStyleNameState,
XMLPropertyState pFontFamilyState,
XMLPropertyState pFontPitchState,
XMLPropertyState pFontCharsetState 
)
staticprivate

Definition at line 151 of file txtimppr.cxx.

References XMLPropertyState::maValue, XMLPropertyState::mnIndex, and sName.

Referenced by finished().

◆ handleSpecialItem()

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

Member Data Documentation

◆ m_nSizeTypeIndex

sal_Int32 XMLTextImportPropertyMapper::m_nSizeTypeIndex
private

Definition at line 28 of file txtimppr.hxx.

Referenced by finished().

◆ m_nWidthTypeIndex

sal_Int32 XMLTextImportPropertyMapper::m_nWidthTypeIndex
private

Definition at line 29 of file txtimppr.hxx.

Referenced by finished().


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