[Libreoffice-commits] core.git: Branch 'feature/unitver' - sc/source

Benjamin Ni benjaminniri at hotmail.com
Sun Jul 5 10:17:30 PDT 2015


 sc/source/core/units/unitsimpl.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit c565edd82b3bf77a9e2333610b495a2916e4ab16
Author: Benjamin Ni <benjaminniri at hotmail.com>
Date:   Fri Jul 3 16:45:52 2015 +0100

    tdf#92455 - inconsistent unit handling
    
    Change-Id: Ifbb85a32ef9d84199d17cedd28fa0f9e66eabf66

diff --git a/sc/source/core/units/unitsimpl.cxx b/sc/source/core/units/unitsimpl.cxx
index c2e39f9..0c89201 100644
--- a/sc/source/core/units/unitsimpl.cxx
+++ b/sc/source/core/units/unitsimpl.cxx
@@ -789,8 +789,9 @@ bool UnitsImpl::convertCellUnitsForColumnRange(const ScRange& rRange,
                 }
             }
 
-            bool bLocalAnnotationRequired = (aHeader.address && !rRange.In(*aHeader.address)) &&
-                (rOutputUnit != aHeader.unit);
+            bool bLocalAnnotationRequired = !aHeader.address || (
+                                            !rRange.In(*aHeader.address) &&
+                                            (rOutputUnit != aHeader.unit) );
             double nValue = pDoc->GetValue(aCurrent);
 
             if (!aLocalUnit.areConvertibleTo(rOutputUnit))


More information about the Libreoffice-commits mailing list