summaryrefslogtreecommitdiff
path: root/sw/qa/extras/uiwriter/uiwriter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/qa/extras/uiwriter/uiwriter.cxx')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx16
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 09f77700472f..32fa64f16d45 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -362,6 +362,7 @@ public:
void testTdf108423();
void testTdf106164();
void testTdf54409();
+ void testTdf38394();
void testInconsistentBookmark();
CPPUNIT_TEST_SUITE(SwUiWriterTest);
@@ -567,6 +568,7 @@ public:
CPPUNIT_TEST(testTdf108423);
CPPUNIT_TEST(testTdf106164);
CPPUNIT_TEST(testTdf54409);
+ CPPUNIT_TEST(testTdf38394);
CPPUNIT_TEST_SUITE_END();
private:
@@ -7067,6 +7069,20 @@ void SwUiWriterTest::testTdf54409()
CPPUNIT_ASSERT_EQUAL(sReplaced3, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
}
+void SwUiWriterTest::testTdf38394()
+{
+ SwDoc* pDoc = createDoc("tdf38394.fodt");
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ // testing autocorrect of French l'" -> l'« (instead of l'»)
+ SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+ pWrtShell->Insert(u"l\u2019");
+ const sal_Unicode cChar = '"';
+ pWrtShell->AutoCorrect(corr, cChar);
+ sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
+ OUString sReplaced(u"l\u2019« ");
+ CPPUNIT_ASSERT_EQUAL(sReplaced, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+}
+
CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest);
CPPUNIT_PLUGIN_IMPLEMENT();