summaryrefslogtreecommitdiff
path: root/oox
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 /oox
parentb84afd2188d6993c91081885dc24664bd3f1cc73 (diff)
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 'oox')
-rw-r--r--oox/source/drawingml/fillproperties.cxx4
-rw-r--r--oox/source/export/shapes.cxx2
2 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/drawingml/fillproperties.cxx b/oox/source/drawingml/fillproperties.cxx
index 655e177d94f3..5b68eb3e60ea 100644
--- a/oox/source/drawingml/fillproperties.cxx
+++ b/oox/source/drawingml/fillproperties.cxx
@@ -72,7 +72,7 @@ Reference< XGraphic > lclCheckAndApplyDuotoneTransform(const BlipFillProperties&
return xGraphic;
}
-Reference< XGraphic > lclRotateGraphic(uno::Reference<graphic::XGraphic> const & xGraphic, long nRotation)
+Reference< XGraphic > lclRotateGraphic(uno::Reference<graphic::XGraphic> const & xGraphic, Degree10 nRotation)
{
::Graphic aGraphic(xGraphic);
::Graphic aReturnGraphic;
@@ -771,7 +771,7 @@ void GraphicProperties::pushToPropMap( PropertyMap& rPropMap, const GraphicHelpe
if(rPropMap.hasProperty(PROP_RotateAngle))
{
long nAngle = rPropMap.getProperty(PROP_RotateAngle).get<long>();
- xGraphic = lclRotateGraphic(xGraphic, nAngle/10 );
+ xGraphic = lclRotateGraphic(xGraphic, Degree10(nAngle/10) );
}
rPropMap.setProperty(PROP_FillBitmap, xGraphic);
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 2b1251660cee..00f94294f1fe 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -844,7 +844,7 @@ ShapeExport& ShapeExport::WriteCustomShape( const Reference< XShape >& xShape )
// Remove rotation
bool bInvertRotation = bFlipH != bFlipV;
if (nRotation != 0)
- aPolyPolygon.Rotate(Point(0,0), static_cast<sal_uInt16>(bInvertRotation ? nRotation/10 : 3600-nRotation/10));
+ aPolyPolygon.Rotate(Point(0,0), Degree10(static_cast<sal_Int16>(bInvertRotation ? nRotation/10 : 3600-nRotation/10)));
WritePolyPolygon(xShape, aPolyPolygon, false);
}
else if (bCustGeom)