From f76d21ca7350f024229169406b8d2eaa0bf825df Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Thu, 23 Oct 2014 17:31:25 +0200 Subject: Fraction: Revert "boost::rational throws if 0 is passed as denominator" This reverts commit 1c8695ecf65174298ebd9edb5b0289db07af98ca. --- sd/source/ui/view/frmview.cxx | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'sd/source/ui/view/frmview.cxx') diff --git a/sd/source/ui/view/frmview.cxx b/sd/source/ui/view/frmview.cxx index 8f48aeca2f1f..470866dffd38 100644 --- a/sd/source/ui/view/frmview.cxx +++ b/sd/source/ui/view/frmview.cxx @@ -874,31 +874,19 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : } else if ( pValue->Name == sUNO_View_GridSnapWidthXNumerator ) { - sal_Int32 nValue = 0; - pValue->Value >>= nValue; - if (nValue != 0) // 0 is allowed, but it doesn't make any sense... - aSnapGridWidthXNum = nValue; + pValue->Value >>= aSnapGridWidthXNum; } else if ( pValue->Name == sUNO_View_GridSnapWidthXDenominator ) { - sal_Int32 nValue = 0; - pValue->Value >>= nValue; - if (nValue != 0) - aSnapGridWidthXDom = nValue; + pValue->Value >>= aSnapGridWidthXDom; } else if ( pValue->Name == sUNO_View_GridSnapWidthYNumerator ) { - sal_Int32 nValue = 0; - pValue->Value >>= nValue; - if (nValue != 0) // 0 is allowed, but it doesn't make any sense... - aSnapGridWidthYNum = nValue; + pValue->Value >>= aSnapGridWidthYNum; } else if ( pValue->Name == sUNO_View_GridSnapWidthYDenominator ) { - sal_Int32 nValue = 0; - pValue->Value >>= nValue; - if (nValue != 0) - aSnapGridWidthYDom = nValue; + pValue->Value >>= aSnapGridWidthYDom; } else if (!bImpress && pValue->Name == sUNO_View_VisibleLayers ) { -- cgit