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 /svl | |
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>
Diffstat (limited to 'svl')
-rw-r--r-- | svl/qa/unit/lockfiles/test_lockfiles.cxx | 2 | ||||
-rw-r--r-- | svl/source/crypto/cryptosign.cxx | 6 | ||||
-rw-r--r-- | svl/source/fsstor/fsfactory.cxx | 2 | ||||
-rw-r--r-- | svl/source/misc/PasswordHelper.cxx | 18 | ||||
-rw-r--r-- | svl/source/misc/inettype.cxx | 6 | ||||
-rw-r--r-- | svl/source/misc/lngmisc.cxx | 2 | ||||
-rw-r--r-- | svl/source/misc/lockfilecommon.cxx | 4 | ||||
-rw-r--r-- | svl/source/numbers/zformat.cxx | 2 | ||||
-rw-r--r-- | svl/source/passwordcontainer/passwordcontainer.cxx | 8 |
9 files changed, 25 insertions, 25 deletions
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 */) { |