summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2020-06-23 19:20:24 +0200
committerLászló Németh <nemeth@numbertext.org>2020-06-26 09:02:46 +0200
commit70ee8666edb0851222550029e445ef61434a0376 (patch)
tree20d79db373bd6ba3439c84166e2ddfe1c6c4c83c /editeng
parent77b213890a96d144d9cfacdfd35ac0bba68b9f7a (diff)
tdf#133524 AutoCorrect angle quotes for fr-CH and gl-ES
Note: << and >> replaced with single angle quotation mark ‹ and › in Swiss French, according to the apostrophe related changes in tdf#116062, see commit b9910e87de4eea1cb3684bb7af8e58d681cbe809 (Resolves: tdf#116062 revert [fr-CH] to use previous single quote characters) Change-Id: I84c54b7c12d2b3a2a53e4daf876bfba11985fdea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97095 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/misc/svxacorr.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 4f55ea951167..58878e41f9fa 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -314,6 +314,8 @@ static constexpr sal_Unicode cEnDash = 0x2013;
static constexpr sal_Unicode cApostrophe = 0x2019;
static constexpr sal_Unicode cLeftDoubleAngleQuote = 0xAB;
static constexpr sal_Unicode cRightDoubleAngleQuote = 0xBB;
+static constexpr sal_Unicode cLeftSingleAngleQuote = 0x2039;
+static constexpr sal_Unicode cRightSingleAngleQuote = 0x203A;
// stop characters for searching preceding quotes
// (the first character is also the opening quote we are looking for)
const sal_Unicode aStopDoubleAngleQuoteStart[] = { 0x201E, 0x201D, 0 }; // preceding ,,
@@ -1208,9 +1210,10 @@ void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, sal_Int32 nInsPos,
if ( eType == ACQuotes::DoubleAngleQuote )
{
+ bool bSwiss = eLang == LANGUAGE_FRENCH_SWISS;
cRet = ( '<' == cInsChar || ('\"' == cInsChar && !bSttQuote) )
- ? cLeftDoubleAngleQuote
- : cRightDoubleAngleQuote;
+ ? ( bSwiss ? cLeftSingleAngleQuote : cLeftDoubleAngleQuote )
+ : ( bSwiss ? cRightSingleAngleQuote : cRightDoubleAngleQuote );
}
else if ( eType == ACQuotes::UseApostrophe )
cRet = cApostrophe;
@@ -1389,6 +1392,8 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
const LanguageType eLang = GetDocLanguage( rDoc, nInsPos );
if ( eLang.anyOf(
LANGUAGE_FINNISH, // alternative primary level
+ LANGUAGE_FRENCH_SWISS, // second level
+ LANGUAGE_GALICIAN,
LANGUAGE_HUNGARIAN, // second level
LANGUAGE_POLISH, // second level
LANGUAGE_PORTUGUESE, // primary level