[Libreoffice-commits] .: svtools/source

Caolán McNamara caolan at kemper.freedesktop.org
Thu Feb 10 06:36:56 PST 2011


 svtools/source/control/ctrlbox.cxx |   19 ++++++++++++++++---
 1 file changed, 16 insertions(+), 3 deletions(-)

New commits:
commit b336065890b4d382d496ab8a6dac9ea099f1c23c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Feb 10 14:08:40 2011 +0000

    add sample Hangul text for hang script-tag

diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 745ddaf..db91522 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -965,6 +965,13 @@ namespace
             };
             sSampleText = rtl::OUString(aHani, SAL_N_ELEMENTS(aHani));
         }
+        else if (nScript == MKTAG("hang"))
+        {
+            const sal_Unicode aHang[] = {
+                0xD55C, 0xAE00
+            };
+            sSampleText = rtl::OUString(aHang, SAL_N_ELEMENTS(aHang));
+        }
         else if (nScript == MKTAG("hebr"))
         {
             const sal_Unicode aHebr[] = {
@@ -1095,17 +1102,22 @@ namespace
             return aTmp[0];
 
         aTmp.erase(std::remove(aTmp.begin(), aTmp.end(), MKTAG("deva")), aTmp.end());
-
         //Probably strongly tuned for a single Indic script
         if (aTmp.size() == 1)
             return aTmp[0];
 
+        aTmp.erase(std::remove(aTmp.begin(), aTmp.end(), MKTAG("jamo")), aTmp.end());
+        //Probably strongly tuned for a single CJK script (Korean)
+        if (aTmp.size() == 1)
+            return aTmp[0];
+
         if (aTmp.size() == 2)
         {
             const sal_uInt32 nHaniKaniTag = MKTAG("hani") | MKTAG("kana");
             if ((aTmp[0] | aTmp[1]) == nHaniKaniTag)
                 return nHaniKaniTag;
         }
+
         return 0;
     }
 
@@ -1332,14 +1344,15 @@ void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
             {
                 MKTAG("arab"), MKTAG("hebr"),
 
+                (MKTAG("hani")|MKTAG("kana")), MKTAG("hani"), MKTAG("kana"),
+                MKTAG("hang"),
+
                 MKTAG("beng"), MKTAG("gujr"), MKTAG("guru"), MKTAG("knda"),
                 MKTAG("mlym"), MKTAG("mymr"), MKTAG("orya"), MKTAG("taml"),
                 MKTAG("telu"), MKTAG("sinh"),
 
                 MKTAG("tibt"), MKTAG("thai"), MKTAG("khmr"), MKTAG("ethi"),
 
-                (MKTAG("hani")|MKTAG("kana")), MKTAG("hani"), MKTAG("kana"),
-
                 MKTAG("deva"),
 
                 MKTAG("grek"), MKTAG("cyrl")


More information about the Libreoffice-commits mailing list