LibreOffice Module sw (master) 1
|
#include <xmlimpit.hxx>
Public Member Functions | |
SvXMLImportItemMapper (SvXMLItemMapEntriesRef aMapEntries) | |
virtual | ~SvXMLImportItemMapper () |
void | importXML (SfxItemSet &rSet, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) |
fills the given itemset with the attributes in the given list More... | |
virtual bool | handleSpecialItem (const SvXMLItemMapEntry &rEntry, SfxPoolItem &rItem, SfxItemSet &rSet, const OUString &rValue, const SvXMLUnitConverter &rUnitConverter) |
this method is called for every item that has the MID_SW_FLAG_SPECIAL_ITEM_IMPORT flag set More... | |
virtual bool | handleNoItem (const SvXMLItemMapEntry &rEntry, SfxItemSet &rSet, const OUString &rValue, const SvXMLUnitConverter &rUnitConverter, const SvXMLNamespaceMap &rNamespaceMap) |
this method is called for every item that has the MID_SW_FLAG_NO_ITEM_IMPORT flag set More... | |
virtual void | finished (SfxItemSet &rSet, SvXMLUnitConverter const &rUnitConverter) const |
This method is called when all attributes have benn processed. More... | |
virtual void | setMapEntries (SvXMLItemMapEntriesRef rMapEntries) |
const SvXMLItemMapEntriesRef & | getMapEntries () const |
Static Public Member Functions | |
static bool | PutXMLValue (SfxPoolItem &rItem, const OUString &rValue, sal_uInt16 nMemberId, const SvXMLUnitConverter &rUnitConverter) |
This method is called for every item that should be set based upon an XML attribute value. More... | |
Private Member Functions | |
void | importXMLUnknownAttributes (SfxItemSet &rSet, css::uno::Reference< css::xml::sax::XFastAttributeList > const &xAttrList, const SvXMLUnitConverter &rUnitConverter, std::unique_ptr< SvXMLAttrContainerItem > &pUnknownItem) |
Private Attributes | |
SvXMLItemMapEntriesRef | mrMapEntries |
Definition at line 32 of file xmlimpit.hxx.
|
explicit |
Definition at line 64 of file xmlimpit.cxx.
|
virtual |
Definition at line 70 of file xmlimpit.cxx.
|
virtual |
This method is called when all attributes have benn processed.
It may be used to remove items that are incomplete
Definition at line 277 of file xmlimpit.cxx.
Referenced by importXML(), and importXMLUnknownAttributes().
|
inline |
Definition at line 86 of file xmlimpit.hxx.
References mrMapEntries.
|
virtual |
this method is called for every item that has the MID_SW_FLAG_NO_ITEM_IMPORT flag set
Definition at line 266 of file xmlimpit.cxx.
Referenced by importXML().
|
virtual |
this method is called for every item that has the MID_SW_FLAG_SPECIAL_ITEM_IMPORT flag set
Definition at line 254 of file xmlimpit.cxx.
Referenced by importXML().
void SvXMLImportItemMapper::importXML | ( | SfxItemSet & | rSet, |
css::uno::Reference< css::xml::sax::XFastAttributeList > const & | xAttrList, | ||
const SvXMLUnitConverter & | rUnitConverter, | ||
const SvXMLNamespaceMap & | rNamespaceMap | ||
) |
fills the given itemset with the attributes in the given list
Definition at line 81 of file xmlimpit.cxx.
References sax_fastparser::castToFastAttributeList(), SfxPoolItem::Clone(), finished(), SfxItemPool::GetDefaultItem(), SfxItemSet::GetItemState(), SvXMLNamespaceMap::GetKeyByAttrName(), SfxItemSet::GetPool(), handleNoItem(), handleSpecialItem(), importXMLUnknownAttributes(), IsTokenInNamespace(), SfxItemPool::IsWhich(), MID_SW_FLAG_ELEMENT_ITEM_IMPORT, MID_SW_FLAG_MASK, MID_SW_FLAG_NO_ITEM_IMPORT, MID_SW_FLAG_SPECIAL_ITEM_IMPORT, mrMapEntries, SvXMLItemMapEntry::nMemberId, nToken, nUnknownWhich, SvXMLItemMapEntry::nWhichId, SfxItemSet::Put(), PutXMLValue(), rSet, TOKEN_MASK, XML_ELEMENT, XML_NAMESPACE_FO_COMPAT, XML_NAMESPACE_NONE, and XML_NAMESPACE_XMLNS.
Referenced by SwXMLItemSetContext::SwXMLItemSetContext().
|
private |
Definition at line 198 of file xmlimpit.cxx.
References SfxPoolItem::Clone(), finished(), SfxItemSet::GetItemState(), i, nUnknownWhich, SfxItemSet::Put(), rSet, SAL_WARN, sName, and sPrefix.
Referenced by importXML().
|
static |
This method is called for every item that should be set based upon an XML attribute value.
Definition at line 310 of file xmlimpit.cxx.
References ALL_BORDER, ALL_BORDER_LINE_WIDTH, ALL_BORDER_PADDING, aXMLTableAlignMap, aXMLTableVAlignMap, BOTTOM_BORDER, BOTTOM_BORDER_LINE_WIDTH, BOTTOM_BORDER_PADDING, COL_BLACK(), sax::Converter::convertBool(), sax::Converter::convertColor(), SvXMLUnitConverter::convertEnum(), SvXMLUnitConverter::convertMeasureToCore(), sax::Converter::convertNumber(), sax::Converter::convertPercent(), XMLPropertyHandlerFactory::CreatePropertyHandler(), ePos, Fixed, SvxBrushItem::GetColor(), SvxBrushItem::GetGraphicPos(), SvXMLTokenEnumerator::getNextToken(), GPOS_AREA, GPOS_LB, GPOS_LM, GPOS_LT, GPOS_MM, GPOS_NONE, GPOS_RB, GPOS_TILED, IsXMLToken(), LEFT_BORDER, LEFT_BORDER_LINE_WIDTH, LEFT_BORDER_PADDING, MID_BACK_COLOR, MID_BREAK_AFTER, MID_BREAK_BEFORE, MID_FIRST_AUTO, MID_FIRST_LINE_INDENT, MID_FRMSIZE_COL_WIDTH, MID_FRMSIZE_FIX_HEIGHT, MID_FRMSIZE_MIN_HEIGHT, MID_FRMSIZE_REL_COL_WIDTH, MID_FRMSIZE_REL_WIDTH, MID_FRMSIZE_WIDTH, MID_GRAPHIC_FILTER, MID_GRAPHIC_POSITION, MID_GRAPHIC_REPEAT, MID_L_MARGIN, MID_LO_MARGIN, MID_PAGEDESC_PAGENUMOFFSET, MID_R_MARGIN, MID_UP_MARGIN, Minimum, MINLAY, SwPostItHelper::NONE, nPos, nValue, psXML_BreakType, psXML_BrushHoriPos, psXML_BrushRepeat, psXML_BrushVertPos, SfxPoolItem::PutValue(), RES_BACKGROUND(), RES_BOX(), RES_BREAK(), RES_COLLAPSING_BORDERS(), RES_FRAMEDIR(), RES_FRM_SIZE(), RES_HORI_ORIENT(), RES_KEEP(), RES_LAYOUT_SPLIT(), RES_LR_SPACE(), RES_MARGIN_FIRSTLINE(), RES_MARGIN_RIGHT(), RES_MARGIN_TEXTLEFT(), RES_PAGEDESC(), RES_PRINT(), RES_ROW_SPLIT(), RES_SHADOW(), RES_UL_SPACE(), RES_VERT_ORIENT(), RIGHT_BORDER, RIGHT_BORDER_LINE_WIDTH, RIGHT_BORDER_PADDING, SAL_MAX_UINT16, Color::SetAlpha(), SvxLRSpaceItem::SetAutoFirst(), SvxBrushItem::SetColor(), SvxShadowItem::SetColor(), SvxBoxItem::SetDistance(), SvxBrushItem::SetGraphicFilter(), SvxBrushItem::SetGraphicPos(), SvxSizeItem::SetHeight(), SwFormatFrameSize::SetHeightSizeType(), SwFormatHoriOrient::SetHoriOrient(), SvxBoxItem::SetLine(), SvxShadowItem::SetLocation(), SvxULSpaceItem::SetLower(), SwFormatPageDesc::SetNumOffset(), SvxLRSpaceItem::SetRight(), SvxLRSpaceItem::SetTextFirstLineOffset(), SvxLRSpaceItem::SetTextLeft(), SvxULSpaceItem::SetUpper(), SfxBoolItem::SetValue(), SwFormatVertOrient::SetVertOrient(), SvxShadowItem::SetWidth(), SvxSizeItem::SetWidth(), SwFormatFrameSize::SetWidthPercent(), sw_frmitems_MergeXMLHoriPos(), sw_frmitems_MergeXMLVertPos(), sw_frmitems_parseXMLBorder(), sw_frmitems_setXMLBorder(), TOP_BORDER, TOP_BORDER_LINE_WIDTH, TOP_BORDER_PADDING, u, Variable, SfxPoolItem::Which(), XML_ALWAYS, XML_AUTO, XML_BT_LR, XML_CENTER, XML_COLLAPSING, XML_FALSE, XML_NONE, XML_SEPARATING, XML_TB_RL90, XML_TRANSPARENT, XML_TRUE, and XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT.
Referenced by importXML(), and SwXMLBrushItemImportContext::ProcessAttrs().
|
virtual |
Definition at line 75 of file xmlimpit.cxx.
References mrMapEntries.
|
private |
Definition at line 34 of file xmlimpit.hxx.
Referenced by getMapEntries(), importXML(), and setMapEntries().