[Libreoffice-commits] core.git: oox/source

Miklos Vajna vmiklos at collabora.co.uk
Thu Jul 21 08:40:17 UTC 2016


 oox/source/shape/WpsContext.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 79fdf19e94cec72b49ec3845ba45a6dd40eead5c
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Jul 21 10:09:03 2016 +0200

    oox: avoid pointless multiplication at int precision in WpsContext
    
    When the output would be used at long precision anyway.
    
    Change-Id: I6eefda0533b8ee70b878f7ce7c6487f8b99a6025
    Reviewed-on: https://gerrit.libreoffice.org/27360
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index b3f4b45..eb67f30 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -106,7 +106,7 @@ oox::core::ContextHandlerRef WpsContext::onCreateContext(sal_Int32 nElementToken
 
                     // If the text is not rotated the way the shape wants it already, set the angle.
                     const sal_Int32 nRotation = -270;
-                    if (static_cast<long>(basegfx::rad2deg(fRotate)) != NormAngle360(nRotation * 100) / 100)
+                    if (static_cast<long>(basegfx::rad2deg(fRotate)) != NormAngle360(static_cast<long>(nRotation) * 100) / 100)
                     {
                         comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
                         aCustomShapeGeometry["TextPreRotateAngle"] = uno::makeAny(nRotation);


More information about the Libreoffice-commits mailing list