[OLEAUT32] Sync with Wine Staging 2.9. CORE-13362
[reactos.git] / reactos / dll / win32 / oleaut32 / oleaut.c
index a70da6f..349a64d 100644 (file)
@@ -918,3 +918,112 @@ HCURSOR WINAPI OleIconToCursor( HINSTANCE hinstExe, HICON hIcon)
     /* FIXME: make an extended conversation from HICON to HCURSOR */
     return CopyCursor(hIcon);
 }
+
+/***********************************************************************
+ *              GetAltMonthNames (OLEAUT32.@)
+ */
+HRESULT WINAPI GetAltMonthNames(LCID lcid, LPOLESTR **str)
+{
+    static const WCHAR ar_month1W[] = {0x645,0x62d,0x631,0x645,0};
+    static const WCHAR ar_month2W[] = {0x635,0x641,0x631,0};
+    static const WCHAR ar_month3W[] = {0x631,0x628,0x64a,0x639,' ',0x627,0x644,0x627,0x648,0x644,0};
+    static const WCHAR ar_month4W[] = {0x631,0x628,0x64a,0x639,' ',0x627,0x644,0x62b,0x627,0x646,0x64a,0};
+    static const WCHAR ar_month5W[] = {0x62c,0x645,0x627,0x62f,0x649,' ',0x627,0x644,0x627,0x648,0x644,0x649,0};
+    static const WCHAR ar_month6W[] = {0x62c,0x645,0x627,0x62f,0x649,' ',0x627,0x644,0x62b,0x627,0x646,0x64a,0x629,0};
+    static const WCHAR ar_month7W[] = {0x631,0x62c,0x628,0};
+    static const WCHAR ar_month8W[] = {0x634,0x639,0x628,0x627,0x646,0};
+    static const WCHAR ar_month9W[] = {0x631,0x645,0x636,0x627,0x646,0};
+    static const WCHAR ar_month10W[] = {0x634,0x648,0x627,0x643,0};
+    static const WCHAR ar_month11W[] = {0x630,0x648,' ',0x627,0x644,0x642,0x639,0x62f,0x629,0};
+    static const WCHAR ar_month12W[] = {0x630,0x648,' ',0x627,0x644,0x62d,0x62c,0x629,0};
+
+    static const WCHAR *arabic_hijri[] =
+    {
+        ar_month1W,
+        ar_month2W,
+        ar_month3W,
+        ar_month4W,
+        ar_month5W,
+        ar_month6W,
+        ar_month7W,
+        ar_month8W,
+        ar_month9W,
+        ar_month10W,
+        ar_month11W,
+        ar_month12W,
+        NULL
+    };
+
+    static const WCHAR pl_month1W[] = {'s','t','y','c','z','n','i','a',0};
+    static const WCHAR pl_month2W[] = {'l','u','t','e','g','o',0};
+    static const WCHAR pl_month3W[] = {'m','a','r','c','a',0};
+    static const WCHAR pl_month4W[] = {'k','w','i','e','t','n','i','a',0};
+    static const WCHAR pl_month5W[] = {'m','a','j','a',0};
+    static const WCHAR pl_month6W[] = {'c','z','e','r','w','c','a',0};
+    static const WCHAR pl_month7W[] = {'l','i','p','c','a',0};
+    static const WCHAR pl_month8W[] = {'s','i','e','r','p','n','i','a',0};
+    static const WCHAR pl_month9W[] = {'w','r','z','e',0x15b,'n','i','a',0};
+    static const WCHAR pl_month10W[] = {'p','a',0x17a,'d','z','i','e','r','n','i','k','a',0};
+    static const WCHAR pl_month11W[] = {'l','i','s','t','o','p','a','d','a',0};
+    static const WCHAR pl_month12W[] = {'g','r','u','d','n','i','a',0};
+
+    static const WCHAR *polish_genitive_names[] =
+    {
+        pl_month1W,
+        pl_month2W,
+        pl_month3W,
+        pl_month4W,
+        pl_month5W,
+        pl_month6W,
+        pl_month7W,
+        pl_month8W,
+        pl_month9W,
+        pl_month10W,
+        pl_month11W,
+        pl_month12W,
+        NULL
+    };
+
+    static const WCHAR ru_month1W[] = {0x44f,0x43d,0x432,0x430,0x440,0x44f,0};
+    static const WCHAR ru_month2W[] = {0x444,0x435,0x432,0x440,0x430,0x43b,0x44f,0};
+    static const WCHAR ru_month3W[] = {0x43c,0x430,0x440,0x442,0x430,0};
+    static const WCHAR ru_month4W[] = {0x430,0x43f,0x440,0x435,0x43b,0x44f,0};
+    static const WCHAR ru_month5W[] = {0x43c,0x430,0x44f,0};
+    static const WCHAR ru_month6W[] = {0x438,0x44e,0x43d,0x44f,0};
+    static const WCHAR ru_month7W[] = {0x438,0x44e,0x43b,0x44f,0};
+    static const WCHAR ru_month8W[] = {0x430,0x432,0x433,0x443,0x441,0x442,0x430,0};
+    static const WCHAR ru_month9W[] = {0x441,0x435,0x43d,0x442,0x44f,0x431,0x440,0x44f,0};
+    static const WCHAR ru_month10W[] = {0x43e,0x43a,0x442,0x44f,0x431,0x440,0x44f,0};
+    static const WCHAR ru_month11W[] = {0x43d,0x43e,0x44f,0x431,0x440,0x44f,0};
+    static const WCHAR ru_month12W[] = {0x434,0x435,0x43a,0x430,0x431,0x440,0x44f,0};
+
+    static const WCHAR *russian_genitive_names[] =
+    {
+        ru_month1W,
+        ru_month2W,
+        ru_month3W,
+        ru_month4W,
+        ru_month5W,
+        ru_month6W,
+        ru_month7W,
+        ru_month8W,
+        ru_month9W,
+        ru_month10W,
+        ru_month11W,
+        ru_month12W,
+        NULL
+    };
+
+    TRACE("%#x, %p\n", lcid, str);
+
+    if (PRIMARYLANGID(LANGIDFROMLCID(lcid)) == LANG_ARABIC)
+        *str = (LPOLESTR *)arabic_hijri;
+    else if (PRIMARYLANGID(LANGIDFROMLCID(lcid)) == LANG_POLISH)
+        *str = (LPOLESTR *)polish_genitive_names;
+    else if (PRIMARYLANGID(LANGIDFROMLCID(lcid)) == LANG_RUSSIAN)
+        *str = (LPOLESTR *)russian_genitive_names;
+    else
+        *str = NULL;
+
+    return S_OK;
+}