summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-07-13 09:06:53 +0200
committerAndras Timar <andras.timar@collabora.com>2017-07-31 12:03:53 +0200
commit4ef56ce6539c267f11cc30e4a4f46d51c8bf2b30 (patch)
treeb3d901abca5919e34f813a867eaa627d2a22d67b
parent95ace79786e9aa9f834d34c06070caf8b0d9dc5a (diff)
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 Reviewed-on: https://gerrit.libreoffice.org/39895 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit f86d9d732d9b2aa711d321a8c9f4110b638560b4)
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Common.xcu5
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs11
-rw-r--r--vcl/unx/generic/fontmanager/fontconfig.cxx9
3 files changed, 25 insertions, 0 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 37952f82badd..df715b79261b 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -552,4 +552,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 7973ab004252..51c4ff4274a5 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -6727,5 +6727,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 dd9d17b7ad28..c85b12fd100d 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -31,6 +31,7 @@
#include <rtl/strbuf.hxx>
#include <unicode/uchar.h>
#include <unicode/uscript.h>
+#include <officecfg/Office/Common.hxx>
using namespace psp;
@@ -901,6 +902,9 @@ namespace
#if ENABLE_DBUS
IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport, Timer *, void)
{
+ if (!officecfg::Office::Common::PackageKit::EnableFontInstallation::get())
+ return;
+
guint xid = get_xid_for_dbus();
if (!xid)
@@ -945,6 +949,11 @@ IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport, Timer *, void)
/* 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);
}