summaryrefslogtreecommitdiff
path: root/sw/qa/extras/layout/layout.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-08-01 10:23:44 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-08-02 15:10:43 +0200
commit961d42e1ca1da7f3199d46445b3766d9c6a6c938 (patch)
tree1797e56bac0bb438f4d3d27a7fb09d82fdafe827 /sw/qa/extras/layout/layout.cxx
parent21ed46f683dd9d838371cdba02593f3e64a5124c (diff)
introduce SwPosition::GetNodeIndex
as part of the process of hiding the internals of SwPosition largely done by doing: git grep -lF 'nNode.GetIndex' | xargs perl -pi -e 's/\bnNode\.GetIndex/GetNodeIndex/g' Change-Id: I3616cea4c47595afe74f1aa8e3be553279f25d44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137694 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/qa/extras/layout/layout.cxx')
-rw-r--r--sw/qa/extras/layout/layout.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index e63b5bd6af1d..0e3811fa22fc 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -3869,7 +3869,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testBtlrCell)
SwPosition aCellStart = *pWrtShell->GetCursor()->Start();
// Test that pressing "up" at the start of the cell goes to the next character position.
- SwNodeOffset nNodeIndex = pWrtShell->GetCursor()->Start()->nNode.GetIndex();
+ SwNodeOffset nNodeIndex = pWrtShell->GetCursor()->Start()->GetNodeIndex();
sal_Int32 nIndex = pWrtShell->GetCursor()->Start()->nContent.GetIndex();
KeyEvent aKeyEvent(0, KEY_UP);
SwEditWin& rEditWin = pShell->GetView()->GetEditWin();
@@ -3886,7 +3886,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testBtlrCell)
Scheduler::ProcessEventsToIdle();
// Without the accompanying fix in place, this test would have failed: the cursor went to the
// paragraph after the table.
- CPPUNIT_ASSERT_EQUAL(nNodeIndex + 1, pWrtShell->GetCursor()->Start()->nNode.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(nNodeIndex + 1, pWrtShell->GetCursor()->Start()->GetNodeIndex());
// Test that we have the correct character index after traveling to the next paragraph.
// Without the accompanying fix in place, this test would have failed: char position was 5, i.e.
@@ -3913,7 +3913,7 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testBtlrCell)
aPoint.setY(nSecondParaTop + nSecondParaHeight - 100);
SwCursorMoveState aState(CursorMoveState::NONE);
pLayout->GetModelPositionForViewPoint(&aPosition, aPoint, &aState);
- CPPUNIT_ASSERT_EQUAL(aCellStart.nNode.GetIndex() + 1, aPosition.nNode.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(aCellStart.GetNodeIndex() + 1, aPosition.GetNodeIndex());
// Without the accompanying fix in place, this test would have failed: character position was 5,
// i.e. cursor was at the end of the paragraph.
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(0), aPosition.nContent.GetIndex());
@@ -4564,13 +4564,13 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf128399)
SwCursorMoveState aState(CursorMoveState::NONE);
pLayout->GetModelPositionForViewPoint(&aPosition, aPoint, &aState);
// Second row is +3: end node, start node and the first text node in the 2nd row.
- SwNodeOffset nExpected = aFirstRow.nNode.GetIndex() + 3;
+ SwNodeOffset nExpected = aFirstRow.GetNodeIndex() + 3;
// Without the accompanying fix in place, this test would have failed with:
// - Expected: 14
// - Actual : 11
// i.e. clicking on the center of the 2nd row placed the cursor in the 1st row.
- CPPUNIT_ASSERT_EQUAL(nExpected, aPosition.nNode.GetIndex());
+ CPPUNIT_ASSERT_EQUAL(nExpected, aPosition.GetNodeIndex());
}
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf145826)