editeng/source/misc/svxacorr.cxx | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-)
New commits: commit 70ee8666edb0851222550029e445ef61434a0376 Author: László Németh <nem...@numbertext.org> AuthorDate: Tue Jun 23 19:20:24 2020 +0200 Commit: László Németh <nem...@numbertext.org> CommitDate: Fri Jun 26 09:02:46 2020 +0200 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 <nem...@numbertext.org> 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 _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits