summaryrefslogtreecommitdiff
path: root/i18npool/source
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-01-17 18:47:52 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-01-20 09:06:48 +0100
commite3ec05960a12d3598fefce8bb2e1c04457de90b6 (patch)
treee5bb1f5ba1f3d6f37462f5420251db96bcbcb44b /i18npool/source
parent552efce640f31130d8e598b1381038b565c81584 (diff)
Some more loplugin:cstylecast: i18npool
Change-Id: Idbb928b2898bc6b2b5bfe3bdbfde0b81d68e4473
Diffstat (limited to 'i18npool/source')
-rw-r--r--i18npool/source/breakiterator/xdictionary.cxx10
-rw-r--r--i18npool/source/collator/collator_unicode.cxx20
-rw-r--r--i18npool/source/indexentry/indexentrysupplier_asian.cxx6
-rw-r--r--i18npool/source/localedata/localedata.cxx38
-rw-r--r--i18npool/source/nativenumber/nativenumbersupplier.cxx4
-rw-r--r--i18npool/source/textconversion/textconversion_ko.cxx10
-rw-r--r--i18npool/source/textconversion/textconversion_zh.cxx34
-rw-r--r--i18npool/source/transliteration/textToPronounce_zh.cxx2
8 files changed, 62 insertions, 62 deletions
diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 6f7c1968fea0..965b9b071775 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -171,15 +171,15 @@ void xdictionary::initDictionaryData(const sal_Char *pLang)
if( aEntry.mhModule ) {
oslGenericFunction func;
func = osl_getAsciiFunctionSymbol( aEntry.mhModule, "getExistMark" );
- aEntry.maData.existMark = ((sal_uInt8 const * (*)()) func)();
+ aEntry.maData.existMark = reinterpret_cast<sal_uInt8 const * (*)()>(func)();
func = osl_getAsciiFunctionSymbol( aEntry.mhModule, "getIndex1" );
- aEntry.maData.index1 = ((sal_Int16 const * (*)()) func)();
+ aEntry.maData.index1 = reinterpret_cast<sal_Int16 const * (*)()>(func)();
func = osl_getAsciiFunctionSymbol( aEntry.mhModule, "getIndex2" );
- aEntry.maData.index2 = ((sal_Int32 const * (*)()) func)();
+ aEntry.maData.index2 = reinterpret_cast<sal_Int32 const * (*)()>(func)();
func = osl_getAsciiFunctionSymbol( aEntry.mhModule, "getLenArray" );
- aEntry.maData.lenArray = ((sal_Int32 const * (*)()) func)();
+ aEntry.maData.lenArray = reinterpret_cast<sal_Int32 const * (*)()>(func)();
func = osl_getAsciiFunctionSymbol( aEntry.mhModule, "getDataArea" );
- aEntry.maData.dataArea = ((sal_Unicode const * (*)()) func)();
+ aEntry.maData.dataArea = reinterpret_cast<sal_Unicode const * (*)()>(func)();
}
data = aEntry.maData;
diff --git a/i18npool/source/collator/collator_unicode.cxx b/i18npool/source/collator/collator_unicode.cxx
index 457f266e4985..ef425738832a 100644
--- a/i18npool/source/collator/collator_unicode.cxx
+++ b/i18npool/source/collator/collator_unicode.cxx
@@ -157,17 +157,17 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
OUString funclen_base = func_base + "_length";
if (OUString("TW HK MO").indexOf(rLocale.Country) >= 0)
{
- func = (const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule,
- OUString(func_base + "TW_" + rAlgorithm).pData);
- funclen = (size_t (*)()) osl_getFunctionSymbol(hModule,
- OUString(funclen_base + "TW_" + rAlgorithm).pData);
+ func = reinterpret_cast<const sal_uInt8* (*)()>(osl_getFunctionSymbol(hModule,
+ OUString(func_base + "TW_" + rAlgorithm).pData));
+ funclen = reinterpret_cast<size_t (*)()>(osl_getFunctionSymbol(hModule,
+ OUString(funclen_base + "TW_" + rAlgorithm).pData));
}
if (!func)
{
- func = (const sal_uInt8* (*)()) osl_getFunctionSymbol(
- hModule, OUString(func_base + rAlgorithm).pData);
- funclen = (size_t (*)()) osl_getFunctionSymbol(
- hModule, OUString(funclen_base + rAlgorithm).pData);
+ func = reinterpret_cast<const sal_uInt8* (*)()>(osl_getFunctionSymbol(
+ hModule, OUString(func_base + rAlgorithm).pData));
+ funclen = reinterpret_cast<size_t (*)()>(osl_getFunctionSymbol(
+ hModule, OUString(funclen_base + rAlgorithm).pData));
}
} else {
if ( rLocale.Language == "ja" ) {
@@ -183,8 +183,8 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
}
OUString func_base = aBuf.makeStringAndClear();
OUString funclen_base = func_base + "_length";
- func = (const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, func_base.pData);
- funclen = (size_t (*)()) osl_getFunctionSymbol(hModule, funclen_base.pData);
+ func = reinterpret_cast<const sal_uInt8* (*)()>(osl_getFunctionSymbol(hModule, func_base.pData));
+ funclen = reinterpret_cast<size_t (*)()>(osl_getFunctionSymbol(hModule, funclen_base.pData));
}
}
#else
diff --git a/i18npool/source/indexentry/indexentrysupplier_asian.cxx b/i18npool/source/indexentry/indexentrysupplier_asian.cxx
index 4cb4d7e3c353..a41e8cb56a08 100644
--- a/i18npool/source/indexentry/indexentrysupplier_asian.cxx
+++ b/i18npool/source/indexentry/indexentrysupplier_asian.cxx
@@ -87,9 +87,9 @@ IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry,
if (hModule) {
OUString get("get_indexdata_");
if ( rLocale.Language == "zh" && OUString( "TW HK MO" ).indexOf(rLocale.Country) >= 0 )
- func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString(get+rLocale.Language+"_TW_"+rAlgorithm).pData);
+ func=reinterpret_cast<sal_uInt16** (*)(sal_Int16*)>(osl_getFunctionSymbol(hModule, OUString(get+rLocale.Language+"_TW_"+rAlgorithm).pData));
if (!func)
- func=(sal_uInt16** (*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString(get+rLocale.Language+"_"+rAlgorithm).pData);
+ func=reinterpret_cast<sal_uInt16** (*)(sal_Int16*)>(osl_getFunctionSymbol(hModule, OUString(get+rLocale.Language+"_"+rAlgorithm).pData));
}
#else
if ( rLocale.Language == "zh" && OUString( "TW HK MO" ).indexOf(rLocale.Country) >= 0 ) {
@@ -168,7 +168,7 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry,
else if ( rLocale.Language == "ko" )
func_name="get_ko_phonetic";
if (func_name)
- func=(sal_uInt16 **(*)(sal_Int16*))osl_getFunctionSymbol(hModule, OUString::createFromAscii(func_name).pData);
+ func=reinterpret_cast<sal_uInt16 **(*)(sal_Int16*)>(osl_getFunctionSymbol(hModule, OUString::createFromAscii(func_name).pData));
}
#else
if ( rLocale.Language == "zh" )
diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx
index 2953207a2e8b..a9ce49073526 100644
--- a/i18npool/source/localedata/localedata.cxx
+++ b/i18npool/source/localedata/localedata.cxx
@@ -369,7 +369,7 @@ LocaleDataImpl::~LocaleDataImpl()
LocaleDataItem SAL_CALL
LocaleDataImpl::getLocaleItem( const Locale& rLocale ) throw(RuntimeException, std::exception)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getLocaleItem" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getLocaleItem" ));
if ( func ) {
sal_Int16 dataItemCount = 0;
@@ -697,7 +697,7 @@ LocaleDataImpl::getAllCalendars2( const Locale& rLocale ) throw(RuntimeException
sal_Unicode const * const * allCalendars = NULL;
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getAllCalendars" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getAllCalendars" ));
if ( func ) {
sal_Int16 calendarsCount = 0;
@@ -756,7 +756,7 @@ LocaleDataImpl::getAllCalendars( const Locale& rLocale ) throw(RuntimeException,
Sequence< Currency2 > SAL_CALL
LocaleDataImpl::getAllCurrencies2( const Locale& rLocale ) throw(RuntimeException, std::exception)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getAllCurrencies" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getAllCurrencies" ));
if ( func ) {
sal_Int16 currencyCount = 0;
@@ -889,7 +889,7 @@ LocaleDataImpl::getAllFormats( const Locale& rLocale ) throw(RuntimeException, s
Sequence< OUString > SAL_CALL
LocaleDataImpl::getDateAcceptancePatterns( const Locale& rLocale ) throw(RuntimeException, std::exception)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getDateAcceptancePatterns" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getDateAcceptancePatterns" ));
if (func)
{
@@ -918,7 +918,7 @@ LocaleDataImpl::getDateAcceptancePatterns( const Locale& rLocale ) throw(Runtime
OUString SAL_CALL
LocaleDataImpl::getCollatorRuleByAlgorithm( const Locale& rLocale, const OUString& algorithm ) throw(RuntimeException)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getCollatorImplementation" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getCollatorImplementation" ));
if ( func ) {
sal_Int16 collatorCount = 0;
sal_Unicode **collatorArray = func(collatorCount);
@@ -933,7 +933,7 @@ LocaleDataImpl::getCollatorRuleByAlgorithm( const Locale& rLocale, const OUStrin
Sequence< Implementation > SAL_CALL
LocaleDataImpl::getCollatorImplementations( const Locale& rLocale ) throw(RuntimeException, std::exception)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getCollatorImplementation" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getCollatorImplementation" ));
if ( func ) {
sal_Int16 collatorCount = 0;
@@ -956,7 +956,7 @@ LocaleDataImpl::getCollatorImplementations( const Locale& rLocale ) throw(Runtim
Sequence< OUString > SAL_CALL
LocaleDataImpl::getCollationOptions( const Locale& rLocale ) throw(RuntimeException, std::exception)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getCollationOptions" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getCollationOptions" ));
if ( func ) {
sal_Int16 optionsCount = 0;
@@ -976,7 +976,7 @@ LocaleDataImpl::getCollationOptions( const Locale& rLocale ) throw(RuntimeExcept
Sequence< OUString > SAL_CALL
LocaleDataImpl::getSearchOptions( const Locale& rLocale ) throw(RuntimeException, std::exception)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getSearchOptions" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getSearchOptions" ));
if ( func ) {
sal_Int16 optionsCount = 0;
@@ -996,7 +996,7 @@ LocaleDataImpl::getSearchOptions( const Locale& rLocale ) throw(RuntimeException
sal_Unicode ** SAL_CALL
LocaleDataImpl::getIndexArray(const Locale& rLocale, sal_Int16& indexCount)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getIndexAlgorithm" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getIndexAlgorithm" ));
if (func)
return func(indexCount);
@@ -1090,7 +1090,7 @@ LocaleDataImpl::getIndexModuleByAlgorithm( const Locale& rLocale, const OUString
Sequence< UnicodeScript > SAL_CALL
LocaleDataImpl::getUnicodeScripts( const Locale& rLocale ) throw(RuntimeException)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getUnicodeScripts" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getUnicodeScripts" ));
if ( func ) {
sal_Int16 scriptCount = 0;
@@ -1110,7 +1110,7 @@ LocaleDataImpl::getUnicodeScripts( const Locale& rLocale ) throw(RuntimeExceptio
Sequence< OUString > SAL_CALL
LocaleDataImpl::getFollowPageWords( const Locale& rLocale ) throw(RuntimeException)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getFollowPageWords" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getFollowPageWords" ));
if ( func ) {
sal_Int16 wordCount = 0;
@@ -1130,7 +1130,7 @@ LocaleDataImpl::getFollowPageWords( const Locale& rLocale ) throw(RuntimeExcepti
Sequence< OUString > SAL_CALL
LocaleDataImpl::getTransliterations( const Locale& rLocale ) throw(RuntimeException, std::exception)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getTransliterations" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getTransliterations" ));
if ( func ) {
sal_Int16 transliterationsCount = 0;
@@ -1155,7 +1155,7 @@ LocaleDataImpl::getTransliterations( const Locale& rLocale ) throw(RuntimeExcept
LanguageCountryInfo SAL_CALL
LocaleDataImpl::getLanguageCountryInfo( const Locale& rLocale ) throw(RuntimeException, std::exception)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getLCInfo" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getLCInfo" ));
if ( func ) {
sal_Int16 LCInfoCount = 0;
@@ -1178,7 +1178,7 @@ LocaleDataImpl::getLanguageCountryInfo( const Locale& rLocale ) throw(RuntimeExc
ForbiddenCharacters SAL_CALL
LocaleDataImpl::getForbiddenCharacters( const Locale& rLocale ) throw(RuntimeException, std::exception)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getForbiddenCharacters" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getForbiddenCharacters" ));
if ( func ) {
sal_Int16 LCForbiddenCharactersCount = 0;
@@ -1195,7 +1195,7 @@ LocaleDataImpl::getForbiddenCharacters( const Locale& rLocale ) throw(RuntimeExc
OUString SAL_CALL
LocaleDataImpl::getHangingCharacters( const Locale& rLocale ) throw(RuntimeException)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getForbiddenCharacters" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getForbiddenCharacters" ));
if ( func ) {
sal_Int16 LCForbiddenCharactersCount = 0;
@@ -1209,7 +1209,7 @@ LocaleDataImpl::getHangingCharacters( const Locale& rLocale ) throw(RuntimeExcep
Sequence< OUString > SAL_CALL
LocaleDataImpl::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeException)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getBreakIteratorRules" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getBreakIteratorRules" ));
if ( func ) {
sal_Int16 LCBreakIteratorRuleCount = 0;
@@ -1231,7 +1231,7 @@ LocaleDataImpl::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeExc
Sequence< OUString > SAL_CALL
LocaleDataImpl::getReservedWord( const Locale& rLocale ) throw(RuntimeException, std::exception)
{
- MyFunc_Type func = (MyFunc_Type) getFunctionSymbol( rLocale, "getReservedWords" );
+ MyFunc_Type func = reinterpret_cast<MyFunc_Type>(getFunctionSymbol( rLocale, "getReservedWords" ));
if ( func ) {
sal_Int16 LCReservedWordsCount = 0;
@@ -1254,7 +1254,7 @@ Sequence< Sequence<beans::PropertyValue> > SAL_CALL
LocaleDataImpl::getContinuousNumberingLevels( const lang::Locale& rLocale ) throw(RuntimeException)
{
// load symbol
- MyFunc_Type2 func = (MyFunc_Type2) getFunctionSymbol( rLocale, "getContinuousNumberingLevels" );
+ MyFunc_Type2 func = reinterpret_cast<MyFunc_Type2>(getFunctionSymbol( rLocale, "getContinuousNumberingLevels" ));
if ( func )
{
@@ -1366,7 +1366,7 @@ Sequence< Reference<container::XIndexAccess> > SAL_CALL
LocaleDataImpl::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(RuntimeException)
{
// load symbol
- MyFunc_Type3 func = (MyFunc_Type3) getFunctionSymbol( rLocale, "getOutlineNumberingLevels" );
+ MyFunc_Type3 func = reinterpret_cast<MyFunc_Type3>(getFunctionSymbol( rLocale, "getOutlineNumberingLevels" ));
if ( func )
{
diff --git a/i18npool/source/nativenumber/nativenumbersupplier.cxx b/i18npool/source/nativenumber/nativenumbersupplier.cxx
index 720644588ded..1fb6953c559d 100644
--- a/i18npool/source/nativenumber/nativenumbersupplier.cxx
+++ b/i18npool/source/nativenumber/nativenumbersupplier.cxx
@@ -314,8 +314,8 @@ static OUString SAL_CALL NativeToAscii(const OUString& inStr,
sal_Int32 i;
OUString numberChar, multiplierChar, decimalChar, minusChar, separatorChar;
- numberChar = OUString((sal_Unicode*)NumberChar, 10*NumberChar_Count);
- multiplierChar = OUString((sal_Unicode*) MultiplierChar_7_CJK, ExponentCount_7_CJK*Multiplier_Count);
+ numberChar = OUString(NumberChar[0], 10*NumberChar_Count);
+ multiplierChar = OUString(MultiplierChar_7_CJK[0], ExponentCount_7_CJK*Multiplier_Count);
decimalChar = OUString(DecimalChar, NumberChar_Count);
minusChar = OUString(MinusChar, NumberChar_Count);
separatorChar = OUString(SeparatorChar, NumberChar_Count);
diff --git a/i18npool/source/textconversion/textconversion_ko.cxx b/i18npool/source/textconversion/textconversion_ko.cxx
index 02dc72e9d307..b80ec0205ca1 100644
--- a/i18npool/source/textconversion/textconversion_ko.cxx
+++ b/i18npool/source/textconversion/textconversion_ko.cxx
@@ -129,11 +129,11 @@ TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos
sal_Unicode ch;
Sequence< OUString > output;
#ifndef DISABLE_DYNLOADING
- const sal_Unicode* (*getHangul2HanjaData)() = (const sal_Unicode* (*)())getFunctionBySymbol("getHangul2HanjaData");
- const Hangul_Index* (*getHangul2HanjaIndex)() = (const Hangul_Index* (*)()) getFunctionBySymbol("getHangul2HanjaIndex");
- sal_Int16 (*getHangul2HanjaIndexCount)() = (sal_Int16 (*)()) getFunctionBySymbol("getHangul2HanjaIndexCount");
- const sal_uInt16* (*getHanja2HangulIndex)() = (const sal_uInt16* (*)()) getFunctionBySymbol("getHanja2HangulIndex");
- const sal_Unicode* (*getHanja2HangulData)() = (const sal_Unicode* (*)()) getFunctionBySymbol("getHanja2HangulData");
+ const sal_Unicode* (*getHangul2HanjaData)() = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getHangul2HanjaData"));
+ const Hangul_Index* (*getHangul2HanjaIndex)() = reinterpret_cast<const Hangul_Index* (*)()>(getFunctionBySymbol("getHangul2HanjaIndex"));
+ sal_Int16 (*getHangul2HanjaIndexCount)() = reinterpret_cast<sal_Int16 (*)()>(getFunctionBySymbol("getHangul2HanjaIndexCount"));
+ const sal_uInt16* (*getHanja2HangulIndex)() = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getHanja2HangulIndex"));
+ const sal_Unicode* (*getHanja2HangulData)() = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getHanja2HangulData"));
#else
#pragma GCC diagnostic push
#ifdef __clang__
diff --git a/i18npool/source/textconversion/textconversion_zh.cxx b/i18npool/source/textconversion/textconversion_zh.cxx
index 89f652ca7418..ea60ba017e74 100644
--- a/i18npool/source/textconversion/textconversion_zh.cxx
+++ b/i18npool/source/textconversion/textconversion_zh.cxx
@@ -84,14 +84,14 @@ TextConversion_zh::getCharConversion(const OUString& aText, sal_Int32 nStartPos,
#ifndef DISABLE_DYNLOADING
if (toSChinese) {
- Data = ((const sal_Unicode* (*)())getFunctionBySymbol("getSTC_CharData_T2S"))();
- Index = ((const sal_uInt16* (*)())getFunctionBySymbol("getSTC_CharIndex_T2S"))();
+ Data = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_T2S"))();
+ Index = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_T2S"))();
} else if (nConversionOptions & TextConversionOption::USE_CHARACTER_VARIANTS) {
- Data = ((const sal_Unicode* (*)())getFunctionBySymbol("getSTC_CharData_S2V"))();
- Index = ((const sal_uInt16* (*)())getFunctionBySymbol("getSTC_CharIndex_S2V"))();
+ Data = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_S2V"))();
+ Index = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_S2V"))();
} else {
- Data = ((const sal_Unicode* (*)())getFunctionBySymbol("getSTC_CharData_S2T"))();
- Index = ((const sal_uInt16* (*)())getFunctionBySymbol("getSTC_CharIndex_S2T"))();
+ Data = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_S2T"))();
+ Index = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_S2T"))();
}
#else
if (toSChinese) {
@@ -125,21 +125,21 @@ TextConversion_zh::getWordConversion(const OUString& aText, sal_Int32 nStartPos,
bool one2one=true;
#ifndef DISABLE_DYNLOADING
- const sal_Unicode *wordData = ((const sal_Unicode* (*)(sal_Int32&)) getFunctionBySymbol("getSTC_WordData"))(dictLen);
+ const sal_Unicode *wordData = reinterpret_cast<const sal_Unicode* (*)(sal_Int32&)>(getFunctionBySymbol("getSTC_WordData"))(dictLen);
if (toSChinese) {
- index = ((const sal_uInt16* (*)(sal_Int32&)) getFunctionBySymbol("getSTC_WordIndex_T2S"))(maxLen);
- entry = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_WordEntry_T2S"))();
- charData = ((const sal_Unicode* (*)()) getFunctionBySymbol("getSTC_CharData_T2S"))();
- charIndex = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_CharIndex_T2S"))();
+ index = reinterpret_cast<const sal_uInt16* (*)(sal_Int32&)>(getFunctionBySymbol("getSTC_WordIndex_T2S"))(maxLen);
+ entry = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_WordEntry_T2S"))();
+ charData = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_T2S"))();
+ charIndex = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_T2S"))();
} else {
- index = ((const sal_uInt16* (*)(sal_Int32&)) getFunctionBySymbol("getSTC_WordIndex_S2T"))(maxLen);
- entry = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_WordEntry_S2T"))();
+ index = reinterpret_cast<const sal_uInt16* (*)(sal_Int32&)>(getFunctionBySymbol("getSTC_WordIndex_S2T"))(maxLen);
+ entry = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_WordEntry_S2T"))();
if (nConversionOptions & TextConversionOption::USE_CHARACTER_VARIANTS) {
- charData = ((const sal_Unicode* (*)()) getFunctionBySymbol("getSTC_CharData_S2V"))();
- charIndex = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_CharIndex_S2V"))();
+ charData = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_S2V"))();
+ charIndex = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_S2V"))();
} else {
- charData = ((const sal_Unicode* (*)()) getFunctionBySymbol("getSTC_CharData_S2T"))();
- charIndex = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_CharIndex_S2T"))();
+ charData = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_S2T"))();
+ charIndex = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_S2T"))();
}
}
#else
diff --git a/i18npool/source/transliteration/textToPronounce_zh.cxx b/i18npool/source/transliteration/textToPronounce_zh.cxx
index 5f96eb987153..1fe87a2810ea 100644
--- a/i18npool/source/transliteration/textToPronounce_zh.cxx
+++ b/i18npool/source/transliteration/textToPronounce_zh.cxx
@@ -163,7 +163,7 @@ TextToPronounce_zh::TextToPronounce_zh(const sal_Char* func_name)
&thisModule, lib.pData, SAL_LOADMODULE_DEFAULT );
idx=NULL;
if (hModule) {
- sal_uInt16** (*function)() = (sal_uInt16** (*)()) osl_getFunctionSymbol(hModule, OUString::createFromAscii(func_name).pData);
+ sal_uInt16** (*function)() = reinterpret_cast<sal_uInt16** (*)()>(osl_getFunctionSymbol(hModule, OUString::createFromAscii(func_name).pData));
if (function)
idx=function();
}