diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-02-05 22:18:56 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-02-05 22:21:36 -0500 |
commit | abf91e0f25941757b392136b6af260883fa3e46e (patch) | |
tree | e9d40a1f3e29df8b5bff8a04a8ae20618cfd928a /sc/qa | |
parent | 947041e1ab4de4723c537eebd37421d929836700 (diff) |
UniString to OUString in ScRefFinder, and a bunch more cleanups.
Some extra code to ensure that OUString's copy method gets correct
sub-string lengths. Unlike UniString, OUString's version is more
strict.
Change-Id: I7daabf2ad587ff44fd6d8c66a02dbecfe519295b
Diffstat (limited to 'sc/qa')
-rw-r--r-- | sc/qa/unit/ucalc.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx index 2e3e5fb2e332..ed67ad1034bb 100644 --- a/sc/qa/unit/ucalc.cxx +++ b/sc/qa/unit/ucalc.cxx @@ -4973,22 +4973,22 @@ void Test::testToggleRefFlag() // column absolute / row absolute -> column relative / row absolute aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=R2C[-3]" ); + CPPUNIT_ASSERT_EQUAL(OUString("=R2C[-3]"), aFormula); // column relative / row absolute - > column absolute / row relative aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=R[-4]C1" ); + CPPUNIT_ASSERT_EQUAL(OUString("=R[-4]C1"), aFormula); // column absolute / row relative -> column relative / row relative aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=R[-4]C[-3]" ); + CPPUNIT_ASSERT_EQUAL(OUString("=R[-4]C[-3]"), aFormula); // column relative / row relative -> column absolute / row absolute aFinder.ToggleRel(0, aFormula.getLength()); aFormula = aFinder.GetText(); - CPPUNIT_ASSERT_MESSAGE( "Wrong conversion.", aFormula == "=R2C1" ); + CPPUNIT_ASSERT_EQUAL(OUString("=R2C1"), aFormula); } { @@ -4999,7 +4999,7 @@ void Test::testToggleRefFlag() ScRefFinder aFinder(aFormula, aPos, m_pDoc, formula::FormulaGrammar::CONV_XL_R1C1); // Original - CPPUNIT_ASSERT_EQUAL(aFormula, OUString(aFinder.GetText())); + CPPUNIT_ASSERT_EQUAL(aFormula, aFinder.GetText()); // Make the column relative. sal_Int32 n = aFormula.getLength(); |