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)
53 switch (rIter.getToken())
130 SAL_WARN(
"xmloff.text",
"XMLContentControlContext::endFastElement: no m_xStart");
134 uno::Reference<text::XTextRange> xEndRange
138 uno::Reference<text::XTextCursor> xInsertionCursor
140 xInsertionCursor->gotoRange(
m_xStart,
true);
142 uno::Reference<text::XTextContent> xContentControl
144 GetImport(),
"com.sun.star.text.ContentControl", OUString(), xInsertionCursor);
145 if (!xContentControl.is())
147 SAL_WARN(
"xmloff.text",
"cannot insert content control");
151 uno::Reference<beans::XPropertySet> xPropertySet(xContentControl, uno::UNO_QUERY);
152 if (!xPropertySet.is())
180 xPropertySet->setPropertyValue(
"ListItems",
207 css::uno::Reference<css::xml::sax::XFastContextHandler>
209 sal_Int32 nElement,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
237 , m_rContentControl(rContentControl)
242 sal_Int32 ,
const uno::Reference<xml::sax::XFastAttributeList>& xAttrList)
244 OUString aDisplayText;
249 switch (rIter.getToken())
253 aDisplayText = rIter.toString();
258 aValue = rIter.toString();
266 uno::Sequence<beans::PropertyValue> aListItem = {
OUString m_aUncheckedState
XMLListItemContext(SvXMLImport &rImport, XMLContentControlContext &rContentControl)
bool & m_rIgnoreLeadingSpace
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
SvXMLImport & GetImport()
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::text::XTextRange > m_xStart
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
rtl::Reference< XMLTextImportHelper > const & GetTextImport()
XMLContentControlContext & m_rContentControl
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())
void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
#define XMLOFF_WARN_UNKNOWN(area, rIter)
void AppendListItem(const css::beans::PropertyValues &rListItem)
void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
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)
static bool convertBool(bool &rBool, std::u16string_view rString)
This class deliberately does not support XWeak, to improve performance when loading large documents...
XMLContentControlContext(SvXMLImport &rImport, sal_Int32 nElement, XMLHints_Impl &rHints, bool &rIgnoreLeadingSpace)
css::uno::Sequence< DstElementType > containerToSequence(const SrcType &i_Container)
Handling of tokens in XML:
#define XML_ELEMENT(prefix, name)
css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &rAttrList) override
void SAL_CALL endFastElement(sal_Int32 nElement) override
endFastElement is called before a context will be destructed, but after an elements context has been ...
#define SAL_WARN(area, stream)
bool m_bShowingPlaceHolder
std::vector< css::beans::PropertyValues > m_aListItems