summaryrefslogtreecommitdiffstats
path: root/sc/qa
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-08-09 15:56:00 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2012-08-09 16:14:34 +0200
commita69d704dc0950ab62e260cb93eb5f37db45e2183 (patch)
tree64be8adb55c7021a4a60631054a733cbb1d4e8a2 /sc/qa
parentfix column navigation with CTRL + direction, fdo#45020 (diff)
downloadcore-a69d704dc0950ab62e260cb93eb5f37db45e2183.tar.gz
core-a69d704dc0950ab62e260cb93eb5f37db45e2183.zip
adapt unit test and activate all test cases
Change-Id: If5998c62709de0f95b2870327fca951cd81f2406
Diffstat (limited to 'sc/qa')
-rw-r--r--sc/qa/unit/ucalc.cxx36
1 files changed, 16 insertions, 20 deletions
diff --git a/sc/qa/unit/ucalc.cxx b/sc/qa/unit/ucalc.cxx
index fc51b2214424..49beff893285 100644
--- a/sc/qa/unit/ucalc.cxx
+++ b/sc/qa/unit/ucalc.cxx
@@ -4617,27 +4617,27 @@ void Test::testFindAreaPosRowDown()
SCCOL nCol = 0;
SCROW nRow = 0;
- pDoc->FindAreaPos(nCol, nRow, 0, 0, 1);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_DOWN);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(1), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(0), nCol);
- pDoc->FindAreaPos(nCol, nRow, 0, 0, 1);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_DOWN);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(2), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(0), nCol);
- pDoc->FindAreaPos(nCol, nRow, 0, 0, 1);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_DOWN);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(5), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(0), nCol);
- pDoc->FindAreaPos(nCol, nRow, 0, 0, 1);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_DOWN);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(6), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(0), nCol);
- pDoc->FindAreaPos(nCol, nRow, 0, 0, 1);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_DOWN);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(MAXROW), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(0), nCol);
@@ -4645,12 +4645,12 @@ void Test::testFindAreaPosRowDown()
nCol = 1;
nRow = 2;
- pDoc->FindAreaPos(nCol, nRow, 0, 0, 1);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_DOWN);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(3), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(1), nCol);
- pDoc->FindAreaPos(nCol, nRow, 0, 0, 1);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_DOWN);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(6), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(1), nCol);
@@ -4678,29 +4678,27 @@ void Test::testFindAreaPosColRight()
SCCOL nCol = 0;
SCROW nRow = 0;
- pDoc->FindAreaPos(nCol, nRow, 0, 1, 0);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_RIGHT);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(0), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(1), nCol);
- pDoc->FindAreaPos(nCol, nRow, 0, 1, 0);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_RIGHT);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(0), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(2), nCol);
- pDoc->FindAreaPos(nCol, nRow, 0, 1, 0);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_RIGHT);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(0), nRow);
- // BUG! This returns right now 4 because FindAreaPos does
- // not yet work correctly with hidden rows
- //CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(5), nCol);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(5), nCol);
- pDoc->FindAreaPos(nCol, nRow, 0, 1, 0);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_RIGHT);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(0), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(6), nCol);
- pDoc->FindAreaPos(nCol, nRow, 0, 1, 0);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_RIGHT);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(0), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(MAXCOL), nCol);
@@ -4708,14 +4706,12 @@ void Test::testFindAreaPosColRight()
nCol = 2;
nRow = 1;
- pDoc->FindAreaPos(nCol, nRow, 0, 1, 0);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_RIGHT);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(1), nRow);
- // BUG! This returns right now 4 because FindAreaPos does
- // not yet work correctly with hidden rows
- //CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(3), nCol);
+ CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(3), nCol);
- pDoc->FindAreaPos(nCol, nRow, 0, 1, 0);
+ pDoc->FindAreaPos(nCol, nRow, 0, SC_MOVE_RIGHT);
CPPUNIT_ASSERT_EQUAL(static_cast<SCROW>(1), nRow);
CPPUNIT_ASSERT_EQUAL(static_cast<SCCOL>(6), nCol);