diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-19 13:15:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-19 19:17:40 +0100 |
commit | 7c18da2dc6963b6f3f74a72fc4f6a3eedd8f9eb7 (patch) | |
tree | bf9b5cf5f648936e5c12c51a7a643059c5bcb6a5 /registry | |
parent | f22044a49a56e585e2e9f419a1b77aba263b2afe (diff) |
sal_Char->char in oox..registry
Change-Id: Icc7f2a32696c30317c1ee77ef39d682d5f5a80b9
Reviewed-on: https://gerrit.libreoffice.org/85512
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'registry')
-rw-r--r-- | registry/source/keyimpl.cxx | 14 | ||||
-rw-r--r-- | registry/source/keyimpl.hxx | 4 | ||||
-rw-r--r-- | registry/source/reflcnst.hxx | 4 | ||||
-rw-r--r-- | registry/source/reflread.cxx | 114 | ||||
-rw-r--r-- | registry/source/reflwrit.cxx | 2 | ||||
-rw-r--r-- | registry/source/regimpl.cxx | 6 | ||||
-rw-r--r-- | registry/source/regkey.cxx | 6 | ||||
-rw-r--r-- | registry/source/regkey.hxx | 4 | ||||
-rw-r--r-- | registry/test/testmerge.cxx | 16 | ||||
-rw-r--r-- | registry/test/testregcpp.cxx | 18 |
10 files changed, 94 insertions, 94 deletions
diff --git a/registry/source/keyimpl.cxx b/registry/source/keyimpl.cxx index d7baabe008da..e14a88ec2576 100644 --- a/registry/source/keyimpl.cxx +++ b/registry/source/keyimpl.cxx @@ -313,7 +313,7 @@ RegError ORegKey::setValue(const OUString& valueName, RegValueType vType, RegVal writeINT32(pBuffer.get()+VALUE_HEADEROFFSET, *static_cast<sal_Int32*>(value)); break; case RegValueType::STRING: - writeUtf8(pBuffer.get()+VALUE_HEADEROFFSET, static_cast<const sal_Char*>(value)); + writeUtf8(pBuffer.get()+VALUE_HEADEROFFSET, static_cast<const char*>(value)); break; case RegValueType::UNICODE: writeString(pBuffer.get()+VALUE_HEADEROFFSET, static_cast<const sal_Unicode*>(value)); @@ -398,7 +398,7 @@ RegError ORegKey::setLongListValue(const OUString& valueName, sal_Int32 const * // setStringListValue -RegError ORegKey::setStringListValue(const OUString& valueName, sal_Char** pValueList, sal_uInt32 len) +RegError ORegKey::setStringListValue(const OUString& valueName, char** pValueList, sal_uInt32 len) { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -589,7 +589,7 @@ RegError ORegKey::getValue(const OUString& valueName, RegValue value) const readINT32(pBuffer.get(), *static_cast<sal_Int32*>(value)); break; case RegValueType::STRING: - readUtf8(pBuffer.get(), static_cast<sal_Char*>(value), valueSize); + readUtf8(pBuffer.get(), static_cast<char*>(value), valueSize); break; case RegValueType::UNICODE: readString(pBuffer.get(), static_cast<sal_Unicode*>(value), valueSize); @@ -714,7 +714,7 @@ RegError ORegKey::getLongListValue(const OUString& valueName, sal_Int32** pValue // getStringListValue -RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pValueList, sal_uInt32* pLen) const +RegError ORegKey::getStringListValue(const OUString& valueName, char*** pValueList, sal_uInt32* pLen) const { OStoreStream rValue; std::unique_ptr<sal_uInt8[]> pBuffer; @@ -785,19 +785,19 @@ RegError ORegKey::getStringListValue(const OUString& valueName, sal_Char*** pVal readUINT32(pBuffer.get(), len); *pLen = len; - sal_Char** pVList = static_cast<sal_Char**>(rtl_allocateZeroMemory(len * sizeof(sal_Char*))); + char** pVList = static_cast<char**>(rtl_allocateZeroMemory(len * sizeof(char*))); sal_uInt32 offset = 4; // initial 4 bytes for the size of the array; sal_uInt32 sLen = 0; - sal_Char *pValue; + char *pValue; for (sal_uInt32 i=0; i < len; i++) { readUINT32(pBuffer.get()+offset, sLen); offset += 4; - pValue = static_cast<sal_Char*>(std::malloc(sLen)); + pValue = static_cast<char*>(std::malloc(sLen)); readUtf8(pBuffer.get()+offset, pValue, sLen); pVList[i] = pValue; diff --git a/registry/source/keyimpl.hxx b/registry/source/keyimpl.hxx index a964866d68bd..cf31c77a91af 100644 --- a/registry/source/keyimpl.hxx +++ b/registry/source/keyimpl.hxx @@ -68,7 +68,7 @@ public: sal_uInt32 len); RegError setStringListValue(const OUString& valueName, - sal_Char** pValueList, + char** pValueList, sal_uInt32 len); RegError setUnicodeListValue(const OUString& valueName, @@ -82,7 +82,7 @@ public: sal_uInt32* pLen) const; RegError getStringListValue(const OUString& valueName, - sal_Char*** pValueList, + char*** pValueList, sal_uInt32* pLen) const; RegError getUnicodeListValue(const OUString& valueName, diff --git a/registry/source/reflcnst.hxx b/registry/source/reflcnst.hxx index 2fff0ca7340e..2254b94b511e 100644 --- a/registry/source/reflcnst.hxx +++ b/registry/source/reflcnst.hxx @@ -191,7 +191,7 @@ inline sal_uInt32 writeUINT64(sal_uInt8* buffer, sal_uInt64 v) return sizeof(sal_uInt64); } -inline sal_uInt32 writeUtf8(sal_uInt8* buffer, const sal_Char* v) +inline sal_uInt32 writeUtf8(sal_uInt8* buffer, const char* v) { sal_uInt32 size = strlen(v) + 1; @@ -200,7 +200,7 @@ inline sal_uInt32 writeUtf8(sal_uInt8* buffer, const sal_Char* v) return size; } -inline sal_uInt32 readUtf8(const sal_uInt8* buffer, sal_Char* v, sal_uInt32 maxSize) +inline sal_uInt32 readUtf8(const sal_uInt8* buffer, char* v, sal_uInt32 maxSize) { sal_uInt32 size = strlen(reinterpret_cast<const char*>(buffer)) + 1; if(size > maxSize) diff --git a/registry/source/reflread.cxx b/registry/source/reflread.cxx index 501ad3096804..3e3da9d089a2 100644 --- a/registry/source/reflread.cxx +++ b/registry/source/reflread.cxx @@ -37,7 +37,7 @@ #include <cstddef> -static const sal_Char NULL_STRING[1] = { 0 }; +static const char NULL_STRING[1] = { 0 }; static const sal_Unicode NULL_WSTRING[1] = { 0 }; const sal_uInt32 magic = 0x12345678; @@ -237,7 +237,7 @@ public: CPInfoTag readTag(sal_uInt16 index) const; - const sal_Char* readUTF8NameConstant(sal_uInt16 index) const; + const char* readUTF8NameConstant(sal_uInt16 index) const; bool readBOOLConstant(sal_uInt16 index) const; sal_Int8 readBYTEConstant(sal_uInt16 index) const; sal_Int16 readINT16Constant(sal_uInt16 index) const; @@ -303,9 +303,9 @@ CPInfoTag ConstantPool::readTag(sal_uInt16 index) const return tag; } -const sal_Char* ConstantPool::readUTF8NameConstant(sal_uInt16 index) const +const char* ConstantPool::readUTF8NameConstant(sal_uInt16 index) const { - const sal_Char* aName = NULL_STRING; + const char* aName = NULL_STRING; if (m_pIndex && (index > 0) && (index <= m_numOfEntries)) { @@ -563,20 +563,20 @@ public: sal_uInt32 parseIndex() const { return ((m_numOfEntries ? sizeof(sal_uInt16) : 0) + (m_numOfEntries * m_FIELD_ENTRY_SIZE));} - const sal_Char* getFieldName(sal_uInt16 index) const; - const sal_Char* getFieldType(sal_uInt16 index) const; + const char* getFieldName(sal_uInt16 index) const; + const char* getFieldType(sal_uInt16 index) const; RTFieldAccess getFieldAccess(sal_uInt16 index) const; RTValueType getFieldConstValue(sal_uInt16 index, RTConstValueUnion* value) const; // throws std::bad_alloc - const sal_Char* getFieldDoku(sal_uInt16 index) const; - const sal_Char* getFieldFileName(sal_uInt16 index) const; + const char* getFieldDoku(sal_uInt16 index) const; + const char* getFieldFileName(sal_uInt16 index) const; }; } -const sal_Char* FieldList::getFieldName(sal_uInt16 index) const +const char* FieldList::getFieldName(sal_uInt16 index) const { - const sal_Char* aName = nullptr; + const char* aName = nullptr; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -590,9 +590,9 @@ const sal_Char* FieldList::getFieldName(sal_uInt16 index) const return aName; } -const sal_Char* FieldList::getFieldType(sal_uInt16 index) const +const char* FieldList::getFieldType(sal_uInt16 index) const { - const sal_Char* aName = nullptr; + const char* aName = nullptr; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -685,9 +685,9 @@ RTValueType FieldList::getFieldConstValue(sal_uInt16 index, RTConstValueUnion* v return ret; } -const sal_Char* FieldList::getFieldDoku(sal_uInt16 index) const +const char* FieldList::getFieldDoku(sal_uInt16 index) const { - const sal_Char* aDoku = nullptr; + const char* aDoku = nullptr; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -701,9 +701,9 @@ const sal_Char* FieldList::getFieldDoku(sal_uInt16 index) const return aDoku; } -const sal_Char* FieldList::getFieldFileName(sal_uInt16 index) const +const char* FieldList::getFieldFileName(sal_uInt16 index) const { - const sal_Char* aFileName = nullptr; + const char* aFileName = nullptr; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -748,17 +748,17 @@ public: } } - const sal_Char* getReferenceName(sal_uInt16 index) const; + const char* getReferenceName(sal_uInt16 index) const; RTReferenceType getReferenceType(sal_uInt16 index) const; - const sal_Char* getReferenceDoku(sal_uInt16 index) const; + const char* getReferenceDoku(sal_uInt16 index) const; RTFieldAccess getReferenceAccess(sal_uInt16 index) const; }; } -const sal_Char* ReferenceList::getReferenceName(sal_uInt16 index) const +const char* ReferenceList::getReferenceName(sal_uInt16 index) const { - const sal_Char* aName = nullptr; + const char* aName = nullptr; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -788,9 +788,9 @@ RTReferenceType ReferenceList::getReferenceType(sal_uInt16 index) const return refType; } -const sal_Char* ReferenceList::getReferenceDoku(sal_uInt16 index) const +const char* ReferenceList::getReferenceDoku(sal_uInt16 index) const { - const sal_Char* aDoku = nullptr; + const char* aDoku = nullptr; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -855,16 +855,16 @@ public: sal_uInt32 parseIndex(); // throws std::bad_alloc - const sal_Char* getMethodName(sal_uInt16 index) const; + const char* getMethodName(sal_uInt16 index) const; sal_uInt16 getMethodParamCount(sal_uInt16 index) const; - const sal_Char* getMethodParamType(sal_uInt16 index, sal_uInt16 paramIndex) const; - const sal_Char* getMethodParamName(sal_uInt16 index, sal_uInt16 paramIndex) const; + const char* getMethodParamType(sal_uInt16 index, sal_uInt16 paramIndex) const; + const char* getMethodParamName(sal_uInt16 index, sal_uInt16 paramIndex) const; RTParamMode getMethodParamMode(sal_uInt16 index, sal_uInt16 paramIndex) const; sal_uInt16 getMethodExcCount(sal_uInt16 index) const; - const sal_Char* getMethodExcType(sal_uInt16 index, sal_uInt16 excIndex) const; - const sal_Char* getMethodReturnType(sal_uInt16 index) const; + const char* getMethodExcType(sal_uInt16 index, sal_uInt16 excIndex) const; + const char* getMethodReturnType(sal_uInt16 index) const; RTMethodMode getMethodMode(sal_uInt16 index) const; - const sal_Char* getMethodDoku(sal_uInt16 index) const; + const char* getMethodDoku(sal_uInt16 index) const; private: sal_uInt16 calcMethodParamIndex( const sal_uInt16 index ) const; @@ -899,9 +899,9 @@ sal_uInt32 MethodList::parseIndex() return offset; } -const sal_Char* MethodList::getMethodName(sal_uInt16 index) const +const char* MethodList::getMethodName(sal_uInt16 index) const { - const sal_Char* aName = nullptr; + const char* aName = nullptr; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -931,9 +931,9 @@ sal_uInt16 MethodList::getMethodParamCount(sal_uInt16 index) const return aCount; } -const sal_Char* MethodList::getMethodParamType(sal_uInt16 index, sal_uInt16 paramIndex) const +const char* MethodList::getMethodParamType(sal_uInt16 index, sal_uInt16 paramIndex) const { - const sal_Char* aName = nullptr; + const char* aName = nullptr; try { if ((m_numOfEntries > 0) && (index <= m_numOfEntries) && @@ -951,9 +951,9 @@ const sal_Char* MethodList::getMethodParamType(sal_uInt16 index, sal_uInt16 para return aName; } -const sal_Char* MethodList::getMethodParamName(sal_uInt16 index, sal_uInt16 paramIndex) const +const char* MethodList::getMethodParamName(sal_uInt16 index, sal_uInt16 paramIndex) const { - const sal_Char* aName = nullptr; + const char* aName = nullptr; try { if ((m_numOfEntries > 0) && (index <= m_numOfEntries) && @@ -1013,9 +1013,9 @@ sal_uInt16 MethodList::getMethodExcCount(sal_uInt16 index) const return aCount; } -const sal_Char* MethodList::getMethodExcType(sal_uInt16 index, sal_uInt16 excIndex) const +const char* MethodList::getMethodExcType(sal_uInt16 index, sal_uInt16 excIndex) const { - const sal_Char* aName = nullptr; + const char* aName = nullptr; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -1037,9 +1037,9 @@ const sal_Char* MethodList::getMethodExcType(sal_uInt16 index, sal_uInt16 excInd return aName; } -const sal_Char* MethodList::getMethodReturnType(sal_uInt16 index) const +const char* MethodList::getMethodReturnType(sal_uInt16 index) const { - const sal_Char* aName = nullptr; + const char* aName = nullptr; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -1069,9 +1069,9 @@ RTMethodMode MethodList::getMethodMode(sal_uInt16 index) const return aMode; } -const sal_Char* MethodList::getMethodDoku(sal_uInt16 index) const +const char* MethodList::getMethodDoku(sal_uInt16 index) const { - const sal_Char* aDoku = nullptr; + const char* aDoku = nullptr; if ((m_numOfEntries > 0) && (index <= m_numOfEntries)) { @@ -1281,7 +1281,7 @@ void TYPEREG_CALLTYPE typereg_reader_getTypeName(void * hEntry, rtl_uString** pT TypeRegistryEntry* pEntry = static_cast<TypeRegistryEntry*>(hEntry); if (pEntry != nullptr) { try { - const sal_Char* pTmp = pEntry->m_pCP->readUTF8NameConstant(pEntry->readUINT16(OFFSET_THIS_TYPE)); + const char* pTmp = pEntry->m_pCP->readUTF8NameConstant(pEntry->readUINT16(OFFSET_THIS_TYPE)); rtl_string2UString( pTypeName, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1299,7 +1299,7 @@ static void TYPEREG_CALLTYPE getSuperTypeName(TypeReaderImpl hEntry, rtl_uString TypeRegistryEntry* pEntry = static_cast<TypeRegistryEntry*>(hEntry); if (pEntry != nullptr && pEntry->m_nSuperTypes != 0) { try { - const sal_Char* pTmp = pEntry->m_pCP->readUTF8NameConstant(pEntry->readUINT16(pEntry->m_offset_SUPERTYPES )); //+ (index * sizeof(sal_uInt16)))); + const char* pTmp = pEntry->m_pCP->readUTF8NameConstant(pEntry->readUINT16(pEntry->m_offset_SUPERTYPES )); //+ (index * sizeof(sal_uInt16)))); rtl_string2UString( pSuperTypeName, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1316,7 +1316,7 @@ void TYPEREG_CALLTYPE typereg_reader_getDocumentation(void * hEntry, rtl_uString TypeRegistryEntry* pEntry = static_cast<TypeRegistryEntry*>(hEntry); if (pEntry != nullptr) { try { - const sal_Char* pTmp = pEntry->m_pCP->readUTF8NameConstant(pEntry->readUINT16(OFFSET_DOKU)); + const char* pTmp = pEntry->m_pCP->readUTF8NameConstant(pEntry->readUINT16(OFFSET_DOKU)); rtl_string2UString( pDoku, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1333,7 +1333,7 @@ void TYPEREG_CALLTYPE typereg_reader_getFileName(void * hEntry, rtl_uString** pF TypeRegistryEntry* pEntry = static_cast<TypeRegistryEntry*>(hEntry); if (pEntry != nullptr) { try { - const sal_Char* pTmp = pEntry->m_pCP->readUTF8NameConstant(pEntry->readUINT16(OFFSET_FILENAME)); + const char* pTmp = pEntry->m_pCP->readUTF8NameConstant(pEntry->readUINT16(OFFSET_FILENAME)); rtl_string2UString( pFileName, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1369,7 +1369,7 @@ void TYPEREG_CALLTYPE typereg_reader_getFieldName(void * hEntry, rtl_uString** p rtl_uString_new(pFieldName); return; } - const sal_Char* pTmp = pEntry->m_pFields->getFieldName(index); + const char* pTmp = pEntry->m_pFields->getFieldName(index); rtl_string2UString( pFieldName, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1385,7 +1385,7 @@ void TYPEREG_CALLTYPE typereg_reader_getFieldTypeName(void * hEntry, rtl_uString return; } - const sal_Char* pTmp = pEntry->m_pFields->getFieldType(index); + const char* pTmp = pEntry->m_pFields->getFieldType(index); rtl_string2UString( pFieldType, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1436,7 +1436,7 @@ void TYPEREG_CALLTYPE typereg_reader_getFieldDocumentation(void * hEntry, rtl_uS return; } - const sal_Char* pTmp = pEntry->m_pFields->getFieldDoku(index); + const char* pTmp = pEntry->m_pFields->getFieldDoku(index); rtl_string2UString( pDoku, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1452,7 +1452,7 @@ void TYPEREG_CALLTYPE typereg_reader_getFieldFileName(void * hEntry, rtl_uString return; } - const sal_Char* pTmp = pEntry->m_pFields->getFieldFileName(index); + const char* pTmp = pEntry->m_pFields->getFieldFileName(index); rtl_string2UString( pFieldFileName, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1478,7 +1478,7 @@ void TYPEREG_CALLTYPE typereg_reader_getMethodName(void * hEntry, rtl_uString** return; } - const sal_Char* pTmp = pEntry->m_pMethods->getMethodName(index); + const char* pTmp = pEntry->m_pMethods->getMethodName(index); rtl_string2UString( pMethodName, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1504,7 +1504,7 @@ void TYPEREG_CALLTYPE typereg_reader_getMethodParameterTypeName(void * hEntry, r return; } - const sal_Char* pTmp = pEntry->m_pMethods->getMethodParamType(index, paramIndex); + const char* pTmp = pEntry->m_pMethods->getMethodParamType(index, paramIndex); rtl_string2UString( pMethodParamType, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1520,7 +1520,7 @@ void TYPEREG_CALLTYPE typereg_reader_getMethodParameterName(void * hEntry, rtl_u return; } - const sal_Char* pTmp = pEntry->m_pMethods->getMethodParamName(index, paramIndex); + const char* pTmp = pEntry->m_pMethods->getMethodParamName(index, paramIndex); rtl_string2UString( pMethodParamName, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1555,7 +1555,7 @@ void TYPEREG_CALLTYPE typereg_reader_getMethodExceptionTypeName(void * hEntry, r return; } - const sal_Char* pTmp = pEntry->m_pMethods->getMethodExcType(index, excIndex); + const char* pTmp = pEntry->m_pMethods->getMethodExcType(index, excIndex); rtl_string2UString( pMethodExcpType, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1571,7 +1571,7 @@ void TYPEREG_CALLTYPE typereg_reader_getMethodReturnTypeName(void * hEntry, rtl_ return; } - const sal_Char* pTmp = pEntry->m_pMethods->getMethodReturnType(index); + const char* pTmp = pEntry->m_pMethods->getMethodReturnType(index); rtl_string2UString( pMethodReturnType, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1596,7 +1596,7 @@ void TYPEREG_CALLTYPE typereg_reader_getMethodDocumentation(void * hEntry, rtl_u return; } - const sal_Char* pTmp = pEntry->m_pMethods->getMethodDoku(index); + const char* pTmp = pEntry->m_pMethods->getMethodDoku(index); rtl_string2UString( pMethodDoku, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1621,7 +1621,7 @@ void TYPEREG_CALLTYPE typereg_reader_getReferenceTypeName(void * hEntry, rtl_uSt return; } - const sal_Char* pTmp = pEntry->m_pReferences->getReferenceName(index); + const char* pTmp = pEntry->m_pReferences->getReferenceName(index); rtl_string2UString( pReferenceName, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1646,7 +1646,7 @@ void TYPEREG_CALLTYPE typereg_reader_getReferenceDocumentation(void * hEntry, rt return; } - const sal_Char* pTmp = pEntry->m_pReferences->getReferenceDoku(index); + const char* pTmp = pEntry->m_pReferences->getReferenceDoku(index); rtl_string2UString( pReferenceDoku, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); @@ -1677,7 +1677,7 @@ void TYPEREG_CALLTYPE typereg_reader_getSuperTypeName( if (pEntry != nullptr) { try { OSL_ASSERT(index < pEntry->m_nSuperTypes); - const sal_Char* pTmp = pEntry->m_pCP->readUTF8NameConstant(pEntry->readUINT16(pEntry->m_offset_SUPERTYPES + (index * sizeof(sal_uInt16)))); + const char* pTmp = pEntry->m_pCP->readUTF8NameConstant(pEntry->readUINT16(pEntry->m_offset_SUPERTYPES + (index * sizeof(sal_uInt16)))); rtl_string2UString( pSuperTypeName, pTmp, pTmp == nullptr ? 0 : rtl_str_getLength(pTmp), RTL_TEXTENCODING_UTF8, OSTRING_TO_OUSTRING_CVTFLAGS); diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx index 25937eea8f8d..0d2f7160d472 100644 --- a/registry/source/reflwrit.cxx +++ b/registry/source/reflwrit.cxx @@ -177,7 +177,7 @@ struct CPInfo { union { - const sal_Char* aUtf8; + const char* aUtf8; RTUik* aUik; RTConstValueUnion aConst; } m_value; diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx index 43e12cb8f375..e58e99b4cdf7 100644 --- a/registry/source/regimpl.cxx +++ b/registry/source/regimpl.cxx @@ -1338,7 +1338,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ return RegError::INVALID_VALUE; } - const sal_Char* indent = sIndent.getStr(); + const char* indent = sIndent.getStr(); switch (valueType) { case RegValueType::NOT_DEFINED: @@ -1359,7 +1359,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ break; case RegValueType::STRING: { - sal_Char* value = static_cast<sal_Char*>(std::malloc(valueSize)); + char* value = static_cast<char*>(std::malloc(valueSize)); readUtf8(aBuffer.data(), value, valueSize); fprintf(stdout, "%sValue: Type = RegValueType::STRING\n", indent); fprintf( @@ -1452,7 +1452,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ offset += 4; // 4 bytes (sal_uInt32) for the string size - sal_Char *pValue = static_cast<sal_Char*>(std::malloc(sLen)); + char *pValue = static_cast<char*>(std::malloc(sLen)); readUtf8(aBuffer.data() + offset, pValue, sLen); if (offset > 8) diff --git a/registry/source/regkey.cxx b/registry/source/regkey.cxx index b63bb5ccf1e1..55b0bc80924e 100644 --- a/registry/source/regkey.cxx +++ b/registry/source/regkey.cxx @@ -278,7 +278,7 @@ RegError REGISTRY_CALLTYPE setLongListValue(RegKeyHandle hKey, RegError REGISTRY_CALLTYPE setStringListValue(RegKeyHandle hKey, rtl_uString* keyName, - sal_Char** pValueList, + char** pValueList, sal_uInt32 len) { ORegKey* pKey = static_cast< ORegKey* >(hKey); @@ -490,7 +490,7 @@ RegError REGISTRY_CALLTYPE getLongListValue(RegKeyHandle hKey, RegError REGISTRY_CALLTYPE getStringListValue(RegKeyHandle hKey, rtl_uString* keyName, - sal_Char*** pValueList, + char*** pValueList, sal_uInt32* pLen) { OSL_PRECOND((pValueList != nullptr) && (pLen != nullptr), "registry::getStringListValue(): invalid parameter"); @@ -579,7 +579,7 @@ RegError REGISTRY_CALLTYPE freeValueList(RegValueType valueType, break; case RegValueType::STRINGLIST: { - sal_Char** pVList = static_cast<sal_Char**>(pValueList); + char** pVList = static_cast<char**>(pValueList); for (sal_uInt32 i=0; i < len; i++) { std::free(pVList[i]); diff --git a/registry/source/regkey.hxx b/registry/source/regkey.hxx index 45c55cee93a7..76e8c2993c18 100644 --- a/registry/source/regkey.hxx +++ b/registry/source/regkey.hxx @@ -43,7 +43,7 @@ RegError REGISTRY_CALLTYPE setValue( RegError REGISTRY_CALLTYPE setLongListValue( RegKeyHandle, rtl_uString*, sal_Int32 const *, sal_uInt32); RegError REGISTRY_CALLTYPE setStringListValue( - RegKeyHandle, rtl_uString*, sal_Char**, sal_uInt32); + RegKeyHandle, rtl_uString*, char**, sal_uInt32); RegError REGISTRY_CALLTYPE setUnicodeListValue( RegKeyHandle, rtl_uString*, sal_Unicode**, sal_uInt32); RegError REGISTRY_CALLTYPE getValueInfo( @@ -52,7 +52,7 @@ RegError REGISTRY_CALLTYPE getValue(RegKeyHandle, rtl_uString*, RegValue); RegError REGISTRY_CALLTYPE getLongListValue( RegKeyHandle, rtl_uString*, sal_Int32**, sal_uInt32*); RegError REGISTRY_CALLTYPE getStringListValue( - RegKeyHandle, rtl_uString*, sal_Char***, sal_uInt32*); + RegKeyHandle, rtl_uString*, char***, sal_uInt32*); RegError REGISTRY_CALLTYPE getUnicodeListValue( RegKeyHandle, rtl_uString*, sal_Unicode***, sal_uInt32*); RegError REGISTRY_CALLTYPE freeValueList(RegValueType, RegValue, sal_uInt32); diff --git a/registry/test/testmerge.cxx b/registry/test/testmerge.cxx index cd480534abc5..2e8cbbcc59cc 100644 --- a/registry/test/testmerge.cxx +++ b/registry/test/testmerge.cxx @@ -37,7 +37,7 @@ sal_Int32 lValue1 = 123456789; sal_Int32 lValue2 = 54321; sal_Int32 lValue3 = 111333111; sal_Int32 lValue4 = 333111333; -sal_Char* sValue = (sal_Char*)"string Value"; +char* sValue = (char*)"string Value"; OUString wValue("unicode Value"); @@ -302,7 +302,7 @@ void test_merge() REG_ENSURE(valueType == RegValueType::STRING && valueSize == strlen(sValue)+1, "testMerge error 76"); Value = new sal_uInt8[valueSize]; REG_ENSURE(!key1.getValue(OUString("/MergeKey1/MK1SubKey2/KeyWithStringValue"), (RegValue)Value), "testMerge error 76.a)"); - REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 76.b)"); + REG_ENSURE(strcmp((const char*)Value, sValue) == 0, "testMerge error 76.b)"); delete [] Value; REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1/MK1SubKey3/KeyWithUnicodeValue"), &valueType, &valueSize), "testMerge error 77"); @@ -316,14 +316,14 @@ void test_merge() REG_ENSURE(valueType == RegValueType::BINARY && valueSize == 27, "testMerge error 80"); Value = new sal_uInt8[valueSize]; REG_ENSURE(!key1.getValue(OUString("/MergeKey1/MK1SubKey4/KeyWithBinaryValue"), (RegValue)Value), "testMerge error 80.a)"); - REG_ENSURE(strcmp((const sal_Char*)Value, "abcdefghijklmnopqrstuvwxyz") == 0, "testMerge error 80.b)"); + REG_ENSURE(strcmp((const char*)Value, "abcdefghijklmnopqrstuvwxyz") == 0, "testMerge error 80.b)"); delete [] Value; REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey2/MK2SubKey1/KeyWithBinaryValue"), &valueType, &valueSize), "testMerge error 81"); REG_ENSURE(valueType == RegValueType::BINARY && valueSize == 11, "testMerge error 82"); Value = new sal_uInt8[valueSize]; REG_ENSURE(!key1.getValue(OUString("/MergeKey2/MK2SubKey1/KeyWithBinaryValue"), (RegValue)Value), "testMerge error 82.a)"); - REG_ENSURE(strcmp((const sal_Char*)Value, "1234567890") == 0, "testMerge error 82.b)"); + REG_ENSURE(strcmp((const char*)Value, "1234567890") == 0, "testMerge error 82.b)"); delete [] Value; REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey2/MK2SubKey2/KeyWithUnicodeValue"), &valueType, &valueSize), "testMerge error 83"); @@ -337,7 +337,7 @@ void test_merge() REG_ENSURE(valueType == RegValueType::STRING && valueSize == strlen(sValue)+1, "testMerge error 86"); Value = new sal_uInt8[valueSize]; REG_ENSURE(!key1.getValue(OUString("/MergeKey2/MK2SubKey3/KeyWithStringValue"), (RegValue)Value), "testMerge error 86.a)"); - REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 86.b)"); + REG_ENSURE(strcmp((const char*)Value, sValue) == 0, "testMerge error 86.b)"); delete [] Value; REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey2/MK2SubKey4/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 87"); @@ -354,7 +354,7 @@ void test_merge() REG_ENSURE(valueType == RegValueType::STRING && valueSize == strlen(sValue)+1, "testMerge error 92"); Value = new sal_uInt8[valueSize]; REG_ENSURE(!key1.getValue(OUString("/MergeKey1u2/MK1SubKey12/KeyWithStringValue"), (RegValue)Value), "testMerge error 92.a)"); - REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 92.b)"); + REG_ENSURE(strcmp((const char*)Value, sValue) == 0, "testMerge error 92.b)"); delete [] Value; REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1u2/MK1SubKey13/KeyWithUnicodeValue"), &valueType, &valueSize), "testMerge error 93"); @@ -368,7 +368,7 @@ void test_merge() REG_ENSURE(valueType == RegValueType::BINARY && valueSize == 19, "testMerge error 96"); Value = new sal_uInt8[valueSize]; REG_ENSURE(!key1.getValue(OUString("/MergeKey1u2/MK2SubKey21/KeyWithBinaryValue"), (RegValue)Value), "testMerge error 96.a)"); - REG_ENSURE(strcmp((const sal_Char*)Value, "a1b2c3d4e5f6g7h8i9") == 0, "testMerge error 96.b)"); + REG_ENSURE(strcmp((const char*)Value, "a1b2c3d4e5f6g7h8i9") == 0, "testMerge error 96.b)"); delete [] Value; REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1u2/MK2SubKey22/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 97"); @@ -380,7 +380,7 @@ void test_merge() REG_ENSURE(valueType == RegValueType::STRING && valueSize == strlen(sValue)+1, "testMerge error 100"); Value = new sal_uInt8[valueSize]; REG_ENSURE(!key1.getValue(OUString("/MergeKey1u2/MK2SubKey23/KeyWithStringValue"), (RegValue)Value), "testMerge error 100.a)"); - REG_ENSURE(strcmp((const sal_Char*)Value, sValue) == 0, "testMerge error 100.b)"); + REG_ENSURE(strcmp((const char*)Value, sValue) == 0, "testMerge error 100.b)"); delete [] Value; REG_ENSURE(!key1.getValueInfo(OUString("/MergeKey1u2/MK12SubKey1u2/KeyWithLongValue"), &valueType, &valueSize), "testMerge error 101"); diff --git a/registry/test/testregcpp.cxx b/registry/test/testregcpp.cxx index 064eb40137a2..8b9531194c9b 100644 --- a/registry/test/testregcpp.cxx +++ b/registry/test/testregcpp.cxx @@ -491,15 +491,15 @@ void test_registry_CppApi() REG_ENSURE(!key8.closeKey(), "test_registry_CppApi error 8d"); - sal_Char* Value=(sal_Char*)"My first value"; + char* Value=(char*)"My first value"; REG_ENSURE(!rootKey.setValue(OUString("mySecondKey"), RegValueType::STRING, Value, 18), "test_registry_CppApi error 9"); RegValueType valueType; sal_uInt32 valueSize; - sal_Char* readValue; + char* readValue; REG_ENSURE(!rootKey.getValueInfo(OUString("mySecondKey"), &valueType, &valueSize), "test_registry_CppApi error 9a"); - readValue = (sal_Char*)std::malloc(valueSize); + readValue = (char*)std::malloc(valueSize); REG_ENSURE(!key2.getValue(OUString(), readValue), "test_registry_CppApi error 10"); REG_ENSURE(valueType == RegValueType::STRING, "test_registry_CppApi error 11"); @@ -507,18 +507,18 @@ void test_registry_CppApi() REG_ENSURE(strcmp(readValue, Value) == 0, "test_registry_CppApi error 13"); std::free(readValue); - const sal_Char* pList[3]; - const sal_Char* n1= "Hello"; - const sal_Char* n2= "now I"; - const sal_Char* n3= "come"; + const char* pList[3]; + const char* n1= "Hello"; + const char* n2= "now I"; + const char* n3= "come"; pList[0]=n1; pList[1]=n2; pList[2]=n3; - REG_ENSURE(!rootKey.setStringListValue(OUString("myFourthKey"), (sal_Char**)pList, 3), "test_registry_CppApi error 13a"); + REG_ENSURE(!rootKey.setStringListValue(OUString("myFourthKey"), (char**)pList, 3), "test_registry_CppApi error 13a"); - RegistryValueList<sal_Char*> valueList; + RegistryValueList<char*> valueList; REG_ENSURE(!rootKey.getStringListValue(OUString("myFourthKey"), valueList), "test_registry_CppApi error 13b"); REG_ENSURE(strcmp(n1, valueList.getElement(0)) == 0, "test_registry_CppApi error 13c"); |