summaryrefslogtreecommitdiff
path: root/sw/qa
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx25
1 files changed, 25 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 4a737f4b9121..669471d4ea3c 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -202,6 +202,7 @@ public:
void testFdo85554();
void testAutoCorr();
void testTdf83260();
+ void testTdf130274();
void testMergeDoc();
void testCreatePortions();
void testBookmarkUndo();
@@ -410,6 +411,7 @@ public:
CPPUNIT_TEST(testFdo85554);
CPPUNIT_TEST(testAutoCorr);
CPPUNIT_TEST(testTdf83260);
+ CPPUNIT_TEST(testTdf130274);
CPPUNIT_TEST(testMergeDoc);
CPPUNIT_TEST(testCreatePortions);
CPPUNIT_TEST(testBookmarkUndo);
@@ -1632,6 +1634,29 @@ void SwUiWriterTest::testTdf83260()
}
}
+void SwUiWriterTest::testTdf130274()
+{
+ SwDoc *const pDoc(createDoc());
+ SwWrtShell *const pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+
+ CPPUNIT_ASSERT(!pWrtShell->GetLayout()->IsHideRedlines());
+ CPPUNIT_ASSERT(!IDocumentRedlineAccess::IsRedlineOn(
+ pDoc->getIDocumentRedlineAccess().GetRedlineFlags()));
+
+ // "tset" may be replaced by the AutoCorrect in the test profile
+ pWrtShell->Insert("tset");
+ // select from left to right
+ pWrtShell->Left(CRSR_SKIP_CHARS, /*bSelect=*/false, 4, /*bBasicCall=*/false);
+ pWrtShell->Right(CRSR_SKIP_CHARS, /*bSelect=*/true, 4, /*bBasicCall=*/false);
+
+ pWrtShell->SetRedlineFlags(pWrtShell->GetRedlineFlags() | RedlineFlags::On);
+ // this would crash in AutoCorrect
+ pWrtShell->AutoCorrect(corr, '.');
+
+ CPPUNIT_ASSERT(!pDoc->getIDocumentRedlineAccess().GetRedlineTable().empty());
+}
+
void SwUiWriterTest::testMergeDoc()
{
SwDoc* const pDoc1(createDoc("merge-change1.odt"));