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 (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...
 
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::unique_ptr< XMLPropertyState > *ppNewFontStyleName, std::unique_ptr< XMLPropertyState > *ppNewFontFamily, std::unique_ptr< XMLPropertyState > *ppNewFontPitch, std::unique_ptr< 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 nSizeTypeIndex
 
sal_Int32 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 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 inherited from SvXMLImportPropertyMapper
SvXMLImportGetImport () 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 ( const rtl::Reference< XMLPropertySetMapper > &  rMapper,
SvXMLImport rImport 
)

Definition at line 138 of file txtimppr.cxx.

XMLTextImportPropertyMapper::~XMLTextImportPropertyMapper ( )
overridevirtual

Definition at line 147 of file txtimppr.cxx.

Member Function Documentation

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 355 of file txtimppr.cxx.

References assert(), 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, FontDefaultsCheck(), FontFinished(), SvXMLImportPropertyMapper::getPropertySetMapper(), i, XMLPropertyState::maValue, XMLPropertyState::mnIndex, nCount, nSizeTypeIndex, nWidthTypeIndex, XML_LINE_BOTTOM, XML_LINE_LEFT, XML_LINE_RIGHT, and XML_LINE_TOP.

void XMLTextImportPropertyMapper::FontDefaultsCheck ( XMLPropertyState const *  pFontFamilyName,
XMLPropertyState const *  pFontStyleName,
XMLPropertyState const *  pFontFamily,
XMLPropertyState const *  pFontPitch,
XMLPropertyState const *  pFontCharSet,
std::unique_ptr< XMLPropertyState > *  ppNewFontStyleName,
std::unique_ptr< XMLPropertyState > *  ppNewFontFamily,
std::unique_ptr< XMLPropertyState > *  ppNewFontPitch,
std::unique_ptr< 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, assert(), 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(), XMLPropertyState::mnIndex, and void().

Referenced by finished().

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().

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

Member Data Documentation

sal_Int32 XMLTextImportPropertyMapper::nSizeTypeIndex
private

Definition at line 28 of file txtimppr.hxx.

Referenced by finished().

sal_Int32 XMLTextImportPropertyMapper::nWidthTypeIndex
private

Definition at line 29 of file txtimppr.hxx.

Referenced by finished().


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