summaryrefslogtreecommitdiff
path: root/sw/qa/extras/uiwriter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/uiwriter')
-rw-r--r--sw/qa/extras/uiwriter/data/fdo75110.odtbin0 -> 13169 bytes
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx15
2 files changed, 15 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/data/fdo75110.odt b/sw/qa/extras/uiwriter/data/fdo75110.odt
new file mode 100644
index 000000000000..f4c2f2bb699b
--- /dev/null
+++ b/sw/qa/extras/uiwriter/data/fdo75110.odt
Binary files differ
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 6df74260f47f..8e59941ef9f5 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -28,6 +28,7 @@ public:
void testFdo70807();
void testImportRTF();
void testExportRTF();
+ void testFdo75110();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
CPPUNIT_TEST(testReplaceForward);
@@ -36,6 +37,7 @@ public:
CPPUNIT_TEST(testFdo70807);
CPPUNIT_TEST(testImportRTF);
CPPUNIT_TEST(testExportRTF);
+ CPPUNIT_TEST(testFdo75110);
CPPUNIT_TEST_SUITE_END();
private:
@@ -87,6 +89,19 @@ void SwUiWriterTest::testReplaceForward()
CPPUNIT_ASSERT_EQUAL(ORIGINAL_REPLACE_CONTENT, pTxtNode->GetTxt());
}
+void SwUiWriterTest::testFdo75110()
+{
+ SwDoc* pDoc = createDoc("fdo75110.odt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+
+ pWrtShell->SelAll();
+ // The problem was that SwEditShell::DeleteSel() what this Delete() invokes took the wrong selection...
+ pWrtShell->Delete();
+ sw::UndoManager& rUndoManager = pDoc->GetUndoManager();
+ // ... so this Undo() call resulted in a crash.
+ rUndoManager.Undo();
+}
+
void SwUiWriterTest::testReplaceBackward()
{
SwDoc* pDoc = createDoc();