sc/source/filter/orcus/interface.cxx | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-)
New commits: commit 78d9d0d8dccb6fd8952435b8a13d525c7606f467 Author: Kohei Yoshida <ko...@libreoffice.org> AuthorDate: Fri Sep 1 16:44:51 2023 -0400 Commit: Kohei Yoshida <ko...@libreoffice.org> CommitDate: Sat Sep 2 02:31:29 2023 +0200 Apply font names and sizes to formatted strings via orcus Change-Id: I6809a184652b278eb66ee104558af19ea4a22ed7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156459 Tested-by: Jenkins Reviewed-by: Kohei Yoshida <ko...@libreoffice.org> diff --git a/sc/source/filter/orcus/interface.cxx b/sc/source/filter/orcus/interface.cxx index c2c784a5a016..b349016355b7 100644 --- a/sc/source/filter/orcus/interface.cxx +++ b/sc/source/filter/orcus/interface.cxx @@ -1357,12 +1357,23 @@ void ScOrcusSharedStrings::set_segment_italic(bool b) maCurFormat.Put(SvxPostureItem(eItalic, EE_CHAR_ITALIC)); } -void ScOrcusSharedStrings::set_segment_font_name(std::string_view /*s*/) +void ScOrcusSharedStrings::set_segment_font_name(std::string_view s) { + OUString aName = toOUString(s); + maCurFormat.Put( + SvxFontItem( + FAMILY_DONTKNOW, aName, aName, PITCH_DONTKNOW, + mrFactory.getGlobalSettings().getTextEncoding(), + EE_CHAR_FONTINFO + ) + ); } -void ScOrcusSharedStrings::set_segment_font_size(double /*point*/) +void ScOrcusSharedStrings::set_segment_font_size(double point) { + // points to 100th of millimeters + tools::Long nMM = o3tl::convert(point, o3tl::Length::pt, o3tl::Length::mm100); + maCurFormat.Put(SvxFontHeightItem(nMM, 100, EE_CHAR_FONTHEIGHT)); } void ScOrcusSharedStrings::set_segment_font_color(