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
8b9ec421
Kaydet (Commit)
8b9ec421
authored
Eki 17, 2016
tarafından
Khaled Hosny
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix debug build and few cleanups
Change-Id: I805962667c3ef2dcaf07a0acebeacca74c74892a
üst
970db619
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
22 deletions
+20
-22
CommonSalLayout.hxx
vcl/inc/CommonSalLayout.hxx
+4
-4
CommonSalLayout.cxx
vcl/source/gdi/CommonSalLayout.cxx
+16
-18
No files found.
vcl/inc/CommonSalLayout.hxx
Dosyayı görüntüle @
8b9ec421
...
...
@@ -50,9 +50,10 @@ class CommonSalLayout : public GenericSalLayout
#else
ServerFont
&
mrServerFont
;
#endif
OString
mLang
;
hb_feature_t
*
mpFeatures
;
unsigned
int
mnFeats
;
void
ParseFeatures
(
const
OUString
&
name
);
OString
msLanguage
;
std
::
vector
<
hb_feature_t
>
maFeatures
;
public
:
#if defined(_WIN32)
...
...
@@ -66,7 +67,6 @@ public:
const
ServerFont
&
getFontData
()
const
{
return
mrServerFont
;
};
#endif
void
ParseFeatures
(
OUString
name
);
void
SetNeedFallback
(
ImplLayoutArgs
&
,
sal_Int32
,
bool
);
void
AdjustLayout
(
ImplLayoutArgs
&
)
override
;
bool
LayoutText
(
ImplLayoutArgs
&
)
override
;
...
...
vcl/source/gdi/CommonSalLayout.cxx
Dosyayı görüntüle @
8b9ec421
...
...
@@ -126,18 +126,16 @@ static hb_unicode_funcs_t* getUnicodeFuncs()
}
#endif
void
CommonSalLayout
::
ParseFeatures
(
OUString
name
)
void
CommonSalLayout
::
ParseFeatures
(
const
OUString
&
name
)
{
mnFeats
=
0
;
mpFeatures
=
0
;
mLang
=
OString
(
""
);
int
nFeatures
=
0
;
int
nStart
=
name
.
indexOf
(
':'
);
if
(
nStart
<
0
)
return
;
OString
oName
=
OUStringToOString
(
name
,
RTL_TEXTENCODING_ASCII_US
);
for
(
int
nNext
=
nStart
;
nNext
>
0
;
nNext
=
name
.
indexOf
(
'&'
,
nNext
+
1
))
{
if
(
name
.
match
(
"lang="
,
nNext
+
1
))
if
(
name
.
match
(
"lang="
,
nNext
+
1
))
{
int
endamp
=
name
.
indexOf
(
'&'
,
nNext
+
1
);
int
enddelim
=
name
.
indexOf
(
' '
,
nNext
+
1
);
...
...
@@ -151,23 +149,23 @@ void CommonSalLayout::ParseFeatures(OUString name)
end
=
endamp
;
else
end
=
enddelim
;
m
Lang
=
oName
.
copy
(
nNext
+
6
,
end
-
nNext
-
6
);
m
sLanguage
=
oName
.
copy
(
nNext
+
6
,
end
-
nNext
-
6
);
}
else
++
mnFeat
s
;
++
nFeature
s
;
}
if
(
mnFeat
s
==
0
)
if
(
nFeature
s
==
0
)
return
;
mpFeatures
=
new
hb_feature_t
[
mnFeats
];
mnFeats
=
0
;
for
(
int
nThis
=
nStart
,
nNext
=
name
.
indexOf
(
'&'
,
nStart
+
1
);
nThis
>
0
;
nThis
=
nNext
,
nNext
=
name
.
indexOf
(
'&'
,
nNext
+
1
))
maFeatures
.
reserve
(
nFeatures
);
for
(
int
nThis
=
nStart
,
nNext
=
name
.
indexOf
(
'&'
,
nStart
+
1
);
nThis
>
0
;
nThis
=
nNext
,
nNext
=
name
.
indexOf
(
'&'
,
nNext
+
1
))
{
if
(
!
name
.
match
(
"lang="
,
nThis
+
1
))
if
(
!
name
.
match
(
"lang="
,
nThis
+
1
))
{
int
end
=
nNext
>
0
?
nNext
:
name
.
getLength
();
if
(
hb_feature_from_string
(
oName
.
getStr
()
+
nThis
+
1
,
end
-
nThis
-
1
,
&
mpFeatures
[
mnFeats
]))
++
mnFeats
;
hb_feature_t
aFeature
;
if
(
hb_feature_from_string
(
oName
.
getStr
()
+
nThis
+
1
,
end
-
nThis
-
1
,
&
aFeature
))
maFeatures
.
push_back
(
aFeature
);
}
}
}
...
...
@@ -463,9 +461,9 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
int
nRunLen
=
nEndRunPos
-
nMinRunPos
;
aHbScript
=
hb_icu_script_to_script
(
aScriptRun
.
maScript
);
// hb_language_from_string() accept ISO639-3 language tag except for Chinese.
LanguageTag
&
rTag
=
rArgs
.
maLanguageTag
;
OString
sLanguage
=
mLang
.
getLength
()
?
mLang
:
OUStringToOString
(
r
Tag
.
getBcp47
(),
RTL_TEXTENCODING_ASCII_US
);
OString
sLanguage
=
msLanguage
;
if
(
sLanguage
.
isEmpty
())
sLanguage
=
OUStringToOString
(
rArgs
.
maLanguage
Tag
.
getBcp47
(),
RTL_TEXTENCODING_ASCII_US
);
bool
bVertical
=
false
;
if
((
rArgs
.
mnFlags
&
SalLayoutFlags
::
Vertical
)
&&
...
...
@@ -498,7 +496,7 @@ bool CommonSalLayout::LayoutText(ImplLayoutArgs& rArgs)
#if HB_VERSION_ATLEAST(0, 9, 42)
hb_buffer_set_cluster_level
(
pHbBuffer
,
HB_BUFFER_CLUSTER_LEVEL_MONOTONE_CHARACTERS
);
#endif
hb_shape
(
mpHbFont
,
pHbBuffer
,
m
pFeatures
,
mnFeats
);
hb_shape
(
mpHbFont
,
pHbBuffer
,
m
aFeatures
.
data
(),
maFeatures
.
size
()
);
int
nRunGlyphCount
=
hb_buffer_get_length
(
pHbBuffer
);
hb_glyph_info_t
*
pHbGlyphInfos
=
hb_buffer_get_glyph_infos
(
pHbBuffer
,
nullptr
);
...
...
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