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

Matúš Kukan matus.kukan at gmail.com
Fri Sep 18 14:02:34 PDT 2015


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

New commits:
commit 494aa9ee5d01699c0dcbc912091de30a314c09fc
Author: Matúš Kukan <matus.kukan at gmail.com>
Date:   Fri Sep 18 12:57:39 2015 +0200

    Workaround unit test failure by comparing as long
    
    On 32bit system, for some reason casting to double gives wrong results.
    Failing unit test was testTdf87924 in CppunitTest_sw_ooxmlimport.
    
    Change-Id: If93e5288a381e50f30d035d56131b1d9235ac658
    Reviewed-on: https://gerrit.libreoffice.org/18684
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/oox/source/shape/WpsContext.cxx b/oox/source/shape/WpsContext.cxx
index 657071b..0cf558c 100644
--- a/oox/source/shape/WpsContext.cxx
+++ b/oox/source/shape/WpsContext.cxx
@@ -100,7 +100,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 (basegfx::rad2deg(fRotate) != static_cast<double>(NormAngle360(nRotation * 100)) / 100)
+                    if (static_cast<long>(basegfx::rad2deg(fRotate)) != NormAngle360(nRotation * 100) / 100)
                     {
                         comphelper::SequenceAsHashMap aCustomShapeGeometry(xPropertySet->getPropertyValue("CustomShapeGeometry"));
                         aCustomShapeGeometry["TextPreRotateAngle"] = uno::makeAny(nRotation);


More information about the Libreoffice-commits mailing list