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
49341001
Kaydet (Commit)
49341001
authored
Şub 10, 2014
tarafından
Kohei Yoshida
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
fdo#46707: Don't bother with synonyms for text with mixed script types.
Change-Id: I7922905523406d05f864b10e1ecfd27f3fb5f9d6
üst
863f1bfc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
outlvw.cxx
editeng/source/outliner/outlvw.cxx
+26
-0
No files found.
editeng/source/outliner/outlvw.cxx
Dosyayı görüntüle @
49341001
...
...
@@ -29,6 +29,7 @@
#include <editeng/fhgtitem.hxx>
#include <svl/style.hxx>
#include <svl/languageoptions.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <editeng/outliner.hxx>
...
...
@@ -1446,6 +1447,27 @@ Selection OutlinerView::GetSurroundingTextSelection() const
// ===== some code for thesaurus sub menu within context menu
// ======================================================================
namespace
{
bool
isSingleScriptType
(
sal_uInt16
nScriptType
)
{
sal_uInt8
nScriptCount
=
0
;
if
(
nScriptType
&
SCRIPTTYPE_LATIN
)
++
nScriptCount
;
if
(
nScriptType
&
SCRIPTTYPE_ASIAN
)
++
nScriptCount
;
if
(
nScriptType
&
SCRIPTTYPE_COMPLEX
)
++
nScriptCount
;
if
(
!
nScriptCount
||
nScriptCount
>
1
)
return
false
;
return
true
;
}
}
// returns: true if a word for thesaurus look-up was found at the current cursor position.
// The status string will be word + iso language string (e.g. "light#en-US")
bool
EDITENG_DLLPUBLIC
GetStatusValueForThesaurusFromContext
(
...
...
@@ -1461,6 +1483,10 @@ bool EDITENG_DLLPUBLIC GetStatusValueForThesaurusFromContext(
aTextSel
=
pEditEngine
->
GetWord
(
aTextSel
,
i18n
::
WordType
::
DICTIONARY_WORD
);
aText
=
pEditEngine
->
GetText
(
aTextSel
);
aTextSel
.
Adjust
();
if
(
!
isSingleScriptType
(
pEditEngine
->
GetScriptType
(
aTextSel
)))
return
false
;
LanguageType
nLang
=
pEditEngine
->
GetLanguage
(
aTextSel
.
nStartPara
,
aTextSel
.
nStartPos
);
OUString
aLangText
(
LanguageTag
::
convertToBcp47
(
nLang
)
);
...
...
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