20#include <com/sun/star/uno/Sequence.h>
45#include <osl/diagnose.h>
47#include <com/sun/star/xml/sax/FastToken.hpp>
50using namespace css::io;
51using namespace css::uno;
52using namespace css::xml::dom;
53using namespace css::xml::dom::events;
54using namespace css::xml::sax;
61 xmlNodePtr cur = i_pDocument->children;
62 while (cur !=
nullptr)
64 if ((cur->type == XML_DOCUMENT_TYPE_NODE) ||
65 (cur->type == XML_DTD_NODE)) {
76 xmlNodePtr cur = i_pDocument->children;
77 while (cur !=
nullptr)
79 if (cur->type == XML_ELEMENT_NODE)
88 NodeType_DOCUMENT_NODE, reinterpret_cast<xmlNodePtr>(pDoc))
90 , m_pEventDispatcher(new events::CEventDispatcher)
98 xDoc->m_NodeMap.emplace(
99 reinterpret_cast<xmlNodePtr
>(pDoc),
101 WeakReference<XNode>(
static_cast<XDocument*
>(xDoc.get())),
108 ::osl::MutexGuard
const g(
m_Mutex);
113 Reference<XNode>
const xNode(rEntry.second.first);
114 OSL_ENSURE(!xNode.is(),
115 "CDocument::~CDocument(): ERROR: live node in document node map!");
138 nodemap_t::iterator
const i =
m_NodeMap.find(pNode);
150 CNode *
const pCurrent =
i->second.second;
151 if (pCurrent == pCNode) {
163 if (
nullptr == pNode) {
167 nodemap_t::const_iterator
const i =
m_NodeMap.find(pNode);
170 uno::Reference<XNode>
const xNode(
i->second.first);
174 OSL_ASSERT(ret.is());
179 if (!bCreate) {
return nullptr; }
187 case XML_ELEMENT_NODE:
195 case XML_CDATA_SECTION_NODE:
199 case XML_ENTITY_REF_NODE:
203 case XML_ENTITY_NODE:
205 pCNode =
new CEntity(*
this,
m_Mutex,
reinterpret_cast<xmlEntityPtr
>(pNode));
211 case XML_COMMENT_NODE:
215 case XML_DOCUMENT_NODE:
217 OSL_ENSURE(
false,
"CDocument::GetCNode is not supposed to"
218 " create a CDocument!!!");
219 pCNode =
new CDocument(
reinterpret_cast<xmlDocPtr
>(pNode));
221 case XML_DOCUMENT_TYPE_NODE:
226 case XML_DOCUMENT_FRAG_NODE:
230 case XML_NOTATION_NODE:
232 pCNode =
new CNotation(*
this,
m_Mutex,
reinterpret_cast<xmlNotationPtr
>(pNode));
234 case XML_ATTRIBUTE_NODE:
236 pCNode =
new CAttr(*
this,
m_Mutex,
reinterpret_cast<xmlAttrPtr
>(pNode));
239 case XML_HTML_DOCUMENT_NODE:
240 case XML_ELEMENT_DECL:
241 case XML_ATTRIBUTE_DECL:
242 case XML_ENTITY_DECL:
243 case XML_NAMESPACE_DECL:
248 if (pCNode !=
nullptr) {
249 bool const bInserted =
m_NodeMap.emplace(
251 ::std::make_pair(WeakReference<XNode>(pCNode), pCNode.get())
253 OSL_ASSERT(bInserted);
260 OSL_ENSURE(pCNode.is(),
"no node produced during CDocument::GetCNode!");
272 i_xHandler->startDocument();
273 for (xmlNodePtr pChild = m_aNodePtr->children;
274 pChild !=
nullptr; pChild = pChild->next) {
276 OSL_ENSURE(pNode !=
nullptr,
"CNode::get returned 0");
277 pNode->saxify(i_xHandler);
279 i_xHandler->endDocument();
285 for (xmlNodePtr pChild = m_aNodePtr->children;
286 pChild !=
nullptr; pChild = pChild->next) {
288 OSL_ENSURE(pNode !=
nullptr,
"CNode::get returned 0");
289 pNode->fastSaxify(rContext);
297 case NodeType_PROCESSING_INSTRUCTION_NODE:
298 case NodeType_COMMENT_NODE:
300 case NodeType_ELEMENT_NODE:
302 return (pReplacedNodeType && *pReplacedNodeType == nodeType)
304 case NodeType_DOCUMENT_TYPE_NODE:
306 return (pReplacedNodeType && *pReplacedNodeType == nodeType)
316 ::osl::MutexGuard
const g(
m_Mutex);
323 ::osl::MutexGuard
const g(
m_Mutex);
343 IOContext *pContext =
static_cast<IOContext*
>(context);
344 Sequence<sal_Int8> bs(
reinterpret_cast<const sal_Int8*
>(buffer), len);
345 pContext->stream->writeBytes(bs);
353 IOContext *pContext =
static_cast<IOContext*
>(context);
354 if (pContext->allowClose) {
355 pContext->stream->closeOutput();
365 ::osl::MutexGuard
const g(
m_Mutex);
372 for (
const Reference< XStreamListener >& aListener : streamListeners) {
373 aListener->started();
377 ::osl::MutexGuard
const g(
m_Mutex);
384 xmlOutputBufferPtr
pOut = xmlOutputBufferCreateIO(
386 xmlSaveFileTo(
pOut, m_aNodePtr->doc,
nullptr);
390 for (
const Reference< XStreamListener >& aListener : streamListeners) {
402 ::osl::MutexGuard
const g(
m_Mutex);
409 ::osl::MutexGuard
const g(
m_Mutex);
417 ::osl::MutexGuard
const g(
m_Mutex);
420 xmlChar
const *
pName =
reinterpret_cast<xmlChar
const *
>(o1.getStr());
421 xmlAttrPtr
const pAttr = xmlNewDocProp(
m_aDocPtr,
pName,
nullptr);
424 reinterpret_cast<xmlNodePtr
>(pAttr)).
get()));
426 pCAttr->m_bUnlinked =
true;
432 const OUString& ns,
const OUString& qname)
434 ::osl::MutexGuard
const g(
m_Mutex);
440 sal_Int32
i = qname.indexOf(
':');
441 OString oPrefix, oName, oUri;
452 xmlAttrPtr
const pAttr = xmlNewDocProp(
m_aDocPtr,
453 reinterpret_cast<xmlChar const*
>(oName.getStr()),
nullptr);
456 reinterpret_cast<xmlNodePtr
>(pAttr)).
get()));
459 pCAttr->m_oNamespace.emplace( oUri, oPrefix );
460 pCAttr->m_bUnlinked =
true;
468 ::osl::MutexGuard
const g(
m_Mutex);
472 xmlChar
const*
const pData =
473 reinterpret_cast<xmlChar const*
>(oData.getStr());
474 xmlNodePtr
const pText =
476 Reference< XCDATASection >
const xRet(
485 ::osl::MutexGuard
const g(
m_Mutex);
488 xmlChar
const *
pData =
reinterpret_cast<xmlChar
const *
>(o1.getStr());
490 Reference< XComment >
const xRet(
499 ::osl::MutexGuard
const g(
m_Mutex);
501 xmlNodePtr pFrag = xmlNewDocFragment(
m_aDocPtr);
502 Reference< XDocumentFragment >
const xRet(
511 ::osl::MutexGuard
const g(
m_Mutex);
514 xmlChar
const *
pName =
reinterpret_cast<xmlChar
const *
>(o1.getStr());
515 xmlNodePtr
const pNode = xmlNewDocNode(
m_aDocPtr,
nullptr,
pName,
nullptr);
516 Reference< XElement >
const xRet(
524 const OUString& ns,
const OUString& qname)
526 ::osl::MutexGuard
const g(
m_Mutex);
528 sal_Int32
i = qname.indexOf(
':');
530 xmlChar
const *pPrefix;
531 xmlChar
const *
pName;
535 pPrefix =
reinterpret_cast<xmlChar
const *
>(o1.getStr());
537 pName =
reinterpret_cast<xmlChar
const *
>(o2.getStr());
540 pPrefix =
reinterpret_cast<xmlChar
const *
>(
"");
542 pName =
reinterpret_cast<xmlChar
const *
>(o2.getStr());
545 xmlChar
const *pUri =
reinterpret_cast<xmlChar
const *
>(o3.getStr());
549 xmlNodePtr
const pNode = xmlNewDocNode(
m_aDocPtr,
nullptr,
pName,
nullptr);
550 xmlNsPtr
const pNs = xmlNewNs(pNode, pUri, pPrefix);
551 xmlSetNs(pNode, pNs);
552 Reference< XElement >
const xRet(
561 ::osl::MutexGuard
const g(
m_Mutex);
564 xmlChar
const *
pName =
reinterpret_cast<xmlChar
const *
>(o1.getStr());
566 Reference< XEntityReference >
const xRet(
575 const OUString& target,
const OUString& data)
577 ::osl::MutexGuard
const g(
m_Mutex);
580 xmlChar
const *pTarget =
reinterpret_cast<xmlChar
const *
>(o1.getStr());
582 xmlChar
const *
pData =
reinterpret_cast<xmlChar
const *
>(o2.getStr());
585 Reference< XProcessingInstruction >
const xRet(
594 ::osl::MutexGuard
const g(
m_Mutex);
597 xmlChar
const *
pData =
reinterpret_cast<xmlChar
const *
>(o1.getStr());
599 Reference< XText >
const xRet(
609 ::osl::MutexGuard
const g(
m_Mutex);
612 Reference< XDocumentType >
const xRet(
622 ::osl::MutexGuard
const g(
m_Mutex);
625 if (!pNode) {
return nullptr; }
626 Reference< XElement >
const xRet(
638 if (cur->type == XML_ELEMENT_NODE)
640 xmlAttrPtr
a = cur->properties;
643 if (
a->atype == XML_ATTRIBUTE_ID) {
644 if (strcmp(
reinterpret_cast<char*
>(
a->children->content),
reinterpret_cast<char const *
>(
id)) == 0)
659 Reference< XElement > SAL_CALL
662 ::osl::MutexGuard
const g(
m_Mutex);
666 xmlChar
const *pId =
reinterpret_cast<xmlChar
const *
>(o1.getStr());
668 if (!pStart) {
return nullptr; }
670 Reference< XElement >
const xRet(
677 Reference< XNodeList > SAL_CALL
680 ::osl::MutexGuard
const g(
m_Mutex);
682 Reference< XNodeList >
const xRet(
688 OUString
const& rNamespaceURI, OUString
const& rLocalName)
690 ::osl::MutexGuard
const g(
m_Mutex);
692 Reference< XNodeList >
const xRet(
694 rLocalName, &rNamespaceURI));
706 Reference< XDocument >
const& xTargetDocument,
707 Reference< XNode >
const& xTargetParent,
708 Reference< XNode >
const& xChild)
710 Reference< XNode > xSibling = xChild;
711 while (xSibling.is())
713 Reference< XNode >
const xTmp(
714 xTargetDocument->importNode(xSibling,
true));
715 xTargetParent->appendChild(xTmp);
716 xSibling = xSibling->getNextSibling();
720 static Reference< XNode >
722 Reference< XNode >
const& xImportedNode,
bool deep)
724 Reference< XNode > xNode;
725 NodeType aNodeType = xImportedNode->getNodeType();
728 case NodeType_ATTRIBUTE_NODE:
730 Reference< XAttr >
const xAttr(xImportedNode, UNO_QUERY_THROW);
731 Reference< XAttr >
const xNew =
732 xDocument->createAttribute(xAttr->getName());
733 xNew->setValue(xAttr->getValue());
737 case NodeType_CDATA_SECTION_NODE:
739 Reference< XCDATASection >
const xCData(xImportedNode,
741 Reference< XCDATASection >
const xNewCData =
742 xDocument->createCDATASection(xCData->getData());
746 case NodeType_COMMENT_NODE:
748 Reference< XComment >
const xComment(xImportedNode,
750 Reference< XComment >
const xNewComment =
751 xDocument->createComment(xComment->getData());
755 case NodeType_DOCUMENT_FRAGMENT_NODE:
757 Reference< XDocumentFragment >
const xFrag(xImportedNode,
759 Reference< XDocumentFragment >
const xNewFrag =
760 xDocument->createDocumentFragment();
764 case NodeType_ELEMENT_NODE:
766 Reference< XElement >
const xElement(xImportedNode,
768 OUString
const aNsUri = xImportedNode->getNamespaceURI();
769 OUString
const aNsPrefix = xImportedNode->getPrefix();
770 OUString aQName = xElement->getTagName();
771 Reference< XElement > xNewElement;
772 if (!aNsUri.isEmpty())
774 if (!aNsPrefix.isEmpty()) {
775 aQName = aNsPrefix +
":" + aQName;
777 xNewElement = xDocument->createElementNS(aNsUri, aQName);
779 xNewElement = xDocument->createElement(aQName);
783 if (xElement->hasAttributes())
785 Reference< XNamedNodeMap > attribs = xElement->getAttributes();
786 for (sal_Int32
i = 0;
i < attribs->getLength();
i++)
788 Reference< XAttr >
const curAttr(attribs->item(
i),
790 OUString
const aAttrUri = curAttr->getNamespaceURI();
791 OUString
const aAttrPrefix = curAttr->getPrefix();
792 OUString aAttrName = curAttr->getName();
793 OUString
const sValue = curAttr->getValue();
794 if (!aAttrUri.isEmpty())
796 if (!aAttrPrefix.isEmpty()) {
797 aAttrName = aAttrPrefix +
":" + aAttrName;
799 xNewElement->setAttributeNS(
800 aAttrUri, aAttrName, sValue);
802 xNewElement->setAttribute(aAttrName, sValue);
809 case NodeType_ENTITY_REFERENCE_NODE:
811 Reference< XEntityReference >
const xRef(xImportedNode,
813 Reference< XEntityReference >
const xNewRef(
814 xDocument->createEntityReference(xRef->getNodeName()));
818 case NodeType_PROCESSING_INSTRUCTION_NODE:
820 Reference< XProcessingInstruction >
const xPi(xImportedNode,
822 Reference< XProcessingInstruction >
const xNewPi(
823 xDocument->createProcessingInstruction(
824 xPi->getTarget(), xPi->getData()));
828 case NodeType_TEXT_NODE:
830 Reference< XText >
const xText(xImportedNode, UNO_QUERY_THROW);
831 Reference< XText >
const xNewText(
832 xDocument->createTextNode(xText->getData()));
836 case NodeType_ENTITY_NODE:
837 case NodeType_DOCUMENT_NODE:
838 case NodeType_DOCUMENT_TYPE_NODE:
839 case NodeType_NOTATION_NODE:
848 Reference< XNode >
const xChild = xImportedNode->getFirstChild();
868 Reference< XDocumentEvent >
const xDocevent(xDocument, UNO_QUERY);
869 Reference< XMutationEvent >
const event(xDocevent->createEvent(
870 "DOMNodeInsertedIntoDocument"), UNO_QUERY_THROW);
871 event->initMutationEvent(
872 "DOMNodeInsertedIntoDocument",
true,
false, Reference< XNode >(),
873 OUString(), OUString(), OUString(), AttrChangeType(0) );
874 Reference< XEventTarget >
const xDocET(xDocument, UNO_QUERY);
875 xDocET->dispatchEvent(event);
882 Reference< XNode >
const& xImportedNode,
sal_Bool deep)
900 Reference< XDocument >
const xDocument(
this);
902 if (xImportedNode->getOwnerDocument() == xDocument) {
903 return xImportedNode;
906 Reference< XNode >
const xNode(
925 ::osl::MutexGuard
const g(
m_rMutex);
927 OSL_ASSERT(
nullptr != m_aNodePtr);
928 if (
nullptr == m_aNodePtr) {
931 xmlDocPtr
const pClone(xmlCopyDoc(
m_aDocPtr, bDeep ? 1 : 0));
932 if (
nullptr == pClone) {
return nullptr; }
933 Reference< XNode >
const xRet(
942 if ( aType ==
"DOMSubtreeModified" || aType ==
"DOMNodeInserted" || aType ==
"DOMNodeRemoved"
943 || aType ==
"DOMNodeRemovedFromDocument" || aType ==
"DOMNodeInsertedIntoDocument" || aType ==
"DOMAttrModified"
944 || aType ==
"DOMCharacterDataModified")
948 }
else if ( aType ==
"DOMFocusIn" || aType ==
"DOMFocusOut" || aType ==
"DOMActivate")
951 }
else if ( aType ==
"click" || aType ==
"mousedown" || aType ==
"mouseup"
952 || aType ==
"mouseover" || aType ==
"mousemove" || aType ==
"mouseout" )
965 const Reference< XDocumentHandler >& i_xHandler,
966 const Sequence< beans::StringPair >& i_rNamespaces)
968 ::osl::MutexGuard
const g(
m_Mutex);
972 if (
nullptr != pRoot) {
973 for (
const beans::StringPair& rNsDef : i_rNamespaces) {
975 RTL_TEXTENCODING_UTF8);
977 RTL_TEXTENCODING_UTF8);
979 xmlNewNs(pRoot,
reinterpret_cast<const xmlChar*
>(href.getStr()),
980 reinterpret_cast<const xmlChar*
>(
prefix.getStr()));
990 const Reference< XFastTokenHandler >& i_xTokenHandler,
991 const Sequence< beans::StringPair >& i_rNamespaces,
992 const Sequence< beans::Pair< OUString, sal_Int32 > >& i_rRegisterNamespaces )
994 ::osl::MutexGuard
const g(
m_Mutex);
998 if (
nullptr != pRoot) {
999 for (
const beans::StringPair& rNsDef : i_rNamespaces) {
1001 RTL_TEXTENCODING_UTF8);
1003 RTL_TEXTENCODING_UTF8);
1005 xmlNewNs(pRoot,
reinterpret_cast<const xmlChar*
>(href.getStr()),
1006 reinterpret_cast<const xmlChar*
>(
prefix.getStr()));
1016 for (
const beans::Pair<OUString,sal_Int32>& rNs : i_rRegisterNamespaces)
1018 OSL_ENSURE(rNs.Second >= FastToken::NAMESPACE,
1019 "CDocument::fastSerialize(): invalid NS token id");
static CDOMImplementation * get()
xmlDocPtr const m_aDocPtr
the libxml document: freed in destructor => all UNO wrapper objects must keep the CDocument alive
::rtl::Reference< CNode > GetCNode(xmlNodePtr const pNode, bool const bCreate=true)
get UNO wrapper instance for a libxml node
virtual void SAL_CALL serialize(const css::uno::Reference< css::xml::sax::XDocumentHandler > &i_xHandler, const css::uno::Sequence< css::beans::StringPair > &i_rNamespaces) override
virtual css::uno::Reference< css::xml::dom::XCDATASection > SAL_CALL createCDATASection(const OUString &data) override
Creates a CDATASection node whose value is the specified string.
virtual void fastSaxify(Context &rContext) override
::std::unique_ptr< events::CEventDispatcher > const m_pEventDispatcher
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getElementsByTagNameNS(const OUString &namespaceURI, const OUString &localName) override
Returns a NodeList of all the Elements with a given local name and namespace URI in the order in whic...
virtual void SAL_CALL setOutputStream(const css::uno::Reference< css::io::XOutputStream > &aStream) override
virtual void SAL_CALL terminate() override
virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL createAttributeNS(const OUString &namespaceURI, const OUString &qualifiedName) override
Creates an attribute of the given qualified name and namespace URI.
virtual bool IsChildTypeAllowed(css::xml::dom::NodeType const nodeType, css::xml::dom::NodeType const *pReplacedNodeType) override
virtual css::uno::Reference< css::xml::dom::XEntityReference > SAL_CALL createEntityReference(const OUString &name) override
Creates an EntityReference object.
virtual CDocument & GetOwnerDocument() override
virtual ~CDocument() override
virtual void SAL_CALL removeListener(const css::uno::Reference< css::io::XStreamListener > &aListener) override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL importNode(const css::uno::Reference< css::xml::dom::XNode > &importedNode, sal_Bool deep) override
Imports a node from another document to this document.
virtual void SAL_CALL fastSerialize(const css::uno::Reference< css::xml::sax::XFastDocumentHandler > &handler, const css::uno::Reference< css::xml::sax::XFastTokenHandler > &tokenHandler, const css::uno::Sequence< css::beans::StringPair > &i_rNamespaces, const css::uno::Sequence< css::beans::Pair< OUString, sal_Int32 > > &namespaces) override
virtual css::uno::Reference< css::xml::dom::XText > SAL_CALL createTextNode(const OUString &data) override
Creates a Text node given the specified string.
listenerlist_t m_streamListeners
virtual css::uno::Reference< css::xml::dom::XNodeList > SAL_CALL getElementsByTagName(const OUString &tagname) override
Returns a NodeList of all the Elements with a given tag name in the order in which they are encounter...
virtual css::uno::Reference< css::xml::dom::XAttr > SAL_CALL createAttribute(const OUString &name) override
Creates an Attr of the given name.
::osl::Mutex m_Mutex
this Mutex is used for synchronization of all UNO wrapper objects that belong to this document
virtual css::uno::Reference< css::xml::dom::XElement > SAL_CALL createElementNS(const OUString &namespaceURI, const OUString &qualifiedName) override
Creates an element of the given qualified name and namespace URI.
virtual OUString SAL_CALL getNodeValue() override
virtual css::uno::Reference< css::xml::dom::XNode > SAL_CALL cloneNode(sal_Bool deep) override
void RemoveCNode(xmlNodePtr const pNode, CNode const *const pCNode)
remove a UNO wrapper instance
virtual css::uno::Reference< css::xml::dom::XElement > SAL_CALL getElementById(const OUString &elementId) override
Returns the Element whose ID is given by elementId.
virtual css::uno::Reference< css::xml::dom::events::XEvent > SAL_CALL createEvent(const OUString &eventType) override
virtual css::uno::Reference< css::xml::dom::XElement > SAL_CALL getDocumentElement() override
This is a convenience attribute that allows direct access to the child node that is the root element ...
virtual css::uno::Reference< css::xml::dom::XDocumentType > SAL_CALL getDoctype() override
The Document Type Declaration (see DocumentType) associated with this document.
::rtl::Reference< CElement > GetDocumentElement()
virtual void SAL_CALL addListener(const css::uno::Reference< css::io::XStreamListener > &aListener) override
CDocument(xmlDocPtr const pDocPtr)
virtual css::uno::Reference< css::io::XOutputStream > SAL_CALL getOutputStream() override
virtual css::uno::Reference< css::xml::dom::XProcessingInstruction > SAL_CALL createProcessingInstruction(const OUString &target, const OUString &data) override
Creates a ProcessingInstruction node given the specified name and data strings.
css::uno::Reference< css::io::XOutputStream > m_rOutputStream
virtual css::uno::Reference< css::xml::dom::XComment > SAL_CALL createComment(const OUString &data) override
Creates a Comment node given the specified string.
virtual OUString SAL_CALL getNodeName() override
virtual css::uno::Reference< css::xml::dom::XElement > SAL_CALL createElement(const OUString &tagName) override
Creates an element of the type specified.
events::CEventDispatcher & GetEventDispatcher()
virtual css::uno::Reference< css::xml::dom::XDocumentFragment > SAL_CALL createDocumentFragment() override
Creates an empty DocumentFragment object.
static ::rtl::Reference< CDocument > CreateCDocument(xmlDocPtr const pDoc)
factory: only way to create instance!
virtual void SAL_CALL start() override
virtual void saxify(const css::uno::Reference< css::xml::sax::XDocumentHandler > &i_xHandler) override
virtual css::uno::Reference< css::xml::dom::XDOMImplementation > SAL_CALL getImplementation() override
The DOMImplementation object that handles this document.
size_type erase(const Value &x)
std::pair< const_iterator, bool > insert(Value &&x)
Reference< XOutputStream > stream
std::unique_ptr< sal_Int32[]> pData
void nscleanup(const xmlNodePtr aNode, const xmlNodePtr aParent)
eliminate redundant namespace declarations
static int closeCallback(void *context)
static int writeCallback(void *context, const char *buffer, int len)
static xmlNodePtr lcl_search_element_by_id(const xmlNodePtr cur, const xmlChar *id)
::cppu::ImplInheritanceHelper< CNode, css::xml::dom::XDocument, css::xml::dom::events::XDocumentEvent, css::io::XActiveDataControl, css::io::XActiveDataSource, css::xml::sax::XSAXSerializable, css::xml::sax::XFastSAXSerializable > CDocument_Base
static void lcl_ImportSiblings(Reference< XDocument > const &xTargetDocument, Reference< XNode > const &xTargetParent, Reference< XNode > const &xChild)
static Reference< XNode > lcl_ImportNode(Reference< XDocument > const &xDocument, Reference< XNode > const &xImportedNode, bool deep)
static xmlNodePtr lcl_getDocumentType(xmlDocPtr const i_pDocument)
static xmlNodePtr lcl_getDocumentRootPtr(xmlDocPtr const i_pDocument)
get the pointer to the root element node of the document
OString OUStringToOString(std::u16string_view str, ConnectionSettings const *settings)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
css::uno::Reference< css::xml::sax::XFastDocumentHandler > mxDocHandler
NamespaceMapType maNamespaceMap