sw/source/filter/ww8/rtfattributeoutput.cxx | 5 +++-- writerfilter/source/rtftok/rtfsdrimport.cxx | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-)
New commits: commit 9348677e040927a736e70797d07bb1de32d729ca Author: Justin Luth <justin.l...@collabora.com> AuthorDate: Mon Feb 26 15:20:11 2024 -0500 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Tue Feb 27 08:45:03 2024 +0100 address nit: use oox::drawingml::PER_DEGREE instead of 60,000 Change-Id: Ie3ca5a76376a3c26f0d3079b6e819ec29afd2c17 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163968 Tested-by: Jenkins Reviewed-by: Justin Luth <jl...@mail.com> Reviewed-by: Miklos Vajna <vmik...@collabora.com> diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 03fc0fa354cb..0f2885068d12 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -86,6 +86,7 @@ #include <redline.hxx> #include <rtf.hxx> #include <vcl/cvtgrf.hxx> +#include <oox/drawingml/drawingmltypes.hxx> #include <oox/mathml/imexport.hxx> #include <com/sun/star/i18n/ScriptType.hpp> #include <svl/grabbagitem.hxx> @@ -3752,11 +3753,11 @@ void RtfAttributeOutput::FormatFillGradient(const XFillGradientItem& rFillGradie const Color aMSOStartColor(rColorStops.back().getStopColor()); Color aMSOEndColor(rColorStops.front().getStopColor()); - const sal_Int32 nAngle = toDegrees(rGradient.GetAngle()); + const sal_Int32 nAngle = toDegrees(rGradient.GetAngle()) * oox::drawingml::PER_DEGREE; if (nAngle != 0) { m_aFlyProperties.push_back( - std::make_pair<OString, OString>("fillAngle"_ostr, OString::number(nAngle * 60000))); + std::make_pair<OString, OString>("fillAngle"_ostr, OString::number(nAngle))); } if (rColorStops.size() < 3) diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx b/writerfilter/source/rtftok/rtfsdrimport.cxx index 9c673e871835..812a8e69f318 100644 --- a/writerfilter/source/rtftok/rtfsdrimport.cxx +++ b/writerfilter/source/rtftok/rtfsdrimport.cxx @@ -42,6 +42,7 @@ #include "rtfreferenceproperties.hxx" #include <oox/vml/vmlformatting.hxx> #include <oox/helper/modelobjecthelper.hxx> +#include <oox/drawingml/drawingmltypes.hxx> #include <oox/drawingml/shapepropertymap.hxx> #include <oox/helper/propertyset.hxx> #include <basegfx/matrix/b2dhommatrix.hxx> @@ -668,7 +669,7 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, ShapeOrPict const shap } else if (rProperty.first == "fillAngle") { - aFillModel.moAngle = rProperty.second.toInt32() / 60000; + aFillModel.moAngle = rProperty.second.toInt32() / oox::drawingml::PER_DEGREE; } else if (rProperty.first == "fillFocus") aFillModel.moFocus = rProperty.second.toDouble() / 100; // percent