Kaydet (Commit) 1c8695ec authored tarafından David Tardon's avatar David Tardon

boost::rational throws if 0 is passed as denominator

Change-Id: I312fd6b964555b3b4aa4e22cec6054c9a83b2c52
üst 376dae81
...@@ -874,19 +874,31 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < : ...@@ -874,19 +874,31 @@ void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < :
} }
else if ( pValue->Name == sUNO_View_GridSnapWidthXNumerator ) 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 ) 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 ) 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 ) 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 ) else if (!bImpress && pValue->Name == sUNO_View_VisibleLayers )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment