diff options
author | Noel Grandin <noel@peralex.com> | 2016-04-27 09:22:13 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-04-28 09:31:16 +0000 |
commit | 43b4903db3e925c652e25c34362490f8adc9c5ec (patch) | |
tree | af12777b72d42280467e8cc19b914b2c7f4f3816 /unoxml | |
parent | 7d6308dad9f4a079d57719a6e3a9c4cebb47d051 (diff) |
teach stylepolice plugin about ref-counted-pointer naming
Change-Id: I6e91d22fc1826038c05ddb6fc065563c6a250752
Reviewed-on: https://gerrit.libreoffice.org/24459
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'unoxml')
-rw-r--r-- | unoxml/source/dom/attr.cxx | 6 | ||||
-rw-r--r-- | unoxml/source/dom/attributesmap.cxx | 12 | ||||
-rw-r--r-- | unoxml/source/dom/document.cxx | 48 | ||||
-rw-r--r-- | unoxml/source/dom/element.cxx | 80 | ||||
-rw-r--r-- | unoxml/source/dom/entity.cxx | 4 | ||||
-rw-r--r-- | unoxml/source/dom/entityreference.cxx | 4 | ||||
-rw-r--r-- | unoxml/source/dom/node.cxx | 10 | ||||
-rw-r--r-- | unoxml/source/dom/notation.cxx | 4 | ||||
-rw-r--r-- | unoxml/source/xpath/xpathapi.cxx | 12 |
9 files changed, 90 insertions, 90 deletions
diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx index e9a96e5dcdf9..5d53151f2ba4 100644 --- a/unoxml/source/dom/attr.cxx +++ b/unoxml/source/dom/attr.cxx @@ -181,12 +181,12 @@ namespace DOM OUString sOldValue = getValue(); OString o1 = OUStringToOString(value, RTL_TEXTENCODING_UTF8); - xmlChar const * xValue = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlChar const * pValue = reinterpret_cast<xmlChar const *>(o1.getStr()); // this does not work if the attribute was created anew // xmlNodePtr pNode = m_aAttrPtr->parent; - // xmlSetProp(pNode, m_aAttrPtr->name, xValue); + // xmlSetProp(pNode, m_aAttrPtr->name, pValue); std::shared_ptr<xmlChar const> const buffer( - xmlEncodeEntitiesReentrant(m_aAttrPtr->doc, xValue), xmlFree); + xmlEncodeEntitiesReentrant(m_aAttrPtr->doc, pValue), xmlFree); xmlFreeNodeList(m_aAttrPtr->children); m_aAttrPtr->children = xmlStringGetNodeList(m_aAttrPtr->doc, buffer.get()); diff --git a/unoxml/source/dom/attributesmap.cxx b/unoxml/source/dom/attributesmap.cxx index 13be27c55ec1..921c085fbca3 100644 --- a/unoxml/source/dom/attributesmap.cxx +++ b/unoxml/source/dom/attributesmap.cxx @@ -70,11 +70,11 @@ namespace DOM if (pNode != nullptr) { OString o1 = OUStringToOString(name, RTL_TEXTENCODING_UTF8); - xmlChar const * xName = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlChar const * pName = reinterpret_cast<xmlChar const *>(o1.getStr()); xmlAttrPtr cur = pNode->properties; while (cur != nullptr) { - if( strcmp(reinterpret_cast<char const *>(xName), reinterpret_cast<char const *>(cur->name)) == 0) + 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() ); @@ -101,15 +101,15 @@ namespace DOM if (pNode != nullptr) { OString o1 = OUStringToOString(localName, RTL_TEXTENCODING_UTF8); - xmlChar const * xName = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlChar const * pName = reinterpret_cast<xmlChar const *>(o1.getStr()); OString o2 = OUStringToOString(namespaceURI, RTL_TEXTENCODING_UTF8); - xmlChar const*const xNs = + xmlChar const* pSearchNs = reinterpret_cast<xmlChar const*>(o2.getStr()); - xmlNsPtr const pNs = xmlSearchNsByHref(pNode->doc, pNode, xNs); + xmlNsPtr const pNs = xmlSearchNsByHref(pNode->doc, pNode, pSearchNs); xmlAttrPtr cur = pNode->properties; while (cur != nullptr && pNs != nullptr) { - if( strcmp(reinterpret_cast<char const *>(xName), reinterpret_cast<char const *>(cur->name)) == 0 && + if( strcmp(reinterpret_cast<char const *>(pName), reinterpret_cast<char const *>(cur->name)) == 0 && cur->ns == pNs) { aNode.set( m_pElement->GetOwnerDocument().GetCNode( diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx index 4a017308702e..8c0b25d2ffc5 100644 --- a/unoxml/source/dom/document.cxx +++ b/unoxml/source/dom/document.cxx @@ -438,8 +438,8 @@ namespace DOM ::osl::MutexGuard const g(m_Mutex); OString o1 = OUStringToOString(name, RTL_TEXTENCODING_UTF8); - xmlChar const *xName = reinterpret_cast<xmlChar const *>(o1.getStr()); - xmlAttrPtr const pAttr = xmlNewDocProp(m_aDocPtr, xName, nullptr); + xmlChar const *pName = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlAttrPtr const pAttr = xmlNewDocProp(m_aDocPtr, pName, nullptr); ::rtl::Reference< CAttr > const pCAttr( dynamic_cast< CAttr* >(GetCNode( reinterpret_cast<xmlNodePtr>(pAttr)).get())); @@ -509,8 +509,8 @@ namespace DOM ::osl::MutexGuard const g(m_Mutex); OString o1 = OUStringToOString(data, RTL_TEXTENCODING_UTF8); - xmlChar const *xData = reinterpret_cast<xmlChar const *>(o1.getStr()); - xmlNodePtr pComment = xmlNewDocComment(m_aDocPtr, xData); + xmlChar const *pData = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlNodePtr pComment = xmlNewDocComment(m_aDocPtr, pData); Reference< XComment > const xRet( static_cast< XNode* >(GetCNode(pComment).get()), UNO_QUERY_THROW); @@ -537,8 +537,8 @@ namespace DOM ::osl::MutexGuard const g(m_Mutex); OString o1 = OUStringToOString(tagName, RTL_TEXTENCODING_UTF8); - xmlChar const *xName = reinterpret_cast<xmlChar const *>(o1.getStr()); - xmlNodePtr const pNode = xmlNewDocNode(m_aDocPtr, nullptr, xName, nullptr); + xmlChar const *pName = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlNodePtr const pNode = xmlNewDocNode(m_aDocPtr, nullptr, pName, nullptr); Reference< XElement > const xRet( static_cast< XNode* >(GetCNode(pNode).get()), UNO_QUERY_THROW); @@ -554,27 +554,27 @@ namespace DOM sal_Int32 i = qname.indexOf(':'); if (ns.isEmpty()) throw RuntimeException(); - xmlChar const *xPrefix; - xmlChar const *xName; + xmlChar const *pPrefix; + xmlChar const *pName; OString o1, o2, o3; if ( i != -1) { o1 = OUStringToOString(qname.copy(0, i), RTL_TEXTENCODING_UTF8); - xPrefix = reinterpret_cast<xmlChar const *>(o1.getStr()); + pPrefix = reinterpret_cast<xmlChar const *>(o1.getStr()); o2 = OUStringToOString(qname.copy(i+1, qname.getLength()-i-1), RTL_TEXTENCODING_UTF8); - xName = reinterpret_cast<xmlChar const *>(o2.getStr()); + pName = reinterpret_cast<xmlChar const *>(o2.getStr()); } else { // default prefix - xPrefix = reinterpret_cast<xmlChar const *>(""); + pPrefix = reinterpret_cast<xmlChar const *>(""); o2 = OUStringToOString(qname, RTL_TEXTENCODING_UTF8); - xName = reinterpret_cast<xmlChar const *>(o2.getStr()); + pName = reinterpret_cast<xmlChar const *>(o2.getStr()); } o3 = OUStringToOString(ns, RTL_TEXTENCODING_UTF8); - xmlChar const *xUri = reinterpret_cast<xmlChar const *>(o3.getStr()); + xmlChar const *pUri = reinterpret_cast<xmlChar const *>(o3.getStr()); // xmlNsPtr aNsPtr = xmlNewReconciledNs? // xmlNsPtr aNsPtr = xmlNewGlobalNs? - xmlNodePtr const pNode = xmlNewDocNode(m_aDocPtr, nullptr, xName, nullptr); - xmlNsPtr const pNs = xmlNewNs(pNode, xUri, xPrefix); + xmlNodePtr const pNode = xmlNewDocNode(m_aDocPtr, nullptr, pName, nullptr); + xmlNsPtr const pNs = xmlNewNs(pNode, pUri, pPrefix); xmlSetNs(pNode, pNs); Reference< XElement > const xRet( static_cast< XNode* >(GetCNode(pNode).get()), @@ -589,8 +589,8 @@ namespace DOM ::osl::MutexGuard const g(m_Mutex); OString o1 = OUStringToOString(name, RTL_TEXTENCODING_UTF8); - xmlChar const *xName = reinterpret_cast<xmlChar const *>(o1.getStr()); - xmlNodePtr const pNode = xmlNewReference(m_aDocPtr, xName); + xmlChar const *pName = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlNodePtr const pNode = xmlNewReference(m_aDocPtr, pName); Reference< XEntityReference > const xRet( static_cast< XNode* >(GetCNode(pNode).get()), UNO_QUERY_THROW); @@ -606,10 +606,10 @@ namespace DOM ::osl::MutexGuard const g(m_Mutex); OString o1 = OUStringToOString(target, RTL_TEXTENCODING_UTF8); - xmlChar const *xTarget = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlChar const *pTarget = reinterpret_cast<xmlChar const *>(o1.getStr()); OString o2 = OUStringToOString(data, RTL_TEXTENCODING_UTF8); - xmlChar const *xData = reinterpret_cast<xmlChar const *>(o2.getStr()); - xmlNodePtr const pNode = xmlNewDocPI(m_aDocPtr, xTarget, xData); + xmlChar const *pData = reinterpret_cast<xmlChar const *>(o2.getStr()); + xmlNodePtr const pNode = xmlNewDocPI(m_aDocPtr, pTarget, pData); pNode->doc = m_aDocPtr; Reference< XProcessingInstruction > const xRet( static_cast< XNode* >(GetCNode(pNode).get()), @@ -624,8 +624,8 @@ namespace DOM ::osl::MutexGuard const g(m_Mutex); OString o1 = OUStringToOString(data, RTL_TEXTENCODING_UTF8); - xmlChar const *xData = reinterpret_cast<xmlChar const *>(o1.getStr()); - xmlNodePtr const pNode = xmlNewDocText(m_aDocPtr, xData); + xmlChar const *pData = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlNodePtr const pNode = xmlNewDocText(m_aDocPtr, pData); Reference< XText > const xRet( static_cast< XNode* >(GetCNode(pNode).get()), UNO_QUERY_THROW); @@ -696,10 +696,10 @@ namespace DOM // search the tree for an element with the given ID OString o1 = OUStringToOString(elementId, RTL_TEXTENCODING_UTF8); - xmlChar const *xId = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlChar const *pId = reinterpret_cast<xmlChar const *>(o1.getStr()); xmlNodePtr const pStart = lcl_getDocumentRootPtr(m_aDocPtr); if (!pStart) { return nullptr; } - xmlNodePtr const pNode = lcl_search_element_by_id(pStart, xId); + xmlNodePtr const pNode = lcl_search_element_by_id(pStart, pId); Reference< XElement > const xRet( static_cast< XNode* >(GetCNode(pNode).get()), UNO_QUERY); diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx index bd7f519e5ba3..4933f89baf3c 100644 --- a/unoxml/source/dom/element.cxx +++ b/unoxml/source/dom/element.cxx @@ -116,15 +116,15 @@ namespace DOM reinterpret_cast<xmlNodePtr>(pAttr)); OSL_ENSURE(pNode != nullptr, "CNode::get returned 0"); - const xmlChar* xName = pAttr->name; + const xmlChar* pName = pAttr->name; sal_Int32 nAttributeToken=FastToken::DONTKNOW; if( pAttr->ns && strlen(reinterpret_cast<char const *>(pAttr->ns->prefix)) ) nAttributeToken = getTokenWithPrefix( i_rContext, reinterpret_cast<char const *>(pAttr->ns->prefix), - reinterpret_cast<char const *>(xName) ); + reinterpret_cast<char const *>(pName) ); else - nAttributeToken = getToken( i_rContext, reinterpret_cast<char const *>(xName) ); + nAttributeToken = getToken( i_rContext, reinterpret_cast<char const *>(pName) ); if( nAttributeToken != FastToken::DONTKNOW ) i_rContext.mxAttribList->add( nAttributeToken, @@ -132,13 +132,13 @@ namespace DOM RTL_TEXTENCODING_UTF8)); } - const xmlChar* xPrefix = m_aNodePtr->ns ? m_aNodePtr->ns->prefix : reinterpret_cast<const xmlChar*>(""); - const xmlChar* xName = m_aNodePtr->name; + const xmlChar* pPrefix = m_aNodePtr->ns ? m_aNodePtr->ns->prefix : reinterpret_cast<const xmlChar*>(""); + const xmlChar* pName = m_aNodePtr->name; sal_Int32 nElementToken=FastToken::DONTKNOW; - if( strlen(reinterpret_cast<char const *>(xPrefix)) ) - nElementToken = getTokenWithPrefix( i_rContext, reinterpret_cast<char const *>(xPrefix), reinterpret_cast<char const *>(xName) ); + if( strlen(reinterpret_cast<char const *>(pPrefix)) ) + nElementToken = getTokenWithPrefix( i_rContext, reinterpret_cast<char const *>(pPrefix), reinterpret_cast<char const *>(pName) ); else - nElementToken = getToken( i_rContext, reinterpret_cast<char const *>(xName) ); + nElementToken = getToken( i_rContext, reinterpret_cast<char const *>(pName) ); Reference<XFastContextHandler> xParentHandler(i_rContext.mxCurrentHandler); try @@ -147,8 +147,8 @@ namespace DOM if( nElementToken == FastToken::DONTKNOW ) { const OUString aNamespace; - const OUString aElementName( reinterpret_cast<char const *>(xPrefix), - strlen(reinterpret_cast<char const *>(xPrefix)), + const OUString aElementName( reinterpret_cast<char const *>(pPrefix), + strlen(reinterpret_cast<char const *>(pPrefix)), RTL_TEXTENCODING_UTF8 ); if( xParentHandler.is() ) @@ -189,8 +189,8 @@ namespace DOM else { const OUString aNamespace; - const OUString aElementName( reinterpret_cast<char const *>(xPrefix), - strlen(reinterpret_cast<char const *>(xPrefix)), + const OUString aElementName( reinterpret_cast<char const *>(pPrefix), + strlen(reinterpret_cast<char const *>(pPrefix)), RTL_TEXTENCODING_UTF8 ); i_rContext.mxCurrentHandler->endUnknownElement( aNamespace, aElementName ); @@ -395,8 +395,8 @@ namespace DOM ::osl::MutexGuard const g(m_rMutex); OString o1 = OUStringToOString(name, RTL_TEXTENCODING_UTF8); - xmlChar const *xName = reinterpret_cast<xmlChar const *>(o1.getStr()); - return (m_aNodePtr != nullptr && xmlHasProp(m_aNodePtr, xName) != nullptr); + xmlChar const *pName = reinterpret_cast<xmlChar const *>(o1.getStr()); + return (m_aNodePtr != nullptr && xmlHasProp(m_aNodePtr, pName) != nullptr); } /** @@ -410,10 +410,10 @@ namespace DOM ::osl::MutexGuard const g(m_rMutex); OString o1 = OUStringToOString(localName, RTL_TEXTENCODING_UTF8); - xmlChar const *xName = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlChar const *pName = reinterpret_cast<xmlChar const *>(o1.getStr()); OString o2 = OUStringToOString(namespaceURI, RTL_TEXTENCODING_UTF8); - xmlChar const *xNs = reinterpret_cast<xmlChar const *>(o2.getStr()); - return (m_aNodePtr != nullptr && xmlHasNsProp(m_aNodePtr, xName, xNs) != nullptr); + xmlChar const *pNs = reinterpret_cast<xmlChar const *>(o2.getStr()); + return (m_aNodePtr != nullptr && xmlHasNsProp(m_aNodePtr, pName, pNs) != nullptr); } /** @@ -619,9 +619,9 @@ namespace DOM ::osl::ClearableMutexGuard guard(m_rMutex); OString o1 = OUStringToOString(name, RTL_TEXTENCODING_UTF8); - xmlChar const *xName = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlChar const *pName = reinterpret_cast<xmlChar const *>(o1.getStr()); OString o2 = OUStringToOString(value, RTL_TEXTENCODING_UTF8); - xmlChar const *xValue = reinterpret_cast<xmlChar const *>(o2.getStr()); + xmlChar const *pValue = reinterpret_cast<xmlChar const *>(o2.getStr()); if (nullptr == m_aNodePtr) { throw RuntimeException(); @@ -629,15 +629,15 @@ namespace DOM OUString oldValue; AttrChangeType aChangeType = AttrChangeType_MODIFICATION; std::shared_ptr<xmlChar const> const pOld( - xmlGetProp(m_aNodePtr, xName), xmlFree); + xmlGetProp(m_aNodePtr, pName), xmlFree); if (pOld == nullptr) { aChangeType = AttrChangeType_ADDITION; - xmlNewProp(m_aNodePtr, xName, xValue); + xmlNewProp(m_aNodePtr, pName, pValue); } else { oldValue = OUString(reinterpret_cast<sal_Char const*>(pOld.get()), strlen(reinterpret_cast<char const*>(pOld.get())), RTL_TEXTENCODING_UTF8); - xmlSetProp(m_aNodePtr, xName, xValue); + xmlSetProp(m_aNodePtr, pName, pValue); } // dispatch DOMAttrModified event @@ -667,42 +667,42 @@ namespace DOM ::osl::ClearableMutexGuard guard(m_rMutex); OString o1, o2, o3, o4, o5; - xmlChar const *xPrefix = nullptr; - xmlChar const *xLName = nullptr; + xmlChar const *pPrefix = nullptr; + xmlChar const *pLName = nullptr; o1 = OUStringToOString(qualifiedName, RTL_TEXTENCODING_UTF8); - xmlChar const *xQName = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlChar const *pQName = reinterpret_cast<xmlChar const *>(o1.getStr()); sal_Int32 idx = qualifiedName.indexOf(':'); if (idx != -1) { o2 = OUStringToOString( qualifiedName.copy(0,idx), RTL_TEXTENCODING_UTF8); - xPrefix = reinterpret_cast<xmlChar const *>(o2.getStr()); + pPrefix = reinterpret_cast<xmlChar const *>(o2.getStr()); o3 = OUStringToOString( qualifiedName.copy(idx+1), RTL_TEXTENCODING_UTF8); - xLName = reinterpret_cast<xmlChar const *>(o3.getStr()); + pLName = reinterpret_cast<xmlChar const *>(o3.getStr()); } else { - xPrefix = reinterpret_cast<xmlChar const *>(""); - xLName = xQName; + pPrefix = reinterpret_cast<xmlChar const *>(""); + pLName = pQName; } o4 = OUStringToOString(namespaceURI, RTL_TEXTENCODING_UTF8); o5 = OUStringToOString(value, RTL_TEXTENCODING_UTF8); - xmlChar const *xURI= reinterpret_cast<xmlChar const *>(o4.getStr()); - xmlChar const *xValue = reinterpret_cast<xmlChar const *>(o5.getStr()); + xmlChar const *pURI= reinterpret_cast<xmlChar const *>(o4.getStr()); + xmlChar const *pValue = reinterpret_cast<xmlChar const *>(o5.getStr()); if (nullptr == m_aNodePtr) { throw RuntimeException(); } //find the right namespace - xmlNsPtr pNs = xmlSearchNs(m_aNodePtr->doc, m_aNodePtr, xPrefix); + xmlNsPtr pNs = xmlSearchNs(m_aNodePtr->doc, m_aNodePtr, pPrefix); // if no namespace found, create a new one if (pNs == nullptr) { - pNs = xmlNewNs(m_aNodePtr, xURI, xPrefix); + pNs = xmlNewNs(m_aNodePtr, pURI, pPrefix); } - if (strcmp(reinterpret_cast<char const *>(pNs->href), reinterpret_cast<char const *>(xURI)) != 0) { + if (strcmp(reinterpret_cast<char const *>(pNs->href), reinterpret_cast<char const *>(pURI)) != 0) { // ambiguous ns prefix throw RuntimeException(); } @@ -712,15 +712,15 @@ namespace DOM OUString oldValue; AttrChangeType aChangeType = AttrChangeType_MODIFICATION; std::shared_ptr<xmlChar const> const pOld( - xmlGetNsProp(m_aNodePtr, xLName, pNs->href), xmlFree); + xmlGetNsProp(m_aNodePtr, pLName, pNs->href), xmlFree); if (pOld == nullptr) { aChangeType = AttrChangeType_ADDITION; - xmlNewNsProp(m_aNodePtr, pNs, xLName, xValue); + xmlNewNsProp(m_aNodePtr, pNs, pLName, pValue); } else { oldValue = OUString(reinterpret_cast<sal_Char const*>(pOld.get()), strlen(reinterpret_cast<char const*>(pOld.get())), RTL_TEXTENCODING_UTF8); - xmlSetNsProp(m_aNodePtr, pNs, xLName, xValue); + xmlSetNsProp(m_aNodePtr, pNs, pLName, pValue); } // dispatch DOMAttrModified event Reference< XDocumentEvent > docevent(getOwnerDocument(), UNO_QUERY); @@ -728,7 +728,7 @@ namespace DOM "DOMAttrModified"), UNO_QUERY); event->initMutationEvent( "DOMAttrModified", true, false, - Reference< XNode >(getAttributeNodeNS(namespaceURI, OUString(reinterpret_cast<char const *>(xLName), strlen(reinterpret_cast<char const *>(xLName)), RTL_TEXTENCODING_UTF8)), UNO_QUERY), + Reference< XNode >(getAttributeNodeNS(namespaceURI, OUString(reinterpret_cast<char const *>(pLName), strlen(reinterpret_cast<char const *>(pLName)), RTL_TEXTENCODING_UTF8)), UNO_QUERY), oldValue, value, qualifiedName, aChangeType); guard.clear(); // release mutex before calling event handlers @@ -758,8 +758,8 @@ namespace DOM OUString aName; if (m_aNodePtr != nullptr) { - const xmlChar* xName = m_aNodePtr->name; - aName = OUString(reinterpret_cast<const char*>(xName), strlen(reinterpret_cast<const char*>(xName)), RTL_TEXTENCODING_UTF8); + const xmlChar* pName = m_aNodePtr->name; + aName = OUString(reinterpret_cast<const char*>(pName), strlen(reinterpret_cast<const char*>(pName)), RTL_TEXTENCODING_UTF8); } return aName; } diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx index 61d0420c60eb..7ce7817319db 100644 --- a/unoxml/source/dom/entity.cxx +++ b/unoxml/source/dom/entity.cxx @@ -98,8 +98,8 @@ namespace DOM OUString aName; if (m_aNodePtr != nullptr) { - const xmlChar* xName = m_aNodePtr->name; - aName = OUString(reinterpret_cast<char const *>(xName), strlen(reinterpret_cast<char const *>(xName)), RTL_TEXTENCODING_UTF8); + const xmlChar* pName = m_aNodePtr->name; + aName = OUString(reinterpret_cast<char const *>(pName), strlen(reinterpret_cast<char const *>(pName)), RTL_TEXTENCODING_UTF8); } return aName; } diff --git a/unoxml/source/dom/entityreference.cxx b/unoxml/source/dom/entityreference.cxx index ebe19dcdaeb1..6d62e69d576c 100644 --- a/unoxml/source/dom/entityreference.cxx +++ b/unoxml/source/dom/entityreference.cxx @@ -56,8 +56,8 @@ namespace DOM OUString aName; if (m_aNodePtr != nullptr) { - const xmlChar* xName = m_aNodePtr->name; - aName = OUString(reinterpret_cast<char const *>(xName), strlen(reinterpret_cast<char const *>(xName)), RTL_TEXTENCODING_UTF8); + const xmlChar* pName = m_aNodePtr->name; + aName = OUString(reinterpret_cast<char const *>(pName), strlen(reinterpret_cast<char const *>(pName)), RTL_TEXTENCODING_UTF8); } return aName; } diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx index 1941c09a8ba6..77288d7365ff 100644 --- a/unoxml/source/dom/node.cxx +++ b/unoxml/source/dom/node.cxx @@ -485,8 +485,8 @@ namespace DOM (m_aNodePtr->type == XML_ELEMENT_NODE || m_aNodePtr->type == XML_ATTRIBUTE_NODE) && m_aNodePtr->ns != nullptr) { - const xmlChar* xHref = m_aNodePtr->ns->href; - aURI = OUString(reinterpret_cast<char const *>(xHref), strlen(reinterpret_cast<char const *>(xHref)), RTL_TEXTENCODING_UTF8); + const xmlChar* pHref = m_aNodePtr->ns->href; + aURI = OUString(reinterpret_cast<char const *>(pHref), strlen(reinterpret_cast<char const *>(pHref)), RTL_TEXTENCODING_UTF8); } return aURI; } @@ -600,9 +600,9 @@ namespace DOM (m_aNodePtr->type == XML_ELEMENT_NODE || m_aNodePtr->type == XML_ATTRIBUTE_NODE) && m_aNodePtr->ns != nullptr) { - const xmlChar* xPrefix = m_aNodePtr->ns->prefix; - if( xPrefix != nullptr ) - aPrefix = OUString(reinterpret_cast<char const *>(xPrefix), strlen(reinterpret_cast<char const *>(xPrefix)), RTL_TEXTENCODING_UTF8); + const xmlChar* pPrefix = m_aNodePtr->ns->prefix; + if( pPrefix != nullptr ) + aPrefix = OUString(reinterpret_cast<char const *>(pPrefix), strlen(reinterpret_cast<char const *>(pPrefix)), RTL_TEXTENCODING_UTF8); } return aPrefix; diff --git a/unoxml/source/dom/notation.cxx b/unoxml/source/dom/notation.cxx index 9f2aca2bec6f..2fa8e3f6f71b 100644 --- a/unoxml/source/dom/notation.cxx +++ b/unoxml/source/dom/notation.cxx @@ -60,8 +60,8 @@ namespace DOM OUString aName; if (m_aNodePtr != nullptr) { - const xmlChar* xName = m_aNodePtr->name; - aName = OUString(reinterpret_cast<char const *>(xName), strlen(reinterpret_cast<char const *>(xName)), RTL_TEXTENCODING_UTF8); + const xmlChar* pName = m_aNodePtr->name; + aName = OUString(reinterpret_cast<char const *>(pName), strlen(reinterpret_cast<char const *>(pName)), RTL_TEXTENCODING_UTF8); } return aName; } diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx index 6452a42addfb..9e1eabd0677e 100644 --- a/unoxml/source/xpath/xpathapi.cxx +++ b/unoxml/source/xpath/xpathapi.cxx @@ -150,10 +150,10 @@ namespace XPath while (pNode != nullptr) { xmlNsPtr curDef = pNode->nsDef; while (curDef != nullptr) { - const xmlChar* xHref = curDef->href; - OUString aURI(reinterpret_cast<char const *>(xHref), strlen(reinterpret_cast<char const *>(xHref)), RTL_TEXTENCODING_UTF8); - const xmlChar* xPre = curDef->prefix; - OUString aPrefix(reinterpret_cast<char const *>(xPre), strlen(reinterpret_cast<char const *>(xPre)), RTL_TEXTENCODING_UTF8); + const xmlChar* pHref = curDef->href; + OUString aURI(reinterpret_cast<char const *>(pHref), strlen(reinterpret_cast<char const *>(pHref)), RTL_TEXTENCODING_UTF8); + const xmlChar* pPre = curDef->prefix; + OUString aPrefix(reinterpret_cast<char const *>(pPre), strlen(reinterpret_cast<char const *>(pPre)), RTL_TEXTENCODING_UTF8); // we could already have this prefix from a child node if (rNamespaces.find(aPrefix) == rNamespaces.end()) { @@ -372,9 +372,9 @@ namespace XPath /* run the query */ OString o1 = OUStringToOString(expr, RTL_TEXTENCODING_UTF8); - xmlChar const *xStr = reinterpret_cast<xmlChar const *>(o1.getStr()); + xmlChar const *pStr = reinterpret_cast<xmlChar const *>(o1.getStr()); std::shared_ptr<xmlXPathObject> const xpathObj( - xmlXPathEval(xStr, xpathCtx.get()), xmlXPathFreeObject); + xmlXPathEval(pStr, xpathCtx.get()), xmlXPathFreeObject); xmlSetGenericErrorFunc(nullptr, nullptr); if (nullptr == xpathObj) { // OSL_ENSURE(xpathCtx->lastError == NULL, xpathCtx->lastError->message); |