diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-07-24 15:22:18 +0200 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2014-07-26 14:25:28 +0200 |
commit | f36a60ea2a001aafae4d8f55e40582c10756890a (patch) | |
tree | c0bde9458f86a94078cdcaf3ec0af2fe3b17e531 /sw | |
parent | 37a4651ceb17c829d979230a13efe79b32072172 (diff) |
sal_uInt16 to long and use Fracion validator
Change-Id: Icb8592bb207c523e7e9cfb4098cb0ef0590431cf
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 ); |