sw/source/uibase/wrtsh/wrtsh1.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 48a076e071369f5eee075f74947219dabfa63ec5
Author:     Xisco Fauli <xiscofa...@libreoffice.org>
AuthorDate: Thu Aug 10 17:59:01 2023 +0200
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Aug 11 13:30:23 2023 +0200

    tdf#156270: use double for width/height
    
    Otherwise 0.313159 is rounded to 0
    
    Regression from
        commit 99f43923b66a98b75c78a50577f19293aa480998
        Author: Xisco Fauli <xiscofa...@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.mcnam...@collabora.com>
    Tested-by: Xisco Fauli <xiscofa...@libreoffice.org>
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>
    (cherry picked from commit 6ab45e1e2b256880d2f05b6669eb196e83682a14)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155489
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/sw/source/uibase/wrtsh/wrtsh1.cxx 
b/sw/source/uibase/wrtsh/wrtsh1.cxx
index 3ef6559cae34..e00aee5c72c7 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 );

Reply via email to