summaryrefslogtreecommitdiff
path: root/svx/source
diff options
context:
space:
mode:
authorNoel <noelgrandin@gmail.com>2020-10-20 09:51:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-20 12:13:31 +0200
commitd8e2ad45000a08c5e5b6e028c2c8fcc69c06fd74 (patch)
tree17e71a43c4c77bc09b86c890cd7d8f35e07070ee /svx/source
parent9aad1dfc7480c2972a4b671699c8729f9c674559 (diff)
fix orientation in vcl::Font<->awt::FontDescriptor conversion
one is in degrees, the other deci-degrees Change-Id: I85270c15f483e959819fcb54d37435388975f766 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104552 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source')
-rw-r--r--svx/source/fmcomp/fmgridif.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/fmcomp/fmgridif.cxx b/svx/source/fmcomp/fmgridif.cxx
index 6ffeabaa08d5..a944d591d8c9 100644
--- a/svx/source/fmcomp/fmgridif.cxx
+++ b/svx/source/fmcomp/fmgridif.cxx
@@ -97,7 +97,7 @@ static css::awt::FontDescriptor ImplCreateFontDescriptor( const vcl::Font& rFont
aFD.Slant = vcl::unohelper::ConvertFontSlant( rFont.GetItalic() );
aFD.Underline = static_cast<sal_Int16>(rFont.GetUnderline());
aFD.Strikeout = static_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 to metric...
@@ -119,7 +119,7 @@ static vcl::Font ImplCreateFont( const css::awt::FontDescriptor& rDescr )
aFont.SetItalic( static_cast<FontItalic>(rDescr.Slant) );
aFont.SetUnderline( static_cast<::FontLineStyle>(rDescr.Underline) );
aFont.SetStrikeout( static_cast<::FontStrikeout>(rDescr.Strikeout) );
- aFont.SetOrientation( static_cast<sal_Int16>(rDescr.Orientation) );
+ aFont.SetOrientation( static_cast<sal_Int16>(rDescr.Orientation * 10) );
aFont.SetKerning( static_cast<FontKerning>(rDescr.Kerning) );
aFont.SetWordLineMode( rDescr.WordLineMode );
return aFont;