diff options
Diffstat (limited to 'unoxml/source')
-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 | ||||
-rw-r--r-- | unoxml/source/events/eventdispatcher.cxx | 2 | ||||
-rw-r--r-- | unoxml/source/rdf/librdf_repository.cxx | 7 | ||||
-rw-r--r-- | unoxml/source/xpath/nodelist.cxx | 3 |
10 files changed, 27 insertions, 46 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); } /** diff --git a/unoxml/source/events/eventdispatcher.cxx b/unoxml/source/events/eventdispatcher.cxx index cc5fb159d3c8..fc396ee9dc76 100644 --- a/unoxml/source/events/eventdispatcher.cxx +++ b/unoxml/source/events/eventdispatcher.cxx @@ -197,7 +197,7 @@ namespace DOM::events { while (cur != nullptr) { Reference< XEventTarget > const xRef( - rDocument.GetCNode(cur).get()); + rDocument.GetCNode(cur)); captureVector.emplace_back(xRef, cur); cur = cur->parent; } diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 13a10b4edb41..85b05260484a 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -1057,7 +1057,7 @@ librdf_Repository::importGraph(::sal_Int16 i_Format, "librdf_model_context_add_statements failed", *this); } - return uno::Reference<rdf::XNamedGraph>(pGraph.get()); + return pGraph; } void addChaffWhenEncryptedStorage(const uno::Reference< io::XOutputStream > &rStream, unsigned char* pBuffer, size_t length) @@ -1273,7 +1273,7 @@ librdf_Repository::getGraph(const uno::Reference< rdf::XURI > & i_xGraphName) ::osl::MutexGuard g(m_aMutex); const NamedGraphMap_t::iterator iter( m_NamedGraphs.find(contextU) ); if (iter != m_NamedGraphs.end()) { - return uno::Reference<rdf::XNamedGraph>(iter->second.get()); + return iter->second; } else { return nullptr; } @@ -1306,8 +1306,7 @@ librdf_Repository::createGraph(const uno::Reference< rdf::XURI > & i_xGraphName) } m_NamedGraphs.insert(std::make_pair(contextU, new librdf_NamedGraph(this, i_xGraphName))); - return uno::Reference<rdf::XNamedGraph>( - m_NamedGraphs.find(contextU)->second.get()); + return m_NamedGraphs.find(contextU)->second; } void SAL_CALL diff --git a/unoxml/source/xpath/nodelist.cxx b/unoxml/source/xpath/nodelist.cxx index 1298a5fa82c6..1b306aabc8d7 100644 --- a/unoxml/source/xpath/nodelist.cxx +++ b/unoxml/source/xpath/nodelist.cxx @@ -65,8 +65,7 @@ namespace XPath return nullptr; } xmlNodePtr const pNode = xmlXPathNodeSetItem(m_pNodeSet, index); - Reference< XNode > const xNode(m_pDocument->GetCNode(pNode).get()); - return xNode; + return m_pDocument->GetCNode(pNode); } } |