summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-05-30 22:38:39 +0200
committerJulien Nabet <serval2412@yahoo.fr>2014-05-30 22:39:35 +0200
commitea15c9dc4da75fcd56e6b0dbce473b9e912fa4e2 (patch)
tree66284cd022a4f5fc04bb1d3f15161eb550d644ec
parent2949cb7b2380291be16831f5239368e90bdc6380 (diff)
Revert "cppcheck: zerodiv"
This reverts commit c46cc5751b5af4ce180fca63f998fe7eb405f93c. See http://nabble.documentfoundation.org/avoiding-cppunit-zerodiv-correction-td4110788.html for more details
-rw-r--r--sd/source/ui/dlg/docprev.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sd/source/ui/dlg/docprev.cxx b/sd/source/ui/dlg/docprev.cxx
index 4c4293ce0f54..cd015cdbd285 100644
--- a/sd/source/ui/dlg/docprev.cxx
+++ b/sd/source/ui/dlg/docprev.cxx
@@ -87,7 +87,7 @@ void SdDocPreviewWin::CalcSizeAndPos( GDIMetaFile* pFile, Size& rSize, Point& rP
long nWidth = rSize.Width() - 2*FRAME;
long nHeight = rSize.Height() - 2*FRAME;
if( nWidth < 0 ) nWidth = 0;
- if( nHeight < 0 ) nHeight = 1;
+ if( nHeight < 0 ) nHeight = 0;
double dRatio=((double)aTmpSize.Width())/aTmpSize.Height();
double dRatioPreV=((double) nWidth ) / nHeight;