| commit | fc5aae69934000d81492668b3a40889bba5d3099 | [log] |
|---|---|---|
| author | Xisco Fauli <xiscofauli@libreoffice.org> | Thu Aug 10 17:59:01 2023 +0200 |
| committer | Xisco Fauli <xiscofauli@libreoffice.org> | Thu Aug 10 21:34:13 2023 +0200 |
| tree | 70bf3b9968c6c0b7d07ebc8d75d259308a633715 | |
| parent | e4e080086e76a0bedd7ce62dc610889dc5c86401 [diff] |
tdf#156270: use double for width/height Otherwise 0.313159 is rounded to 0 Regression from commit 99f43923b66a98b75c78a50577f19293aa480998 Author: Xisco Fauli <xiscofauli@libreoffice.org> Date: Tue Apr 18 14:37:32 2023 +0200 sw: fix divide by 0 Change-Id: Ib8bf0a770834e0ff73d215c27788df7a3b98404d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155561 Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx b/sw/source/uibase/wrtsh/wrtsh1.cxx index 7a39048..af96916 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -915,8 +915,8 @@ void SwWrtShell::CalcAndSetScale( svt::EmbeddedObjectRef& xObj, } else { tools::Long nWidth(pCli->GetScaleWidth()); tools::Long nHeight(pCli->GetScaleHeight()); double nWidth(pCli->GetScaleWidth()); double nHeight(pCli->GetScaleHeight()); if (nWidth && nHeight) { aArea.Width ( aArea.Width() / nWidth );