diff options
Diffstat (limited to 'i18npool')
4 files changed, 12 insertions, 13 deletions
diff --git a/i18npool/inc/cclass_unicode.hxx b/i18npool/inc/cclass_unicode.hxx index 4ae4f5fd362e..3cfa1475a063 100644 --- a/i18npool/inc/cclass_unicode.hxx +++ b/i18npool/inc/cclass_unicode.hxx @@ -134,7 +134,6 @@ private: std::unique_ptr<ParserFlags[]> pCont; sal_Int32 nStartTypes; sal_Int32 nContTypes; - ScanState eState; sal_Unicode cGroupSep; sal_Unicode cDecimalSep; sal_Unicode cDecimalSepAlt; @@ -143,10 +142,10 @@ private: static sal_Int32 getParseTokensType(sal_uInt32 c, bool isFirst); /// Access parser table flags. - ParserFlags getFlags(sal_uInt32 c); + ParserFlags getFlags(sal_uInt32 c, ScanState eState); /// Access parser flags via International and special definitions. - ParserFlags getFlagsExtended(sal_uInt32 c) const; + ParserFlags getFlagsExtended(sal_uInt32 c, ScanState eState) const; /// Access parser table flags for user defined start characters. ParserFlags getStartCharsFlags( sal_uInt32 c ); diff --git a/i18npool/source/characterclassification/cclass_unicode.cxx b/i18npool/source/characterclassification/cclass_unicode.cxx index 2eb3fdf5f27d..45f222c60f6f 100644 --- a/i18npool/source/characterclassification/cclass_unicode.cxx +++ b/i18npool/source/characterclassification/cclass_unicode.cxx @@ -43,7 +43,6 @@ cclass_Unicode::cclass_Unicode( const uno::Reference < XComponentContext >& rxCo m_xContext( rxContext ), nStartTypes( 0 ), nContTypes( 0 ), - eState( ssGetChar ), cGroupSep( ',' ), cDecimalSep( '.' ), cDecimalSepAlt( 0 ) diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx index 59f10339b5d3..313e42a0f2fe 100644 --- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx +++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx @@ -557,13 +557,13 @@ void cclass_Unicode::destroyParserTable() } -ParserFlags cclass_Unicode::getFlags(sal_uInt32 const c) +ParserFlags cclass_Unicode::getFlags(sal_uInt32 const c, const cclass_Unicode::ScanState eState) { ParserFlags nMask; if ( c < nDefCnt ) nMask = pTable[ sal_uInt8(c) ]; else - nMask = getFlagsExtended(c); + nMask = getFlagsExtended(c, eState); switch ( eState ) { case ssGetChar : @@ -593,7 +593,7 @@ ParserFlags cclass_Unicode::getFlags(sal_uInt32 const c) } -ParserFlags cclass_Unicode::getFlagsExtended(sal_uInt32 const c) const +ParserFlags cclass_Unicode::getFlagsExtended(sal_uInt32 const c, const cclass_Unicode::ScanState eState) const { if ( c == cGroupSep ) return ParserFlags::VALUE; @@ -702,7 +702,7 @@ ParserFlags cclass_Unicode::getContCharsFlags( sal_Unicode c ) void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 nPos, sal_Int32 nTokenType ) { assert(r.LeadingWhiteSpace == 0); - eState = ssGetChar; + ScanState eState = ssGetChar; //! All the variables below (plus ParseResult) have to be reset on ssRewindFromValue! OUStringBuffer aSymbol; @@ -723,7 +723,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 while ((current != 0) && (eState != ssStop)) { ++nCodePoints; - ParserFlags nMask = getFlags(current); + ParserFlags nMask = getFlags(current, eState); if ( nMask & ParserFlags::EXCLUDED ) eState = ssBounce; if ( bMightBeWord ) @@ -827,7 +827,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 { if (current == cGroupSep) { - if (getFlags(nextChar) & ParserFlags::VALUE_DIGIT) + if (getFlags(nextChar, eState) & ParserFlags::VALUE_DIGIT) nParseTokensType |= KParseTokens::GROUP_SEPARATOR_IN_NUMBER; else { @@ -850,7 +850,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 } else if (current == 'E' || current == 'e') { - ParserFlags nNext = getFlags(nextChar); + ParserFlags nNext = getFlags(nextChar, eState); if ( nNext & ParserFlags::VALUE_EXP ) ; // keep it going else if (bMightBeWord && ((nNext & ParserFlags::WORD) || !nextChar)) @@ -865,7 +865,7 @@ void cclass_Unicode::parseText( ParseResult& r, const OUString& rText, sal_Int32 { if ( (cLast == 'E') || (cLast == 'e') ) { - ParserFlags nNext = getFlags(nextChar); + ParserFlags nNext = getFlags(nextChar, eState); if ( nNext & ParserFlags::VALUE_EXP_VALUE ) ; // keep it going else if (bMightBeWord && ((nNext & ParserFlags::WORD) || !nextChar)) diff --git a/i18npool/source/transliteration/transliteration_body.cxx b/i18npool/source/transliteration/transliteration_body.cxx index e1fc11a8d70a..80072219780c 100644 --- a/i18npool/source/transliteration/transliteration_body.cxx +++ b/i18npool/source/transliteration/transliteration_body.cxx @@ -194,7 +194,8 @@ Transliteration_casemapping::Transliteration_casemapping() void Transliteration_casemapping::setMappingType( const MappingType rMappingType, const Locale& rLocale ) { - nMappingType = rMappingType; + if (nMappingType != rMappingType) + nMappingType = rMappingType; if (aLocale != rLocale) aLocale = rLocale; } |