Gentoo Archives: gentoo-commits

From: "Andreas HAttel (dilfridge)" <dilfridge@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in app-office/calligra/files: calligra-2.3.92-language.patch calligra-2.3.92-table.patch
Date: Sun, 08 Apr 2012 13:54:17
Message-Id: 20120408135407.4391B2004C@flycatcher.gentoo.org
1 dilfridge 12/04/08 13:54:07
2
3 Added: calligra-2.3.92-language.patch
4 calligra-2.3.92-table.patch
5 Log:
6 Add several crash fixes, thanks to Franz Fellner, bug 410109 and bug 410187
7
8 (Portage version: 2.1.10.56/cvs/Linux x86_64)
9
10 Revision Changes Path
11 1.1 app-office/calligra/files/calligra-2.3.92-language.patch
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/calligra/files/calligra-2.3.92-language.patch?rev=1.1&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/calligra/files/calligra-2.3.92-language.patch?rev=1.1&content-type=text/plain
15
16 Index: calligra-2.3.92-language.patch
17 ===================================================================
18 --- plugins/textediting/spellcheck/SpellCheck.cpp.org 2012-03-29 07:19:58.808192633 +0200
19 +++ plugins/textediting/spellcheck/SpellCheck.cpp 2012-03-29 07:28:13.671184157 +0200
20 @@ -44,7 +44,8 @@
21 m_allowSignals(true),
22 m_documentIsLoading(false),
23 m_isChecking(false),
24 - m_spellCheckMenu(0)
25 + m_spellCheckMenu(0),
26 + m_document(0)
27 {
28 /* setup actions for this plugin */
29 KAction *configureAction = new KAction(i18n("Configure &Spell Checking..."), this);
30 @@ -141,7 +142,7 @@
31 {
32 m_speller.setDefaultLanguage(language);
33 m_bgSpellCheck->setDefaultLanguage(language);
34 - if (m_enableSpellCheck) {
35 + if (m_enableSpellCheck && m_document) {
36 checkSection(m_document, 0, m_document->characterCount() - 1);
37 }
38 }
39
40
41
42 1.1 app-office/calligra/files/calligra-2.3.92-table.patch
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/calligra/files/calligra-2.3.92-table.patch?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/app-office/calligra/files/calligra-2.3.92-table.patch?rev=1.1&content-type=text/plain
46
47 Index: calligra-2.3.92-table.patch
48 ===================================================================
49 From 0f96e4b78756deaba77b2d8d486ea5585bd8f652 Mon Sep 17 00:00:00 2001
50 From: Boudewijn Rempt <boud@×××××××.org>
51 Date: Thu, 29 Mar 2012 15:32:18 +0200
52 Subject: [PATCH] Fix inserting table shape in non-english locale
53
54 Comparing a translated name with a fixed text isn't going to work...
55
56 BUG:297029
57 BUG:293704
58
59 Okay to backport to 2.4?
60 ---
61 libs/flake/KoDeferredShapeFactoryBase.h | 2 ++
62 libs/flake/KoShapeFactoryBase.cpp | 9 ++-------
63 sheets/shape/TableShapeDeferredFactory.h | 2 ++
64 sheets/shape/TableShapeFactory.cpp | 2 +-
65 sheets/shape/spreadsheetshape-deferred.desktop | 1 +
66 5 files changed, 8 insertions(+), 8 deletions(-)
67
68 diff --git a/libs/flake/KoDeferredShapeFactoryBase.h b/libs/flake/KoDeferredShapeFactoryBase.h
69 index 68bc5e3..7887484 100644
70 --- a/libs/flake/KoDeferredShapeFactoryBase.h
71 +++ b/libs/flake/KoDeferredShapeFactoryBase.h
72 @@ -47,6 +47,8 @@ public:
73
74 virtual ~KoDeferredShapeFactoryBase();
75
76 + virtual QString deferredPluginName() = 0;
77 +
78 /**
79 * This method should be implemented by factories to create a shape that the user
80 * gets when doing a base insert. For example from a script. The created shape
81 diff --git a/libs/flake/KoShapeFactoryBase.cpp b/libs/flake/KoShapeFactoryBase.cpp
82 index 116cacc..5c5ec48 100644
83 --- a/libs/flake/KoShapeFactoryBase.cpp
84 +++ b/libs/flake/KoShapeFactoryBase.cpp
85 @@ -242,19 +242,14 @@ void KoShapeFactoryBase::getDeferredPlugin()
86 if (d->deferredFactory) return;
87
88 const QString serviceType = "Calligra/Deferred";
89 - QString query = QString::fromLatin1("(Type == 'Service') and (Name == '%1')").arg(d->deferredPluginName);
90 - const KService::List offers = KServiceTypeTrader::self()->query(serviceType, query);
91 + const KService::List offers = KServiceTypeTrader::self()->query(serviceType, QString());
92 Q_ASSERT(offers.size() > 0);
93
94 foreach(KSharedPtr<KService> service, offers) {
95 - QString error = 0; // FIXME: From where does error get a value?
96 KoDeferredShapeFactoryBase *plugin = service->createInstance<KoDeferredShapeFactoryBase>(this);
97 - if (plugin) {
98 + if (plugin && plugin->deferredPluginName() == d->deferredPluginName) {
99 d->deferredFactory = plugin;
100 }
101 - else {
102 - kWarning(30003) << "loading plugin" << service->name() << "failed, " << error;
103 - }
104 }
105
106 }
107 diff --git a/sheets/shape/TableShapeDeferredFactory.h b/sheets/shape/TableShapeDeferredFactory.h
108 index 2668c2b..981b4d8 100644
109 --- a/sheets/shape/TableShapeDeferredFactory.h
110 +++ b/sheets/shape/TableShapeDeferredFactory.h
111 @@ -30,6 +30,8 @@ public:
112 TableDeferredShapeFactory(QObject *parent, const QVariantList&);
113 ~TableDeferredShapeFactory();
114
115 + virtual QString deferredPluginName() { return "spreadsheetshape-deferred"; }
116 +
117 KoShape *createDefaultShape(KoDocumentResourceManager *documentResources = 0) const;
118 private:
119 KoShapeFactoryBase *m_stubFactory;
120 diff --git a/sheets/shape/TableShapeFactory.cpp b/sheets/shape/TableShapeFactory.cpp
121 index 0cba2a9..98102a6 100644
122 --- a/sheets/shape/TableShapeFactory.cpp
123 +++ b/sheets/shape/TableShapeFactory.cpp
124 @@ -47,7 +47,7 @@ TableShapePlugin::TableShapePlugin(QObject * parent, const QVariantList&)
125
126
127 TableShapeFactory::TableShapeFactory()
128 - : KoShapeFactoryBase(TableShapeId, i18n("Spreadsheet"), "Spreadsheet Shape")
129 + : KoShapeFactoryBase(TableShapeId, i18n("Spreadsheet"), "spreadsheetshape-deferred")
130 {
131 setToolTip(i18n("Spreadsheet Shape"));
132 setIcon("spreadsheetshape");
133 diff --git a/sheets/shape/spreadsheetshape-deferred.desktop b/sheets/shape/spreadsheetshape-deferred.desktop
134 index cb47900..da3b679 100644
135 --- a/sheets/shape/spreadsheetshape-deferred.desktop
136 +++ b/sheets/shape/spreadsheetshape-deferred.desktop
137 @@ -39,3 +39,4 @@ Type=Service
138 X-KDE-Library=spreadsheetshape-deferred
139 X-Flake-MinVersion=4
140 X-Flake-PluginVersion=4
141 +X-DeferredID=spreadsheetshape-deferred
142 --
143 1.7.9.2