summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrzej Hunt <andrzej@ahunt.org>2015-08-05 19:50:55 +0100
committerAndrzej Hunt <andrzej@ahunt.org>2015-10-21 10:23:46 +0200
commitda06bb25def1af25253efa9737683223607a78f3 (patch)
tree577b2783c2093776d590b253de5887cf8708b466
parent31ac44715883c3c41c71fadae248f7a0ce8851d8 (diff)
Test for tdf#92455 (persist purely local annotations after conversion)
Change-Id: I3f0ed297ef4eb9ac7876a9e24e3c2f0c1ec0b521
-rw-r--r--sc/qa/unit/units.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/sc/qa/unit/units.cxx b/sc/qa/unit/units.cxx
index 28cffa24d32f..86efc227a594 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()