summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-10-13 10:02:02 +0200
committerDavid Tardon <dtardon@redhat.com>2014-10-13 10:02:26 +0200
commit1c8695ecf65174298ebd9edb5b0289db07af98ca (patch)
treeeeffb14f90dfeda6eab2713272c434074200da5d /sd
parent376dae8117365166a6a9c7c280f5bf367570fefa (diff)
boost::rational throws if 0 is passed as denominator
Change-Id: I312fd6b964555b3b4aa4e22cec6054c9a83b2c52
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/frmview.cxx20
1 files changed, 16 insertions, 4 deletions
diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx
index 470866dffd38..8f48aeca2f1f 100644
--- a/sd/source/ui/view/frmview.cxx
+++ b/sd/source/ui/view/frmview.cxx
@@ -874,19 +874,31 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
}
else if ( pValue->Name == sUNO_View_GridSnapWidthXNumerator )
{
- pValue->Value >>= aSnapGridWidthXNum;
+ sal_Int32 nValue = 0;
+ pValue->Value >>= nValue;
+ if (nValue != 0) // 0 is allowed, but it doesn't make any sense...
+ aSnapGridWidthXNum = nValue;
}
else if ( pValue->Name == sUNO_View_GridSnapWidthXDenominator )
{
- pValue->Value >>= aSnapGridWidthXDom;
+ sal_Int32 nValue = 0;
+ pValue->Value >>= nValue;
+ if (nValue != 0)
+ aSnapGridWidthXDom = nValue;
}
else if ( pValue->Name == sUNO_View_GridSnapWidthYNumerator )
{
- pValue->Value >>= aSnapGridWidthYNum;
+ sal_Int32 nValue = 0;
+ pValue->Value >>= nValue;
+ if (nValue != 0) // 0 is allowed, but it doesn't make any sense...
+ aSnapGridWidthYNum = nValue;
}
else if ( pValue->Name == sUNO_View_GridSnapWidthYDenominator )
{
- pValue->Value >>= aSnapGridWidthYDom;
+ sal_Int32 nValue = 0;
+ pValue->Value >>= nValue;
+ if (nValue != 0)
+ aSnapGridWidthYDom = nValue;
}
else if (!bImpress && pValue->Name == sUNO_View_VisibleLayers )
{