summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/source/uibase/wrtsh/wrtsh1.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 7073ce1bd34a..65f434d45961 100644
--- a/sw/source/uibase/wrtsh/wrtsh1.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -914,8 +914,13 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
}
else
{
- aArea.Width ( tools::Long( aArea.Width() / pCli->GetScaleWidth() ) );
- aArea.Height( tools::Long( aArea.Height() / pCli->GetScaleHeight() ) );
+ tools::Long nWidth(pCli->GetScaleWidth());
+ tools::Long nHeight(pCli->GetScaleHeight());
+ if (nWidth && nHeight)
+ {
+ aArea.Width ( aArea.Width() / nWidth );
+ aArea.Height( aArea.Height() / nHeight );
+ }
}
pCli->SetObjAreaAndScale( aArea.SVRect(), aScaleWidth, aScaleHeight );