[Libreoffice-commits] core.git: sw/qa
Varun
varun.dhall at studentpartner.com
Thu Aug 13 04:26:05 PDT 2015
sw/qa/extras/uiwriter/uiwriter.cxx | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
New commits:
commit 7e32ce6b4f910c0d43ce6c6ee28dac1e5aad0e52
Author: Varun <varun.dhall at studentpartner.com>
Date: Tue Aug 11 22:50:08 2015 +0530
Added Test for tdf#74363 auto correct of initial captials on start
Change-Id: I1c17778ef4e1d5b977a7c3e6f6f78caca4e0a8ec
Reviewed-on: https://gerrit.libreoffice.org/17654
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index d59f3b3..edfd808 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -133,6 +133,7 @@ public:
void testTdf78742();
void testUnoParagraph();
void testSearchWithTransliterate();
+ void testTdf74363();
void testTdf80663();
void testTdf57197();
void testTdf90808();
@@ -202,6 +203,7 @@ public:
CPPUNIT_TEST(testTdf78742);
CPPUNIT_TEST(testUnoParagraph);
CPPUNIT_TEST(testSearchWithTransliterate);
+ CPPUNIT_TEST(testTdf74363);
CPPUNIT_TEST(testTdf80663);
CPPUNIT_TEST(testTdf57197);
CPPUNIT_TEST(testTdf90808);
@@ -1576,6 +1578,21 @@ void SwUiWriterTest::testSearchWithTransliterate()
CPPUNIT_ASSERT_EQUAL(1,(int)case2);
}
+void SwUiWriterTest::testTdf74363()
+{
+ SwDoc* pDoc = createDoc();
+ SwWrtShell* pWrtShell = pDoc->GetDocShell()->GetWrtShell();
+ //testing autocorrect of initial capitals on start of first paragraph
+ SwAutoCorrect corr(*SvxAutoCorrCfg::Get().GetAutoCorrect());
+ //Inserting one all-lowercase word into the first paragraph
+ pWrtShell->Insert("testing");
+ const sal_Unicode cChar = ' ';
+ pWrtShell->AutoCorrect(corr, cChar);
+ //The word should be capitalized due to autocorrect
+ sal_uLong nIndex = pWrtShell->GetCrsr()->GetNode().GetIndex();
+ CPPUNIT_ASSERT_EQUAL(OUString("Testing "), static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
+}
+
void SwUiWriterTest::testTdf80663()
{
SwDoc* pDoc = createDoc();
More information about the Libreoffice-commits
mailing list