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
9eb39ccf
Kaydet (Commit)
9eb39ccf
authored
Agu 23, 2013
tarafından
László Németh
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#68373 allow "*word" pattern matching
Change-Id: I13682f3886451838e522b259dbb2d686bff1437b
üst
19cb39f0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
9 deletions
+16
-9
svxacorr.cxx
editeng/source/misc/svxacorr.cxx
+16
-9
No files found.
editeng/source/misc/svxacorr.cxx
Dosyayı görüntüle @
9eb39ccf
...
...
@@ -2710,20 +2710,29 @@ const SvxAutocorrWord* SvxAutocorrWordList::WordMatches(const SvxAutocorrWord *p
xub_StrLen
nEndPos
)
const
{
const
String
&
rChk
=
pFnd
->
GetShort
();
if
(
nEndPos
>=
rChk
.
Len
()
)
xub_StrLen
left_wildcard
=
(
rChk
.
GetChar
(
0
)
==
C_ASTERISK
)
?
1
:
0
;
// "*word" pattern?
xub_StrLen
nSttWdPos
=
nEndPos
;
bool
bWasWordDelim
=
false
;
if
(
nEndPos
>=
rChk
.
Len
()
-
left_wildcard
)
{
xub_StrLen
nCalcStt
=
nEndPos
-
rChk
.
Len
();
if
(
(
!
nCalcStt
||
nCalcStt
==
rStt
||
xub_StrLen
nCalcStt
=
nEndPos
-
rChk
.
Len
()
+
left_wildcard
;
if
(
(
!
nCalcStt
||
nCalcStt
==
rStt
||
left_wildcard
||
(
nCalcStt
<
rStt
&&
IsWordDelim
(
rTxt
.
GetChar
(
nCalcStt
-
1
)
)))
)
{
TransliterationWrapper
&
rCmp
=
GetIgnoreTranslWrapper
();
OUString
sWord
(
rTxt
.
GetBuffer
()
+
nCalcStt
,
rChk
.
Len
());
if
(
rCmp
.
isEqual
(
rChk
,
sWord
))
OUString
sWord
(
rTxt
.
GetBuffer
()
+
nCalcStt
,
rChk
.
Len
()
-
left_wildcard
);
if
(
(
!
left_wildcard
&&
rCmp
.
isEqual
(
rChk
,
sWord
))
||
(
left_wildcard
&&
rCmp
.
isEqual
(
rChk
.
Copy
(
1
),
sWord
)
))
{
rStt
=
nCalcStt
;
return
pFnd
;
if
(
!
left_wildcard
)
return
pFnd
;
// get the first word delimiter position before the matching "*word" pattern
while
(
rStt
&&
!
(
bWasWordDelim
=
IsWordDelim
(
rTxt
.
GetChar
(
--
rStt
))))
;
if
(
bWasWordDelim
)
rStt
++
;
SvxAutocorrWord
*
pNew
=
new
SvxAutocorrWord
(
OUString
(
rTxt
.
GetBuffer
()
+
rStt
,
nEndPos
-
rStt
),
OUString
(
rTxt
.
GetBuffer
()
+
rStt
,
nEndPos
-
rStt
-
rChk
.
Len
()
+
1
)
+
OUString
(
pFnd
->
GetLong
()));
if
(
Insert
(
pNew
)
)
return
pNew
;
else
delete
pNew
;
}
}
// match "word*" patterns, eg. "i18n*"
...
...
@@ -2731,8 +2740,6 @@ const SvxAutocorrWord* SvxAutocorrWordList::WordMatches(const SvxAutocorrWord *p
{
String
sTmp
(
rChk
.
Copy
(
0
,
rChk
.
Len
()
-
1
)
);
// Get the last word delimiter position
xub_StrLen
nSttWdPos
=
nEndPos
;
bool
bWasWordDelim
=
false
;
bool
not_suffix
;
while
(
nSttWdPos
&&
!
(
bWasWordDelim
=
IsWordDelim
(
rTxt
.
GetChar
(
--
nSttWdPos
))))
;
...
...
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