incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r1172138 - /incubator/ooo/trunk/main/sc/source/ui/view/drawutil.cxx
Date Sat, 17 Sep 2011 22:45:01 GMT
Author: mst
Date: Sat Sep 17 22:45:00 2011
New Revision: 1172138

URL: http://svn.apache.org/viewvc?rev=1172138&view=rev
Log:
calc69: #i118068# handle all-hidden case in ScDrawUtil::CalcScale

# HG changeset patch
# User Niklas Nebel <nn@openoffice.org>
# Date 1306155759 -7200
# Node ID 5c023aa1cc35c5a974984ff25bcea557f4aa7d2c
# Parent  1c6c8dec2313416c6de595eb2cfac3e98250fea6

Modified:
    incubator/ooo/trunk/main/sc/source/ui/view/drawutil.cxx

Modified: incubator/ooo/trunk/main/sc/source/ui/view/drawutil.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/sc/source/ui/view/drawutil.cxx?rev=1172138&r1=1172137&r2=1172138&view=diff
==============================================================================
--- incubator/ooo/trunk/main/sc/source/ui/view/drawutil.cxx (original)
+++ incubator/ooo/trunk/main/sc/source/ui/view/drawutil.cxx Sat Sep 17 22:45:00 2011
@@ -83,11 +83,14 @@ void ScDrawUtil::CalcScale( ScDocument* 
 
     // #i116848# To get a large-enough number for PixelToLogic, multiply the integer values
     // instead of using a larger number of rows
-    long nMultiply = 2000000 / nTwipsY;
-    if ( nMultiply > 1 )
+    if ( nTwipsY )
     {
-        nTwipsY *= nMultiply;
-        nPixelY *= nMultiply;
+        long nMultiply = 2000000 / nTwipsY;
+        if ( nMultiply > 1 )
+        {
+            nTwipsY *= nMultiply;
+            nPixelY *= nMultiply;
+        }
     }
 
 	MapMode aHMMMode( MAP_100TH_MM, Point(), rZoomX, rZoomY );



Mime
View raw message