[Libreoffice-commits] core.git: svx/source xmloff/source

Fabio Buso dev.siroibaf at gmail.com
Thu Feb 25 16:34:44 UTC 2016


 svx/source/items/e3ditem.cxx       |    5 +++--
 xmloff/source/draw/ximp3dscene.cxx |    3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

New commits:
commit 36ae1972ff64c80dc053680c82032904f7bbdcb8
Author: Fabio Buso <dev.siroibaf at gmail.com>
Date:   Thu Feb 25 09:45:03 2016 +0100

    Use rtl::math::isNan()
    
    isnan() not found causes compilation error
    System: Archlinux (Kernel Version 4.4) - GCC 5.3.0
    
    Change-Id: Id0bb4555428896678437e8abf228f1c208f1e7a0
    Reviewed-on: https://gerrit.libreoffice.org/22695
    Reviewed-by: Tor Lillqvist <tml at collabora.com>
    Tested-by: Tor Lillqvist <tml at collabora.com>

diff --git a/svx/source/items/e3ditem.cxx b/svx/source/items/e3ditem.cxx
index 9e623dc..9604bce 100644
--- a/svx/source/items/e3ditem.cxx
+++ b/svx/source/items/e3ditem.cxx
@@ -19,6 +19,7 @@
 
 #include <com/sun/star/drawing/Direction3D.hpp>
 #include <tools/stream.hxx>
+#include <rtl/math.hxx>
 
 #include <svx/e3ditem.hxx>
 
@@ -87,7 +88,7 @@ SvStream& SvxB3DVectorItem::Store(SvStream &rStream, sal_uInt16 /*nItemVersion*/
 
 bool SvxB3DVectorItem::QueryValue( uno::Any& rVal, sal_uInt8 /*nMemberId*/ ) const
 {
-    assert(!isnan(aVal.getX()) && !isnan(aVal.getY()) && !isnan(aVal.getZ()));
+    assert(!rtl::math::isNan(aVal.getX()) && !rtl::math::isNan(aVal.getY()) && !rtl::math::isNan(aVal.getZ()));
 
     drawing::Direction3D aDirection;
 
@@ -111,7 +112,7 @@ bool SvxB3DVectorItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
     aVal.setY(aDirection.DirectionY);
     aVal.setZ(aDirection.DirectionZ);
 
-    assert(!isnan(aVal.getX()) && !isnan(aVal.getY()) && !isnan(aVal.getZ()));
+    assert(!rtl::math::isNan(aVal.getX()) && !rtl::math::isNan(aVal.getY()) && !rtl::math::isNan(aVal.getZ()));
 
     return true;
 }
diff --git a/xmloff/source/draw/ximp3dscene.cxx b/xmloff/source/draw/ximp3dscene.cxx
index 5cf205f..69fb32a 100644
--- a/xmloff/source/draw/ximp3dscene.cxx
+++ b/xmloff/source/draw/ximp3dscene.cxx
@@ -18,6 +18,7 @@
  */
 
 #include <sax/tools/converter.hxx>
+#include <rtl/math.hxx>
 
 #include "ximp3dscene.hxx"
 #include <xmloff/xmluconv.hxx>
@@ -66,7 +67,7 @@ SdXML3DLightContext::SdXML3DLightContext(
             {
                 ::basegfx::B3DVector aVal;
                 SvXMLUnitConverter::convertB3DVector(aVal, sValue);
-                if (!isnan(aVal.getX()) && !isnan(aVal.getY()) && !isnan(aVal.getZ()))
+                if (!rtl::math::isNan(aVal.getX()) && !rtl::math::isNan(aVal.getY()) && !rtl::math::isNan(aVal.getZ()))
                 {
                     maDirection = aVal;
                 }


More information about the Libreoffice-commits mailing list