[Libreoffice-commits] .: 5 commits - i18npool/inc i18nutil/inc i18nutil/source vcl/aqua vcl/generic vcl/headless vcl/inc vcl/ios vcl/Library_vcl.mk vcl/source vcl/unx vcl/win

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Sep 3 09:02:24 PDT 2012


 i18npool/inc/i18npool/languagetag.hxx    |    2 
 i18nutil/inc/i18nutil/unicode.hxx        |    3 
 i18nutil/source/utility/unicode.cxx      |  473 +++++++++++++++++++++++++++++++
 vcl/Library_vcl.mk                       |    1 
 vcl/aqua/source/gdi/atsui/salgdi.cxx     |    7 
 vcl/aqua/source/gdi/coretext/salgdi.cxx  |    7 
 vcl/generic/fontmanager/fontconfig.cxx   |  158 +++++++++-
 vcl/generic/fontmanager/fontmanager.cxx  |    8 
 vcl/generic/glyphs/glyphcache.cxx        |   33 --
 vcl/generic/print/genpspgraphics.cxx     |    5 
 vcl/headless/svptext.cxx                 |    6 
 vcl/inc/aqua/atsui/salgdi.h              |    2 
 vcl/inc/aqua/coretext/salgdi.h           |    2 
 vcl/inc/generic/genpspgraphics.h         |    2 
 vcl/inc/generic/glyphcache.hxx           |    1 
 vcl/inc/headless/svpgdi.hxx              |    1 
 vcl/inc/ios/salgdi.h                     |    2 
 vcl/inc/salgdi.hxx                       |    2 
 vcl/inc/unx/salgdi.h                     |    1 
 vcl/inc/vcl/fontmanager.hxx              |    7 
 vcl/inc/win/salgdi.h                     |    2 
 vcl/ios/source/gdi/salgdi.cxx            |    7 
 vcl/source/gdi/outdev3.cxx               |    6 
 vcl/unx/generic/gdi/salgdi3.cxx          |    6 
 vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx |   11 
 vcl/win/source/gdi/salgdi3.cxx           |    5 
 26 files changed, 728 insertions(+), 32 deletions(-)

New commits:
commit a4196e56eb3560a2ec2199b87e5d7ff12d55a097
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 3 16:59:48 2012 +0100

    adjust auto font installation
    
    to happen on a 5 second timer and collect up as much missing
    stuff in one go as we can
    
    Change-Id: I79f5e70634684a2ef83e3090790531149baf529b

diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index a98e529..f5f2145 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -846,64 +846,71 @@ namespace
         return LanguageTag(OStringToOUString(aBuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
     }
 
-    int autoInstallFontLangSupport(const std::vector<OString> &rNewReqs, guint xid)
+    guint get_xid_for_dbus()
     {
-        GError *error = NULL;
-        /* get the DBUS session connection */
-        DBusGConnection *session_connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
-        if (error != NULL)
-        {
-            g_warning ("DBUS cannot connect : %s", error->message);
-            g_error_free (error);
-            return -1;
-        }
+        const Window *pTopWindow = Application::IsHeadlessModeEnabled() ? NULL : Application::GetActiveTopWindow();
+        const SystemEnvData* pEnvData = pTopWindow ? pTopWindow->GetSystemData() : NULL;
+        return pEnvData ? pEnvData->aWindow : 0;
+    }
+#endif
+}
 
-        /* get the proxy with gnome-session-manager */
-        DBusGProxy *proxy = dbus_g_proxy_new_for_name(session_connection,
-                                           "org.freedesktop.PackageKit",
-                                           "/org/freedesktop/PackageKit",
-                                           "org.freedesktop.PackageKit.Modify");
-        if (proxy == NULL)
-        {
-            g_warning("Could not get DBUS proxy: org.freedesktop.PackageKit");
-            return -1;
-        }
+IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport)
+{
+    guint xid = get_xid_for_dbus();
 
-        gchar **fonts = (gchar**)g_malloc((rNewReqs.size() + 1) * sizeof(gchar*));
-        gchar **font = fonts;
-        for (std::vector<OString>::const_iterator aI = rNewReqs.begin(); aI != rNewReqs.end(); ++aI)
-            *font++ = (gchar*)aI->getStr();
-        *font = NULL;
-        gboolean res = dbus_g_proxy_call(proxy, "InstallFontconfigResources", &error,
-                     G_TYPE_UINT, xid, /* xid */
-                     G_TYPE_STRV, fonts, /* data */
-                     G_TYPE_STRING, "hide-finished", /* interaction */
-                     G_TYPE_INVALID,
-                     G_TYPE_INVALID);
-        /* check the return value */
-        if (!res)
-           g_warning("InstallFontconfigResources method failed");
-
-        /* check the error value */
-        if (error != NULL)
-        {
-            g_warning("InstallFontconfigResources problem : %s", error->message);
-            g_error_free(error);
-        }
+    if (!xid)
+        return -1;
 
-        g_free(fonts);
-        g_object_unref(G_OBJECT (proxy));
+#ifdef ENABLE_DBUS
+    GError *error = NULL;
+    /* get the DBUS session connection */
+    DBusGConnection *session_connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+    if (error != NULL)
+    {
+        g_warning ("DBUS cannot connect : %s", error->message);
+        g_error_free (error);
+        return -1;
+    }
 
-        return 0;
+    /* get the proxy with gnome-session-manager */
+    DBusGProxy *proxy = dbus_g_proxy_new_for_name(session_connection,
+                                       "org.freedesktop.PackageKit",
+                                       "/org/freedesktop/PackageKit",
+                                       "org.freedesktop.PackageKit.Modify");
+    if (proxy == NULL)
+    {
+        g_warning("Could not get DBUS proxy: org.freedesktop.PackageKit");
+        return -1;
     }
 
-    guint get_xid_for_dbus()
+    gchar **fonts = (gchar**)g_malloc((m_aCurrentRequests.size() + 1) * sizeof(gchar*));
+    gchar **font = fonts;
+    for (std::vector<OString>::const_iterator aI = m_aCurrentRequests.begin(); aI != m_aCurrentRequests.end(); ++aI)
+        *font++ = (gchar*)aI->getStr();
+    *font = NULL;
+    gboolean res = dbus_g_proxy_call(proxy, "InstallFontconfigResources", &error,
+                 G_TYPE_UINT, xid, /* xid */
+                 G_TYPE_STRV, fonts, /* data */
+                 G_TYPE_STRING, "hide-finished", /* interaction */
+                 G_TYPE_INVALID,
+                 G_TYPE_INVALID);
+    /* check the return value */
+    if (!res)
+       g_warning("InstallFontconfigResources method failed");
+
+    /* check the error value */
+    if (error != NULL)
     {
-        const Window *pTopWindow = Application::IsHeadlessModeEnabled() ? NULL : Application::GetActiveTopWindow();
-        const SystemEnvData* pEnvData = pTopWindow ? pTopWindow->GetSystemData() : NULL;
-        return pEnvData ? pEnvData->aWindow : 0;
+        g_warning("InstallFontconfigResources problem : %s", error->message);
+        g_error_free(error);
     }
+
+    g_free(fonts);
+    g_object_unref(G_OBJECT (proxy));
+    m_aCurrentRequests.clear();
 #endif
+    return 0;
 }
 
 bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& rMissingCodes )
@@ -1050,10 +1057,8 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
                 }
                 OUString sStillMissing(pRemainingCodes, nRemainingLen);
 #ifdef ENABLE_DBUS
-                guint xid = get_xid_for_dbus();
-                if (xid)
+                if (get_xid_for_dbus())
                 {
-                    std::vector<OString> aNewRequests;
                     if (sStillMissing == rMissingCodes) //replaced nothing
                     {
                         //It'd be better if we could ask packagekit using the
@@ -1071,13 +1076,16 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
                             if (!sTag.isEmpty() && m_aPreviousLangSupportRequests.find(sTag) == m_aPreviousLangSupportRequests.end())
                             {
                                 OString sReq = OString(":lang=") + sTag;
-                                aNewRequests.push_back(sReq);
+                                m_aCurrentRequests.push_back(sReq);
                                 m_aPreviousLangSupportRequests.insert(sTag);
                             }
                         }
                     }
-                    if (!aNewRequests.empty())
-                        autoInstallFontLangSupport(aNewRequests, xid);
+                    if (!m_aCurrentRequests.empty())
+                    {
+                        m_aFontInstallerTimer.Stop();
+                        m_aFontInstallerTimer.Start();
+                    }
                 }
 #endif
                 rMissingCodes = sStillMissing;
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 8199fc3..2a3d29a 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1018,12 +1018,16 @@ PrintFontManager::PrintFontManager()
             m_aAdobecodeToUnicode.insert( ::boost::unordered_multimap< sal_uInt8, sal_Unicode >::value_type( aAdobeCodes[i].aAdobeStandardCode, aAdobeCodes[i].aUnicode ) );
         }
     }
+
+    m_aFontInstallerTimer.SetTimeoutHdl(LINK(this, PrintFontManager, autoInstallFontLangSupport));
+    m_aFontInstallerTimer.SetTimeout(5000);
 }
 
 // -------------------------------------------------------------------------
 
 PrintFontManager::~PrintFontManager()
 {
+    m_aFontInstallerTimer.Stop();
     deinitFontconfig();
     for( ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it )
         delete (*it).second;
diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx
index 4bd7a4d..6666f0f 100644
--- a/vcl/inc/vcl/fontmanager.hxx
+++ b/vcl/inc/vcl/fontmanager.hxx
@@ -36,6 +36,7 @@
 
 #include "vcl/dllapi.h"
 #include "vcl/helper.hxx"
+#include "vcl/timer.hxx"
 #include "vcl/vclenum.hxx"
 #include "com/sun/star/lang/Locale.hpp"
 
@@ -354,6 +355,10 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
     bool readOverrideMetrics();
 
     std::set<OString> m_aPreviousLangSupportRequests;
+    std::vector<OString> m_aCurrentRequests;
+    Timer m_aFontInstallerTimer;
+
+    DECL_LINK( autoInstallFontLangSupport, void* );
 
     PrintFontManager();
     ~PrintFontManager();
commit feddd3d87077abb2d5435804a9a4859286f6d86f
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 3 16:15:18 2012 +0100

    Refetch fonts if new ones installed or old ones deinstalled
    
    i.e. honour gtk-fontconfig-timestamp so that if we request a font from
    packagekit to be installed, then we can auto-use it when it appears.
    
    Change-Id: Id0d914a3f9cd589d9e8a87bf9be4b6e47de2e191

diff --git a/vcl/aqua/source/gdi/atsui/salgdi.cxx b/vcl/aqua/source/gdi/atsui/salgdi.cxx
index cd68245..561b96c 100644
--- a/vcl/aqua/source/gdi/atsui/salgdi.cxx
+++ b/vcl/aqua/source/gdi/atsui/salgdi.cxx
@@ -528,6 +528,13 @@ void AquaSalGraphics::GetDevFontList( ImplDevFontList* pFontList )
     pSalData->mpFontList->AnnounceFonts( *pFontList );
 }
 
+void AquaSalGraphics::ClearDevFontList()
+{
+    SalData* pSalData = GetSalData();
+    delete pSalData->mpFontList;
+    pSalData->mpFontList = NULL;
+}
+
 // -----------------------------------------------------------------------
 
 bool AquaSalGraphics::AddTempDevFont( ImplDevFontList*,
diff --git a/vcl/aqua/source/gdi/coretext/salgdi.cxx b/vcl/aqua/source/gdi/coretext/salgdi.cxx
index 160cf18..0b8b77b 100644
--- a/vcl/aqua/source/gdi/coretext/salgdi.cxx
+++ b/vcl/aqua/source/gdi/coretext/salgdi.cxx
@@ -78,6 +78,13 @@ void AquaSalGraphics::GetDevFontList( ImplDevFontList* pFontList )
     pSalData->mpFontList->AnnounceFonts( *pFontList );
 }
 
+void AquaSalGraphics::ClearDevFontList()
+{
+    SalData* pSalData = GetSalData();
+    delete pSalData->mpFontList;
+    pSalData->mpFontList = NULL;
+}
+
 void AquaSalGraphics::GetDevFontSubstList( OutputDevice* )
 {
     // nothing to do since there are no device-specific fonts on Aqua
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index 57a17c9..a98e529 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -128,6 +128,8 @@ public:
 
     FcFontSet* getFontSet();
 
+    void clear();
+
 public:
     FcResult LocalizedElementFromPattern(FcPattern* pPattern, FcChar8 **family,
                                          const char *elementtype, const char *elementlangtype);
@@ -263,8 +265,7 @@ FcFontSet* FontCfgWrapper::getFontSet()
 
 FontCfgWrapper::~FontCfgWrapper()
 {
-    if( m_pOutlineSet )
-        FcFontSetDestroy( m_pOutlineSet );
+    clear();
     //To-Do: get gtk vclplug smoketest to pass
     //FcFini();
 }
@@ -402,12 +403,24 @@ FcResult FontCfgWrapper::LocalizedElementFromPattern(FcPattern* pPattern, FcChar
     return eElementRes;
 }
 
+void FontCfgWrapper::clear()
+{
+    m_aFontNameToLocalized.clear();
+    m_aLocalizedToCanonical.clear();
+    if( m_pOutlineSet )
+    {
+        FcFontSetDestroy( m_pOutlineSet );
+        m_pOutlineSet = NULL;
+    }
+}
+
 /*
  * PrintFontManager::initFontconfig
  */
 void PrintFontManager::initFontconfig()
 {
-    FontCfgWrapper::get();
+    FontCfgWrapper& rWrapper = FontCfgWrapper::get();
+    rWrapper.clear();
 }
 
 namespace
diff --git a/vcl/generic/fontmanager/fontmanager.cxx b/vcl/generic/fontmanager/fontmanager.cxx
index 090cabb..8199fc3 100644
--- a/vcl/generic/fontmanager/fontmanager.cxx
+++ b/vcl/generic/fontmanager/fontmanager.cxx
@@ -1673,7 +1673,9 @@ void PrintFontManager::initialize()
 #endif
     }
 
-    // initialize may be called twice in the future
+    // initialize can be called more than once, e.g.
+    // gtk-fontconfig-timestamp changes to reflect new font installed and
+    // PrintFontManager::initialize called again
     {
         for( ::boost::unordered_map< fontID, PrintFont* >::const_iterator it = m_aFonts.begin(); it != m_aFonts.end(); ++it )
             delete (*it).second;
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index 923ca47..2ed37a7 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -186,6 +186,13 @@ void GlyphCache::AnnounceFonts( ImplDevFontList* pList ) const
         mpFtManager->AnnounceFonts( pList );
 }
 
+void GlyphCache::ClearFontCache()
+{
+    InvalidateAllGlyphs();
+    if (mpFtManager)
+        mpFtManager->ClearFontList();
+}
+
 // -----------------------------------------------------------------------
 
 ServerFont* GlyphCache::CacheFont( const FontSelectPattern& rFontSelData )
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index 78a6c1e..c711033 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -912,6 +912,11 @@ void GenPspGraphics::GetDevFontList( ImplDevFontList *pList )
     SalGenericInstance::RegisterFontSubstitutors( pList );
 }
 
+void GenPspGraphics::ClearDevFontCache()
+{
+    GlyphCache::GetInstance().ClearFontCache();
+}
+
 void GenPspGraphics::GetDevFontSubstList( OutputDevice* pOutDev )
 {
     const psp::PrinterInfo& rInfo = psp::PrinterInfoManager::get().getPrinterInfo( m_pJobData->m_aPrinterName );
diff --git a/vcl/headless/svptext.cxx b/vcl/headless/svptext.cxx
index 5399a4e..916c8e0 100644
--- a/vcl/headless/svptext.cxx
+++ b/vcl/headless/svptext.cxx
@@ -362,6 +362,12 @@ void SvpSalGraphics::GetDevFontList( ImplDevFontList* pDevFontList )
     ImplGetSVData()->maGDIData.mbNativeFontConfig = true;
 }
 
+void SvpSalGraphics::ClearDevFontCache()
+{
+    GlyphCache& rGC = SvpGlyphCache::GetInstance();
+    rGC.ClearFontCache();
+}
+
 // ---------------------------------------------------------------------------
 
 void SvpSalGraphics::GetDevFontSubstList( OutputDevice* )
diff --git a/vcl/inc/aqua/atsui/salgdi.h b/vcl/inc/aqua/atsui/salgdi.h
index 5827706..7580f4f 100644
--- a/vcl/inc/aqua/atsui/salgdi.h
+++ b/vcl/inc/aqua/atsui/salgdi.h
@@ -272,6 +272,8 @@ public:
     virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
     // graphics must fill supplied font list
     virtual void            GetDevFontList( ImplDevFontList* );
+    // graphics must drop any cached font info
+    virtual void ClearDevFontCache();
     // graphics should call ImplAddDevFontSubstitute on supplied
     // OutputDevice for all its device specific preferred font substitutions
     virtual void            GetDevFontSubstList( OutputDevice* );
diff --git a/vcl/inc/aqua/coretext/salgdi.h b/vcl/inc/aqua/coretext/salgdi.h
index fb9f863..8786526 100644
--- a/vcl/inc/aqua/coretext/salgdi.h
+++ b/vcl/inc/aqua/coretext/salgdi.h
@@ -201,6 +201,8 @@ public:
     virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
     // graphics must fill supplied font list
     virtual void GetDevFontList( ImplDevFontList* );
+    // graphics must drop any cached font info
+    virtual void ClearDevFontCache();
     // graphics should call ImplAddDevFontSubstitute on supplied
     // OutputDevice for all its device specific preferred font substitutions
     virtual void GetDevFontSubstList( OutputDevice* );
diff --git a/vcl/inc/generic/genpspgraphics.h b/vcl/inc/generic/genpspgraphics.h
index 177f09a..3a7c0ce 100644
--- a/vcl/inc/generic/genpspgraphics.h
+++ b/vcl/inc/generic/genpspgraphics.h
@@ -103,6 +103,8 @@ public:
     virtual const ImplFontCharMap* GetImplFontCharMap() const;
     virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
     virtual void            GetDevFontList( ImplDevFontList* );
+    // graphics must drop any cached font info
+    virtual void ClearDevFontCache();
     virtual void            GetDevFontSubstList( OutputDevice* );
     virtual bool            AddTempDevFont( ImplDevFontList*, const rtl::OUString& rFileURL, const rtl::OUString& rFontName );
 
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index 90551a6..4318979 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -87,6 +87,7 @@ public:
 
     ServerFont*                 CacheFont( const FontSelectPattern& );
     void                        UncacheFont( ServerFont& );
+    void                        ClearFontCache();
     void                        InvalidateAllGlyphs();
 
 protected:
diff --git a/vcl/inc/headless/svpgdi.hxx b/vcl/inc/headless/svpgdi.hxx
index 9f2f913..319e95d 100644
--- a/vcl/inc/headless/svpgdi.hxx
+++ b/vcl/inc/headless/svpgdi.hxx
@@ -105,6 +105,7 @@ public:
     virtual const ImplFontCharMap* GetImplFontCharMap() const;
     virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
     virtual void            GetDevFontList( ImplDevFontList* );
+    virtual void ClearDevFontCache();
     virtual void            GetDevFontSubstList( OutputDevice* );
     virtual bool            AddTempDevFont( ImplDevFontList*, const rtl::OUString& rFileURL, const rtl::OUString& rFontName );
     virtual sal_Bool            CreateFontSubset( const rtl::OUString& rToFile,
diff --git a/vcl/inc/ios/salgdi.h b/vcl/inc/ios/salgdi.h
index 1d9ef63..9a2c044 100644
--- a/vcl/inc/ios/salgdi.h
+++ b/vcl/inc/ios/salgdi.h
@@ -221,6 +221,8 @@ public:
     virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
     // graphics must fill supplied font list
     virtual void GetDevFontList( ImplDevFontList* );
+    // graphics must drop any cached font info
+    virtual void ClearDevFontCache();
     // graphics should call ImplAddDevFontSubstitute on supplied
     // OutputDevice for all its device specific preferred font substitutions
     virtual void GetDevFontSubstList( OutputDevice* );
diff --git a/vcl/inc/salgdi.hxx b/vcl/inc/salgdi.hxx
index 00e37e5..43b00ff 100644
--- a/vcl/inc/salgdi.hxx
+++ b/vcl/inc/salgdi.hxx
@@ -239,6 +239,8 @@ public:
     virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const = 0;
     // graphics must fill supplied font list
     virtual void            GetDevFontList( ImplDevFontList* ) = 0;
+    // graphics must drop any cached font info
+    virtual void ClearDevFontCache() = 0;
     // graphics should call ImplAddDevFontSubstitute on supplied
     // OutputDevice for all its device specific preferred font substitutions
     virtual void            GetDevFontSubstList( OutputDevice* ) = 0;
diff --git a/vcl/inc/unx/salgdi.h b/vcl/inc/unx/salgdi.h
index 494a1dc..8e539db 100644
--- a/vcl/inc/unx/salgdi.h
+++ b/vcl/inc/unx/salgdi.h
@@ -243,6 +243,7 @@ public:
     virtual const ImplFontCharMap* GetImplFontCharMap() const;
     virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rFontCapabilities) const;
     virtual void            GetDevFontList( ImplDevFontList* );
+    virtual void ClearDevFontCache();
     virtual void            GetDevFontSubstList( OutputDevice* );
     virtual bool            AddTempDevFont( ImplDevFontList*, const rtl::OUString& rFileURL, const rtl::OUString& rFontName );
     virtual sal_Bool            CreateFontSubset( const rtl::OUString& rToFile,
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index f92849c..ac451df 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -305,6 +305,8 @@ public:
     virtual bool GetImplFontCapabilities(vcl::FontCapabilities &rGetFontCapabilities) const;
     // graphics must fill supplied font list
     virtual void            GetDevFontList( ImplDevFontList* );
+    // graphics must drop any cached font info
+    virtual void ClearDevFontCache();
     // graphics should call ImplAddDevFontSubstitute on supplied
     // OutputDevice for all its device specific preferred font substitutions
     virtual void            GetDevFontSubstList( OutputDevice* );
diff --git a/vcl/ios/source/gdi/salgdi.cxx b/vcl/ios/source/gdi/salgdi.cxx
index 2525086..ebf6430 100644
--- a/vcl/ios/source/gdi/salgdi.cxx
+++ b/vcl/ios/source/gdi/salgdi.cxx
@@ -104,6 +104,13 @@ void IosSalGraphics::GetDevFontList( ImplDevFontList* pFontList )
     pSalData->mpFontList->AnnounceFonts( *pFontList );
 }
 
+void IosSalGraphics::ClearDevFontList()
+{
+    SalData* pSalData = GetSalData();
+    delete pSalData->mpFontList;
+    pSalData->mpFontList = NULL;
+}
+
 void IosSalGraphics::GetDevFontSubstList( OutputDevice* )
 {
     // nothing to do since there are no device-specific fonts on Ios
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 226ec08..049b13e 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -299,8 +299,12 @@ void OutputDevice::ImplUpdateAllFontData( bool bNewFontLists )
         if ( pFrame )
         {
             if ( pFrame->ImplGetGraphics() )
+            {
                 // MT: Stupid typecast here and somewhere ((OutputDevice*)&aVDev)->, because bug in .NET2002 compiler.
-                ((OutputDevice*)pFrame)->mpGraphics->GetDevFontList( pFrame->mpWindowImpl->mpFrameData->mpFontList );
+                OutputDevice *pDevice = (OutputDevice*)pFrame;
+                pDevice->mpGraphics->ClearDevFontCache();
+                pDevice->mpGraphics->GetDevFontList(pFrame->mpWindowImpl->mpFrameData->mpFontList);
+            }
         }
     }
 }
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 89e524e..a532fc2 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -573,7 +573,11 @@ bool X11SalGraphics::AddTempDevFont( ImplDevFontList* pFontList,
     return true;
 }
 
-// ----------------------------------------------------------------------------
+void X11SalGraphics::ClearDevFontCache()
+{
+    X11GlyphCache& rGC = X11GlyphCache::GetInstance();
+    rGC.ClearFontCache();
+}
 
 void X11SalGraphics::GetDevFontList( ImplDevFontList *pList )
 {
diff --git a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
index 011e755..da3cc50 100644
--- a/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk/gdi/salnativewidgets-gtk.cxx
@@ -3699,6 +3699,17 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings )
     GtkSettings* pSettings = gtk_widget_get_settings( m_pWindow );
     StyleSettings aStyleSet = rSettings.GetStyleSettings();
 
+    guint latest_fontconfig_timestamp = 0;
+    static guint our_fontconfig_timestamp = 0;
+    g_object_get( pSettings, "gtk-fontconfig-timestamp", &latest_fontconfig_timestamp, (char *)NULL );
+    if (latest_fontconfig_timestamp != our_fontconfig_timestamp)
+    {
+        bool bFirstTime = our_fontconfig_timestamp == 0;
+        our_fontconfig_timestamp = latest_fontconfig_timestamp;
+        if (!bFirstTime)
+            psp::PrintFontManager::get().initialize();
+    }
+
     // get the widgets in place
     NWEnsureGTKMenu( m_nXScreen );
     NWEnsureGTKMenubar( m_nXScreen );
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index ebb1edc..c1407d2 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -2282,6 +2282,11 @@ void WinSalGraphics::GetDevFontList( ImplDevFontList* pFontList )
     pFontList->SetFallbackHook( &aSubstFallback );
 }
 
+void WinSalGraphics::ClearDevFontList()
+{
+    //anything to do here ?
+}
+
 // ----------------------------------------------------------------------------
 
 void WinSalGraphics::GetDevFontSubstList( OutputDevice* )
commit 402603793360fb058f84e2aa88d5fdcd6131334d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 3 16:13:23 2012 +0100

    make GlyphCache::InvalidateAllGlyphs do what it says it does
    
    all the things we say don't do in GlyphCache::InvalidateAllGlyphs but would do
    if the random debugging getenv was set are always done in the lines after
    the one and only call to this.
    
    Change-Id: Icd5719f12ab687568c95d59b1f6413a13cef3e3a

diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index bf2159e..923ca47 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -68,32 +68,22 @@ GlyphCache::GlyphCache( GlyphCachePeer& rPeer )
 GlyphCache::~GlyphCache()
 {
     InvalidateAllGlyphs();
-    for( FontList::iterator it = maFontList.begin(), end = maFontList.end(); it != end; ++it )
-    {
-        ServerFont* pServerFont = it->second;
-        mrPeer.RemovingFont(*pServerFont);
-        delete pServerFont;
-    }
-    if( mpFtManager )
-        delete mpFtManager;
+    delete mpFtManager;
 }
 
 // -----------------------------------------------------------------------
 
 void GlyphCache::InvalidateAllGlyphs()
 {
-    // an application about to exit can omit garbage collecting the heap
-    // since it makes things slower and introduces risks if the heap was not perfect
-    // for debugging, for memory grinding or leak checking the env allows to force GC
-    const char* pEnv = getenv( "SAL_FORCE_GC_ON_EXIT" );
-    if( pEnv && (*pEnv != '0') )
+    for( FontList::iterator it = maFontList.begin(), end = maFontList.end(); it != end; ++it )
     {
-        // uncache of all glyph shapes and metrics
-        for( FontList::iterator it = maFontList.begin(); it != maFontList.end(); ++it )
-            delete const_cast<ServerFont*>( it->second );
-        maFontList.clear();
-        mpCurrentGCFont = NULL;
+        ServerFont* pServerFont = it->second;
+        mrPeer.RemovingFont(*pServerFont);
+        delete pServerFont;
     }
+
+    maFontList.clear();
+    mpCurrentGCFont = NULL;
 }
 
 // -----------------------------------------------------------------------
commit 92efdaf94bc9aa463ed7c73526fbb55ec51e9ff5
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 3 13:17:09 2012 +0100

    Resolves: #i96826# request font installation on render failure
    
    Use packagekit interface to request font installation when
    glyph fallback fails
    
    Change-Id: Idb6f5cb6971bd156d7cac0a79e240246e9e0f973

diff --git a/i18npool/inc/i18npool/languagetag.hxx b/i18npool/inc/i18npool/languagetag.hxx
index d8eb207..36ab7a2 100644
--- a/i18npool/inc/i18npool/languagetag.hxx
+++ b/i18npool/inc/i18npool/languagetag.hxx
@@ -57,7 +57,7 @@ public:
      */
     explicit LanguageTag( const rtl::OUString& rLanguage, const rtl::OUString& rCountry );
 
-    explicit LanguageTag( const LanguageTag & rLanguageTag );
+    LanguageTag( const LanguageTag & rLanguageTag );
     ~LanguageTag();
     LanguageTag& operator=( const LanguageTag & rLanguageTag );
 
diff --git a/vcl/Library_vcl.mk b/vcl/Library_vcl.mk
index d45ee98..5a1dc36 100644
--- a/vcl/Library_vcl.mk
+++ b/vcl/Library_vcl.mk
@@ -519,6 +519,7 @@ $(eval $(call gb_Library_add_exception_objects,vcl,\
     ) \
 ))
 $(eval $(call gb_Library_use_externals,vcl,\
+	dbus \
 	fontconfig \
 	freetype \
 ))
diff --git a/vcl/generic/fontmanager/fontconfig.cxx b/vcl/generic/fontmanager/fontconfig.cxx
index a90ecaf..57a17c9 100644
--- a/vcl/generic/fontmanager/fontconfig.cxx
+++ b/vcl/generic/fontmanager/fontconfig.cxx
@@ -29,10 +29,17 @@
 
 #include "fontcache.hxx"
 #include "impfont.hxx"
-#include "vcl/fontmanager.hxx"
-#include "vcl/vclenum.hxx"
+#include <vcl/fontmanager.hxx>
+#include <vcl/svapp.hxx>
+#include <vcl/sysdata.hxx>
+#include <vcl/vclenum.hxx>
+#include <vcl/wrkwin.hxx>
 #include "outfont.hxx"
 #include <i18npool/languagetag.hxx>
+#include <i18nutil/unicode.hxx>
+#include <rtl/strbuf.hxx>
+#include <unicode/uchar.h>
+#include <unicode/uscript.h>
 
 using namespace psp;
 
@@ -75,6 +82,10 @@ using namespace psp;
     #define FC_FONTFORMAT "fontformat"
 #endif
 
+#ifdef ENABLE_DBUS
+#include <dbus/dbus-glib.h>
+#endif
+
 #include <cstdio>
 #include <cstdarg>
 
@@ -797,15 +808,89 @@ namespace
         OString sLang = OUStringToOString(rLangTag.getLanguage(), RTL_TEXTENCODING_UTF8).toAsciiLowerCase();
         OString sRegion = OUStringToOString(rLangTag.getCountry(), RTL_TEXTENCODING_UTF8).toAsciiLowerCase();
 
-        sLangAttrib = sLang + OString('-') + sRegion;
-        if (FcStrSetMember(pLangSet, (const FcChar8*)sLangAttrib.getStr()))
-            return sLangAttrib;
+        if (!sRegion.isEmpty())
+        {
+            sLangAttrib = sLang + OString('-') + sRegion;
+            if (FcStrSetMember(pLangSet, (const FcChar8*)sLangAttrib.getStr()))
+                return sLangAttrib;
+        }
 
         if (FcStrSetMember(pLangSet, (const FcChar8*)sLang.getStr()))
-            return sLangAttrib;
+            return sLang;
 
         return OString();
     }
+
+#ifdef ENABLE_DBUS
+    LanguageTag getExemplerLangTagForCodePoint(sal_uInt32 currentChar)
+    {
+        int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT);
+        UScriptCode eScript = static_cast<UScriptCode>(script);
+        OStringBuffer aBuf(unicode::getExemplerLanguageForUScriptCode(eScript));
+        const char* pScriptCode = uscript_getShortName(eScript);
+        if (pScriptCode)
+            aBuf.append('-').append(pScriptCode);
+        return LanguageTag(OStringToOUString(aBuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8));
+    }
+
+    int autoInstallFontLangSupport(const std::vector<OString> &rNewReqs, guint xid)
+    {
+        GError *error = NULL;
+        /* get the DBUS session connection */
+        DBusGConnection *session_connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);
+        if (error != NULL)
+        {
+            g_warning ("DBUS cannot connect : %s", error->message);
+            g_error_free (error);
+            return -1;
+        }
+
+        /* get the proxy with gnome-session-manager */
+        DBusGProxy *proxy = dbus_g_proxy_new_for_name(session_connection,
+                                           "org.freedesktop.PackageKit",
+                                           "/org/freedesktop/PackageKit",
+                                           "org.freedesktop.PackageKit.Modify");
+        if (proxy == NULL)
+        {
+            g_warning("Could not get DBUS proxy: org.freedesktop.PackageKit");
+            return -1;
+        }
+
+        gchar **fonts = (gchar**)g_malloc((rNewReqs.size() + 1) * sizeof(gchar*));
+        gchar **font = fonts;
+        for (std::vector<OString>::const_iterator aI = rNewReqs.begin(); aI != rNewReqs.end(); ++aI)
+            *font++ = (gchar*)aI->getStr();
+        *font = NULL;
+        gboolean res = dbus_g_proxy_call(proxy, "InstallFontconfigResources", &error,
+                     G_TYPE_UINT, xid, /* xid */
+                     G_TYPE_STRV, fonts, /* data */
+                     G_TYPE_STRING, "hide-finished", /* interaction */
+                     G_TYPE_INVALID,
+                     G_TYPE_INVALID);
+        /* check the return value */
+        if (!res)
+           g_warning("InstallFontconfigResources method failed");
+
+        /* check the error value */
+        if (error != NULL)
+        {
+            g_warning("InstallFontconfigResources problem : %s", error->message);
+            g_error_free(error);
+        }
+
+        g_free(fonts);
+        g_object_unref(G_OBJECT (proxy));
+
+        return 0;
+    }
+
+    guint get_xid_for_dbus()
+    {
+        const Window *pTopWindow = Application::IsHeadlessModeEnabled() ? NULL : Application::GetActiveTopWindow();
+        const SystemEnvData* pEnvData = pTopWindow ? pTopWindow->GetSystemData() : NULL;
+        return pEnvData ? pEnvData->aWindow : 0;
+    }
+#endif
 }
 
 bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& rMissingCodes )
@@ -950,7 +1035,39 @@ bool PrintFontManager::Substitute( FontSelectPattern &rPattern, rtl::OUString& r
                             pRemainingCodes[ nRemainingLen++ ] = nCode;
                     }
                 }
-                rMissingCodes = OUString( pRemainingCodes, nRemainingLen );
+                OUString sStillMissing(pRemainingCodes, nRemainingLen);
+#ifdef ENABLE_DBUS
+                guint xid = get_xid_for_dbus();
+                if (xid)
+                {
+                    std::vector<OString> aNewRequests;
+                    if (sStillMissing == rMissingCodes) //replaced nothing
+                    {
+                        //It'd be better if we could ask packagekit using the
+                        //missing codepoints or some such rather than using
+                        //"language" as a proxy to how fontconfig considers
+                        //scripts to default to a given language.
+                        for (sal_Int32 i = 0; i < nRemainingLen; ++i)
+                        {
+                            LanguageTag aOurTag = getExemplerLangTagForCodePoint(pRemainingCodes[i]);
+                            OString sTag = OUStringToOString(aOurTag.getBcp47(), RTL_TEXTENCODING_UTF8);
+                            if (m_aPreviousLangSupportRequests.find(sTag) != m_aPreviousLangSupportRequests.end())
+                                continue;
+                            m_aPreviousLangSupportRequests.insert(sTag);
+                            sTag = mapToFontConfigLangTag(aOurTag);
+                            if (!sTag.isEmpty() && m_aPreviousLangSupportRequests.find(sTag) == m_aPreviousLangSupportRequests.end())
+                            {
+                                OString sReq = OString(":lang=") + sTag;
+                                aNewRequests.push_back(sReq);
+                                m_aPreviousLangSupportRequests.insert(sTag);
+                            }
+                        }
+                    }
+                    if (!aNewRequests.empty())
+                        autoInstallFontLangSupport(aNewRequests, xid);
+                }
+#endif
+                rMissingCodes = sStillMissing;
             }
         }
 
diff --git a/vcl/inc/vcl/fontmanager.hxx b/vcl/inc/vcl/fontmanager.hxx
index 3bdfa48..4bd7a4d 100644
--- a/vcl/inc/vcl/fontmanager.hxx
+++ b/vcl/inc/vcl/fontmanager.hxx
@@ -353,6 +353,8 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
 
     bool readOverrideMetrics();
 
+    std::set<OString> m_aPreviousLangSupportRequests;
+
     PrintFontManager();
     ~PrintFontManager();
 public:
commit 4b5aa7a0bef61c9f81d2f87a7cef744d27e02309
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Mon Sep 3 11:37:44 2012 +0100

    Add a way to get a sample language for a given scriptcode
    
    Change-Id: I3a0f561aa2838870c7fc35b2a976f133f3667104

diff --git a/i18nutil/inc/i18nutil/unicode.hxx b/i18nutil/inc/i18nutil/unicode.hxx
index b352893..7da0f53 100644
--- a/i18nutil/inc/i18nutil/unicode.hxx
+++ b/i18nutil/inc/i18nutil/unicode.hxx
@@ -51,6 +51,9 @@ public:
 
     //Map an ISO 15924 script code to Latin/Asian/Complex/Weak
     static sal_Int16 SAL_CALL getScriptClassFromUScriptCode(UScriptCode eScript);
+
+    //Return a language that can be written in a given ISO 15924 script code
+    static OString SAL_CALL getExemplerLanguageForUScriptCode(UScriptCode eScript);
 };
 
 #endif
diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx
index 9a263fa..0100556 100644
--- a/i18nutil/source/utility/unicode.cxx
+++ b/i18nutil/source/utility/unicode.cxx
@@ -473,4 +473,477 @@ sal_Int16 SAL_CALL unicode::getScriptClassFromUScriptCode(UScriptCode eScript)
     return nRet;
 }
 
+OString SAL_CALL unicode::getExemplerLanguageForUScriptCode(UScriptCode eScript)
+{
+    OString sRet;
+    switch (eScript)
+    {
+        case USCRIPT_CODE_LIMIT:
+        case USCRIPT_INVALID_CODE:
+            sRet = "zxx";
+            break;
+        case USCRIPT_COMMON:
+        case USCRIPT_INHERITED:
+            sRet = "und";
+            break;
+        case USCRIPT_MATHEMATICAL_NOTATION:
+        case USCRIPT_SYMBOLS:
+            sRet = "zxx";
+            break;
+        case USCRIPT_UNWRITTEN_LANGUAGES:
+        case USCRIPT_UNKNOWN:
+            sRet = "und";
+            break;
+        //This block has no language with an assigned code yet
+        case USCRIPT_NABATAEAN:
+        case USCRIPT_PALMYRENE:
+        case USCRIPT_NUSHU:
+            sRet = "mis";
+            break;
+        case USCRIPT_ARABIC:
+            sRet = "ar";
+            break;
+        case USCRIPT_ARMENIAN:
+            sRet = "hy";
+            break;
+        case USCRIPT_BENGALI:
+            sRet = "bn";
+            break;
+        case USCRIPT_BOPOMOFO:
+            sRet = "zh";
+            break;
+        case USCRIPT_CHEROKEE:
+            sRet = "chr";
+            break;
+        case USCRIPT_COPTIC:
+            sRet = "cop";
+            break;
+        case USCRIPT_CYRILLIC:
+            sRet = "ru";
+            break;
+        case USCRIPT_DESERET:
+            sRet = "en";
+            break;
+        case USCRIPT_DEVANAGARI:
+            sRet = "hi";
+            break;
+        case USCRIPT_ETHIOPIC:
+            sRet = "am";
+            break;
+        case USCRIPT_GEORGIAN:
+            sRet = "ka";
+            break;
+        case USCRIPT_GOTHIC:
+            sRet = "got";
+            break;
+        case USCRIPT_GREEK:
+            sRet = "el";
+            break;
+        case USCRIPT_GUJARATI:
+            sRet = "gu";
+            break;
+        case USCRIPT_GURMUKHI:
+            sRet = "pa";
+            break;
+        case USCRIPT_HAN:
+            sRet = "zh";
+            break;
+        case USCRIPT_HANGUL:
+            sRet = "ko";
+            break;
+        case USCRIPT_HEBREW:
+            sRet = "hr";
+            break;
+        case USCRIPT_HIRAGANA:
+            sRet = "ja";
+            break;
+        case USCRIPT_KANNADA:
+            sRet = "kn";
+            break;
+        case USCRIPT_KATAKANA:
+            sRet = "ja";
+            break;
+        case USCRIPT_KHMER:
+            sRet = "km";
+            break;
+        case USCRIPT_LAO:
+            sRet = "lo";
+            break;
+        case USCRIPT_LATIN:
+            sRet = "en";
+            break;
+        case USCRIPT_MALAYALAM:
+            sRet = "ml";
+            break;
+        case USCRIPT_MONGOLIAN:
+            sRet = "mn";
+            break;
+        case USCRIPT_MYANMAR:
+            sRet = "my";
+            break;
+        case USCRIPT_OGHAM:
+            sRet = "pgl";
+            break;
+        case USCRIPT_OLD_ITALIC:
+            sRet = "osc";
+            break;
+        case USCRIPT_ORIYA:
+            sRet = "or";
+            break;
+        case USCRIPT_RUNIC:
+            sRet = "ang";
+            break;
+        case USCRIPT_SINHALA:
+            sRet = "si";
+            break;
+        case USCRIPT_SYRIAC:
+            sRet = "syr";
+            break;
+        case USCRIPT_TAMIL:
+            sRet = "ta";
+            break;
+        case USCRIPT_TELUGU:
+            sRet = "te";
+            break;
+        case USCRIPT_THAANA:
+            sRet = "dv";
+            break;
+        case USCRIPT_THAI:
+            sRet = "th";
+            break;
+        case USCRIPT_TIBETAN:
+            sRet = "bo";
+            break;
+        case USCRIPT_CANADIAN_ABORIGINAL:
+            sRet = "iu";
+            break;
+        case USCRIPT_YI:
+            sRet = "ii";
+            break;
+        case USCRIPT_TAGALOG:
+            sRet = "tl";
+            break;
+        case USCRIPT_HANUNOO:
+            sRet = "hnn";
+            break;
+        case USCRIPT_BUHID:
+            sRet = "bku";
+            break;
+        case USCRIPT_TAGBANWA:
+            sRet = "tbw";
+            break;
+        case USCRIPT_BRAILLE:
+            sRet = "en";
+            break;
+        case USCRIPT_CYPRIOT:
+            sRet = "ecy";
+            break;
+        case USCRIPT_LIMBU:
+            sRet = "lif";
+            break;
+        case USCRIPT_LINEAR_B:
+            sRet = "gmy";
+            break;
+        case USCRIPT_OSMANYA:
+            sRet = "so";
+            break;
+        case USCRIPT_SHAVIAN:
+            sRet = "en";
+            break;
+        case USCRIPT_TAI_LE:
+            sRet = "tdd";
+            break;
+        case USCRIPT_UGARITIC:
+            sRet = "uga";
+            break;
+        case USCRIPT_KATAKANA_OR_HIRAGANA:
+            sRet = "ja";
+            break;
+        case USCRIPT_BUGINESE:
+            sRet = "bug";
+            break;
+        case USCRIPT_GLAGOLITIC:
+            sRet = "ch";
+            break;
+        case USCRIPT_KHAROSHTHI:
+            sRet = "pra";
+            break;
+        case USCRIPT_SYLOTI_NAGRI:
+            sRet = "syl";
+            break;
+        case USCRIPT_NEW_TAI_LUE:
+            sRet = "khb";
+            break;
+        case USCRIPT_TIFINAGH:
+            sRet = "tmh";
+            break;
+        case USCRIPT_OLD_PERSIAN:
+            sRet = "peo";
+            break;
+        case USCRIPT_BALINESE:
+            sRet = "ban";
+            break;
+        case USCRIPT_BATAK:
+            sRet = "btk";
+            break;
+        case USCRIPT_BLISSYMBOLS:
+            sRet = "en";
+            break;
+        case USCRIPT_BRAHMI:
+            sRet = "pra";
+            break;
+        case USCRIPT_CHAM:
+            sRet = "cja";
+            break;
+        case USCRIPT_CIRTH:
+            sRet = "sjn";
+            break;
+        case USCRIPT_OLD_CHURCH_SLAVONIC_CYRILLIC:
+            sRet = "cu";
+            break;
+        case USCRIPT_DEMOTIC_EGYPTIAN:
+        case USCRIPT_HIERATIC_EGYPTIAN:
+        case USCRIPT_EGYPTIAN_HIEROGLYPHS:
+            sRet = "egy";
+            break;
+        case USCRIPT_KHUTSURI:
+            sRet = "ka";
+            break;
+        case USCRIPT_SIMPLIFIED_HAN:
+            sRet = "zh";
+            break;
+        case USCRIPT_TRADITIONAL_HAN:
+            sRet = "zh";
+            break;
+        case USCRIPT_PAHAWH_HMONG:
+            sRet = "blu";
+            break;
+        case USCRIPT_OLD_HUNGARIAN:
+            sRet = "ohu";
+            break;
+        case USCRIPT_HARAPPAN_INDUS:
+            sRet = "xiv";
+            break;
+        case USCRIPT_JAVANESE:
+            sRet = "kaw";
+            break;
+        case USCRIPT_KAYAH_LI:
+            sRet = "eky";
+            break;
+        case USCRIPT_LATIN_FRAKTUR:
+            sRet = "de";
+            break;
+        case USCRIPT_LATIN_GAELIC:
+            sRet = "ga";
+            break;
+        case USCRIPT_LEPCHA:
+            sRet = "lep";
+            break;
+        case USCRIPT_LINEAR_A:
+            sRet = "ecr";
+            break;
+        case USCRIPT_MANDAIC:
+            sRet = "mic";
+            break;
+        case USCRIPT_MAYAN_HIEROGLYPHS:
+            sRet = "myn";
+            break;
+        case USCRIPT_MEROITIC:
+            sRet = "xmr";
+            break;
+        case USCRIPT_NKO:
+            sRet = "nqo";
+            break;
+        case USCRIPT_ORKHON:
+            sRet = "otk";
+            break;
+        case USCRIPT_OLD_PERMIC:
+            sRet = "kv";
+            break;
+        case USCRIPT_PHAGS_PA:
+            sRet = "xng";
+            break;
+        case USCRIPT_PHOENICIAN:
+            sRet = "phn";
+            break;
+        case USCRIPT_PHONETIC_POLLARD:
+            sRet = "hmd";
+            break;
+        case USCRIPT_RONGORONGO:
+            sRet = "rap";
+            break;
+        case USCRIPT_SARATI:
+            sRet = "qya";
+            break;
+        case USCRIPT_ESTRANGELO_SYRIAC:
+            sRet = "syr";
+            break;
+        case USCRIPT_WESTERN_SYRIAC:
+            sRet = "tru";
+            break;
+        case USCRIPT_EASTERN_SYRIAC:
+            sRet = "aii";
+            break;
+        case USCRIPT_TENGWAR:
+            sRet = "sjn";
+            break;
+        case USCRIPT_VAI:
+            sRet = "vai";
+            break;
+        case USCRIPT_VISIBLE_SPEECH:
+            sRet = "en";
+            break;
+        case USCRIPT_CUNEIFORM:
+            sRet = "akk";
+            break;
+        case USCRIPT_CARIAN:
+            sRet = "xcr";
+            break;
+        case USCRIPT_JAPANESE:
+            sRet = "ja";
+            break;
+        case USCRIPT_LANNA:
+            sRet = "nod";
+            break;
+        case USCRIPT_LYCIAN:
+            sRet = "xlc";
+            break;
+        case USCRIPT_LYDIAN:
+            sRet = "xld";
+            break;
+        case USCRIPT_OL_CHIKI:
+            sRet = "sat";
+            break;
+        case USCRIPT_REJANG:
+            sRet = "rej";
+            break;
+        case USCRIPT_SAURASHTRA:
+            sRet = "saz";
+            break;
+        case USCRIPT_SIGN_WRITING:
+            sRet = "en";
+            break;
+        case USCRIPT_SUNDANESE:
+            sRet = "su";
+            break;
+        case USCRIPT_MOON:
+            sRet = "en";
+            break;
+        case USCRIPT_MEITEI_MAYEK:
+            sRet = "mni";
+            break;
+        case USCRIPT_IMPERIAL_ARAMAIC:
+            sRet = "arc";
+            break;
+        case USCRIPT_AVESTAN:
+            sRet = "ae";
+            break;
+        case USCRIPT_CHAKMA:
+            sRet = "ccp";
+            break;
+        case USCRIPT_KOREAN:
+            sRet = "ko";
+            break;
+        case USCRIPT_KAITHI:
+            sRet = "awa";
+            break;
+        case USCRIPT_MANICHAEAN:
+            sRet = "xmn";
+            break;
+        case USCRIPT_INSCRIPTIONAL_PAHLAVI:
+        case USCRIPT_PSALTER_PAHLAVI:
+        case USCRIPT_BOOK_PAHLAVI:
+        case USCRIPT_INSCRIPTIONAL_PARTHIAN:
+            sRet = "xpr";
+            break;
+        case USCRIPT_SAMARITAN:
+            sRet = "heb";
+            break;
+        case USCRIPT_TAI_VIET:
+            sRet = "blt";
+            break;
+        case USCRIPT_BAMUM:
+            sRet = "bax";
+            break;
+        case USCRIPT_LISU:
+            sRet = "lis";
+            break;
+        case USCRIPT_NAKHI_GEBA:
+            sRet = "nxq";
+            break;
+        case USCRIPT_OLD_SOUTH_ARABIAN:
+            sRet = "xsa";
+            break;
+        case USCRIPT_BASSA_VAH:
+            sRet = "bsq";
+            break;
+        case USCRIPT_DUPLOYAN_SHORTAND:
+            sRet = "fr";
+            break;
+        case USCRIPT_ELBASAN:
+            sRet = "sq";
+            break;
+        case USCRIPT_GRANTHA:
+            sRet = "ta";
+            break;
+        case USCRIPT_KPELLE:
+            sRet = "kpe";
+            break;
+        case USCRIPT_LOMA:
+            sRet = "lom";
+            break;
+        case USCRIPT_MENDE:
+            sRet = "men";
+            break;
+        case USCRIPT_MEROITIC_CURSIVE:
+            sRet = "xmr";
+            break;
+        case USCRIPT_OLD_NORTH_ARABIAN:
+            sRet = "xna";
+            break;
+        case USCRIPT_SINDHI:
+            sRet = "sd";
+            break;
+        case USCRIPT_WARANG_CITI:
+            sRet = "hoc";
+            break;
+        case USCRIPT_AFAKA:
+            sRet = "djk";
+            break;
+        case USCRIPT_JURCHEN:
+            sRet = "juc";
+            break;
+        case USCRIPT_MRO:
+            sRet = "cmr";
+            break;
+        case USCRIPT_SHARADA:
+            sRet = "sa";
+            break;
+        case USCRIPT_SORA_SOMPENG:
+            sRet = "srb";
+            break;
+        case USCRIPT_TAKRI:
+            sRet = "doi";
+            break;
+        case USCRIPT_TANGUT:
+            sRet = "txg";
+            break;
+        case USCRIPT_WOLEAI:
+            sRet = "woe";
+            break;
+#if (U_ICU_VERSION_MAJOR_NUM > 4)
+        case USCRIPT_ANATOLIAN_HIEROGLYPHS:
+            sRet = "hlu";
+            break;
+        case USCRIPT_KHOJKI:
+            sRet = "gu";
+            break;
+        case USCRIPT_TIRHUTA:
+            sRet = "mai";
+            break;
+#endif
+    }
+    return sRet;
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list