diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-22 20:37:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-12-23 07:40:24 +0100 |
commit | 2976a37ff7039d521c4d15a8387e9db9b27f89d8 (patch) | |
tree | 8462d9c2dd1d08db3d255d75fb4d44e3c7a556a9 | |
parent | 2aa76522881bd92ddc4daeaabcb30a6938291afc (diff) |
sal_Char->char in svtools..svl
Change-Id: Ideb61209e8795865bce6e0b1d667b34f8a8db4d9
Reviewed-on: https://gerrit.libreoffice.org/85713
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
24 files changed, 78 insertions, 78 deletions
diff --git a/include/svl/PasswordHelper.hxx b/include/svl/PasswordHelper.hxx index a71f2ca7c172..ef3dc2c21cbc 100644 --- a/include/svl/PasswordHelper.hxx +++ b/include/svl/PasswordHelper.hxx @@ -30,7 +30,7 @@ class SvPasswordHelper static void GetHashPasswordBigEndian(css::uno::Sequence<sal_Int8>& rPassHash, const OUString& sPass); public: - SVL_DLLPUBLIC static void GetHashPassword(css::uno::Sequence <sal_Int8>& rPassHash, const sal_Char* pPass, sal_uInt32 nLen); + SVL_DLLPUBLIC static void GetHashPassword(css::uno::Sequence <sal_Int8>& rPassHash, const char* pPass, sal_uInt32 nLen); SVL_DLLPUBLIC static void GetHashPassword(css::uno::Sequence<sal_Int8>& rPassHash, const OUString& sPass); SVL_DLLPUBLIC static void GetHashPasswordSHA1UTF8(css::uno::Sequence<sal_Int8>& rPassHash, const OUString& sPass); diff --git a/include/svtools/htmlout.hxx b/include/svtools/htmlout.hxx index b5685840b431..5de8360987ad 100644 --- a/include/svtools/htmlout.hxx +++ b/include/svtools/htmlout.hxx @@ -34,8 +34,8 @@ class SvNumberFormatter; struct HTMLOutEvent { - const sal_Char *pBasicName; - const sal_Char *pJavaName; + const char *pBasicName; + const char *pJavaName; SvMacroItemId const nEvent; }; @@ -68,9 +68,9 @@ struct HTMLOutFuncs SVT_DLLPUBLIC static SvStream& Out_ImageMap( SvStream&, const OUString&, const ImageMap&, const OUString&, const HTMLOutEvent *pEventTable, bool bOutStarBasic, - const sal_Char *pDelim, - const sal_Char *pIndentArea, - const sal_Char *pIndentMap, + const char *pDelim, + const char *pIndentArea, + const char *pIndentMap, rtl_TextEncoding eDestEnc = RTL_TEXTENCODING_MS_1252, OUString *pNonConvertableChars = nullptr ); SVT_DLLPUBLIC static SvStream& FlushToAscii( SvStream&, HTMLOutContext& rContext ); diff --git a/include/svtools/parhtml.hxx b/include/svtools/parhtml.hxx index c2f9d850bd79..a00762af8a3a 100644 --- a/include/svtools/parhtml.hxx +++ b/include/svtools/parhtml.hxx @@ -75,7 +75,7 @@ enum class HTMLScriptLanguage template<typename EnumT> struct HTMLOptionEnum { - const sal_Char *pName; // value of an HTML option + const char *pName; // value of an HTML option EnumT const nValue; // and corresponding value of an enum }; diff --git a/include/svtools/ruler.hxx b/include/svtools/ruler.hxx index 80f38d8922db..2bd3a4b132bb 100644 --- a/include/svtools/ruler.hxx +++ b/include/svtools/ruler.hxx @@ -578,7 +578,7 @@ struct RulerUnitData double const nTick2; // Tick quarter unit double const nTick3; // Tick half unit double const nTick4; // Tick whole unit - sal_Char const aUnitStr[8]; // Unit string + char const aUnitStr[8]; // Unit string }; diff --git a/include/svtools/unoevent.hxx b/include/svtools/unoevent.hxx index f693a51030ca..0d4cdfd0ac07 100644 --- a/include/svtools/unoevent.hxx +++ b/include/svtools/unoevent.hxx @@ -42,7 +42,7 @@ enum class SvMacroItemId : sal_uInt16; struct SvEventDescription { SvMacroItemId const mnEvent; - const sal_Char* mpEventName; + const char* mpEventName; }; /** diff --git a/svl/qa/unit/lockfiles/test_lockfiles.cxx b/svl/qa/unit/lockfiles/test_lockfiles.cxx index a14a89f605a2..edaa8c38a10a 100644 --- a/svl/qa/unit/lockfiles/test_lockfiles.cxx +++ b/svl/qa/unit/lockfiles/test_lockfiles.cxx @@ -83,7 +83,7 @@ OUString readLockFile(const OUString& aSource) OStringBuffer aResult(static_cast<int>(nSize)); for (sal_Int8 nByte : aData) { - aResult.append(static_cast<sal_Char>(nByte)); + aResult.append(static_cast<char>(nByte)); } return OStringToOUString(aResult.makeStringAndClear(), RTL_TEXTENCODING_UTF8); } diff --git a/svl/source/crypto/cryptosign.cxx b/svl/source/crypto/cryptosign.cxx index 5a3f0271c40d..0d5fca9b630c 100644 --- a/svl/source/crypto/cryptosign.cxx +++ b/svl/source/crypto/cryptosign.cxx @@ -78,7 +78,7 @@ namespace { #if HAVE_FEATURE_NSS void appendHex( sal_Int8 nInt, OStringBuffer& rBuffer ) { - static const sal_Char pHexDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', + static const char pHexDigits[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' }; rBuffer.append( pHexDigits[ (nInt >> 4) & 15 ] ); rBuffer.append( pHexDigits[ nInt & 15 ] ); @@ -1016,7 +1016,7 @@ bool Signing::Sign(OStringBuffer& rCMSHexBuffer) PLArenaPool *ts_arena = PORT_NewArena(10000); NSSCMSEncoderContext *ts_cms_ecx; ts_cms_ecx = NSS_CMSEncoder_Start(ts_cms_msg, nullptr, nullptr, &ts_cms_output, ts_arena, PDFSigningPKCS7PasswordCallback, - const_cast<sal_Char*>(pass.getStr()), nullptr, nullptr, nullptr, nullptr); + const_cast<char*>(pass.getStr()), nullptr, nullptr, nullptr, nullptr); if (NSS_CMSEncoder_Finish(ts_cms_ecx) != SECSuccess) { @@ -1348,7 +1348,7 @@ bool Signing::Sign(OStringBuffer& rCMSHexBuffer) // to test it and risk locking up my token... cms_ecx = NSS_CMSEncoder_Start(cms_msg, nullptr, nullptr, &cms_output, arena, PDFSigningPKCS7PasswordCallback, - const_cast<sal_Char*>(pass.getStr()), nullptr, nullptr, nullptr, nullptr); + const_cast<char*>(pass.getStr()), nullptr, nullptr, nullptr, nullptr); if (!cms_ecx) { diff --git a/svl/source/fsstor/fsfactory.cxx b/svl/source/fsstor/fsfactory.cxx index 1b4174fb9558..0fec0cefefd6 100644 --- a/svl/source/fsstor/fsfactory.cxx +++ b/svl/source/fsstor/fsfactory.cxx @@ -170,7 +170,7 @@ uno::Sequence< OUString > SAL_CALL FSStorageFactory::getSupportedServiceNames() extern "C" { SAL_DLLPUBLIC_EXPORT void * fsstorage_component_getFactory ( - const sal_Char * pImplementationName, void * pServiceManager, + const char * pImplementationName, void * pServiceManager, SAL_UNUSED_PARAMETER void * /* pRegistryKey */) { void * pResult = nullptr; diff --git a/svl/source/misc/PasswordHelper.cxx b/svl/source/misc/PasswordHelper.cxx index 4f8cbb655b08..5f2e286e1ef5 100644 --- a/svl/source/misc/PasswordHelper.cxx +++ b/svl/source/misc/PasswordHelper.cxx @@ -33,7 +33,7 @@ void SvPasswordHelper::GetHashPasswordSHA256(uno::Sequence<sal_Int8>& rPassHash, ::comphelper::HashType::SHA256)); rPassHash.realloc(hash.size()); ::std::copy(hash.begin(), hash.end(), rPassHash.begin()); - rtl_secureZeroMemory(const_cast<sal_Char *>(tmp.getStr()), tmp.getLength()); + rtl_secureZeroMemory(const_cast<char *>(tmp.getStr()), tmp.getLength()); } void SvPasswordHelper::GetHashPasswordSHA1UTF8(uno::Sequence<sal_Int8>& rPassHash, OUString const& rPassword) @@ -44,10 +44,10 @@ void SvPasswordHelper::GetHashPasswordSHA1UTF8(uno::Sequence<sal_Int8>& rPassHas ::comphelper::HashType::SHA1)); rPassHash.realloc(hash.size()); ::std::copy(hash.begin(), hash.end(), rPassHash.begin()); - rtl_secureZeroMemory(const_cast<sal_Char *>(tmp.getStr()), tmp.getLength()); + rtl_secureZeroMemory(const_cast<char *>(tmp.getStr()), tmp.getLength()); } -void SvPasswordHelper::GetHashPassword(uno::Sequence<sal_Int8>& rPassHash, const sal_Char* pPass, sal_uInt32 nLen) +void SvPasswordHelper::GetHashPassword(uno::Sequence<sal_Int8>& rPassHash, const char* pPass, sal_uInt32 nLen) { rPassHash.realloc(RTL_DIGEST_LENGTH_SHA1); @@ -61,13 +61,13 @@ void SvPasswordHelper::GetHashPassword(uno::Sequence<sal_Int8>& rPassHash, const void SvPasswordHelper::GetHashPasswordLittleEndian(uno::Sequence<sal_Int8>& rPassHash, const OUString& sPass) { sal_Int32 nSize(sPass.getLength()); - std::unique_ptr<sal_Char[]> pCharBuffer(new sal_Char[nSize * sizeof(sal_Unicode)]); + std::unique_ptr<char[]> pCharBuffer(new char[nSize * sizeof(sal_Unicode)]); for (sal_Int32 i = 0; i < nSize; ++i) { sal_Unicode ch(sPass[ i ]); - pCharBuffer[2 * i] = static_cast< sal_Char >(ch & 0xFF); - pCharBuffer[2 * i + 1] = static_cast< sal_Char >(ch >> 8); + pCharBuffer[2 * i] = static_cast< char >(ch & 0xFF); + pCharBuffer[2 * i + 1] = static_cast< char >(ch >> 8); } GetHashPassword(rPassHash, pCharBuffer.get(), nSize * sizeof(sal_Unicode)); @@ -77,13 +77,13 @@ void SvPasswordHelper::GetHashPasswordLittleEndian(uno::Sequence<sal_Int8>& rPas void SvPasswordHelper::GetHashPasswordBigEndian(uno::Sequence<sal_Int8>& rPassHash, const OUString& sPass) { sal_Int32 nSize(sPass.getLength()); - std::unique_ptr<sal_Char[]> pCharBuffer(new sal_Char[nSize * sizeof(sal_Unicode)]); + std::unique_ptr<char[]> pCharBuffer(new char[nSize * sizeof(sal_Unicode)]); for (sal_Int32 i = 0; i < nSize; ++i) { sal_Unicode ch(sPass[ i ]); - pCharBuffer[2 * i] = static_cast< sal_Char >(ch >> 8); - pCharBuffer[2 * i + 1] = static_cast< sal_Char >(ch & 0xFF); + pCharBuffer[2 * i] = static_cast< char >(ch >> 8); + pCharBuffer[2 * i + 1] = static_cast< char >(ch & 0xFF); } GetHashPassword(rPassHash, pCharBuffer.get(), nSize * sizeof(sal_Unicode)); diff --git a/svl/source/misc/inettype.cxx b/svl/source/misc/inettype.cxx index ea3675889aaa..8b2ef3c3d7cc 100644 --- a/svl/source/misc/inettype.cxx +++ b/svl/source/misc/inettype.cxx @@ -31,7 +31,7 @@ namespace struct MediaTypeEntry { - sal_Char const * m_pTypeName; + char const * m_pTypeName; INetContentType m_eTypeID; }; @@ -276,9 +276,9 @@ INetContentType INetContentTypes::GetContentType(OUString const & rTypeName) //static OUString INetContentTypes::GetContentType(INetContentType eTypeID) { - static std::array<sal_Char const *, CONTENT_TYPE_LAST + 1> aMap = [&]() + static std::array<char const *, CONTENT_TYPE_LAST + 1> aMap = [&]() { - std::array<sal_Char const *, CONTENT_TYPE_LAST + 1> tmp; + std::array<char const *, CONTENT_TYPE_LAST + 1> tmp; for (std::size_t i = 0; i <= CONTENT_TYPE_LAST; ++i) tmp[aStaticTypeNameMap[i].m_eTypeID] = aStaticTypeNameMap[i].m_pTypeName; tmp[CONTENT_TYPE_UNKNOWN] = CONTENT_TYPE_STR_APP_OCTSTREAM; diff --git a/svl/source/misc/lngmisc.cxx b/svl/source/misc/lngmisc.cxx index a5d38b1a21c6..4224a14429a5 100644 --- a/svl/source/misc/lngmisc.cxx +++ b/svl/source/misc/lngmisc.cxx @@ -64,7 +64,7 @@ namespace linguistic bool ReplaceControlChars(OUString &rTxt) { // non breaking field character - static const sal_Char CH_TXTATR_INWORD = static_cast<sal_Char>(0x02); + static const char CH_TXTATR_INWORD = static_cast<char>(0x02); // the resulting string looks like this: // 1. non breaking field characters get removed diff --git a/svl/source/misc/lockfilecommon.cxx b/svl/source/misc/lockfilecommon.cxx index 8daf3f3549b9..405e3a229042 100644 --- a/svl/source/misc/lockfilecommon.cxx +++ b/svl/source/misc/lockfilecommon.cxx @@ -144,7 +144,7 @@ OUString LockFileCommon::ParseName( const uno::Sequence< sal_Int8 >& aBuffer, sa if ( aBuffer[io_nCurPos] != ',' && aBuffer[io_nCurPos] != ';' && aBuffer[io_nCurPos] != '\\' ) throw io::WrongFormatException(); - aResult.append( static_cast<sal_Char>(aBuffer[io_nCurPos]) ); + aResult.append( static_cast<char>(aBuffer[io_nCurPos]) ); bEscape = false; io_nCurPos++; @@ -156,7 +156,7 @@ OUString LockFileCommon::ParseName( const uno::Sequence< sal_Int8 >& aBuffer, sa if ( aBuffer[io_nCurPos] == '\\' ) bEscape = true; else - aResult.append( static_cast<sal_Char>(aBuffer[io_nCurPos]) ); + aResult.append( static_cast<char>(aBuffer[io_nCurPos]) ); io_nCurPos++; } diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx index 330502a891b8..273df728b784 100644 --- a/svl/source/numbers/zformat.cxx +++ b/svl/source/numbers/zformat.cxx @@ -1459,7 +1459,7 @@ namespace { sal_Unicode toUniChar(sal_uInt8 n) { - sal_Char c; + char c; if (n < 10) { c = '0' + n; diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx index 02947cd3892c..acafd8986f5f 100644 --- a/svl/source/passwordcontainer/passwordcontainer.cxx +++ b/svl/source/passwordcontainer/passwordcontainer.cxx @@ -56,7 +56,7 @@ static OUString createIndex(const std::vector< OUString >& lines) if( i ) aResult.append("__"); OString line = OUStringToOString( lines[i], RTL_TEXTENCODING_UTF8 ); - const sal_Char* pLine = line.getStr(); + const char* pLine = line.getStr(); while( *pLine ) { @@ -83,7 +83,7 @@ static std::vector< OUString > getInfoFromInd( const OUString& aInd ) bool aStart = true; OString line = OUStringToOString( aInd, RTL_TEXTENCODING_ASCII_US ); - const sal_Char* pLine = line.getStr(); + const char* pLine = line.getStr(); do { OUStringBuffer newItem; @@ -508,7 +508,7 @@ OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines result = rtl_cipher_decode ( aEncoder, (sal_uInt8*)aSeq1.getArray(), aSeq1.getLength(), (sal_uInt8*)resSeq1.getArray(), resSeq1.getLength() ); - OUString aPasswd( ( sal_Char* )resSeq1.getArray(), resSeq1.getLength(), RTL_TEXTENCODING_UTF8 ); + OUString aPasswd( ( char* )resSeq1.getArray(), resSeq1.getLength(), RTL_TEXTENCODING_UTF8 ); } */ @@ -1374,7 +1374,7 @@ MasterPasswordRequest_Impl::MasterPasswordRequest_Impl( PasswordRequestMode Mode extern "C" { SAL_DLLPUBLIC_EXPORT void * passwordcontainer_component_getFactory ( - const sal_Char * pImplementationName, + const char * pImplementationName, SAL_UNUSED_PARAMETER void * pServiceManager, SAL_UNUSED_PARAMETER void * /* pRegistryKey */) { diff --git a/svtools/qa/unit/testHtmlWriter.cxx b/svtools/qa/unit/testHtmlWriter.cxx index eec064f050f8..773da64c4891 100644 --- a/svtools/qa/unit/testHtmlWriter.cxx +++ b/svtools/qa/unit/testHtmlWriter.cxx @@ -23,7 +23,7 @@ OString extractFromStream(SvMemoryStream& rStream) rStream.WriteChar('\0'); rStream.Flush(); rStream.Seek(STREAM_SEEK_TO_BEGIN); - return static_cast<const sal_Char*>(rStream.GetData()); + return static_cast<const char*>(rStream.GetData()); } } diff --git a/svtools/source/config/fontsubstconfig.cxx b/svtools/source/config/fontsubstconfig.cxx index 34a11f6147b7..e0fb350d8cba 100644 --- a/svtools/source/config/fontsubstconfig.cxx +++ b/svtools/source/config/fontsubstconfig.cxx @@ -32,13 +32,13 @@ using namespace com::sun::star::uno; using namespace com::sun::star::beans; -const sal_Char cReplacement[] = "Replacement"; -const sal_Char cFontPairs[] = "FontPairs"; +const char cReplacement[] = "Replacement"; +const char cFontPairs[] = "FontPairs"; -const sal_Char cReplaceFont[] = "ReplaceFont"; -const sal_Char cSubstituteFont[]= "SubstituteFont"; -const sal_Char cOnScreenOnly[] = "OnScreenOnly"; -const sal_Char cAlways[] = "Always"; +const char cReplaceFont[] = "ReplaceFont"; +const char cSubstituteFont[]= "SubstituteFont"; +const char cOnScreenOnly[] = "OnScreenOnly"; +const char cAlways[] = "Always"; typedef std::vector<SubstitutionStruct> SubstitutionStructArr; diff --git a/svtools/source/dialogs/addresstemplate.cxx b/svtools/source/dialogs/addresstemplate.cxx index d6f84191fa05..9550e7bc232b 100644 --- a/svtools/source/dialogs/addresstemplate.cxx +++ b/svtools/source/dialogs/addresstemplate.cxx @@ -246,10 +246,10 @@ namespace svt protected: css::uno::Any getProperty(const OUString& _rLocalName) const; - OUString getStringProperty(const sal_Char* _pLocalName) const; + OUString getStringProperty(const char* _pLocalName) const; OUString getStringProperty(const OUString& _rLocalName) const; - void setStringProperty(const sal_Char* _pLocalName, const OUString& _rValue); + void setStringProperty(const char* _pLocalName, const OUString& _rValue); public: AssignmentPersistentData(); @@ -326,7 +326,7 @@ void AssignmentPersistentData::ImplCommit() } - OUString AssignmentPersistentData::getStringProperty(const sal_Char* _pLocalName) const + OUString AssignmentPersistentData::getStringProperty(const char* _pLocalName) const { OUString sReturn; getProperty(OUString::createFromAscii(_pLocalName)) >>= sReturn; @@ -334,7 +334,7 @@ void AssignmentPersistentData::ImplCommit() } - void AssignmentPersistentData::setStringProperty(const sal_Char* _pLocalName, const OUString& _rValue) + void AssignmentPersistentData::setStringProperty(const char* _pLocalName, const OUString& _rValue) { Sequence< OUString > aNames { OUString::createFromAscii(_pLocalName) }; Sequence< Any > aValues(1); diff --git a/svtools/source/dialogs/insdlg.cxx b/svtools/source/dialogs/insdlg.cxx index 75c5fb6e632a..5b387d275626 100644 --- a/svtools/source/dialogs/insdlg.cxx +++ b/svtools/source/dialogs/insdlg.cxx @@ -304,7 +304,7 @@ bool SvPasteObjectHelper::GetEmbeddedName(const TransferableDataHelper& rData, O // the user friendly description string is '\0' terminated. const sal_Unicode* pUserTypeName = reinterpret_cast< sal_Unicode* >( - reinterpret_cast< sal_Char* >( pOleObjDescr ) + + reinterpret_cast< char* >( pOleObjDescr ) + pOleObjDescr->dwFullUserTypeName ); _rName += pUserTypeName; @@ -321,7 +321,7 @@ bool SvPasteObjectHelper::GetEmbeddedName(const TransferableDataHelper& rData, O // the source string is '\0' terminated. const sal_Unicode* pSrcOfCopy = reinterpret_cast< sal_Unicode* >( - reinterpret_cast< sal_Char* >( pOleObjDescr ) + + reinterpret_cast< char* >( pOleObjDescr ) + pOleObjDescr->dwSrcOfCopy ); _rSource += pSrcOfCopy; diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx index 841ff9f1f65c..ce43e2dd9cce 100644 --- a/svtools/source/svhtml/htmlout.cxx +++ b/svtools/source/svhtml/htmlout.cxx @@ -58,10 +58,10 @@ HTMLOutContext::~HTMLOutContext() rtl_destroyUnicodeToTextConverter( m_hConv ); } -static const sal_Char *lcl_svhtml_GetEntityForChar( sal_uInt32 c, +static const char *lcl_svhtml_GetEntityForChar( sal_uInt32 c, rtl_TextEncoding eDestEnc ) { - const sal_Char* pStr = nullptr; + const char* pStr = nullptr; // Note: We currently handle special cases for ISO-8859-2 here simply because // the code was already submitted. But we should also handle other code pages @@ -391,7 +391,7 @@ static const sal_Char *lcl_svhtml_GetEntityForChar( sal_uInt32 c, return pStr; } -static sal_Size lcl_FlushContext(HTMLOutContext& rContext, sal_Char* pBuffer, sal_uInt32 nFlags) +static sal_Size lcl_FlushContext(HTMLOutContext& rContext, char* pBuffer, sal_uInt32 nFlags) { sal_uInt32 nInfo = 0; sal_Size nSrcChars; @@ -411,7 +411,7 @@ static OString lcl_ConvertCharToHTML( sal_uInt32 c, OStringBuffer aDest; DBG_ASSERT( RTL_TEXTENCODING_DONTKNOW != rContext.m_eDestEnc, "wrong destination encoding" ); - const sal_Char *pStr = nullptr; + const char *pStr = nullptr; switch( c ) { case 0xA0: // is a hard blank @@ -433,7 +433,7 @@ static OString lcl_ConvertCharToHTML( sal_uInt32 c, break; } - sal_Char cBuffer[TXTCONV_BUFFER_SIZE]; + char cBuffer[TXTCONV_BUFFER_SIZE]; const sal_uInt32 nFlags = RTL_UNICODETOTEXT_FLAGS_NONSPACING_IGNORE| RTL_UNICODETOTEXT_FLAGS_CONTROL_IGNORE| RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR| @@ -441,7 +441,7 @@ static OString lcl_ConvertCharToHTML( sal_uInt32 c, if( pStr ) { sal_Size nLen = lcl_FlushContext(rContext, cBuffer, nFlags); - sal_Char *pBuffer = cBuffer; + char *pBuffer = cBuffer; while( nLen-- ) aDest.append(*pBuffer++); aDest.append('&').append(pStr).append(';'); @@ -459,7 +459,7 @@ static OString lcl_ConvertCharToHTML( sal_uInt32 c, nFlags, &nInfo, &nSrcChars); if( nLen > 0 && (nInfo & (RTL_UNICODETOTEXT_INFO_ERROR|RTL_UNICODETOTEXT_INFO_DESTBUFFERTOSMALL)) == 0 ) { - sal_Char *pBuffer = cBuffer; + char *pBuffer = cBuffer; while( nLen-- ) aDest.append(*pBuffer++); } @@ -470,7 +470,7 @@ static OString lcl_ConvertCharToHTML( sal_uInt32 c, // entity. // coverity[callee_ptr_arith] - its ok nLen = lcl_FlushContext(rContext, cBuffer, nFlags); - sal_Char *pBuffer = cBuffer; + char *pBuffer = cBuffer; while( nLen-- ) aDest.append(*pBuffer++); @@ -492,13 +492,13 @@ static OString lcl_FlushToAscii( HTMLOutContext& rContext ) { OStringBuffer aDest; - sal_Char cBuffer[TXTCONV_BUFFER_SIZE]; + char cBuffer[TXTCONV_BUFFER_SIZE]; const sal_uInt32 nFlags = RTL_UNICODETOTEXT_FLAGS_NONSPACING_IGNORE| RTL_UNICODETOTEXT_FLAGS_CONTROL_IGNORE| RTL_UNICODETOTEXT_FLAGS_UNDEFINED_ERROR| RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR; sal_Size nLen = lcl_FlushContext(rContext, cBuffer, nFlags); - sal_Char *pBuffer = cBuffer; + char *pBuffer = cBuffer; while( nLen-- ) aDest.append(*pBuffer++); return aDest.makeStringAndClear(); @@ -564,17 +564,17 @@ SvStream& HTMLOutFuncs::FlushToAscii( SvStream& rStream, SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen ) { // out into a stream - sal_Char aNToABuf[] = "0000000000000000"; + char aNToABuf[] = "0000000000000000"; DBG_ASSERT( nLen < sizeof(aNToABuf), "too many places" ); if( nLen>=sizeof(aNToABuf) ) nLen = (sizeof(aNToABuf)-1); // set pointer to end of buffer - sal_Char *pStr = aNToABuf + (sizeof(aNToABuf)-1); + char *pStr = aNToABuf + (sizeof(aNToABuf)-1); for( sal_uInt8 n = 0; n < nLen; ++n ) { - *(--pStr) = static_cast<sal_Char>(nHex & 0xf ) + 48; + *(--pStr) = static_cast<char>(nHex & 0xf ) + 48; if( *pStr > '9' ) *pStr += 39; nHex >>= 4; @@ -610,9 +610,9 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, const OUString& rName, const HTMLOutEvent *pEventTable, bool bOutStarBasic, - const sal_Char *pDelim, - const sal_Char *pIndentArea, - const sal_Char *pIndentMap, + const char *pDelim, + const char *pIndentArea, + const char *pIndentMap, rtl_TextEncoding eDestEnc, OUString *pNonConvertableChars ) { @@ -641,7 +641,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream, if( pObj ) { - const sal_Char *pShape = nullptr; + const char *pShape = nullptr; OString aCoords; switch( pObj->GetType() ) { @@ -917,7 +917,7 @@ SvStream& HTMLOutFuncs::Out_Events( SvStream& rStrm, if( pMacro && pMacro->HasMacro() && ( JAVASCRIPT == pMacro->GetScriptType() || bOutStarBasic )) { - const sal_Char *pStr = STARBASIC == pMacro->GetScriptType() + const char *pStr = STARBASIC == pMacro->GetScriptType() ? pEventTable[i].pBasicName : pEventTable[i].pJavaName; @@ -1027,7 +1027,7 @@ void HtmlWriterHelper::applyEvents(HtmlWriter& rHtmlWriter, const SvxMacroTableD if (pMacro && pMacro->HasMacro() && (JAVASCRIPT == pMacro->GetScriptType() || bOutStarBasic)) { - const sal_Char* pAttributeName = nullptr; + const char* pAttributeName = nullptr; if (STARBASIC == pMacro->GetScriptType()) pAttributeName = pEventTable[i].pBasicName; else diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx index 523ed4fb28e4..6af8a3e73532 100644 --- a/svtools/source/svhtml/parhtml.cxx +++ b/svtools/source/svhtml/parhtml.cxx @@ -441,7 +441,7 @@ HtmlTokenId HTMLParser::ScanText( const sal_Unicode cBreak ) RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT | RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT; - sal_Char cEncodedChar = static_cast<sal_Char>(cChar); + char cEncodedChar = static_cast<char>(cChar); cChar = OUString(&cEncodedChar, 1, eSrcEnc, convertFlags).toChar(); if( 0U == cChar ) { diff --git a/svtools/source/svrtf/parrtf.cxx b/svtools/source/svrtf/parrtf.cxx index 8a83512c06ae..16d3eb7146f4 100644 --- a/svtools/source/svrtf/parrtf.cxx +++ b/svtools/source/svrtf/parrtf.cxx @@ -341,7 +341,7 @@ void SvRTFParser::ScanText() bool bBreak = false; bool bEOF = false; - sal_Char nSlash = '\\'; + char nSlash = '\\'; while (!bBreak) { auto next = GetNextChar(); @@ -358,9 +358,9 @@ void SvRTFParser::ScanText() continue; } - nSlash = static_cast<sal_Char>(next); + nSlash = static_cast<char>(next); while (nSlash == 0xD || nSlash == 0xA) - nSlash = static_cast<sal_Char>(GetNextChar()); + nSlash = static_cast<char>(GetNextChar()); switch (nSlash) { @@ -580,7 +580,7 @@ void SvRTFParser::ReadBitmapData() { SkipGroup(); } SvParserState SvRTFParser::CallParser() { - sal_Char cFirstCh; + char cFirstCh; nNextChPos = rInput.Tell(); rInput.ReadChar( cFirstCh ); nNextCh = static_cast<unsigned char>(cFirstCh); diff --git a/svtools/source/svrtf/rtfout.cxx b/svtools/source/svrtf/rtfout.cxx index bfb3b3c932d5..b06a04eedfa0 100644 --- a/svtools/source/svrtf/rtfout.cxx +++ b/svtools/source/svrtf/rtfout.cxx @@ -28,17 +28,17 @@ namespace { SvStream& Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen ) { - sal_Char aNToABuf[] = "0000000000000000"; + char aNToABuf[] = "0000000000000000"; DBG_ASSERT( nLen < sizeof(aNToABuf), "too many places" ); if( nLen >= sizeof(aNToABuf) ) nLen = (sizeof(aNToABuf)-1); // set pointer to end of buffer - sal_Char* pStr = aNToABuf + (sizeof(aNToABuf)-1); + char* pStr = aNToABuf + (sizeof(aNToABuf)-1); for( sal_uInt8 n = 0; n < nLen; ++n ) { - *(--pStr) = static_cast<sal_Char>(nHex & 0xf ) + 48; + *(--pStr) = static_cast<char>(nHex & 0xf ) + 48; if( *pStr > '9' ) *pStr += 39; nHex >>= 4; @@ -60,7 +60,7 @@ SvStream& Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen ) SvStream& Out_Char(SvStream& rStream, sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc) { - const sal_Char* pStr = nullptr; + const char* pStr = nullptr; switch (c) { case 0x1: diff --git a/svtools/source/svrtf/svparser.cxx b/svtools/source/svrtf/svparser.cxx index a2f41e8e62eb..cafb5b8d38e5 100644 --- a/svtools/source/svrtf/svparser.cxx +++ b/svtools/source/svrtf/svparser.cxx @@ -275,7 +275,7 @@ sal_uInt32 SvParser<T>::GetNextChar() sal_Size nChars = 0; do { - sal_Char c1; // signed, that's the text converter expects + char c1; // signed, that's the text converter expects rInput.ReadChar( c1 ); bErr = !rInput.good(); if( !bErr ) @@ -352,7 +352,7 @@ sal_uInt32 SvParser<T>::GetNextChar() } else { - sal_Char sBuffer[10]; + char sBuffer[10]; sBuffer[0] = c1; sal_uInt16 nLen = 1; while( (nInfo&RTL_TEXTTOUNICODE_INFO_SRCBUFFERTOOSMALL) != 0 && diff --git a/svtools/source/uno/miscservices.cxx b/svtools/source/uno/miscservices.cxx index 89368f922543..e921e55d3dc6 100644 --- a/svtools/source/uno/miscservices.cxx +++ b/svtools/source/uno/miscservices.cxx @@ -57,7 +57,7 @@ extern "C" { SAL_DLLPUBLIC_EXPORT void * svt_component_getFactory( - const sal_Char * pImplementationName, void * _pServiceManager, void * pRegistryKey) + const char * pImplementationName, void * _pServiceManager, void * pRegistryKey) { void * pResult = nullptr; if (_pServiceManager) |