blob: 9a8c444b7eaa21a58f4f562a00999cbb2459c854 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
diff --git a/lyx-2.2.3/src/EnchantChecker.cpp.orig b/lyx-2.2.3/src/EnchantChecker.cpp
index 7be361a..70d9914 100644
--- lyx-2.2.3/src/EnchantChecker.cpp.orig
+++ lyx-2.2.3/src/EnchantChecker.cpp
@@ -53,6 +53,8 @@ struct EnchantChecker::Private
/// the spellers
Spellers spellers_;
+
+ enchant::Broker instance;
};
@@ -68,12 +70,11 @@ EnchantChecker::Private::~Private()
enchant::Dict * EnchantChecker::Private::addSpeller(string const & lang)
{
- enchant::Broker * instance = enchant::Broker::instance();
Speller m;
try {
LYXERR(Debug::FILES, "request enchant speller for language " << lang);
- m.speller = instance->request_dict(lang);
+ m.speller = instance.request_dict(lang);
}
catch (enchant::Exception & e) {
// FIXME error handling?
@@ -186,8 +187,7 @@ bool EnchantChecker::hasDictionary(Language const * lang) const
{
if (!lang)
return false;
- enchant::Broker * instance = enchant::Broker::instance();
- return (instance->dict_exists(lang->code()));
+ return (d->instance.dict_exists(lang->code()));
}
|