summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2014-01-19 15:36:06 -0600
committerNorbert Thiebaud <nthiebaud@gmail.com>2014-01-19 15:36:06 -0600
commitb4ed680ebe8d89d010f4f1ccb5ffb8d6710475f4 (patch)
tree8cf650705aec41a81abd8f36b1ab43022b1a5fa7 /basctl
parenta1a545aa98951c06468330d8924f33c69fb7ba54 (diff)
coverity#735599 : Division by zero
Change-Id: I1a69224793eb39d88894e1090672bdb641c88a02
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/baside2.cxx6
1 files changed, 5 insertions, 1 deletions
diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index 50590e689bd0..cc3a6e6a893b 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -886,7 +886,11 @@ sal_Int32 ModulWindow::FormatAndPrint( Printer* pPrinter, sal_Int32 nPrintPage )
OUString aTitle( CreateQualifiedName() );
- sal_uInt16 nLineHeight = (sal_uInt16) pPrinter->GetTextHeight(); // etwas mehr.
+ sal_uInt16 nLineHeight = (sal_uInt16) pPrinter->GetTextHeight();
+ if(nLineHeight == 0)
+ {
+ nLineHeight = 1;
+ }
sal_uInt16 nParaSpace = 10;
Size aPaperSz = pPrinter->GetOutputSize();