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
98029f16
Kaydet (Commit)
98029f16
authored
Şub 08, 2013
tarafından
László Németh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#60427, fdo#59337: spell words with ZWNJ/ZWJ, f-lig. (only 8-bit dic.)
Change-Id: Ie8ac76373f4f4a456cdfb7f1a77ce640a5595d10
üst
d9d2b0b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
3 deletions
+34
-3
sspellimp.cxx
lingucomponent/source/spellcheck/spell/sspellimp.cxx
+34
-3
No files found.
lingucomponent/source/spellcheck/spell/sspellimp.cxx
Dosyayı görüntüle @
98029f16
...
@@ -274,13 +274,23 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
...
@@ -274,13 +274,23 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
OUStringBuffer
rBuf
(
rWord
);
OUStringBuffer
rBuf
(
rWord
);
sal_Int32
n
=
rBuf
.
getLength
();
sal_Int32
n
=
rBuf
.
getLength
();
sal_Unicode
c
;
sal_Unicode
c
;
sal_Int32
extrachar
=
0
;
for
(
sal_Int32
ix
=
0
;
ix
<
n
;
ix
++
)
for
(
sal_Int32
ix
=
0
;
ix
<
n
;
ix
++
)
{
{
c
=
rBuf
[
ix
];
c
=
rBuf
[
ix
];
if
((
c
==
0x201C
)
||
(
c
==
0x201D
))
if
((
c
==
0x201C
)
||
(
c
==
0x201D
))
rBuf
[
ix
]
=
(
sal_Unicode
)
0x0022
;
rBuf
[
ix
]
=
(
sal_Unicode
)
0x0022
;
if
((
c
==
0x2018
)
||
(
c
==
0x2019
))
else
if
((
c
==
0x2018
)
||
(
c
==
0x2019
))
rBuf
[
ix
]
=
(
sal_Unicode
)
0x0027
;
rBuf
[
ix
]
=
(
sal_Unicode
)
0x0027
;
// recognize words with Unicode ligatures and ZWNJ/ZWJ characters (only
// with 8-bit encoded dictionaries. For UTF-8 encoded dictionaries
// set ICONV and IGNORE aff file options, if needed.)
else
if
((
c
==
0x200C
)
||
(
c
==
0x200D
)
||
((
c
>=
0xFB00
)
&&
(
c
<=
0xFB04
)))
extrachar
=
1
;
}
}
OUString
nWord
(
rBuf
.
makeStringAndClear
());
OUString
nWord
(
rBuf
.
makeStringAndClear
());
...
@@ -334,10 +344,31 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
...
@@ -334,10 +344,31 @@ sal_Int16 SpellChecker::GetSpellFailure( const OUString &rWord, const Locale &rL
OString
aWrd
(
OU2ENC
(
nWord
,
eEnc
));
OString
aWrd
(
OU2ENC
(
nWord
,
eEnc
));
int
rVal
=
pMS
->
spell
((
char
*
)
aWrd
.
getStr
());
int
rVal
=
pMS
->
spell
((
char
*
)
aWrd
.
getStr
());
if
(
rVal
!=
1
)
if
(
rVal
!=
1
)
{
if
(
extrachar
&&
(
eEnc
!=
RTL_TEXTENCODING_UTF8
))
{
OUStringBuffer
mBuf
(
nWord
);
n
=
mBuf
.
getLength
();
for
(
sal_Int32
ix
=
n
-
1
;
ix
>=
0
;
ix
--
)
{
switch
(
mBuf
[
ix
])
{
case
0xFB00
:
mBuf
.
remove
(
ix
,
1
);
mBuf
.
insert
(
ix
,
"ff"
);
break
;
case
0xFB01
:
mBuf
.
remove
(
ix
,
1
);
mBuf
.
insert
(
ix
,
"fi"
);
break
;
case
0xFB02
:
mBuf
.
remove
(
ix
,
1
);
mBuf
.
insert
(
ix
,
"fl"
);
break
;
case
0xFB03
:
mBuf
.
remove
(
ix
,
1
);
mBuf
.
insert
(
ix
,
"ffi"
);
break
;
case
0xFB04
:
mBuf
.
remove
(
ix
,
1
);
mBuf
.
insert
(
ix
,
"ffl"
);
break
;
case
0x200C
:
case
0x200D
:
mBuf
.
remove
(
ix
,
1
);
break
;
}
}
OUString
mWord
(
mBuf
.
makeStringAndClear
());
OString
bWrd
(
OU2ENC
(
mWord
,
eEnc
));
rVal
=
pMS
->
spell
((
char
*
)
bWrd
.
getStr
());
if
(
rVal
==
1
)
return
-
1
;
}
nRes
=
SpellFailure
::
SPELLING_ERROR
;
nRes
=
SpellFailure
::
SPELLING_ERROR
;
else
}
else
{
return
-
1
;
return
-
1
;
}
pMS
=
NULL
;
pMS
=
NULL
;
}
}
}
}
...
...
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