tdf#162514 i18npool: fix Hungarian ordinal numbers with affix
Restores Hungarian break iterator by recognizing ordinal numbers with affixes, e.g. "50.-et" etc. (to spell checking bad forms, like "50.-at"). Regression from commit44699b3de3"tdf#49885 BreakIterator rule upgrades". Follow-up to commitf4fe6df6aa"tdf#162514 i18npool: Handle abbreviations in dictionary breakiterator" and commit167bbe31c0"tdf#162514 i18npool: apply fix for Hungarian abbreviations, too". Change-Id: I6b6ea363a509a9d8af8330330f78cc23c210d107 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/196225 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
@@ -1844,7 +1844,7 @@ void TestBreakIterator::testDictWordAbbreviationHU()
|
||||
|
||||
for (const auto& rLocale : aLocale)
|
||||
{
|
||||
auto aTest = u"Pl. stb. dr.-ral Mo.-gal"_ustr;
|
||||
auto aTest = u"Pl. stb. dr.-ral Mo.-gal 50-et 50.-et"_ustr;
|
||||
|
||||
i18n::Boundary aBounds
|
||||
= m_xBreak->getWordBoundary(aTest, 1, rLocale, i18n::WordType::DICTIONARY_WORD, false);
|
||||
@@ -1865,6 +1865,16 @@ void TestBreakIterator::testDictWordAbbreviationHU()
|
||||
= m_xBreak->getWordBoundary(aTest, 17, rLocale, i18n::WordType::DICTIONARY_WORD, false);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(17), aBounds.startPos);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(24), aBounds.endPos);
|
||||
|
||||
aBounds
|
||||
= m_xBreak->getWordBoundary(aTest, 25, rLocale, i18n::WordType::DICTIONARY_WORD, false);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(25), aBounds.startPos);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(30), aBounds.endPos);
|
||||
|
||||
aBounds
|
||||
= m_xBreak->getWordBoundary(aTest, 31, rLocale, i18n::WordType::DICTIONARY_WORD, false);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(31), aBounds.startPos);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(37), aBounds.endPos);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -168,7 +168,7 @@ $Ideographic $ExFm* {400}; #
|
||||
### tdf#162514: For spell checking, abbreviations may end with a period.
|
||||
|
||||
# ($ALetterPlus | $Hebrew_Letter) $ExFm* ($ALetterPlus | $Hebrew_Letter);
|
||||
($ALetterPlus | $Hebrew_Letter) $ExFm* ($ALetterPlus | $Hebrew_Letter) ($PostPeriod)?;
|
||||
($ALetterPlus | $Hebrew_Letter | $Numeric) $ExFm* ($ALetterPlus | $Hebrew_Letter) ($PostPeriod)?;
|
||||
|
||||
### END CUSTOMIZATION
|
||||
|
||||
@@ -178,7 +178,7 @@ $Ideographic $ExFm* {400}; #
|
||||
### tdf#162514: For spell checking, abbreviations may end with a period.
|
||||
|
||||
# ($ALetterPlus | $Hebrew_Letter) $ExFm* ($MidLetter | $MidNumLet | $Single_Quote) $ExFm* ($ALetterPlus | $Hebrew_Letter) {200};
|
||||
($ALetterPlus | $Hebrew_Letter) $ExFm* ($MidLetter | $MidNumLet | $Single_Quote) $ExFm* ($ALetterPlus | $Hebrew_Letter) ($PostPeriod)? {200};
|
||||
($ALetterPlus | $Hebrew_Letter | $Numeric) $ExFm* ($MidLetter | $MidNumLet | $Single_Quote) $ExFm* ($ALetterPlus | $Hebrew_Letter) ($PostPeriod)? {200};
|
||||
|
||||
### END CUSTOMIZATION
|
||||
|
||||
|
||||
Reference in New Issue
Block a user