22 #include <com/sun/star/uno/Reference.h>
23 #include <com/sun/star/util/DateTime.hpp>
24 #include <com/sun/star/text/XTextCursor.hpp>
37 using ::com::sun::star::uno::Reference;
38 using ::com::sun::star::text::XTextCursor;
40 using ::com::sun::star::xml::sax::XAttributeList;
55 const css::uno::Reference< css::xml::sax::XFastAttributeList >& xAttrList )
58 bool bHaveXmlId(
false );
61 switch(aIter.getToken())
65 sID = aIter.toString();
71 if (!bHaveXmlId) {
sID = aIter.toString(); }
90 sal_Int32 nElement,
const css::uno::Reference< css::xml::sax::XFastAttributeList >& )
127 rHelper->DeleteParagraph();
135 const OUString& rType,
136 const OUString& rAuthor,
137 const OUString& rComment,
138 std::u16string_view rDate)
140 util::DateTime aDateTime;
156 Reference<XTextCursor> xCursor( rHelper->GetCursor() );
159 Reference<XTextCursor> xNewCursor =
160 rHelper->RedlineCreateText(xCursor,
sID);
166 rHelper->SetCursor( xNewCursor );
Import and elements contained in a element...
virtual void SAL_CALL startFastElement(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList) override
SvXMLImport & GetImport()
virtual css::uno::Reference< css::xml::sax::XFastContextHandler > SAL_CALL createFastChildContext(sal_Int32 nElement, const css::uno::Reference< css::xml::sax::XFastAttributeList > &AttrList) override
FastAttributeList & castToFastAttributeList(const css::uno::Reference< css::xml::sax::XFastAttributeList > &xAttrList)
static bool parseDateTime(css::util::DateTime &rDateTime, std::u16string_view rString)
rtl::Reference< XMLTextImportHelper > const & GetTextImport()
void UseRedlineText()
create redline XText/XTextCursor on demand and register with XMLTextImportHelper
css::uno::Reference< css::text::XTextCursor > xOldCursor
if we replace the current XTextCursor/XText by the ones for the redline, we remember the old cursor h...
bool bMergeLastPara
merge-last-paragraph flag
#define XMLOFF_WARN_UNKNOWN(area, rIter)
void SetChangeInfo(const OUString &rType, const OUString &rAuthor, const OUString &rComment, std::u16string_view rDate)
change info: To be called from change-info context
static bool convertBool(bool &rBool, std::u16string_view rString)
static const OUString & getNameFromToken(sal_Int32 nToken)
This class deliberately does not support XWeak, to improve performance when loading large documents...
Handling of tokens in XML:
#define XML_ELEMENT(prefix, name)
virtual ~XMLChangedRegionImportContext() override
#define XMLOFF_WARN_UNKNOWN_ELEMENT(area, token)
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 ...
XMLChangedRegionImportContext(SvXMLImport &rImport)