[Libreoffice-commits] core.git: i18npool/inc i18npool/source i18npool/util

DaeHyun Sung (via logerrit) logerrit at kemper.freedesktop.org
Fri May 31 23:22:04 UTC 2019


 i18npool/inc/calendar_gregorian.hxx                   |   10 ++++++++++
 i18npool/source/calendar/calendar_gregorian.cxx       |   13 +++++++++++++
 i18npool/source/registerservices/registerservices.cxx |    4 ++++
 i18npool/util/i18npool.component                      |    3 +++
 4 files changed, 30 insertions(+)

New commits:
commit 5e67aa92a8f08fe488c9344851c2f819d4eaa542
Author:     DaeHyun Sung <sungdh86+git at gmail.com>
AuthorDate: Sat May 25 09:33:33 2019 +0900
Commit:     Eike Rathke <erack at redhat.com>
CommitDate: Sat Jun 1 01:21:06 2019 +0200

    Support to Korean Dangi Calendar for tdf#125446
    
    Support to Korean Traditional Calendar, Dan-gi(단기/檀紀) Calendar
    
    The era name, Dangi(단기,檀紀) originating from the foundation of Gojoseon[고조선/古朝鮮] is also widely used in Korea as an indication of long civilization of Korea.
    
    Full name: `Dangun-giwon (단군기원, 檀君紀元 "First Age of Lord Dangun")`
    
    Abbreviation Name: `Dangi(단기,檀紀)`
    
    The Dangi Calendar measures years from the ancient founding of Korea in 2333 B.C.
    
    Reference. ICU Library
    ICU library support Dangi Calendar.
    ICU4C 50 http://bugs.icu-project.org/trac/ticket/9255
    ICU4J 51 http://bugs.icu-project.org/trac/ticket/9616
    
    Change-Id: I490b8b288c68f498eb29d4fcc73251cbef3ac6d4
    Reviewed-on: https://gerrit.libreoffice.org/72943
    Tested-by: Jenkins
    Reviewed-by: Eike Rathke <erack at redhat.com>

diff --git a/i18npool/inc/calendar_gregorian.hxx b/i18npool/inc/calendar_gregorian.hxx
index 6d343f33f28d..894f2246e30b 100644
--- a/i18npool/inc/calendar_gregorian.hxx
+++ b/i18npool/inc/calendar_gregorian.hxx
@@ -177,6 +177,16 @@ public:
 };
 
 
+//  class Calendar_dangi
+
+class Calendar_dangi : public Calendar_gregorian
+{
+public:
+    // Constructors
+    Calendar_dangi();
+};
+
+
 //  class Calendar_buddhist
 
 class Calendar_buddhist : public Calendar_gregorian
diff --git a/i18npool/source/calendar/calendar_gregorian.cxx b/i18npool/source/calendar/calendar_gregorian.cxx
index 45a9de3bf3ef..18676361027a 100644
--- a/i18npool/source/calendar/calendar_gregorian.cxx
+++ b/i18npool/source/calendar/calendar_gregorian.cxx
@@ -226,6 +226,19 @@ Calendar_ROC::Calendar_ROC() : Calendar_gregorian(ROC_eraArray)
     cCalendar = "com.sun.star.i18n.Calendar_ROC";
 }
 
+/**
+* The start year of the Korean traditional calendar (Dan-gi) is the inaugural
+* year of Dan-gun (BC 2333).
+*/
+static const Era dangi_eraArray[] = {
+    {-2332, 1, 1, 0},
+    {0, 0, 0, 0}
+};
+Calendar_dangi::Calendar_dangi() : Calendar_gregorian(dangi_eraArray)
+{
+    cCalendar = "com.sun.star.i18n.Calendar_dangi";
+}
+
 static const Era buddhist_eraArray[] = {
     {-542, 1, 1, 0},
     {0, 0, 0, 0}
diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx
index f6c187c83a56..dd891558696d 100644
--- a/i18npool/source/registerservices/registerservices.cxx
+++ b/i18npool/source/registerservices/registerservices.cxx
@@ -114,6 +114,7 @@ IMPL_CREATEINSTANCE( Calendar_gregorian )
 IMPL_CREATEINSTANCE( Calendar_hanja )
 IMPL_CREATEINSTANCE( Calendar_gengou )
 IMPL_CREATEINSTANCE( Calendar_ROC )
+IMPL_CREATEINSTANCE( Calendar_dangi )
 IMPL_CREATEINSTANCE( Calendar_hijri )
 IMPL_CREATEINSTANCE( Calendar_jewish )
 IMPL_CREATEINSTANCE( Calendar_buddhist )
@@ -295,6 +296,9 @@ static const struct InstancesArray {
     {   "com.sun.star.i18n.Calendar_ROC",
         "com.sun.star.i18n.Calendar_ROC",
         &Calendar_ROC_CreateInstance },
+    {   "com.sun.star.i18n.Calendar_dangi",
+        "com.sun.star.i18n.Calendar_dangi",
+        &Calendar_dangi_CreateInstance },
     {   "com.sun.star.i18n.Calendar_hanja_yoil",
         "com.sun.star.i18n.Calendar_hanja_yoil",
         &Calendar_hanja_CreateInstance },
diff --git a/i18npool/util/i18npool.component b/i18npool/util/i18npool.component
index d4e7ea7b0a35..0b419d2f80f5 100644
--- a/i18npool/util/i18npool.component
+++ b/i18npool/util/i18npool.component
@@ -49,6 +49,9 @@
   <implementation name="com.sun.star.i18n.Calendar_ROC">
     <service name="com.sun.star.i18n.Calendar_ROC"/>
   </implementation>
+  <implementation name="com.sun.star.i18n.Calendar_dangi">
+    <service name="com.sun.star.i18n.Calendar_dangi"/>
+  </implementation>
   <implementation name="com.sun.star.i18n.Calendar_buddhist">
     <service name="com.sun.star.i18n.Calendar_buddhist"/>
   </implementation>


More information about the Libreoffice-commits mailing list