23#include <rtl/ustring.hxx>
24#include <rtl/ustrbuf.hxx>
36#include <com/sun/star/frame/XModel.hpp>
37#include <com/sun/star/xml/sax/XAttributeList.hpp>
38#include <com/sun/star/beans/XPropertySet.hpp>
39#include <com/sun/star/text/XFootnotesSupplier.hpp>
40#include <com/sun/star/text/XEndnotesSupplier.hpp>
41#include <com/sun/star/text/FootnoteNumbering.hpp>
42#include <com/sun/star/style/NumberingType.hpp>
60 OUStringBuffer sBuffer;
66 XMLFootnoteConfigHelper(
73 virtual void SAL_CALL
characters(
const OUString& rChars )
override;
78XMLFootnoteConfigHelper::XMLFootnoteConfigHelper(
83, rConfig(rConfigImport)
88void XMLFootnoteConfigHelper::endFastElement(sal_Int32 )
92 rConfig.SetBeginNotice(sBuffer.makeStringAndClear());
96 rConfig.SetEndNotice(sBuffer.makeStringAndClear());
101void XMLFootnoteConfigHelper::characters(
const OUString& rChars )
103 sBuffer.append(rChars);
123 SvXMLImport& rImport,
125 const Reference<XFastAttributeList> & xAttrList)
130, nNumbering(FootnoteNumbering::PER_PAGE)
154 {
XML_PAGE, FootnoteNumbering::PER_PAGE },
161 const OUString& rValue )
183 nOffset =
static_cast<sal_uInt16
>(nTmp);
217 const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
219 css::uno::Reference< css::xml::sax::XFastContextHandler > xContext;
227 xContext =
new XMLFootnoteConfigHelper(
GetImport(), *
this,
false);
230 xContext =
new XMLFootnoteConfigHelper(
GetImport(), *
this,
true);
246 Reference<XEndnotesSupplier> xSupplier(
255 Reference<XFootnotesSupplier> xSupplier(
266 const Reference<XPropertySet> & rConfig)
272 aAny <<=
GetImport().GetStyleDisplayName(
279 aAny <<=
GetImport().GetStyleDisplayName(
286 aAny <<=
GetImport().GetStyleDisplayName(
293 aAny <<=
GetImport().GetStyleDisplayName(
302 sal_Int16
nNumType = NumberingType::ARABIC;
307 if( NumberingType::CHAR_SPECIAL ==
nNumType )
324 const OUString& sText)
330 const OUString& sText)
This class deliberately does not support XWeak, to improve performance when loading large documents.
virtual void SAL_CALL endFastElement(sal_Int32 Element) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
SvXMLImport & GetImport()
virtual void SAL_CALL characters(const OUString &aChars) override
This method is called for all characters that are contained in the current element.
void SetFamily(XmlStyleFamily nSet)
static bool convertEnum(EnumT &rEnum, std::u16string_view rValue, const SvXMLEnumMapEntry< EnumT > *pMap)
convert string to enum using given enum map, if the enum is not found in the map, this method will re...
static bool convertNumber(sal_Int32 &rValue, std::u16string_view aString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
@ XML_CITATION_BODY_STYLE_NAME
@ XML_FOOTNOTE_CONTINUATION_NOTICE_FORWARD
@ XML_FOOTNOTE_CONTINUATION_NOTICE_BACKWARD
@ XML_CITATION_STYLE_NAME
bool IsXMLToken(std::u16string_view rString, enum XMLTokenEnum eToken)
compare eToken to the string
#define XML_ELEMENT(prefix, name)