writerfilter/source/rtftok/rtfsdrimport.cxx |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

New commits:
commit b0e291a7efcd3af2a72d0b622b1f1b84723f011f
Author: Jochen Nitschke <j.nitschke+loger...@ok.de>
Date:   Sat Jun 30 20:34:35 2018 +0200

    cppcheck: variableScope
    
    Change-Id: I06fc0e6cba1e5754f9b801e55e27fcde4457eb72
    Reviewed-on: https://gerrit.libreoffice.org/56768
    Tested-by: Jenkins
    Reviewed-by: Jochen Nitschke <j.nitschke+loger...@ok.de>

diff --git a/writerfilter/source/rtftok/rtfsdrimport.cxx 
b/writerfilter/source/rtftok/rtfsdrimport.cxx
index f5a96a3efada..f2ea5d920be1 100644
--- a/writerfilter/source/rtftok/rtfsdrimport.cxx
+++ b/writerfilter/source/rtftok/rtfsdrimport.cxx
@@ -717,10 +717,12 @@ void RTFSdrImport::resolve(RTFShape& rShape, bool bClose, 
ShapeOrPict const shap
         else if (rProperty.first == "pctHoriz" || rProperty.first == "pctVert")
         {
             sal_Int16 nPercentage = 
rtl::math::round(rProperty.second.toDouble() / 10);
-            boost::optional<sal_Int16>& rPercentage
-                = rProperty.first == "pctHoriz" ? oRelativeWidth : 
oRelativeHeight;
             if (nPercentage)
+            {
+                boost::optional<sal_Int16>& rPercentage
+                    = rProperty.first == "pctHoriz" ? oRelativeWidth : 
oRelativeHeight;
                 rPercentage = nPercentage;
+            }
         }
         else if (rProperty.first == "sizerelh")
         {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to