diff options
author | László Németh <nemeth@numbertext.org> | 2019-12-29 17:46:56 +0100 |
---|---|---|
committer | Adolfo Jayme Barrientos <fitojb@ubuntu.com> | 2019-12-31 15:07:26 +0100 |
commit | 6a37bc154b80e261e6d10d383de73da6ffa1e9d9 (patch) | |
tree | 16642194c2fb6dbb1b62682971afd5aa7bd6d66c /sw | |
parent | a17eca1559d2dc07b88eeb836f794f43ef7ca0ce (diff) |
tdf#59666 AutoCorrect: don't capitalize single Greek letters
in automatic sentence capitalization (except in Greek texts),
to keep the requested lower case scientific and mathematical symbols.
Change-Id: I0c658bb69fb90e7159665939f85f1fd99477c730
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/85955
Reviewed-by: László Németh <nemeth@numbertext.org>
Tested-by: László Németh <nemeth@numbertext.org>
(cherry picked from commit 04ef45a6dd7692c6ee08769c4ac4a0e92a0b64b8)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86042
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/extras/uiwriter/uiwriter.cxx | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx index ede1736ce0dc..52003fe601f8 100644 --- a/sw/qa/extras/uiwriter/uiwriter.cxx +++ b/sw/qa/extras/uiwriter/uiwriter.cxx @@ -362,6 +362,7 @@ public: void testTdf106164(); void testTdf54409(); void testTdf38394(); + void testTdf59666(); void testInconsistentBookmark(); CPPUNIT_TEST_SUITE(SwUiWriterTest); @@ -568,6 +569,7 @@ public: CPPUNIT_TEST(testTdf106164); CPPUNIT_TEST(testTdf54409); CPPUNIT_TEST(testTdf38394); + CPPUNIT_TEST(testTdf59666); CPPUNIT_TEST_SUITE_END(); private: @@ -7031,6 +7033,20 @@ void SwUiWriterTest::testTdf38394() CPPUNIT_ASSERT_EQUAL(sReplaced, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText()); } +void SwUiWriterTest::testTdf59666() +{ + SwDoc* pDoc = createDoc(); + SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell(); + // testing missing autocorrect of single Greek letters + SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect()); + pWrtShell->Insert(u"\u03C0"); + const sal_Unicode cChar = ' '; + pWrtShell->AutoCorrect(corr, cChar); + sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex(); + OUString sReplaced(u"\u03C0 "); + CPPUNIT_ASSERT_EQUAL(sReplaced, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText()); +} + CPPUNIT_TEST_SUITE_REGISTRATION(SwUiWriterTest); CPPUNIT_PLUGIN_IMPLEMENT(); |