diff options
-rw-r--r-- | sw/qa/extras/uiwriter/data/tdf148868.odt | bin | 0 -> 11112 bytes | |||
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter3.cxx | 19 |
2 files changed, 19 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/tdf148868.odt b/sw/qa/extras/uiwriter/data/tdf148868.odt Binary files differnew file mode 100644 index 000000000000..7ebf68a82ea3 --- /dev/null +++ b/sw/qa/extras/uiwriter/data/tdf148868.odt diff --git a/sw/qa/extras/uiwriter/uiwriter3.cxx b/sw/qa/extras/uiwriter/uiwriter3.cxx index 3c794a3da60e..1c7c4a87d3c5 100644 --- a/sw/qa/extras/uiwriter/uiwriter3.cxx +++ b/sw/qa/extras/uiwriter/uiwriter3.cxx @@ -352,6 +352,25 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf147126) } } +CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf148868) +{ + SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf148868.odt"); + SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); + + pWrtShell->EndPg(/*bSelect=*/false); + pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/true, 5, /*bBasicCall=*/false); + pWrtShell->Insert("X"); + + // Without the fix in place, this test would have failed with + // - Expected: 1 + // - Actual : 0 + CPPUNIT_ASSERT_EQUAL(1, getShapes()); + CPPUNIT_ASSERT_EQUAL(1, getPages()); +} + CPPUNIT_TEST_FIXTURE(SwUiWriterTest3, testTdf129382) { SwDoc* pDoc = createSwDoc(DATA_DIRECTORY, "tdf129382.docx"); |