33#include <com/sun/star/container/XNamed.hpp>
34#include <com/sun/star/frame/XModel.hpp>
35#include <com/sun/star/uno/Reference.h>
36#include <com/sun/star/text/XTextContent.hpp>
37#include <com/sun/star/beans/XPropertySet.hpp>
38#include <com/sun/star/lang/XMultiServiceFactory.hpp>
39#include <com/sun/star/text/ControlCharacter.hpp>
42using ::com::sun::star::beans::XPropertySet;
43using ::com::sun::star::uno::Reference;
44using ::com::sun::star::xml::sax::XFastAttributeList;
45using ::com::sun::star::lang::XMultiServiceFactory;
46using ::com::sun::star::container::XNamed;
65, bIsCurrentlyVisible(true)
66, bIsCurrentlyVisibleOK(false)
76 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
95 Reference<XMultiServiceFactory>
xFactory(
100 Reference<XInterface> xIfc =
101 xFactory->createInstance( bIsIndexHeader ? OUString(
"com.sun.star.text.IndexHeaderSection")
102 : OUString(
"com.sun.star.text.TextSection") );
106 Reference<XPropertySet> xPropSet(xIfc, UNO_QUERY);
112 Reference<XNamed> xNamed(xPropSet, UNO_QUERY);
113 xNamed->setName(
sName);
121 if (pStyle !=
nullptr)
128 if (! bIsIndexHeader)
142 xPropSet->setPropertyValue(
"Condition",
Any(
sCond) );
150 xPropSet->setPropertyValue(
"ProtectionKey",
Any(
aSequence));
154 xPropSet->setPropertyValue(
"IsProtected",
Any(
bProtect) );
159 Reference<XTextRange> xStart =
160 rHelper->GetCursor()->getStart();
162 OUString sMarkerString(
" ");
164 OUString sMarkerString(
"X");
166 rHelper->InsertString(sMarkerString);
167 rHelper->InsertControlCharacter(
168 ControlCharacter::APPEND_PARAGRAPH );
169 rHelper->InsertString(sMarkerString);
172 rHelper->GetCursor()->gotoRange(xStart,
false);
173 rHelper->GetCursor()->goRight(1,
true);
180 rHelper->GetText()->insertTextContent(
181 rHelper->GetCursorAsRange(), xTextContent,
true );
184 rHelper->GetText()->insertString(
185 rHelper->GetCursorAsRange(),
"",
true);
189 rHelper->RedlineAdjustStartNodeCursor();
196 const Reference<XFastAttributeList> & xAttrList )
200 switch (aIter.getToken())
203 sXmlId = aIter.toString();
209 sName = aIter.toString();
214 OUString sValue = aIter.toString();
216 sal_uInt16 nPrefix =
GetImport().GetNamespaceMap().
217 GetKeyByAttrValueQName(sValue, &sTmp);
277 rHelper->GetCursor()->goRight(1,
false);
280 rHelper->GetCursor()->goLeft(1,
true);
281 rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
286 rHelper->GetCursor()->goRight(1,
true);
287 rHelper->GetText()->insertString(rHelper->GetCursorAsRange(),
291 rHelper->RedlineAdjustStartNodeCursor();
296 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
312 auto pContext =
GetImport().GetTextImport()->CreateTextChildContext(
This class deliberately does not support XWeak, to improve performance when loading large documents.
SvXMLImport & GetImport()
virtual void FillPropertySet(const css::uno::Reference< css::beans::XPropertySet > &rPropSet)
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
css::uno::Reference< css::beans::XPropertySet > xSectionPropertySet
TextSection (as XPropertySet) for passing down to data source elements.
XMLSectionImportContext(SvXMLImport &rImport)
css::uno::Sequence< sal_Int8 > aSequence
virtual ~XMLSectionImportContext() override
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 ...
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
void ProcessAttributes(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
bool bIsCurrentlyVisibleOK
static void decode(css::uno::Sequence< sal_Int8 > &aPass, std::u16string_view sBuffer)
static bool convertBool(bool &rBool, std::u16string_view rString)
Reference< XSingleServiceFactory > xFactory
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
#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token)
#define XMLOFF_WARN_UNKNOWN(area, rIter)
#define XML_ELEMENT(prefix, name)
constexpr sal_Int32 TOKEN_MASK
constexpr sal_uInt16 XML_NAMESPACE_OOOW