diff options
-rw-r--r-- | forms/source/component/DatabaseForm.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/submission/serialization_urlencoded.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/submission/submission_get.cxx | 2 | ||||
-rw-r--r-- | forms/source/xforms/xpathlib/xpathlib.cxx | 22 |
4 files changed, 14 insertions, 14 deletions
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx index 8c0894610874..0ef7c003feba 100644 --- a/forms/source/component/DatabaseForm.cxx +++ b/forms/source/component/DatabaseForm.cxx @@ -2157,7 +2157,7 @@ void lcl_dispatch(const Reference< XFrame >& xFrame,const Reference<XURLTransfor // build a sequence from the to-be-submitted string OString a8BitData(OUStringToOString(aData, _eEncoding)); // always ANSI #58641 - Sequence< sal_Int8 > aPostData((const sal_Int8*)a8BitData.getStr(), a8BitData.getLength()); + Sequence< sal_Int8 > aPostData(reinterpret_cast<const sal_Int8*>(a8BitData.getStr()), a8BitData.getLength()); Reference< XInputStream > xPostData = new SequenceInputStream(aPostData); aArgs.getArray()[1].Name = "PostData"; diff --git a/forms/source/xforms/submission/serialization_urlencoded.cxx b/forms/source/xforms/submission/serialization_urlencoded.cxx index 8bd3807dd1ab..c688b6eb7fc0 100644 --- a/forms/source/xforms/submission/serialization_urlencoded.cxx +++ b/forms/source/xforms/submission/serialization_urlencoded.cxx @@ -142,7 +142,7 @@ void CSerializationURLEncoded::serialize_node(const Reference< XNode >& aNode) aEncodedBuffer.append("="); encode_and_append(aUnencValue, aEncodedBuffer); aEncodedBuffer.append("&"); - sal_Int8 *pData = (sal_Int8*)aEncodedBuffer.getStr(); + sal_Int8 const *pData = reinterpret_cast<sal_Int8 const *>(aEncodedBuffer.getStr()); Sequence< sal_Int8 > sData(pData, aEncodedBuffer.getLength()); m_aPipe->writeBytes(sData); } diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx index 3c497e5e86ff..de7caa654f74 100644 --- a/forms/source/xforms/submission/submission_get.cxx +++ b/forms/source/xforms/submission/submission_get.cxx @@ -79,7 +79,7 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const css::uno::Reference< sal_Int32 n = 0; Sequence< sal_Int8 > aByteBuffer(size); while ((n = aInStream->readSomeBytes(aByteBuffer, size-1)) != 0) - aQueryString.append((sal_Char*)aByteBuffer.getArray(), n); + aQueryString.append(reinterpret_cast<char const *>(aByteBuffer.getConstArray()), n); if (!aQueryString.isEmpty() && m_aURLObj.GetProtocol() != INET_PROT_FILE) { aUTF8QueryURL.append('?'); diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx index e8183c3c0246..609b6faa3575 100644 --- a/forms/source/xforms/xpathlib/xpathlib.cxx +++ b/forms/source/xforms/xpathlib/xpathlib.cxx @@ -51,7 +51,7 @@ using namespace com::sun::star::lang; xmlXPathFunction xforms_lookupFunc(void *, const xmlChar *xname, const xmlChar *) { - const char *name = (char *)xname; + const char *name = reinterpret_cast<char const *>(xname); if (strcmp("boolean-from-string", name)==0) return xforms_booleanFromStringFunction; else if ((strcmp("if", name))==0) @@ -92,7 +92,7 @@ void xforms_booleanFromStringFunction(xmlXPathParserContextPtr ctxt, int nargs) if (nargs != 1) XP_ERROR(XPATH_INVALID_ARITY); xmlChar *pString = xmlXPathPopString(ctxt); if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE); - OUString aString((char*)pString, strlen((char*)pString), RTL_TEXTENCODING_UTF8); + OUString aString(reinterpret_cast<char*>(pString), strlen(reinterpret_cast<char*>(pString)), RTL_TEXTENCODING_UTF8); if (aString.equalsIgnoreAsciiCase("true") || aString.equalsIgnoreAsciiCase("1")) xmlXPathReturnTrue(ctxt); @@ -221,11 +221,11 @@ void xforms_propertyFunction(xmlXPathParserContextPtr ctxt, int nargs) if (nargs != 1) XP_ERROR(XPATH_INVALID_ARITY); xmlChar* pString = xmlXPathPopString(ctxt); if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE); - OUString aString((char*)pString, strlen((char*)pString), RTL_TEXTENCODING_UTF8); + OUString aString(reinterpret_cast<char*>(pString), strlen(reinterpret_cast<char*>(pString)), RTL_TEXTENCODING_UTF8); if (aString.equalsIgnoreAsciiCase("version")) - xmlXPathReturnString(ctxt, (xmlChar*)_version); + xmlXPathReturnString(ctxt, reinterpret_cast<xmlChar *>(const_cast<char *>(_version))); else if (aString.equalsIgnoreAsciiCase("conformance-level")) - xmlXPathReturnString(ctxt, (xmlChar*)_conformance); + xmlXPathReturnString(ctxt, reinterpret_cast<xmlChar *>(const_cast<char *>(_conformance))); else xmlXPathReturnEmptyString(ctxt); } @@ -280,7 +280,7 @@ void xforms_nowFunction(xmlXPathParserContextPtr ctxt, int /*nargs*/) DateTime aDateTime( DateTime::SYSTEM ); OString aDateTimeString = makeDateTimeString(aDateTime); xmlChar *pString = static_cast<xmlChar*>(xmlMalloc(aDateTimeString.getLength()+1)); - strncpy((char*)pString, (char*)aDateTimeString.getStr(), aDateTimeString.getLength()); + strncpy(reinterpret_cast<char*>(pString), (char*)aDateTimeString.getStr(), aDateTimeString.getLength()); pString[aDateTimeString.getLength()] = 0; xmlXPathReturnString(ctxt, pString); } @@ -332,7 +332,7 @@ void xforms_daysFromDateFunction(xmlXPathParserContextPtr ctxt, int nargs) if (nargs != 1) XP_ERROR(XPATH_INVALID_ARITY); xmlChar* pString = xmlXPathPopString(ctxt); if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE); - OUString aString((char*)pString, strlen((char*)pString), RTL_TEXTENCODING_UTF8); + OUString aString(reinterpret_cast<char*>(pString), strlen(reinterpret_cast<char*>(pString)), RTL_TEXTENCODING_UTF8); DateTime aDateTime( DateTime::EMPTY ); if (parseDateTime(aString, aDateTime)) @@ -355,7 +355,7 @@ void xforms_secondsFromDateTimeFunction(xmlXPathParserContextPtr ctxt, int nargs if (nargs != 1) XP_ERROR(XPATH_INVALID_ARITY); xmlChar* pString = xmlXPathPopString(ctxt); if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE); - OUString aString((char*)pString, strlen((char*)pString), RTL_TEXTENCODING_UTF8); + OUString aString(reinterpret_cast<char*>(pString), strlen(reinterpret_cast<char*>(pString)), RTL_TEXTENCODING_UTF8); DateTime aDateTime( DateTime::EMPTY ); @@ -378,10 +378,10 @@ static bool parseDuration(const xmlChar* aString, bool& bNegative, sal_Int32& nY sal_Int32& nHours, sal_Int32& nMinutes, sal_Int32& nSeconds) { bool bTime = false; // in part after T - sal_Int32 nLength = strlen((char*)aString)+1; + sal_Int32 nLength = strlen(reinterpret_cast<char const *>(aString))+1; char *pString = (char*)rtl_allocateMemory(nLength); char *pString0 = pString; - strncpy(pString, (char*)aString, nLength); + strncpy(pString, reinterpret_cast<char const *>(aString), nLength); if (pString[0] == '-') { bNegative = true; @@ -504,7 +504,7 @@ void xforms_instanceFuction(xmlXPathParserContextPtr ctxt, int nargs) if (nargs != 1) XP_ERROR(XPATH_INVALID_ARITY); xmlChar *pString = xmlXPathPopString(ctxt); if (xmlXPathCheckError(ctxt)) XP_ERROR(XPATH_INVALID_TYPE); - OUString aString((char*)pString, strlen((char*)pString), RTL_TEXTENCODING_UTF8); + OUString aString(reinterpret_cast<char*>(pString), strlen(reinterpret_cast<char*>(pString)), RTL_TEXTENCODING_UTF8); Reference< XModel > aModel = ((CLibxml2XFormsExtension*)ctxt->context->funcLookupData)->getModel(); if (aModel.is()) |