summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-11-24 15:06:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2015-11-24 15:19:02 +0000
commit7acbf173fc9f624da144a242e33033de56550a2f (patch)
tree4c82cf2264fed679e18596181e814d998b8926cc /svx
parent78407eea3ddb5717a501d9336e3b3cbef188d010 (diff)
crashtesting: ooo72999-1.ods NaNs found in light direction
and NaN != NaN so busted logic propogates, drop invalid directions on initial read Change-Id: Ic76c714666df14d37a4c68f43b817327675bd0e0
Diffstat (limited to 'svx')
-rw-r--r--svx/source/items/e3ditem.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/svx/source/items/e3ditem.cxx b/svx/source/items/e3ditem.cxx
index d41b77818a31..f853012e2516 100644
--- a/svx/source/items/e3ditem.cxx
+++ b/svx/source/items/e3ditem.cxx
@@ -95,6 +95,8 @@ 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()));
+
drawing::Direction3D aDirection;
// Werte eintragen
@@ -117,6 +119,9 @@ bool SvxB3DVectorItem::PutValue( const uno::Any& rVal, sal_uInt8 /*nMemberId*/ )
aVal.setX(aDirection.DirectionX);
aVal.setY(aDirection.DirectionY);
aVal.setZ(aDirection.DirectionZ);
+
+ assert(!isnan(aVal.getX()) && !isnan(aVal.getY()) && !isnan(aVal.getZ()));
+
return true;
}