diff options
author | Varun <varun.dhall@studentpartner.com> | 2015-06-21 03:29:14 +0530 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-06-22 11:07:38 +0000 |
commit | 9d9fbbdc1ec57715305563817ce0a7a638da7bda (patch) | |
tree | 55d219fdfce588eed2b503bcb60ed66b067be30c /sw | |
parent | lokdocview: fixed a signal name (diff) | |
download | core-9d9fbbdc1ec57715305563817ce0a7a638da7bda.tar.gz core-9d9fbbdc1ec57715305563817ce0a7a638da7bda.zip |
Add test for tdf#75137 crsr movement b/w footnote
Change-Id: Ifd0ec1e7922c54fb3509824de13bb8f0b1c79279
Reviewed-on: https://gerrit.libreoffice.org/16391
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index 22cd38abd4ad..815189df414c 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -95,6 +95,7 @@ public: void testdelofTableRedlines(); void testExportToPicture(); void testSearchWithTransliterate(); + void testTdf75137(); void testTableBackgroundColor(); void testTdf90362(); void testUndoCharAttribute(); @@ -137,6 +138,7 @@ public: CPPUNIT_TEST(testdelofTableRedlines); CPPUNIT_TEST(testExportToPicture); CPPUNIT_TEST(testSearchWithTransliterate); + CPPUNIT_TEST(testTdf75137); CPPUNIT_TEST(testTableBackgroundColor); CPPUNIT_TEST(testTdf90362); CPPUNIT_TEST(testUndoCharAttribute); @@ -957,6 +959,23 @@ void SwUiWriterTest::testSearchWithTransliterate() CPPUNIT_ASSERT_EQUAL(1,(int)case2); } +void SwUiWriterTest::testTdf75137() +{ + SwDoc* pDoc = createDoc(); + SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(true); + pWrtShell->InsertFootnote(OUString("This is first footnote")); + sal_uLong firstIndex = pShellCrsr->GetNode().GetIndex(); + pShellCrsr->GotoFootnoteAnchor(); + pWrtShell->InsertFootnote(OUString("This is second footnote")); + pWrtShell->Up(false, 1, false); + sal_uLong secondIndex = pShellCrsr->GetNode().GetIndex(); + pWrtShell->Down(false, 1, false); + sal_uLong thirdIndex = pShellCrsr->GetNode().GetIndex(); + CPPUNIT_ASSERT_EQUAL(firstIndex, thirdIndex); + CPPUNIT_ASSERT(firstIndex != secondIndex); +} + void SwUiWriterTest::testTableBackgroundColor() { SwDoc* pDoc = createDoc(); |