tdf#138475: also set font size/weight/posture for CJK/CTL languages...
when parsing the default Calc styles. As an initial matter, orcus currently does not support XML_font_size_asian, XML_font_size_complex, XML_font_weight_asian, XML_font_weight_complex etc in: https://gitlab.com/orcus/orcus/-/blob/master/src/liborcus/odf_styles_context.cpp#L128 While this need to be improved by Orcus, actually in Calc we provide the default font attributes in sc/res/xml/styles.xml and it makes no sense to set different font size/weight/posture for each language type. As a result we apply the same font attributes of latin to all these languages. Change-Id: I1b105fecce45aa22c6b72e15305e25dc6669d2cb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124536 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -1362,9 +1362,13 @@ void ScOrcusStyles::font::applyToItemSet(SfxItemSet& rSet) const
|
||||
{
|
||||
FontItalic eItalic = mbItalic ? ITALIC_NORMAL : ITALIC_NONE;
|
||||
rSet.Put(SvxPostureItem(eItalic, ATTR_FONT_POSTURE));
|
||||
rSet.Put(SvxPostureItem(eItalic, ATTR_CJK_FONT_POSTURE));
|
||||
rSet.Put(SvxPostureItem(eItalic, ATTR_CTL_FONT_POSTURE));
|
||||
|
||||
FontWeight eWeight = mbBold ? WEIGHT_BOLD : WEIGHT_NORMAL;
|
||||
rSet.Put(SvxWeightItem(eWeight, ATTR_FONT_WEIGHT));
|
||||
rSet.Put(SvxWeightItem(eWeight, ATTR_CJK_FONT_WEIGHT));
|
||||
rSet.Put(SvxWeightItem(eWeight, ATTR_CTL_FONT_WEIGHT));
|
||||
|
||||
rSet.Put( SvxColorItem(maColor, ATTR_FONT_COLOR));
|
||||
|
||||
@@ -1372,6 +1376,8 @@ void ScOrcusStyles::font::applyToItemSet(SfxItemSet& rSet) const
|
||||
rSet.Put( SvxFontItem( FAMILY_DONTKNOW, maName, maName, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ));
|
||||
|
||||
rSet.Put( SvxFontHeightItem (translateToInternal(mnSize, orcus::length_unit_t::point), 100, ATTR_FONT_HEIGHT));
|
||||
rSet.Put( SvxFontHeightItem (translateToInternal(mnSize, orcus::length_unit_t::point), 100, ATTR_CJK_FONT_HEIGHT));
|
||||
rSet.Put( SvxFontHeightItem (translateToInternal(mnSize, orcus::length_unit_t::point), 100, ATTR_CTL_FONT_HEIGHT));
|
||||
}
|
||||
|
||||
if (mbHasUnderlineAttr)
|
||||
|
||||
Reference in New Issue
Block a user