i18npool/source/breakiterator/breakiteratorImpl.cxx |    3 +++
 vcl/source/gdi/CommonSalLayout.cxx                  |    7 +++++--
 2 files changed, 8 insertions(+), 2 deletions(-)

New commits:
commit b087e451527f2e497ccab83b63b4f10099bfb8b8
Author: Mark Hung <mark...@gmail.com>
Date:   Sun Oct 1 21:16:06 2017 +0800

    tdf#95656 fix orientation for Bopomofo tonal marks
    
    A few Spacing Modifier Letters ( 0x2ca, 0x2c7, 0x2cb, 0x2d9 )
    are used as Bopomofo tonal marks.
    
    This patch force their vertical orientation property
    to be transformed upright.
    
    This patch also set the script type of them to WEAK
    to keep them with nearby Bopomofo symbols in the same portion.
    
    Change-Id: Ib226ebbcaf140124dee806dd6b2859150eb53f67
    Reviewed-on: https://gerrit.libreoffice.org/43001
    Tested-by: Jenkins <c...@libreoffice.org>
    Reviewed-by: Khaled Hosny <khaledho...@eglug.org>

diff --git a/i18npool/source/breakiterator/breakiteratorImpl.cxx 
b/i18npool/source/breakiterator/breakiteratorImpl.cxx
index 57da598c76e1..fba56fcec7ae 100644
--- a/i18npool/source/breakiterator/breakiteratorImpl.cxx
+++ b/i18npool/source/breakiterator/breakiteratorImpl.cxx
@@ -481,6 +481,9 @@ bool getCompatibilityScriptClassByBlock(sal_uInt32 
currentChar, sal_Int16 &rScri
     //  0x20 & 0xA0 - Bug 102975, declare western space and non-break space as 
WEAK char.
     if( 0x01 == currentChar || 0x02 == currentChar || 0x20 == currentChar || 
0xA0 == currentChar)
         rScriptType = ScriptType::WEAK;
+    // Few Spacing Modifier Letters that can be Bopomofo tonal marks.
+    else if ( 0x2CA == currentChar || 0x2CB == currentChar || 0x2C7 == 
currentChar || 0x2D9 == currentChar )
+        rScriptType = ScriptType::WEAK;
     // workaround for Coptic
     else if ( 0x2C80 <= currentChar && 0x2CE3 >= currentChar)
         rScriptType = ScriptType::LATIN;
diff --git a/vcl/source/gdi/CommonSalLayout.cxx 
b/vcl/source/gdi/CommonSalLayout.cxx
index 8e8565717932..5055c74c58b8 100644
--- a/vcl/source/gdi/CommonSalLayout.cxx
+++ b/vcl/source/gdi/CommonSalLayout.cxx
@@ -309,8 +309,11 @@ namespace {
 
     VerticalOrientation GetVerticalOrientation(sal_UCS4 cCh, const 
LanguageTag& rTag)
     {
-        // Override fullwidth colon and semi-colon orientation. Tu is 
preferred.
-        if ((cCh == 0xff1a || cCh == 0xff1b) && rTag.getLanguage() == "zh")
+        // Override orientation of fullwidth colon , semi-colon,
+        // and Bopomofo tonal marks.
+        if ((cCh == 0xff1a || cCh == 0xff1b
+           || cCh == 0x2ca || cCh == 0x2cb || cCh == 0x2c7 || cCh == 0x2d9)
+                && rTag.getLanguage() == "zh")
             return VerticalOrientation::TransformedUpright;
 
         uint8_t nRet = 1;
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to