Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
core
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
LibreOffice
core
Commits
475d0c59
Kaydet (Commit)
475d0c59
authored
Şub 14, 2012
tarafından
Caolán McNamara
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
use icu's breakiterator for Thai, not our customized generic rules
üst
fad63878
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
test_breakiterator.cxx
i18npool/qa/cppunit/test_breakiterator.cxx
+3
-2
breakiterator_unicode.cxx
i18npool/source/breakiterator/breakiterator_unicode.cxx
+5
-2
No files found.
i18npool/qa/cppunit/test_breakiterator.cxx
Dosyayı görüntüle @
475d0c59
...
...
@@ -70,7 +70,7 @@ public:
CPPUNIT_TEST
(
testGraphemeIteration
);
CPPUNIT_TEST
(
testWeak
);
CPPUNIT_TEST
(
testAsian
);
//
CPPUNIT_TEST(testThai);
CPPUNIT_TEST
(
testThai
);
CPPUNIT_TEST_SUITE_END
();
private
:
...
...
@@ -264,13 +264,13 @@ void TestBreakIterator::testThai()
{
const
sal_Unicode
THAI1
[]
=
{
0x0E01
,
0x0E38
,
0x0E2B
,
0x0E25
,
0x0E32
,
0x0E1A
};
::
rtl
::
OUString
aTest
(
THAI1
,
SAL_N_ELEMENTS
(
THAI1
));
aBounds
=
m_xBreak
->
getWordBoundary
(
aTest
,
0
,
aLocale
,
i18n
::
WordType
::
DICTIONARY_WORD
,
true
);
CPPUNIT_ASSERT_MESSAGE
(
"Should skip full word"
,
aBounds
.
startPos
==
0
&&
aBounds
.
endPos
==
aTest
.
getLength
());
}
#ifdef TODO
{
const
sal_Unicode
NORTHERN_THAI1
[]
=
{
0x0E01
,
0x0E38
,
0x0E4A
,
0x0E2B
,
0x0E25
,
0x0E32
,
0x0E1A
};
::
rtl
::
OUString
aTest
(
NORTHERN_THAI1
,
SAL_N_ELEMENTS
(
NORTHERN_THAI1
));
...
...
@@ -279,6 +279,7 @@ void TestBreakIterator::testThai()
CPPUNIT_ASSERT_MESSAGE
(
"Should skip full word"
,
aBounds
.
startPos
==
0
&&
aBounds
.
endPos
==
aTest
.
getLength
());
}
#endif
}
TestBreakIterator
::
TestBreakIterator
()
...
...
i18npool/source/breakiterator/breakiterator_unicode.cxx
Dosyayı görüntüle @
475d0c59
...
...
@@ -129,10 +129,13 @@ void SAL_CALL BreakIterator_Unicode::loadICUBreakIterator(const com::sun::star::
OOoRuleBasedBreakIterator
*
rbi
=
NULL
;
if
(
breakRules
.
getLength
()
>
breakType
&&
!
breakRules
[
breakType
].
isEmpty
())
{
if
(
breakRules
.
getLength
()
>
breakType
&&
!
breakRules
[
breakType
].
isEmpty
())
{
rbi
=
new
OOoRuleBasedBreakIterator
(
udata_open
(
"OpenOffice"
,
"brk"
,
OUStringToOString
(
breakRules
[
breakType
],
RTL_TEXTENCODING_ASCII_US
).
getStr
(),
&
status
),
status
);
}
else
{
}
else
if
(
!
rLocale
.
Language
.
equalsAsciiL
(
RTL_CONSTASCII_STRINGPARAM
(
"th"
)))
//use icu's breakiterator for Thai
{
status
=
U_ZERO_ERROR
;
OStringBuffer
aUDName
(
64
);
aUDName
.
append
(
rule
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment