| commit | 50c3d02656ffb10fc103ad2bb52f0fcc1de93daf | [log] |
|---|---|---|
| author | Xisco Fauli <xiscofauli@libreoffice.org> | Thu Aug 10 17:59:01 2023 +0200 |
| committer | Michael Stahl <michael.stahl@allotropia.de> | Fri Aug 11 13:30:34 2023 +0200 |
| tree | bc42c3497cb384e5d2fcdd63485e82dcf6e457c5 | |
| parent | ec7065bafc0a805b03a2b4d5522026f829c25522 [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> (cherry picked from commit 6ab45e1e2b256880d2f05b6669eb196e83682a14) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155488 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
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 );