summaryrefslogtreecommitdiffstats
path: root/editeng/source/uno
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2020-10-20 07:27:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-10-21 08:13:05 +0200
commit0fb58a1ff168ae122e9c8993a3136658e3b0e3f0 (patch)
tree908983b02f466e0a49599edc70aaa1baaa240371 /editeng/source/uno
parentCppunitTest_sc_subsequent_export: factor out duplicated code (diff)
downloadcore-0fb58a1ff168ae122e9c8993a3136658e3b0e3f0.tar.gz
core-0fb58a1ff168ae122e9c8993a3136658e3b0e3f0.zip
new tools::Degree10 strong typedef
partly to flush some use of "long" out the codebase, but also to make it obvious which units are being used for angle values. Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'editeng/source/uno')
-rw-r--r--editeng/source/uno/unofdesc.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/editeng/source/uno/unofdesc.cxx b/editeng/source/uno/unofdesc.cxx
index a7042726c41f..0cfd7a710dcf 100644
--- a/editeng/source/uno/unofdesc.cxx
+++ b/editeng/source/uno/unofdesc.cxx
@@ -48,7 +48,7 @@ void SvxUnoFontDescriptor::ConvertToFont( const awt::FontDescriptor& rDesc, vcl:
rFont.SetFamily( static_cast<FontFamily>(rDesc.Family) );
rFont.SetCharSet( static_cast<rtl_TextEncoding>(rDesc.CharSet) );
rFont.SetPitch( static_cast<FontPitch>(rDesc.Pitch) );
- rFont.SetOrientation( static_cast<short>(rDesc.Orientation*10) );
+ rFont.SetOrientation( Degree10(static_cast<sal_Int16>(rDesc.Orientation*10)) );
rFont.SetKerning( rDesc.Kerning ? FontKerning::FontSpecific : FontKerning::NONE );
rFont.SetWeight( vcl::unohelper::ConvertFontWeight(rDesc.Weight) );
rFont.SetItalic( static_cast<FontItalic>(rDesc.Slant) );
@@ -66,7 +66,7 @@ void SvxUnoFontDescriptor::ConvertFromFont( const vcl::Font& rFont, awt::FontDes
rDesc.Family = sal::static_int_cast< sal_Int16 >(rFont.GetFamilyType());
rDesc.CharSet = rFont.GetCharSet();
rDesc.Pitch = sal::static_int_cast< sal_Int16 >(rFont.GetPitch());
- rDesc.Orientation = static_cast< float >(rFont.GetOrientation() / 10);
+ rDesc.Orientation = static_cast< float >(rFont.GetOrientation().get() / 10);
rDesc.Kerning = rFont.IsKerning();
rDesc.Weight = vcl::unohelper::ConvertFontWeight( rFont.GetWeight() );
rDesc.Slant = vcl::unohelper::ConvertFontSlant( rFont.GetItalic() );