summaryrefslogtreecommitdiff
path: root/sw/qa/extras/uiwriter/uiwriter.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-03-13 15:03:33 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-13 15:41:27 +0100
commitf1f9b5b1b73218274ee69cf4e518c2ba926458af (patch)
tree956e57a823198b889dc9c528b9162f83231dd6dd /sw/qa/extras/uiwriter/uiwriter.cxx
parent05331426023de4714ecabbf8a891061b1880a3c4 (diff)
fdo#75898 SwFEShell::InsertRow: fix this in case bSelectAll == true
Change-Id: Iaf59db6a55c3f81d11d0196d5d3e52056e31c4b1
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter.cxx')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx17
1 files changed, 17 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 8e59941ef9f5..5aef75bab9a0 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -29,6 +29,7 @@ public:
void testImportRTF();
void testExportRTF();
void testFdo75110();
+ void testFdo75898();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -38,6 +39,7 @@ public:
CPPUNIT_TEST(testImportRTF);
CPPUNIT_TEST(testExportRTF);
CPPUNIT_TEST(testFdo75110);
+ CPPUNIT_TEST(testFdo75898);
CPPUNIT_TEST_SUITE_END();
private:
@@ -102,6 +104,21 @@ void SwUiWriterTest::testFdo75110()
rUndoManager.Undo();
}
+void SwUiWriterTest::testFdo75898()
+{
+ SwDoc* pDoc = createDoc("fdo75898.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ pWrtShell->SelAll();
+ pWrtShell->InsertRow(1, true);
+ pWrtShell->InsertRow(1, true);
+
+ // Now check if the table has 3 lines.
+ SwShellCrsr* pShellCrsr = pWrtShell->getShellCrsr(false);
+ SwTableNode* pTableNode = pShellCrsr->Start()->nNode.GetNode().FindTableNode();
+ // This was 1, when doing the same using the UI, Writer even crashed.
+ CPPUNIT_ASSERT_EQUAL(static_cast<size_t>(3), pTableNode->GetTable().GetTabLines().size());
+}
+
void SwUiWriterTest::testReplaceBackward()
{
SwDoc* pDoc = createDoc();