summaryrefslogtreecommitdiff
path: root/toolkit
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-10-19 21:32:49 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-20 08:04:20 +0200
commit6eefea359fe1e51adfd4a2002614013a7c060a33 (patch)
tree690afd9a663be22595610cabce28bc0a77919cb5 /toolkit
parentdb6457fc6035a9c271edbaedd33d04985d1235b2 (diff)
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.grandin@collabora.co.uk>
Diffstat (limited to 'toolkit')
-rw-r--r--toolkit/source/helper/vclunohelper.cxx4
1 files changed, 2 insertions, 2 deletions
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 );