[Libreoffice-commits] core.git: Branch 'feature/cib_contract136' - officecfg/registry vcl/unx

Samuel Mehrbrodt Samuel.Mehrbrodt at cib.de
Thu Jul 13 07:41:35 UTC 2017


 officecfg/registry/data/org/openoffice/Office/Common.xcu   |    5 +++++
 officecfg/registry/schema/org/openoffice/Office/Common.xcs |   11 +++++++++++
 vcl/unx/generic/fontmanager/fontconfig.cxx                 |    9 +++++++++
 3 files changed, 25 insertions(+)

New commits:
commit cbc751f711822b8c16a5f0574efa987f6be42229
Author: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
Date:   Thu Jul 13 09:06:53 2017 +0200

    tdf#104883 Don't call InstallFontconfigResources if it's not available
    
    We need to call it once because we have no other way to detect whether
    it's working or not.
    But if we receive an error the first time, we disable it from now on.
    
    Change-Id: I67dba8b65660ff7e05bdf2ddc18b565550901cd1

diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 58610e7a8962..1fb58290b3bd 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -640,4 +640,9 @@
       </prop>
     </node>
   </node>
+  <node oor:name="PackageKit">
+      <prop oor:name="EnableFontInstallation" oor:type="xs:boolean">
+        <value install:module="unx">true</value>
+      </prop>
+  </node>
 </oor:component-data>
diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
index 32c3cd7e9a28..aa92f8e5d403 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -6632,5 +6632,16 @@
         <value>true</value>
       </prop>
     </group>
+    <group oor:name="PackageKit">
+      <info>
+        <desc>Contains settings related to PackageKit (Unix only).</desc>
+      </info>
+      <prop oor:name="EnableFontInstallation" oor:type="xs:boolean" oor:nillable="false">
+        <info>
+           <desc>Specifies if missing font installation should be triggered.</desc>
+        </info>
+        <value>true</value>
+      </prop>
+    </group>
   </component>
 </oor:component-schema>
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 79971d5d18ed..26c0577aa50e 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -30,6 +30,7 @@
 #include <rtl/strbuf.hxx>
 #include <unicode/uchar.h>
 #include <unicode/uscript.h>
+#include <officecfg/Office/Common.hxx>
 
 using namespace psp;
 
@@ -890,6 +891,9 @@ namespace
 #if ENABLE_DBUS
 IMPL_LINK_NOARG_TYPED(PrintFontManager, autoInstallFontLangSupport, Timer *, void)
 {
+    if (!officecfg::Office::Common::PackageKit::EnableFontInstallation::get())
+        return;
+
     guint xid = get_xid_for_dbus();
 
     if (!xid)
@@ -934,6 +938,11 @@ IMPL_LINK_NOARG_TYPED(PrintFontManager, autoInstallFontLangSupport, Timer *, voi
     /* check the error value */
     if (error != nullptr)
     {
+        // Disable this method from now on. It's simply not available on some systems
+        // and leads to an error dialog being shown each tim theis is called tdf#104883
+        std::shared_ptr<comphelper::ConfigurationChanges> batch( comphelper::ConfigurationChanges::create() );
+        officecfg::Office::Common::PackageKit::EnableFontInstallation::set(false, batch);
+        batch->commit();
         g_debug("InstallFontconfigResources problem : %s", error->message);
         g_error_free(error);
     }


More information about the Libreoffice-commits mailing list