summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-07-13 09:06:53 +0200
committerSamuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>2017-07-13 16:25:43 +0200
commite8567ecd9d78a742cbab86498f7a31b22ee92ffa (patch)
treea456e55673d992a6c2766d27832f5360af369969
parent94a475bdec4e6f98b4d0488db6021011d64be83e (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/39885 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
-rw-r--r--officecfg/registry/data/org/openoffice/Office/Common.xcu5
-rw-r--r--officecfg/registry/schema/org/openoffice/Office/Common.xcs13
-rw-r--r--vcl/unx/generic/fontmanager/fontconfig.cxx9
3 files changed, 26 insertions, 1 deletions
diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu
index 7e10c8932f33..eef41786feed 100644
--- a/officecfg/registry/data/org/openoffice/Office/Common.xcu
+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu
@@ -530,4 +530,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 6844e63e0b5c..bfcefe2ec38b 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -1272,7 +1272,7 @@
/italic/, -strikeout- and _underline_ -->
<info>
<desc>Specifies if text should be formatted in bold or underlined when
- the corresponding characters are entered (*bold*, /italic/, -strikeout-,
+ the corresponding characters are entered (*bold*, /italic/, -strikeout-,
_underline_).</desc>
<label>Apply bold, italics, strikeout or underline</label>
</info>
@@ -6701,5 +6701,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 59bc5f365611..68d00eb0d6bf 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -32,6 +32,7 @@
#include <unicode/uchar.h>
#include <unicode/uscript.h>
#include <config_gio.h>
+#include <officecfg/Office/Common.hxx>
using namespace psp;
@@ -876,6 +877,9 @@ namespace
#if ENABLE_GIO
IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport, Timer *, void)
{
+ if (!officecfg::Office::Common::PackageKit::EnableFontInstallation::get())
+ return;
+
guint xid = get_xid_for_dbus();
if (!xid)
@@ -928,6 +932,11 @@ IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport, Timer *, void)
if (res == nullptr && 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);
}