20#include <com/sun/star/style/TabAlign.hpp>
26#include <com/sun/star/style/TabStop.hpp>
43 const uno::Reference< xml::sax::XFastAttributeList > & xAttrList );
50 SvXMLImport& rImport, sal_Int32 ,
51 const uno::Reference< xml::sax::XFastAttributeList > & xAttrList )
55 aTabStop.Alignment = style::TabAlign_LEFT;
63 switch( aIter.getToken() )
66 if (
GetImport().GetMM100UnitConverter().convertMeasureToCore(
67 nVal, aIter.toView()))
75 aTabStop.Alignment = style::TabAlign_LEFT;
79 aTabStop.Alignment = style::TabAlign_RIGHT;
83 aTabStop.Alignment = style::TabAlign_CENTER;
87 aTabStop.Alignment = style::TabAlign_DECIMAL;
91 aTabStop.Alignment = style::TabAlign_DEFAULT;
95 if( !aIter.isEmpty() )
96 aTabStop.DecimalChar = aIter.toString()[0];
107 if( !aIter.isEmpty() )
108 cTextFillChar = aIter.toString()[0];
115 if( cTextFillChar != 0 &&
aTabStop.FillChar !=
' ' )
121 SvXMLImport& rImport, sal_Int32 nElement,
123 ::std::vector< XMLPropertyState > &rProps )
130 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList)
141 return xTabStopContext;
152 uno::Sequence< style::TabStop>
aSeq(
nCount );
156 sal_uInt16 nNewCount = 0;
158 style::TabStop* pTabStops =
aSeq.getArray();
162 const style::TabStop& rTabStop = pTabStopContext->
getTabStop();
163 bool bDflt = style::TabAlign_DEFAULT == rTabStop.Alignment;
174 aSeq.realloc( nNewCount );
This class deliberately does not support XWeak, to improve performance when loading large documents.
SvXMLImport & GetImport()
SvxXMLTabStopContext_Impl(SvXMLImport &rImport, sal_Int32 nElement, const uno::Reference< xml::sax::XFastAttributeList > &xAttrList)
const style::TabStop & getTabStop() const
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
SvxXMLTabStopImportContext(SvXMLImport &rImport, sal_Int32 nElement, const XMLPropertyState &rProp, ::std::vector< XMLPropertyState > &rProps)
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
std::vector< rtl::Reference< SvxXMLTabStopContext_Impl > > maTabStops
void SetInsert(bool bIns)
virtual void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
Sequence< sal_Int8 > aSeq
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
Smart struct to transport an Any with an index to the appropriate property-name.
#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token)
#define XMLOFF_WARN_UNKNOWN(area, rIter)
#define XML_ELEMENT(prefix, name)