[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - editeng/source

László Németh (via logerrit) logerrit at kemper.freedesktop.org
Fri Jun 26 10:33:00 UTC 2020


 editeng/source/misc/svxacorr.cxx |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

New commits:
commit 7b2f854754065354ccd50a42e0b7d28ee7c745dd
Author:     László Németh <nemeth at numbertext.org>
AuthorDate: Tue Jun 23 19:20:24 2020 +0200
Commit:     Adolfo Jayme Barrientos <fitojb at ubuntu.com>
CommitDate: Fri Jun 26 12:32:29 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 <nemeth at numbertext.org>
    (cherry picked from commit 70ee8666edb0851222550029e445ef61434a0376)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97142
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index c776cb45aae7..32d4d6e9fa5f 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -313,6 +313,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 ,,
@@ -1207,9 +1209,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;
@@ -1386,6 +1389,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


More information about the Libreoffice-commits mailing list