| commit | 48a076e071369f5eee075f74947219dabfa63ec5 | [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:23 2023 +0200 |
| tree | 69eb7844646ea5a5f54ce0e398b171f6cfea810c | |
| parent | f3b62a9fb3ae38a152fe95dac53903bd1751595c [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/+/155489 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 3ef6559..e00aee5 100644 --- a/sw/source/uibase/wrtsh/wrtsh1.cxx +++ b/sw/source/uibase/wrtsh/wrtsh1.cxx
@@ -914,8 +914,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 );