sc/qa/unit/units.cxx | 12 ++++++++++++ 1 file changed, 12 insertions(+)
New commits: commit 6a75eeb0c3dc12844557027f0df443e1b57269c6 Author: Andrzej Hunt <andr...@ahunt.org> Date: Wed Aug 5 19:50:55 2015 +0100 Test for tdf#92455 (persist purely local annotations after conversion) Change-Id: I3f0ed297ef4eb9ac7876a9e24e3c2f0c1ec0b521 diff --git a/sc/qa/unit/units.cxx b/sc/qa/unit/units.cxx index 28cffa2..86efc22 100644 --- a/sc/qa/unit/units.cxx +++ b/sc/qa/unit/units.cxx @@ -948,6 +948,18 @@ void UnitsTest::testRangeConversion() { // TODO: we need to test: // 1. actual sensible ranges } + + // test purely local annotations (tdf#92455) + ScAddress headerAddressCol4(3, 0, nTab); + + mpDoc->SetValue(headerAddressCol4, 3); + setNumberFormatUnit(headerAddressCol4, "m"); + + aRange = ScRange(headerAddressCol4); + CPPUNIT_ASSERT(mpUnitsImpl->convertCellUnits(aRange, mpDoc, "cm")); + CPPUNIT_ASSERT_DOUBLES_EQUAL(mpDoc->GetValue(headerAddressCol4), 300, 1e-7); + + CPPUNIT_ASSERT(UnitsImpl::extractUnitStringForCell(headerAddressCol4, mpDoc) == "cm"); } void UnitsTest::testConvertCellUnits() _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits