toolkit/source/helper/vclunohelper.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
New commits: commit 6eefea359fe1e51adfd4a2002614013a7c060a33 Author: Noel Grandin <noelgran...@gmail.com> AuthorDate: Mon Oct 19 21:32:49 2020 +0200 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Tue Oct 20 08:04:20 2020 +0200 fix font orientation conversion in VCLUnoHelper css::awt::FontDescriptor uses degrees, while vcl::Font uses deci-degrees Change-Id: I72265ea6385bc61db99ee9a6bb392dab2cb1ab3f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104543 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/toolkit/source/helper/vclunohelper.cxx b/toolkit/source/helper/vclunohelper.cxx index e1f0bf38d1ec..238f148af910 100644 --- a/toolkit/source/helper/vclunohelper.cxx +++ b/toolkit/source/helper/vclunohelper.cxx @@ -211,7 +211,7 @@ css::awt::FontDescriptor VCLUnoHelper::CreateFontDescriptor( const vcl::Font& rF aFD.Slant = vcl::unohelper::ConvertFontSlant(rFont.GetItalic()); aFD.Underline = sal::static_int_cast< sal_Int16 >(rFont.GetUnderline()); aFD.Strikeout = sal::static_int_cast< sal_Int16 >(rFont.GetStrikeout()); - aFD.Orientation = rFont.GetOrientation(); + aFD.Orientation = rFont.GetOrientation() / 10.0; aFD.Kerning = rFont.IsKerning(); aFD.WordLineMode = rFont.IsWordLineMode(); aFD.Type = 0; // ??? => Only in Metric... @@ -245,7 +245,7 @@ vcl::Font VCLUnoHelper::CreateFont( const css::awt::FontDescriptor& rDescr, cons aFont.SetStrikeout( static_cast<FontStrikeout>(rDescr.Strikeout) ); // Not DONTKNOW - aFont.SetOrientation( static_cast<short>(rDescr.Orientation) ); + aFont.SetOrientation( static_cast<short>(rDescr.Orientation * 10) ); aFont.SetKerning( static_cast<FontKerning>(rDescr.Kerning) ); aFont.SetWordLineMode( rDescr.WordLineMode ); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits