// attach footnote to document
Reference<XTextContent> xTextContent(xIfc, UNO_QUERY);
rHelper.InsertTextContent(xTextContent);
// process id attribute for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
{ if( aIter.getToken() == XML_ELEMENT(TEXT, XML_ID) )
{ // get ID ...
Reference<XPropertySet> xPropertySet(xTextContent, UNO_QUERY);
Any aAny =xPropertySet->getPropertyValue(u"ReferenceId"_ustr);
sal_Int16 nID = 0;
aAny >>= nID;
// ... and insert into map
rHelper.InsertFootnoteID( aIter.toString(), nID); break;
}
}
// save old cursor and install new one
xOldCursor = rHelper.GetCursor();
Reference<XText> xText(xTextContent, UNO_QUERY); try
{ // May fail e.g. for a nested footnote, which is formally a valid ODF, but is not supported
rHelper.SetCursor(xText->createTextCursor());
} catch (css::uno::RuntimeException&)
{
TOOLS_WARN_EXCEPTION("xmloff.text", "skipping the footnote: caught");
mbIsValid = false;
}
// remember old list item and block (#89891#) and reset them // for the footnote
rHelper.PushListContext();
mbListContextPushed = true;
switch(nElement)
{ case XML_ELEMENT(TEXT, XML_NOTE_CITATION):
{ // little hack: we only care for one attribute of the citation // element. We handle that here, and then return a // default context. for( auto& aIter : sax_fastparser::castToFastAttributeList(xAttrList) )
{ if ( aIter.getToken() == XML_ELEMENT(TEXT, XML_LABEL) )
xFootnote->setLabel(aIter.toString());
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.