From 56063d30628ee2497a7c559d7de42d26e9cfc8ae Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 24 Dec 2019 10:36:27 +0200 Subject: sal_Char->char in unoxml Change-Id: Ie14ea8349e5dc698a11b3447429b3ca7cbab9bb3 Reviewed-on: https://gerrit.libreoffice.org/85774 Tested-by: Jenkins Reviewed-by: Noel Grandin --- unoxml/inc/node.hxx | 4 ++-- unoxml/source/dom/characterdata.cxx | 8 ++++---- unoxml/source/dom/element.cxx | 12 ++++++------ unoxml/source/dom/node.cxx | 8 ++++---- unoxml/source/dom/processinginstruction.cxx | 4 ++-- unoxml/source/rdf/librdf_repository.cxx | 8 ++++---- unoxml/source/service/services.cxx | 2 +- unoxml/source/xpath/xpathobject.cxx | 2 +- 8 files changed, 24 insertions(+), 24 deletions(-) (limited to 'unoxml') diff --git a/unoxml/inc/node.hxx b/unoxml/inc/node.hxx index e35ab3aafda5..3637c47cd004 100644 --- a/unoxml/inc/node.hxx +++ b/unoxml/inc/node.hxx @@ -83,8 +83,8 @@ namespace DOM void pushContext(Context& io_rContext); void popContext(Context& io_rContext); - sal_Int32 getTokenWithPrefix( const Context& rContext, const sal_Char* xPrefix, const sal_Char* xName ); - sal_Int32 getToken( const Context& rContext, const sal_Char* xName ); + sal_Int32 getTokenWithPrefix( const Context& rContext, const char* xPrefix, const char* xName ); + sal_Int32 getToken( const Context& rContext, const char* xName ); /// add namespaces on this node to context void addNamespaces(Context& io_rContext, xmlNodePtr pNode); diff --git a/unoxml/source/dom/characterdata.cxx b/unoxml/source/dom/characterdata.cxx index f9fa0cce650f..46d7a4d7b898 100644 --- a/unoxml/source/dom/characterdata.cxx +++ b/unoxml/source/dom/characterdata.cxx @@ -88,7 +88,7 @@ namespace DOM // get current data std::shared_ptr const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); - OString aData(reinterpret_cast(pContent.get())); + OString aData(reinterpret_cast(pContent.get())); OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0 || count < 0) { DOMException e; @@ -158,7 +158,7 @@ namespace DOM // get current data std::shared_ptr const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); - OString aData(reinterpret_cast(pContent.get())); + OString aData(reinterpret_cast(pContent.get())); OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0) { DOMException e; @@ -193,7 +193,7 @@ namespace DOM // get current data std::shared_ptr const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); - OString aData(reinterpret_cast(pContent.get())); + OString aData(reinterpret_cast(pContent.get())); OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0 || count < 0){ DOMException e; @@ -246,7 +246,7 @@ namespace DOM // get current data std::shared_ptr const pContent( xmlNodeGetContent(m_aNodePtr), xmlFree); - OString aData(reinterpret_cast(pContent.get())); + OString aData(reinterpret_cast(pContent.get())); OUString tmp(OStringToOUString(aData, RTL_TEXTENCODING_UTF8)); if (offset > tmp.getLength() || offset < 0 || count < 0) { DOMException e; diff --git a/unoxml/source/dom/element.cxx b/unoxml/source/dom/element.cxx index e5e82b2613cd..f154cbc2e2dc 100644 --- a/unoxml/source/dom/element.cxx +++ b/unoxml/source/dom/element.cxx @@ -62,13 +62,13 @@ namespace DOM // add namespace definitions to attributes for (xmlNsPtr pNs = m_aNodePtr->nsDef; pNs != nullptr; pNs = pNs->next) { const xmlChar *pPrefix = pNs->prefix ? pNs->prefix : reinterpret_cast(""); - OUString prefix(reinterpret_cast(pPrefix), + OUString prefix(reinterpret_cast(pPrefix), strlen(reinterpret_cast(pPrefix)), RTL_TEXTENCODING_UTF8); OUString name = (prefix.isEmpty()) ? OUString( "xmlns" ) : "xmlns:" + prefix; const xmlChar *pHref = pNs->href; - OUString val(reinterpret_cast(pHref), + OUString val(reinterpret_cast(pHref), strlen(reinterpret_cast(pHref)), RTL_TEXTENCODING_UTF8); pAttrs->AddAttribute(name, type, val); @@ -243,7 +243,7 @@ namespace DOM std::shared_ptr const pValue( xmlGetProp(m_aNodePtr, reinterpret_cast(o1.getStr())), xmlFree); OUString const ret( pValue - ? OUString(reinterpret_cast(pValue.get()), + ? OUString(reinterpret_cast(pValue.get()), strlen(reinterpret_cast(pValue.get())), RTL_TEXTENCODING_UTF8) : OUString() ); @@ -326,7 +326,7 @@ namespace DOM if (nullptr == pValue) { return OUString(); } - OUString const ret(reinterpret_cast(pValue.get()), + OUString const ret(reinterpret_cast(pValue.get()), strlen(reinterpret_cast(pValue.get())), RTL_TEXTENCODING_UTF8); return ret; @@ -620,7 +620,7 @@ namespace DOM aChangeType = AttrChangeType_ADDITION; xmlNewProp(m_aNodePtr, pName, pValue); } else { - oldValue = OUString(reinterpret_cast(pOld.get()), + oldValue = OUString(reinterpret_cast(pOld.get()), strlen(reinterpret_cast(pOld.get())), RTL_TEXTENCODING_UTF8); xmlSetProp(m_aNodePtr, pName, pValue); @@ -702,7 +702,7 @@ namespace DOM aChangeType = AttrChangeType_ADDITION; xmlNewNsProp(m_aNodePtr, pNs, pLName, pValue); } else { - oldValue = OUString(reinterpret_cast(pOld.get()), + oldValue = OUString(reinterpret_cast(pOld.get()), strlen(reinterpret_cast(pOld.get())), RTL_TEXTENCODING_UTF8); xmlSetNsProp(m_aNodePtr, pNs, pLName, pValue); diff --git a/unoxml/source/dom/node.cxx b/unoxml/source/dom/node.cxx index cdeab8e2d419..d85038c7e48d 100644 --- a/unoxml/source/dom/node.cxx +++ b/unoxml/source/dom/node.cxx @@ -76,10 +76,10 @@ namespace DOM for (xmlNsPtr pNs = pNode->nsDef; pNs != nullptr; pNs = pNs->next) { const xmlChar *pPrefix = pNs->prefix; // prefix can be NULL when xmlns attribute is empty (xmlns="") - OString prefix(reinterpret_cast(pPrefix), + OString prefix(reinterpret_cast(pPrefix), pPrefix ? strlen(reinterpret_cast(pPrefix)) : 0); const xmlChar *pHref = pNs->href; - OUString val(reinterpret_cast(pHref), + OUString val(reinterpret_cast(pHref), strlen(reinterpret_cast(pHref)), RTL_TEXTENCODING_UTF8); @@ -98,13 +98,13 @@ namespace DOM } } - sal_Int32 getToken( const Context& rContext, const sal_Char* pToken ) + sal_Int32 getToken( const Context& rContext, const char* pToken ) { const Sequence aSeq( reinterpret_cast(pToken), strlen( pToken ) ); return rContext.mxTokenHandler->getTokenFromUTF8( aSeq ); } - sal_Int32 getTokenWithPrefix( const Context& rContext, const sal_Char* pPrefix, const sal_Char* pName ) + sal_Int32 getTokenWithPrefix( const Context& rContext, const char* pPrefix, const char* pName ) { sal_Int32 nNamespaceToken = FastToken::DONTKNOW; OString prefix(pPrefix, diff --git a/unoxml/source/dom/processinginstruction.cxx b/unoxml/source/dom/processinginstruction.cxx index 275441249feb..9eda0b90461d 100644 --- a/unoxml/source/dom/processinginstruction.cxx +++ b/unoxml/source/dom/processinginstruction.cxx @@ -116,8 +116,8 @@ namespace DOM return OUString(); } - sal_Char const*const pName = - reinterpret_cast(m_aNodePtr->name); + char const*const pName = + reinterpret_cast(m_aNodePtr->name); OUString const ret(pName, strlen(pName), RTL_TEXTENCODING_UTF8); return ret; } diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx index 46bcdfa05dba..b06901436df1 100644 --- a/unoxml/source/rdf/librdf_repository.cxx +++ b/unoxml/source/rdf/librdf_repository.cxx @@ -2353,7 +2353,7 @@ librdf_TypeConverter::convertToXURI(librdf_uri* i_pURI) const "librdf_uri_as_string failed", m_rRep); } OUString uriU( OStringToOUString( - OString(reinterpret_cast(uri)), + OString(reinterpret_cast(uri)), RTL_TEXTENCODING_UTF8) ); try { return rdf::URI::create(m_xContext, uriU); @@ -2395,7 +2395,7 @@ librdf_TypeConverter::convertToXResource(librdf_node* i_pNode) const "blank node has no label", m_rRep); } OUString labelU( OStringToOUString( - OString(reinterpret_cast(label)), + OString(reinterpret_cast(label)), RTL_TEXTENCODING_UTF8) ); try { return rdf::BlankNode::create(m_xContext, labelU); @@ -2428,11 +2428,11 @@ librdf_TypeConverter::convertToXNode(librdf_node* i_pNode) const librdf_node_get_literal_value_datatype_uri(i_pNode) ); OSL_ENSURE(!lang || !pType, "convertToXNode: invalid literal"); const OUString valueU( OStringToOUString( - OString(reinterpret_cast(value)), + OString(reinterpret_cast(value)), RTL_TEXTENCODING_UTF8) ); if (lang) { const OUString langU( OStringToOUString( - OString(reinterpret_cast(lang)), + OString(reinterpret_cast(lang)), RTL_TEXTENCODING_UTF8) ); return rdf::Literal::createWithLanguage(m_xContext, valueU, langU); } else if (pType) { diff --git a/unoxml/source/service/services.cxx b/unoxml/source/service/services.cxx index cf029fb3d01b..55e58b769965 100644 --- a/unoxml/source/service/services.cxx +++ b/unoxml/source/service/services.cxx @@ -41,7 +41,7 @@ using namespace css::registry; extern "C" { -SAL_DLLPUBLIC_EXPORT void* unoxml_component_getFactory(const sal_Char *pImplementationName, void *pServiceManager, void * /*pRegistryKey*/) +SAL_DLLPUBLIC_EXPORT void* unoxml_component_getFactory(const char *pImplementationName, void *pServiceManager, void * /*pRegistryKey*/) { void* pReturn = nullptr ; if ( pImplementationName && pServiceManager ) diff --git a/unoxml/source/xpath/xpathobject.cxx b/unoxml/source/xpath/xpathobject.cxx index 2a055f10cdc4..b71f8b80d5cf 100644 --- a/unoxml/source/xpath/xpathobject.cxx +++ b/unoxml/source/xpath/xpathobject.cxx @@ -170,7 +170,7 @@ namespace XPath std::shared_ptr str( xmlXPathCastToString(m_pXPathObj.get()), xmlFree); - sal_Char const*const pS(reinterpret_cast(str.get())); + char const*const pS(reinterpret_cast(str.get())); return OUString(pS, strlen(pS), RTL_TEXTENCODING_UTF8); } -- cgit