diff options
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/characterclassification/cclass_unicode_parser.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx | 15 | ||||
-rw-r--r-- | i18npool/source/isolang/inwnt.cxx | 4 | ||||
-rw-r--r-- | i18npool/source/isolang/mslangid.cxx | 2 | ||||
-rw-r--r-- | i18npool/source/localedata/localedata.cxx | 11 | ||||
-rw-r--r-- | i18npool/source/search/makefile.mk | 6 | ||||
-rw-r--r-- | i18npool/source/search/textsearch.cxx | 1 | ||||
-rw-r--r-- | i18npool/source/textconversion/genconv_dict.cxx | 12 |
8 files changed, 22 insertions, 31 deletions
diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx index 27d6443a27fc..39e925cb7eb9 100644 --- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx +++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx @@ -1038,7 +1038,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 if ( !xNatNumSup.is() ) { throw RuntimeException( OUString( -#ifndef PRODUCT +#ifdef DBG_UTIL RTL_CONSTASCII_USTRINGPARAM( "cclass_Unicode::parseText: can't instanciate " NATIVENUMBERSUPPLIER_SERVICENAME ) diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx index 9126162d6f36..91d856b19e62 100644 --- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx +++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx @@ -39,11 +39,6 @@ #include <stdio.h> #include <string.h> -#if OSL_DEBUG_LEVEL == 0 && !defined(NDEBUG) -#define NDEBUG -#endif -#include <assert.h> - // Cyrillic upper case #define C_CYR_A "\xD0\x90" #define C_CYR_B "\xD0\x91" @@ -277,7 +272,7 @@ const char* expected_name( int i, int last ) else if( i==1 ) return "NumberingType"; else if( i==2 ) return "Suffix"; else if( i==last ) return "Value"; - else { assert(0); return ""; } + else { OSL_ASSERT(0); return ""; } } static const char* expected_type( int i, int last ) @@ -287,7 +282,7 @@ const char* expected_type( int i, int last ) else if( i==1 ) return "sal_Int16"; else if( i==2 ) return "OUString"; else if( i==last ) return "sal_Int32"; - else { assert(0); return ""; } + else { OSL_ASSERT(0); return ""; } } static void failedToConvert( int i, int last ) @@ -461,7 +456,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal return OUString::createFromAscii(""); // ignore prefix and suffix case PAGE_DESCRIPTOR: case BITMAP: - assert(0); + OSL_ASSERT(0); throw IllegalArgumentException(); case CHARS_UPPER_LETTER_N: lcl_formatChars1( upperLetter, 26, number-1, result ); // 1=>A, 2=>B, ..., 26=>Z, 27=>AA, 28=>BB, ... @@ -480,7 +475,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal } catch (Exception& ) { // When translteration property is missing, return default number (bug #101141#) result += OUString::valueOf( number ); - // assert(0); + // OSL_ASSERT(0); // throw IllegalArgumentException(); } break; @@ -674,7 +669,7 @@ DefaultNumberingProvider::makeNumberingString( const Sequence<beans::PropertyVal break; default: - assert(0); + OSL_ASSERT(0); throw IllegalArgumentException(); } diff --git a/i18npool/source/isolang/inwnt.cxx b/i18npool/source/isolang/inwnt.cxx index 7d5e4d3216e7..2550eb3acd10 100644 --- a/i18npool/source/isolang/inwnt.cxx +++ b/i18npool/source/isolang/inwnt.cxx @@ -104,11 +104,7 @@ LanguageType MsLangId::getPlatformSystemUILanguage() { // TODO: this could be distinguished, #if(WINVER >= 0x0500) // needs _run_ time differentiation though, not at compile time. -#if 0 getPlatformSystemLanguageImpl( nImplSystemUILanguage, &GetUserDefaultUILanguage, &GetSystemDefaultUILanguage); -#endif - getPlatformSystemLanguageImpl( nImplSystemUILanguage, - &GetUserDefaultLangID, &GetSystemDefaultLangID); return nImplSystemUILanguage; } diff --git a/i18npool/source/isolang/mslangid.cxx b/i18npool/source/isolang/mslangid.cxx index 3476341fbc79..aab92d717429 100644 --- a/i18npool/source/isolang/mslangid.cxx +++ b/i18npool/source/isolang/mslangid.cxx @@ -154,7 +154,7 @@ LanguageType MsLangId::resolveSystemLanguageByScriptType( LanguageType nLang, sa if (nConfiguredAsianFallback == LANGUAGE_SYSTEM) nLang = LANGUAGE_CHINESE_SIMPLIFIED; else - nLang = nConfiguredComplexFallback; + nLang = nConfiguredAsianFallback; break; case ::com::sun::star::i18n::ScriptType::COMPLEX: if (nConfiguredComplexFallback == LANGUAGE_SYSTEM) diff --git a/i18npool/source/localedata/localedata.cxx b/i18npool/source/localedata/localedata.cxx index 083fbc548c8c..e119e71ec14c 100644 --- a/i18npool/source/localedata/localedata.cxx +++ b/i18npool/source/localedata/localedata.cxx @@ -38,13 +38,6 @@ #include <stdio.h> #include "rtl/instance.hxx" -#if OSL_DEBUG_LEVEL == 0 -# ifndef NDEBUG -# define NDEBUG -# endif -#endif -#include <assert.h> - using namespace com::sun::star::i18n; using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -1136,7 +1129,7 @@ LocaleData::getContinuousNumberingLevels( const lang::Locale& rLocale ) throw(Ru rVal.Value <<= (sal_Int16) sVal.toInt32(); break; default: - assert(0); + OSL_ASSERT(0); } } } @@ -1260,7 +1253,7 @@ LocaleData::getOutlineNumberingLevels( const lang::Locale& rLocale ) throw(Runti case 10: level[j].sTransliteration = tmp; break; case 11: level[j].nNatNum = tmp.toInt32(); break; default: - assert(0); + OSL_ASSERT(0); } } } diff --git a/i18npool/source/search/makefile.mk b/i18npool/source/search/makefile.mk index 1b48919624f6..2e81ec3f1d53 100644 --- a/i18npool/source/search/makefile.mk +++ b/i18npool/source/search/makefile.mk @@ -50,6 +50,12 @@ SLOFILES= \ $(EXCEPTIONSFILES) \ $(SLO)$/levdis.obj +# on unxsoli, no optimization for textsearch because of i105945 +.IF "$(OS)$(COM)$(CPUNAME)"=="SOLARISC52INTEL" +EXCEPTIONSNOOPTFILES= \ + $(SLO)$/textsearch.obj +.ENDIF + SHL1TARGET= $(TARGET) SHL1OBJS= $(SLOFILES) diff --git a/i18npool/source/search/textsearch.cxx b/i18npool/source/search/textsearch.cxx index 96f033f4e4e3..2518a6cb0481 100644 --- a/i18npool/source/search/textsearch.cxx +++ b/i18npool/source/search/textsearch.cxx @@ -562,6 +562,7 @@ sal_Int32 TextSearch::GetDiff( const sal_Unicode cChr ) const } +// TextSearch::NSrchFrwrd is mis-optimized on unxsoli (#i105945#) SearchResult TextSearch::NSrchFrwrd( const OUString& searchStr, sal_Int32 startPos, sal_Int32 endPos ) throw(RuntimeException) { diff --git a/i18npool/source/textconversion/genconv_dict.cxx b/i18npool/source/textconversion/genconv_dict.cxx index 23a264603df9..a49bf3031bbc 100644 --- a/i18npool/source/textconversion/genconv_dict.cxx +++ b/i18npool/source/textconversion/genconv_dict.cxx @@ -39,6 +39,8 @@ #include <rtl/strbuf.hxx> #include <rtl/ustring.hxx> +#include <vector> + using namespace ::rtl; void make_hhc_char(FILE *sfp, FILE *cfp); @@ -357,8 +359,8 @@ void make_stc_word(FILE *sfp, FILE *cfp) { sal_Int32 count, i, length; sal_Unicode STC_WordData[0x10000]; - Index *STC_WordEntry_S2T = (Index*) malloc(0x10000 * sizeof(Index)); - Index *STC_WordEntry_T2S = (Index*) malloc(0x10000 * sizeof(Index)); + std::vector<Index> STC_WordEntry_S2T(0x10000); + std::vector<Index> STC_WordEntry_T2S(0x10000); sal_Int32 count_S2T = 0, count_T2S = 0; sal_Int32 line = 0, char_total = 0; sal_Char Cstr[1024]; @@ -416,7 +418,7 @@ void make_stc_word(FILE *sfp, FILE *cfp) sal_uInt16 STC_WordIndex[0x100]; if (count_S2T > 0) { - qsort(STC_WordEntry_S2T, count_S2T, sizeof(Index), Index_comp); + qsort(&STC_WordEntry_S2T[0], count_S2T, sizeof(Index), Index_comp); fprintf(cfp, "\nstatic const sal_uInt16 STC_WordEntry_S2T[] = {"); count = 0; @@ -449,7 +451,7 @@ void make_stc_word(FILE *sfp, FILE *cfp) } if (count_T2S > 0) { - qsort(STC_WordEntry_T2S, count_T2S, sizeof(Index), Index_comp); + qsort(&STC_WordEntry_T2S[0], count_T2S, sizeof(Index), Index_comp); fprintf(cfp, "\nstatic const sal_uInt16 STC_WordEntry_T2S[] = {"); count = 0; @@ -480,7 +482,5 @@ void make_stc_word(FILE *sfp, FILE *cfp) fprintf (cfp, "\tconst sal_uInt16* getSTC_WordEntry_T2S() { return NULL; }\n"); fprintf (cfp, "\tconst sal_uInt16* getSTC_WordIndex_T2S(sal_Int32& count) { count = 0; return NULL; }\n"); } - free(STC_WordEntry_S2T); - free(STC_WordEntry_T2S); } |