Kaydet (Commit) e3ec0596 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some more loplugin:cstylecast: i18npool

Change-Id: Idbb928b2898bc6b2b5bfe3bdbfde0b81d68e4473
üst 552efce6
...@@ -171,15 +171,15 @@ void xdictionary::initDictionaryData(const sal_Char *pLang) ...@@ -171,15 +171,15 @@ void xdictionary::initDictionaryData(const sal_Char *pLang)
if( aEntry.mhModule ) { if( aEntry.mhModule ) {
oslGenericFunction func; oslGenericFunction func;
func = osl_getAsciiFunctionSymbol( aEntry.mhModule, "getExistMark" ); 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" ); 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" ); 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" ); 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" ); 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; data = aEntry.maData;
......
...@@ -157,17 +157,17 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: ...@@ -157,17 +157,17 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
OUString funclen_base = func_base + "_length"; OUString funclen_base = func_base + "_length";
if (OUString("TW HK MO").indexOf(rLocale.Country) >= 0) if (OUString("TW HK MO").indexOf(rLocale.Country) >= 0)
{ {
func = (const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, func = reinterpret_cast<const sal_uInt8* (*)()>(osl_getFunctionSymbol(hModule,
OUString(func_base + "TW_" + rAlgorithm).pData); OUString(func_base + "TW_" + rAlgorithm).pData));
funclen = (size_t (*)()) osl_getFunctionSymbol(hModule, funclen = reinterpret_cast<size_t (*)()>(osl_getFunctionSymbol(hModule,
OUString(funclen_base + "TW_" + rAlgorithm).pData); OUString(funclen_base + "TW_" + rAlgorithm).pData));
} }
if (!func) if (!func)
{ {
func = (const sal_uInt8* (*)()) osl_getFunctionSymbol( func = reinterpret_cast<const sal_uInt8* (*)()>(osl_getFunctionSymbol(
hModule, OUString(func_base + rAlgorithm).pData); hModule, OUString(func_base + rAlgorithm).pData));
funclen = (size_t (*)()) osl_getFunctionSymbol( funclen = reinterpret_cast<size_t (*)()>(osl_getFunctionSymbol(
hModule, OUString(funclen_base + rAlgorithm).pData); hModule, OUString(funclen_base + rAlgorithm).pData));
} }
} else { } else {
if ( rLocale.Language == "ja" ) { if ( rLocale.Language == "ja" ) {
...@@ -183,8 +183,8 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang:: ...@@ -183,8 +183,8 @@ Collator_Unicode::loadCollatorAlgorithm(const OUString& rAlgorithm, const lang::
} }
OUString func_base = aBuf.makeStringAndClear(); OUString func_base = aBuf.makeStringAndClear();
OUString funclen_base = func_base + "_length"; OUString funclen_base = func_base + "_length";
func = (const sal_uInt8* (*)()) osl_getFunctionSymbol(hModule, func_base.pData); func = reinterpret_cast<const sal_uInt8* (*)()>(osl_getFunctionSymbol(hModule, func_base.pData));
funclen = (size_t (*)()) osl_getFunctionSymbol(hModule, funclen_base.pData); funclen = reinterpret_cast<size_t (*)()>(osl_getFunctionSymbol(hModule, funclen_base.pData));
} }
} }
#else #else
......
...@@ -87,9 +87,9 @@ IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry, ...@@ -87,9 +87,9 @@ IndexEntrySupplier_asian::getIndexCharacter( const OUString& rIndexEntry,
if (hModule) { if (hModule) {
OUString get("get_indexdata_"); OUString get("get_indexdata_");
if ( rLocale.Language == "zh" && OUString( "TW HK MO" ).indexOf(rLocale.Country) >= 0 ) 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) 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 #else
if ( rLocale.Language == "zh" && OUString( "TW HK MO" ).indexOf(rLocale.Country) >= 0 ) { if ( rLocale.Language == "zh" && OUString( "TW HK MO" ).indexOf(rLocale.Country) >= 0 ) {
...@@ -168,7 +168,7 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry, ...@@ -168,7 +168,7 @@ IndexEntrySupplier_asian::getPhoneticCandidate( const OUString& rIndexEntry,
else if ( rLocale.Language == "ko" ) else if ( rLocale.Language == "ko" )
func_name="get_ko_phonetic"; func_name="get_ko_phonetic";
if (func_name) 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 #else
if ( rLocale.Language == "zh" ) if ( rLocale.Language == "zh" )
......
...@@ -369,7 +369,7 @@ LocaleDataImpl::~LocaleDataImpl() ...@@ -369,7 +369,7 @@ LocaleDataImpl::~LocaleDataImpl()
LocaleDataItem SAL_CALL LocaleDataItem SAL_CALL
LocaleDataImpl::getLocaleItem( const Locale& rLocale ) throw(RuntimeException, std::exception) 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 ) { if ( func ) {
sal_Int16 dataItemCount = 0; sal_Int16 dataItemCount = 0;
...@@ -697,7 +697,7 @@ LocaleDataImpl::getAllCalendars2( const Locale& rLocale ) throw(RuntimeException ...@@ -697,7 +697,7 @@ LocaleDataImpl::getAllCalendars2( const Locale& rLocale ) throw(RuntimeException
sal_Unicode const * const * allCalendars = NULL; 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 ) { if ( func ) {
sal_Int16 calendarsCount = 0; sal_Int16 calendarsCount = 0;
...@@ -756,7 +756,7 @@ LocaleDataImpl::getAllCalendars( const Locale& rLocale ) throw(RuntimeException, ...@@ -756,7 +756,7 @@ LocaleDataImpl::getAllCalendars( const Locale& rLocale ) throw(RuntimeException,
Sequence< Currency2 > SAL_CALL Sequence< Currency2 > SAL_CALL
LocaleDataImpl::getAllCurrencies2( const Locale& rLocale ) throw(RuntimeException, std::exception) 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 ) { if ( func ) {
sal_Int16 currencyCount = 0; sal_Int16 currencyCount = 0;
...@@ -889,7 +889,7 @@ LocaleDataImpl::getAllFormats( const Locale& rLocale ) throw(RuntimeException, s ...@@ -889,7 +889,7 @@ LocaleDataImpl::getAllFormats( const Locale& rLocale ) throw(RuntimeException, s
Sequence< OUString > SAL_CALL Sequence< OUString > SAL_CALL
LocaleDataImpl::getDateAcceptancePatterns( const Locale& rLocale ) throw(RuntimeException, std::exception) 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) if (func)
{ {
...@@ -918,7 +918,7 @@ LocaleDataImpl::getDateAcceptancePatterns( const Locale& rLocale ) throw(Runtime ...@@ -918,7 +918,7 @@ LocaleDataImpl::getDateAcceptancePatterns( const Locale& rLocale ) throw(Runtime
OUString SAL_CALL OUString SAL_CALL
LocaleDataImpl::getCollatorRuleByAlgorithm( const Locale& rLocale, const OUString& algorithm ) throw(RuntimeException) 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 ) { if ( func ) {
sal_Int16 collatorCount = 0; sal_Int16 collatorCount = 0;
sal_Unicode **collatorArray = func(collatorCount); sal_Unicode **collatorArray = func(collatorCount);
...@@ -933,7 +933,7 @@ LocaleDataImpl::getCollatorRuleByAlgorithm( const Locale& rLocale, const OUStrin ...@@ -933,7 +933,7 @@ LocaleDataImpl::getCollatorRuleByAlgorithm( const Locale& rLocale, const OUStrin
Sequence< Implementation > SAL_CALL Sequence< Implementation > SAL_CALL
LocaleDataImpl::getCollatorImplementations( const Locale& rLocale ) throw(RuntimeException, std::exception) 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 ) { if ( func ) {
sal_Int16 collatorCount = 0; sal_Int16 collatorCount = 0;
...@@ -956,7 +956,7 @@ LocaleDataImpl::getCollatorImplementations( const Locale& rLocale ) throw(Runtim ...@@ -956,7 +956,7 @@ LocaleDataImpl::getCollatorImplementations( const Locale& rLocale ) throw(Runtim
Sequence< OUString > SAL_CALL Sequence< OUString > SAL_CALL
LocaleDataImpl::getCollationOptions( const Locale& rLocale ) throw(RuntimeException, std::exception) 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 ) { if ( func ) {
sal_Int16 optionsCount = 0; sal_Int16 optionsCount = 0;
...@@ -976,7 +976,7 @@ LocaleDataImpl::getCollationOptions( const Locale& rLocale ) throw(RuntimeExcept ...@@ -976,7 +976,7 @@ LocaleDataImpl::getCollationOptions( const Locale& rLocale ) throw(RuntimeExcept
Sequence< OUString > SAL_CALL Sequence< OUString > SAL_CALL
LocaleDataImpl::getSearchOptions( const Locale& rLocale ) throw(RuntimeException, std::exception) 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 ) { if ( func ) {
sal_Int16 optionsCount = 0; sal_Int16 optionsCount = 0;
...@@ -996,7 +996,7 @@ LocaleDataImpl::getSearchOptions( const Locale& rLocale ) throw(RuntimeException ...@@ -996,7 +996,7 @@ LocaleDataImpl::getSearchOptions( const Locale& rLocale ) throw(RuntimeException
sal_Unicode ** SAL_CALL sal_Unicode ** SAL_CALL
LocaleDataImpl::getIndexArray(const Locale& rLocale, sal_Int16& indexCount) 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) if (func)
return func(indexCount); return func(indexCount);
...@@ -1090,7 +1090,7 @@ LocaleDataImpl::getIndexModuleByAlgorithm( const Locale& rLocale, const OUString ...@@ -1090,7 +1090,7 @@ LocaleDataImpl::getIndexModuleByAlgorithm( const Locale& rLocale, const OUString
Sequence< UnicodeScript > SAL_CALL Sequence< UnicodeScript > SAL_CALL
LocaleDataImpl::getUnicodeScripts( const Locale& rLocale ) throw(RuntimeException) 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 ) { if ( func ) {
sal_Int16 scriptCount = 0; sal_Int16 scriptCount = 0;
...@@ -1110,7 +1110,7 @@ LocaleDataImpl::getUnicodeScripts( const Locale& rLocale ) throw(RuntimeExceptio ...@@ -1110,7 +1110,7 @@ LocaleDataImpl::getUnicodeScripts( const Locale& rLocale ) throw(RuntimeExceptio
Sequence< OUString > SAL_CALL Sequence< OUString > SAL_CALL
LocaleDataImpl::getFollowPageWords( const Locale& rLocale ) throw(RuntimeException) 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 ) { if ( func ) {
sal_Int16 wordCount = 0; sal_Int16 wordCount = 0;
...@@ -1130,7 +1130,7 @@ LocaleDataImpl::getFollowPageWords( const Locale& rLocale ) throw(RuntimeExcepti ...@@ -1130,7 +1130,7 @@ LocaleDataImpl::getFollowPageWords( const Locale& rLocale ) throw(RuntimeExcepti
Sequence< OUString > SAL_CALL Sequence< OUString > SAL_CALL
LocaleDataImpl::getTransliterations( const Locale& rLocale ) throw(RuntimeException, std::exception) 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 ) { if ( func ) {
sal_Int16 transliterationsCount = 0; sal_Int16 transliterationsCount = 0;
...@@ -1155,7 +1155,7 @@ LocaleDataImpl::getTransliterations( const Locale& rLocale ) throw(RuntimeExcept ...@@ -1155,7 +1155,7 @@ LocaleDataImpl::getTransliterations( const Locale& rLocale ) throw(RuntimeExcept
LanguageCountryInfo SAL_CALL LanguageCountryInfo SAL_CALL
LocaleDataImpl::getLanguageCountryInfo( const Locale& rLocale ) throw(RuntimeException, std::exception) 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 ) { if ( func ) {
sal_Int16 LCInfoCount = 0; sal_Int16 LCInfoCount = 0;
...@@ -1178,7 +1178,7 @@ LocaleDataImpl::getLanguageCountryInfo( const Locale& rLocale ) throw(RuntimeExc ...@@ -1178,7 +1178,7 @@ LocaleDataImpl::getLanguageCountryInfo( const Locale& rLocale ) throw(RuntimeExc
ForbiddenCharacters SAL_CALL ForbiddenCharacters SAL_CALL
LocaleDataImpl::getForbiddenCharacters( const Locale& rLocale ) throw(RuntimeException, std::exception) 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 ) { if ( func ) {
sal_Int16 LCForbiddenCharactersCount = 0; sal_Int16 LCForbiddenCharactersCount = 0;
...@@ -1195,7 +1195,7 @@ LocaleDataImpl::getForbiddenCharacters( const Locale& rLocale ) throw(RuntimeExc ...@@ -1195,7 +1195,7 @@ LocaleDataImpl::getForbiddenCharacters( const Locale& rLocale ) throw(RuntimeExc
OUString SAL_CALL OUString SAL_CALL
LocaleDataImpl::getHangingCharacters( const Locale& rLocale ) throw(RuntimeException) 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 ) { if ( func ) {
sal_Int16 LCForbiddenCharactersCount = 0; sal_Int16 LCForbiddenCharactersCount = 0;
...@@ -1209,7 +1209,7 @@ LocaleDataImpl::getHangingCharacters( const Locale& rLocale ) throw(RuntimeExcep ...@@ -1209,7 +1209,7 @@ LocaleDataImpl::getHangingCharacters( const Locale& rLocale ) throw(RuntimeExcep
Sequence< OUString > SAL_CALL Sequence< OUString > SAL_CALL
LocaleDataImpl::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeException) 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 ) { if ( func ) {
sal_Int16 LCBreakIteratorRuleCount = 0; sal_Int16 LCBreakIteratorRuleCount = 0;
...@@ -1231,7 +1231,7 @@ LocaleDataImpl::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeExc ...@@ -1231,7 +1231,7 @@ LocaleDataImpl::getBreakIteratorRules( const Locale& rLocale ) throw(RuntimeExc
Sequence< OUString > SAL_CALL Sequence< OUString > SAL_CALL
LocaleDataImpl::getReservedWord( const Locale& rLocale ) throw(RuntimeException, std::exception) 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 ) { if ( func ) {
sal_Int16 LCReservedWordsCount = 0; sal_Int16 LCReservedWordsCount = 0;
...@@ -1254,7 +1254,7 @@ Sequence< Sequence<beans::PropertyValue> > SAL_CALL ...@@ -1254,7 +1254,7 @@ Sequence< Sequence<beans::PropertyValue> > SAL_CALL
LocaleDataImpl::getContinuousNumberingLevels( const lang::Locale& rLocale ) throw(RuntimeException) LocaleDataImpl::getContinuousNumberingLevels( const lang::Locale& rLocale ) throw(RuntimeException)
{ {
// load symbol // load symbol
MyFunc_Type2 func = (MyFunc_Type2) getFunctionSymbol( rLocale, "getContinuousNumberingLevels" ); MyFunc_Type2 func = reinterpret_cast<MyFunc_Type2>(getFunctionSymbol( rLocale, "getContinuousNumberingLevels" ));
if ( func ) if ( func )
{ {
...@@ -1366,7 +1366,7 @@ Sequence< Reference<container::XIndexAccess> > SAL_CALL ...@@ -1366,7 +1366,7 @@ Sequence< Reference<container::XIndexAccess> > SAL_CALL
LocaleDataImpl::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(RuntimeException) LocaleDataImpl::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(RuntimeException)
{ {
// load symbol // load symbol
MyFunc_Type3 func = (MyFunc_Type3) getFunctionSymbol( rLocale, "getOutlineNumberingLevels" ); MyFunc_Type3 func = reinterpret_cast<MyFunc_Type3>(getFunctionSymbol( rLocale, "getOutlineNumberingLevels" ));
if ( func ) if ( func )
{ {
......
...@@ -314,8 +314,8 @@ static OUString SAL_CALL NativeToAscii(const OUString& inStr, ...@@ -314,8 +314,8 @@ static OUString SAL_CALL NativeToAscii(const OUString& inStr,
sal_Int32 i; sal_Int32 i;
OUString numberChar, multiplierChar, decimalChar, minusChar, separatorChar; OUString numberChar, multiplierChar, decimalChar, minusChar, separatorChar;
numberChar = OUString((sal_Unicode*)NumberChar, 10*NumberChar_Count); numberChar = OUString(NumberChar[0], 10*NumberChar_Count);
multiplierChar = OUString((sal_Unicode*) MultiplierChar_7_CJK, ExponentCount_7_CJK*Multiplier_Count); multiplierChar = OUString(MultiplierChar_7_CJK[0], ExponentCount_7_CJK*Multiplier_Count);
decimalChar = OUString(DecimalChar, NumberChar_Count); decimalChar = OUString(DecimalChar, NumberChar_Count);
minusChar = OUString(MinusChar, NumberChar_Count); minusChar = OUString(MinusChar, NumberChar_Count);
separatorChar = OUString(SeparatorChar, NumberChar_Count); separatorChar = OUString(SeparatorChar, NumberChar_Count);
......
...@@ -129,11 +129,11 @@ TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos ...@@ -129,11 +129,11 @@ TextConversion_ko::getCharConversions(const OUString& aText, sal_Int32 nStartPos
sal_Unicode ch; sal_Unicode ch;
Sequence< OUString > output; Sequence< OUString > output;
#ifndef DISABLE_DYNLOADING #ifndef DISABLE_DYNLOADING
const sal_Unicode* (*getHangul2HanjaData)() = (const sal_Unicode* (*)())getFunctionBySymbol("getHangul2HanjaData"); const sal_Unicode* (*getHangul2HanjaData)() = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getHangul2HanjaData"));
const Hangul_Index* (*getHangul2HanjaIndex)() = (const Hangul_Index* (*)()) getFunctionBySymbol("getHangul2HanjaIndex"); const Hangul_Index* (*getHangul2HanjaIndex)() = reinterpret_cast<const Hangul_Index* (*)()>(getFunctionBySymbol("getHangul2HanjaIndex"));
sal_Int16 (*getHangul2HanjaIndexCount)() = (sal_Int16 (*)()) getFunctionBySymbol("getHangul2HanjaIndexCount"); sal_Int16 (*getHangul2HanjaIndexCount)() = reinterpret_cast<sal_Int16 (*)()>(getFunctionBySymbol("getHangul2HanjaIndexCount"));
const sal_uInt16* (*getHanja2HangulIndex)() = (const sal_uInt16* (*)()) getFunctionBySymbol("getHanja2HangulIndex"); const sal_uInt16* (*getHanja2HangulIndex)() = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getHanja2HangulIndex"));
const sal_Unicode* (*getHanja2HangulData)() = (const sal_Unicode* (*)()) getFunctionBySymbol("getHanja2HangulData"); const sal_Unicode* (*getHanja2HangulData)() = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getHanja2HangulData"));
#else #else
#pragma GCC diagnostic push #pragma GCC diagnostic push
#ifdef __clang__ #ifdef __clang__
......
...@@ -84,14 +84,14 @@ TextConversion_zh::getCharConversion(const OUString& aText, sal_Int32 nStartPos, ...@@ -84,14 +84,14 @@ TextConversion_zh::getCharConversion(const OUString& aText, sal_Int32 nStartPos,
#ifndef DISABLE_DYNLOADING #ifndef DISABLE_DYNLOADING
if (toSChinese) { if (toSChinese) {
Data = ((const sal_Unicode* (*)())getFunctionBySymbol("getSTC_CharData_T2S"))(); Data = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_T2S"))();
Index = ((const sal_uInt16* (*)())getFunctionBySymbol("getSTC_CharIndex_T2S"))(); Index = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_T2S"))();
} else if (nConversionOptions & TextConversionOption::USE_CHARACTER_VARIANTS) { } else if (nConversionOptions & TextConversionOption::USE_CHARACTER_VARIANTS) {
Data = ((const sal_Unicode* (*)())getFunctionBySymbol("getSTC_CharData_S2V"))(); Data = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_S2V"))();
Index = ((const sal_uInt16* (*)())getFunctionBySymbol("getSTC_CharIndex_S2V"))(); Index = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_S2V"))();
} else { } else {
Data = ((const sal_Unicode* (*)())getFunctionBySymbol("getSTC_CharData_S2T"))(); Data = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_S2T"))();
Index = ((const sal_uInt16* (*)())getFunctionBySymbol("getSTC_CharIndex_S2T"))(); Index = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_S2T"))();
} }
#else #else
if (toSChinese) { if (toSChinese) {
...@@ -125,21 +125,21 @@ TextConversion_zh::getWordConversion(const OUString& aText, sal_Int32 nStartPos, ...@@ -125,21 +125,21 @@ TextConversion_zh::getWordConversion(const OUString& aText, sal_Int32 nStartPos,
bool one2one=true; bool one2one=true;
#ifndef DISABLE_DYNLOADING #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) { if (toSChinese) {
index = ((const sal_uInt16* (*)(sal_Int32&)) getFunctionBySymbol("getSTC_WordIndex_T2S"))(maxLen); index = reinterpret_cast<const sal_uInt16* (*)(sal_Int32&)>(getFunctionBySymbol("getSTC_WordIndex_T2S"))(maxLen);
entry = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_WordEntry_T2S"))(); entry = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_WordEntry_T2S"))();
charData = ((const sal_Unicode* (*)()) getFunctionBySymbol("getSTC_CharData_T2S"))(); charData = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_T2S"))();
charIndex = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_CharIndex_T2S"))(); charIndex = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_T2S"))();
} else { } else {
index = ((const sal_uInt16* (*)(sal_Int32&)) getFunctionBySymbol("getSTC_WordIndex_S2T"))(maxLen); index = reinterpret_cast<const sal_uInt16* (*)(sal_Int32&)>(getFunctionBySymbol("getSTC_WordIndex_S2T"))(maxLen);
entry = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_WordEntry_S2T"))(); entry = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_WordEntry_S2T"))();
if (nConversionOptions & TextConversionOption::USE_CHARACTER_VARIANTS) { if (nConversionOptions & TextConversionOption::USE_CHARACTER_VARIANTS) {
charData = ((const sal_Unicode* (*)()) getFunctionBySymbol("getSTC_CharData_S2V"))(); charData = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_S2V"))();
charIndex = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_CharIndex_S2V"))(); charIndex = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_S2V"))();
} else { } else {
charData = ((const sal_Unicode* (*)()) getFunctionBySymbol("getSTC_CharData_S2T"))(); charData = reinterpret_cast<const sal_Unicode* (*)()>(getFunctionBySymbol("getSTC_CharData_S2T"))();
charIndex = ((const sal_uInt16* (*)()) getFunctionBySymbol("getSTC_CharIndex_S2T"))(); charIndex = reinterpret_cast<const sal_uInt16* (*)()>(getFunctionBySymbol("getSTC_CharIndex_S2T"))();
} }
} }
#else #else
......
...@@ -163,7 +163,7 @@ TextToPronounce_zh::TextToPronounce_zh(const sal_Char* func_name) ...@@ -163,7 +163,7 @@ TextToPronounce_zh::TextToPronounce_zh(const sal_Char* func_name)
&thisModule, lib.pData, SAL_LOADMODULE_DEFAULT ); &thisModule, lib.pData, SAL_LOADMODULE_DEFAULT );
idx=NULL; idx=NULL;
if (hModule) { 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) if (function)
idx=function(); idx=function();
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment