diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-11-27 13:18:47 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-11-27 21:58:07 +0100 |
commit | 03567d1156d4e61910912c89124b6da94a577c22 (patch) | |
tree | 50cdb71c9e3915180a0c605c66cfc583c7ac15bc /sw | |
parent | 6160ac241b1f54ddb2b2b444da14fe31878a5bc7 (diff) |
rhbz#1517407 Capitalize every word doesn't work after brackets
Change-Id: Iab2da3f74f6116bb1b9855044df2a2ece977bb95
Reviewed-on: https://gerrit.libreoffice.org/45335
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/qa/core/uwriter.cxx | 6 | ||||
-rw-r--r-- | sw/source/core/txtnode/txtedt.cxx | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/sw/qa/core/uwriter.cxx b/sw/qa/core/uwriter.cxx index 9b68dc156d08..e91b8fd8ac20 100644 --- a/sw/qa/core/uwriter.cxx +++ b/sw/qa/core/uwriter.cxx @@ -1492,6 +1492,12 @@ void SwDocTest::testTransliterate() CPPUNIT_ASSERT_EQUAL(OUString("Foobar"), translitTest(*m_pDoc, aPaM, TransliterationFlags::HIRAGANA_KATAKANA)); + + m_pDoc->getIDocumentContentOperations().AppendTextNode(*aPaM.GetPoint()); + m_pDoc->getIDocumentContentOperations().InsertString(aPaM, "one (two) three"); + CPPUNIT_ASSERT_EQUAL(OUString("One (Two) Three"), + translitTest(*m_pDoc, aPaM, + TransliterationFlags::TITLE_CASE)); } namespace diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx index 424564b72450..c9b7abe9734e 100644 --- a/sw/source/core/txtnode/txtedt.cxx +++ b/sw/source/core/txtnode/txtedt.cxx @@ -1757,8 +1757,8 @@ void SwTextNode::TransliterateText( } aCurWordBndry = g_pBreakIt->GetBreakIter()->nextWord( - GetText(), nEnd, - g_pBreakIt->GetLocale( GetLang( nEnd ) ), + GetText(), nStt, + g_pBreakIt->GetLocale(GetLang(nStt, 1)), nWordType); } } |