22#include <com/sun/star/beans/XPropertySet.hpp>
41 , m_rIgnoreLeadingSpace(rIgnoreLeadingSpace)
42 , m_xStart(GetImport().GetTextImport()->GetCursorAsRange()->getStart())
47 sal_Int32 ,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
54 switch (rIter.getToken())
152 m_aTag = rIter.toString();
186 SAL_WARN(
"xmloff.text",
"XMLContentControlContext::endFastElement: no m_xStart");
190 uno::Reference<text::XTextRange> xEndRange
191 =
GetImport().GetTextImport()->GetCursorAsRange()->getStart();
194 uno::Reference<text::XTextCursor> xInsertionCursor
195 =
GetImport().GetTextImport()->GetText()->createTextCursorByRange(xEndRange);
196 xInsertionCursor->gotoRange(
m_xStart,
true);
198 uno::Reference<text::XTextContent> xContentControl
200 GetImport(),
"com.sun.star.text.ContentControl", OUString(), xInsertionCursor);
201 if (!xContentControl.is())
203 SAL_WARN(
"xmloff.text",
"cannot insert content control");
207 uno::Reference<beans::XPropertySet> xPropertySet(xContentControl, uno::UNO_QUERY);
208 if (!xPropertySet.is())
236 xPropertySet->setPropertyValue(
"ListItems",
303css::uno::Reference<css::xml::sax::XFastContextHandler>
305 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
333 , m_rContentControl(rContentControl)
338 sal_Int32 ,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
340 OUString aDisplayText;
345 switch (rIter.getToken())
349 aDisplayText = rIter.toString();
354 aValue = rIter.toString();
362 uno::Sequence<beans::PropertyValue> aListItem = {
This class deliberately does not support XWeak, to improve performance when loading large documents.
SvXMLImport & GetImport()
Imports <loext:content-control>.
void SAL_CALL characters(const OUString &rChars) override
This method is called for all characters that are contained in the current element.
css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &rAttrList) override
bool & m_rIgnoreLeadingSpace
void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
void AppendListItem(const css::beans::PropertyValues &rListItem)
XMLContentControlContext(SvXMLImport &rImport, sal_Int32 nElement, XMLHints_Impl &rHints, bool &rIgnoreLeadingSpace)
std::vector< css::beans::PropertyValues > m_aListItems
void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
css::uno::Reference< css::text::XTextRange > m_xStart
OUString m_aUncheckedState
bool m_bShowingPlaceHolder
static css::uno::Reference< css::xml::sax::XFastContextHandler > CreateSpanContext(SvXMLImport &rImport, sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList, XMLHints_Impl &rHints, bool &rIgnLeadSpace, sal_uInt8 nStarFontsConvFlags=0)
Imports <loext:list-item> inside <loext:content-control>.
XMLContentControlContext & m_rContentControl
XMLListItemContext(SvXMLImport &rImport, XMLContentControlContext &rContentControl)
void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
static css::uno::Reference< css::text::XTextContent > CreateAndInsertMark(SvXMLImport &rImport, const OUString &sServiceName, const OUString &sMarkName, const css::uno::Reference< css::text::XTextRange > &rRange, const OUString &i_rXmlId=OUString(), bool const isFieldmarkSeparatorMissing=false)
static bool convertNumber(sal_Int32 &rValue, std::u16string_view aString, sal_Int32 nMin=SAL_MIN_INT32, sal_Int32 nMax=SAL_MAX_INT32)
static bool convertBool(bool &rBool, std::u16string_view rString)
#define SAL_WARN(area, stream)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
Handling of tokens in XML:
@ XML_SHOWING_PLACE_HOLDER
@ XML_DATE_RFC_LANGUAGE_TAG
#define XMLOFF_WARN_UNKNOWN(area, rIter)
#define XML_ELEMENT(prefix, name)