diff options
Diffstat (limited to 'unoxml/source/dom')
-rw-r--r-- | unoxml/source/dom/attributesmap.cxx | 12 | ||||
-rw-r--r-- | unoxml/source/dom/childlist.cxx | 3 | ||||
-rw-r--r-- | unoxml/source/dom/document.cxx | 6 | ||||
-rw-r--r-- | unoxml/source/dom/documentbuilder.cxx | 8 | ||||
-rw-r--r-- | unoxml/source/dom/element.cxx | 4 | ||||
-rw-r--r-- | unoxml/source/dom/elementlist.cxx | 4 | ||||
-rw-r--r-- | unoxml/source/dom/node.cxx | 24 |
7 files changed, 22 insertions, 39 deletions
diff --git a/unoxml/source/dom/attributesmap.cxx b/unoxml/source/dom/attributesmap.cxx index eef8c09f7b0b..575fa96c2ce0 100644 --- a/unoxml/source/dom/attributesmap.cxx +++ b/unoxml/source/dom/attributesmap.cxx @@ -78,8 +78,8 @@ namespace DOM { if( strcmp(reinterpret_cast<char const *>(pName), reinterpret_cast<char const *>(cur->name)) == 0) { - aNode.set( m_pElement->GetOwnerDocument().GetCNode( - reinterpret_cast<xmlNodePtr>(cur)).get() ); + aNode = m_pElement->GetOwnerDocument().GetCNode( + reinterpret_cast<xmlNodePtr>(cur)); break; } cur = cur->next; @@ -113,8 +113,8 @@ namespace DOM if( strcmp(reinterpret_cast<char const *>(pName), reinterpret_cast<char const *>(cur->name)) == 0 && cur->ns == pNs) { - aNode.set( m_pElement->GetOwnerDocument().GetCNode( - reinterpret_cast<xmlNodePtr>(cur)).get() ); + aNode = m_pElement->GetOwnerDocument().GetCNode( + reinterpret_cast<xmlNodePtr>(cur)); break; } cur = cur->next; @@ -141,8 +141,8 @@ namespace DOM { if (count == index) { - aNode.set( m_pElement->GetOwnerDocument().GetCNode( - reinterpret_cast<xmlNodePtr>(cur)).get() ); + aNode = m_pElement->GetOwnerDocument().GetCNode( + reinterpret_cast<xmlNodePtr>(cur)); break; } count++; diff --git a/unoxml/source/dom/childlist.cxx b/unoxml/source/dom/childlist.cxx index ec3811fa9161..6f62f0144dbb 100644 --- a/unoxml/source/dom/childlist.cxx +++ b/unoxml/source/dom/childlist.cxx @@ -75,8 +75,7 @@ namespace DOM while (cur != nullptr) { if (index-- == 0) { - return Reference< XNode >( - m_pNode->GetOwnerDocument().GetCNode(cur).get()); + return m_pNode->GetOwnerDocument().GetCNode(cur); } cur = cur->next; } diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx index 8d56510da81f..db93dcad847a 100644 --- a/unoxml/source/dom/document.cxx +++ b/unoxml/source/dom/document.cxx @@ -249,7 +249,7 @@ namespace DOM if (pCNode != nullptr) { bool const bInserted = m_NodeMap.emplace( pNode, - ::std::make_pair(WeakReference<XNode>(pCNode.get()), pCNode.get()) + ::std::make_pair(WeakReference<XNode>(pCNode), pCNode.get()) ).second; OSL_ASSERT(bInserted); if (!bInserted) { @@ -423,7 +423,7 @@ namespace DOM reinterpret_cast<xmlNodePtr>(pAttr)).get())); if (!pCAttr.is()) { throw RuntimeException(); } pCAttr->m_bUnlinked = true; - return pCAttr.get(); + return pCAttr; }; // Creates an attribute of the given qualified name and namespace URI. @@ -458,7 +458,7 @@ namespace DOM pCAttr->m_pNamespace.reset( new stringpair_t(oUri, oPrefix) ); pCAttr->m_bUnlinked = true; - return pCAttr.get(); + return pCAttr; }; // Creates a CDATASection node whose value is the specified string. diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx index 3a4ddc5fe821..8d42ad5f9b75 100644 --- a/unoxml/source/dom/documentbuilder.cxx +++ b/unoxml/source/dom/documentbuilder.cxx @@ -133,9 +133,7 @@ namespace DOM // create a new document xmlDocPtr pDocument = xmlNewDoc(reinterpret_cast<const xmlChar*>("1.0")); - Reference< XDocument > const xRet( - CDocument::CreateCDocument(pDocument).get()); - return xRet; + return CDocument::CreateCDocument(pDocument); } static OUString make_error_message(xmlParserCtxtPtr ctxt) @@ -361,9 +359,7 @@ namespace DOM if (pDoc == nullptr) { throwEx(pContext.get()); } - Reference< XDocument > const xRet( - CDocument::CreateCDocument(pDoc).get()); - return xRet; + return CDocument::CreateCDocument(pDoc); } Reference< XDocument > SAL_CALL CDocumentBuilder::parseURI(const OUString& sUri) diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx index f5dd67304d6b..988d7f1b9c32 100644 --- a/unoxml/source/dom/element.cxx +++ b/unoxml/source/dom/element.cxx @@ -144,7 +144,7 @@ namespace DOM Reference<XFastContextHandler> xParentHandler(i_rContext.mxCurrentHandler); try { - Reference< XFastAttributeList > xAttr( i_rContext.mxAttribList.get() ); + Reference< XFastAttributeList > xAttr( i_rContext.mxAttribList ); if( nElementToken == FastToken::DONTKNOW ) { const OUString aNamespace; @@ -472,7 +472,7 @@ namespace DOM } ::rtl::Reference<CNode> const pCNode( - comphelper::getUnoTunnelImplementation<CNode>(Reference<XNode>(oldAttr.get()))); + comphelper::getUnoTunnelImplementation<CNode>(Reference<XNode>(oldAttr))); if (!pCNode.is()) { throw RuntimeException(); } xmlNodePtr const pNode = pCNode->GetNodePtr(); diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx index 290438b2ca28..c0ffb0f87929 100644 --- a/unoxml/source/dom/elementlist.cxx +++ b/unoxml/source/dom/elementlist.cxx @@ -176,9 +176,7 @@ namespace DOM if (m_nodevector.size() <= o3tl::make_unsigned(index)) { throw RuntimeException(); } - Reference< XNode > const xRet( - m_pElement->GetOwnerDocument().GetCNode(m_nodevector[index]).get()); - return xRet; + return m_pElement->GetOwnerDocument().GetCNode(m_nodevector[index]); } // tree mutations can change the list diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx index 68a834c1a8b4..8abe73e707b3 100644 --- a/unoxml/source/dom/node.cxx +++ b/unoxml/source/dom/node.cxx @@ -371,7 +371,7 @@ namespace DOM // dispatch subtree modified for this node dispatchSubtreeModified(); - return pNode.get(); + return pNode; } /** @@ -389,7 +389,7 @@ namespace DOM xmlCopyNode(m_aNodePtr, bDeep ? 1 : 0)); if (!pNode.is()) { return nullptr; } pNode->m_bUnlinked = true; // not linked yet - return pNode.get(); + return pNode; } /** @@ -426,9 +426,7 @@ namespace DOM if (nullptr == m_aNodePtr) { return nullptr; } - Reference< XNode > const xNode( - GetOwnerDocument().GetCNode(m_aNodePtr->children).get()); - return xNode; + return GetOwnerDocument().GetCNode(m_aNodePtr->children); } /** @@ -441,9 +439,7 @@ namespace DOM if (nullptr == m_aNodePtr) { return nullptr; } - Reference< XNode > const xNode( - GetOwnerDocument().GetCNode(xmlGetLastChild(m_aNodePtr)).get()); - return xNode; + return GetOwnerDocument().GetCNode(xmlGetLastChild(m_aNodePtr)); } /** @@ -484,9 +480,7 @@ namespace DOM if (nullptr == m_aNodePtr) { return nullptr; } - Reference< XNode > const xNode( - GetOwnerDocument().GetCNode(m_aNodePtr->next).get()); - return xNode; + return GetOwnerDocument().GetCNode(m_aNodePtr->next); } /** @@ -557,9 +551,7 @@ namespace DOM if (nullptr == m_aNodePtr) { return nullptr; } - Reference< XNode > const xNode( - GetOwnerDocument().GetCNode(m_aNodePtr->parent).get()); - return xNode; + return GetOwnerDocument().GetCNode(m_aNodePtr->parent); } /** @@ -592,9 +584,7 @@ namespace DOM if (nullptr == m_aNodePtr) { return nullptr; } - Reference< XNode > const xNode( - GetOwnerDocument().GetCNode(m_aNodePtr->prev).get()); - return xNode; + return GetOwnerDocument().GetCNode(m_aNodePtr->prev); } /** |