summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2019-12-20 19:35:38 +0100
committerLászló Németh <nemeth@numbertext.org>2019-12-21 16:22:09 +0100
commitf6cf80c81043d84606a5b5f7d93ae958307a16d3 (patch)
tree1982f40815ca43f32aab9b8f4a1fb9e1a0ec928c /editeng
parentc1ed2a821234b02529bf949214d0dd26aaa4330c (diff)
tdf#106164 AutoCorrect: capitalize words with apostrophe
at sentence starting position, for example we’re -> We’re This worked only with ASCII apostrophe ('), and changing to default usage of typographical apostrophe (U+2019) broke this kind of capitalization from commit e6fade1ce133039d28369751b77ac8faff6e40cb (tdf#38395 enable smart apostrophe replacement by default). Change-Id: If582194364f77cfb9fc0f04a28ac79a08bb804ff Reviewed-on: https://gerrit.libreoffice.org/85630 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 58088523fb4e..faea050bbe17 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -304,6 +304,7 @@ ACFlags SvxAutoCorrect::GetDefaultFlags()
static constexpr sal_Unicode cEmDash = 0x2014;
static constexpr sal_Unicode cEnDash = 0x2013;
+static constexpr sal_Unicode cApostrophe = 0x2019;
SvxAutoCorrect::SvxAutoCorrect( const OUString& rShareAutocorrFile,
const OUString& rUserAutocorrFile )
@@ -845,7 +846,7 @@ void SvxAutoCorrect::FnCapitalStartSentence( SvxAutoCorrDoc& rDoc,
}
else if (pWordStt && !rCC.isDigit(aText, pStr - pStart))
{
- if( lcl_IsInAsciiArr( "-'", *pStr ) && // These characters are allowed in words
+ if( (lcl_IsInAsciiArr( "-'", *pStr ) || *pStr == cApostrophe) && // These characters are allowed in words
pWordStt - 1 == pStr &&
// Installation at beginning of paragraph. Replaced < by <= (#i38971#)
(pStart + 1) <= pStr &&