diff options
author | Noel <noel.grandin@collabora.co.uk> | 2020-12-22 15:42:08 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2021-01-02 15:26:38 +0100 |
commit | 11e52fe2979b0947814a49b9c17ec373795cbf8e (patch) | |
tree | 48268579f052b7fdfcc2c334fffe8c91d29cb234 /writerfilter | |
parent | 610ceb05025c9c7a9a34dddcb0dac506b8eab441 (diff) |
introduce Degree100 strong_int type
Change-Id: I78f837a1340be0ca5c49097f543a481b7b43a632
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108367
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 6 | ||||
-rw-r--r-- | writerfilter/source/rtftok/rtfsdrimport.cxx | 3 |
2 files changed, 4 insertions, 5 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 59c972ec8429..02c348a05693 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -792,7 +792,7 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) if (m_pImpl->isYSizeValis()) aSize.Height = m_pImpl->getYSize(); - sal_Int32 nRotation = 0; + Degree100 nRotation; if (bKeepRotation) { // Use internal API, getPropertyValue(RotateAngle) @@ -804,8 +804,8 @@ void GraphicImport::lcl_attribute(Id nName, Value& rValue) m_xShape->setSize(aSize); if (bKeepRotation) { - xShapeProps->setPropertyValue("RotateAngle", uno::makeAny(nRotation)); - if (nRotation == 0) + xShapeProps->setPropertyValue("RotateAngle", uno::makeAny(nRotation.get())); + if (nRotation == 0_deg100) { // Include effect extent in the margin to bring Writer layout closer // to Word. But do this for non-rotated shapes only, where effect diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index be403b01f4e9..bf94d9cf8097 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -250,8 +250,7 @@ void RTFSdrImport::applyProperty(uno::Reference<drawing::XShape> const& xShape, uno::Reference<lang::XServiceInfo> xServiceInfo(xShape, uno::UNO_QUERY); if (!xServiceInfo->supportsService("com.sun.star.text.TextFrame")) xPropertySet->setPropertyValue( - "RotateAngle", - uno::makeAny(sal_Int32(NormAngle36000(static_cast<tools::Long>(nRotation) * -1)))); + "RotateAngle", uno::makeAny(NormAngle36000(Degree100(nRotation * -1)).get())); } if (nHoriOrient != 0 && xPropertySet.is()) |