diff options
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/uiview/viewport.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sw/source/uibase/uiview/viewport.cxx b/sw/source/uibase/uiview/viewport.cxx index 9961b9902268..f00be536190a 100644 --- a/sw/source/uibase/uiview/viewport.cxx +++ b/sw/source/uibase/uiview/viewport.cxx @@ -986,9 +986,9 @@ void SwView::InnerResizePixel( const Point &rOfst, const Size &rSize ) if( m_pHRuler->IsVisible() || m_pVRuler->IsVisible() ) { const Fraction& rFrac = GetEditWin().GetMapMode().GetScaleX(); - sal_uInt16 nZoom = 100; - if (0 != rFrac.GetDenominator()) - nZoom = sal_uInt16(rFrac.GetNumerator() * 100L / rFrac.GetDenominator()); + long nZoom = 100; + if (rFrac.IsValid()) + nZoom = rFrac.GetNumerator() * 100L / rFrac.GetDenominator(); const Fraction aFrac( nZoom, 100 ); m_pVRuler->SetZoom( aFrac ); |