1 |
commit: 968910ab62421955ee0abc7eefbdb38270c7a398 |
2 |
Author: Michał Górny <mgorny <AT> gentoo <DOT> org> |
3 |
AuthorDate: Fri Dec 8 18:21:28 2017 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Fri Dec 8 18:47:10 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=968910ab |
7 |
|
8 |
app-office/abiword: [QA] Move patches to a distfile |
9 |
|
10 |
Closes: https://bugs.gentoo.org/620546 |
11 |
|
12 |
app-office/abiword/Manifest | 3 +- |
13 |
app-office/abiword/abiword-3.0.2-r1.ebuild | 23 +- |
14 |
app-office/abiword/abiword-3.0.2.ebuild | 21 +- |
15 |
.../abiword/files/abiword-2.6.0-boolean.patch | 13 - |
16 |
.../abiword/files/abiword-2.8.3-desktop.patch | 12 - |
17 |
.../abiword/files/abiword-3.0.0-librevenge.patch | 1169 -------------------- |
18 |
app-office/abiword/files/abiword-3.0.0-libwp.patch | 36 - |
19 |
.../abiword-3.0.0-link-grammar-5-second.patch | 19 - |
20 |
.../abiword/files/abiword-3.0.1-fixwps.patch | 31 - |
21 |
.../abiword/files/abiword-3.0.1-libwps-0.4.patch | 54 - |
22 |
...biword-3.0.2-fix-black-drawing-regression.patch | 54 - |
23 |
.../abiword-3.0.2-fix-installing-readme.patch | 19 - |
24 |
.../files/abiword-3.0.2-fix-nullptr-c++98.patch | 34 - |
25 |
13 files changed, 25 insertions(+), 1463 deletions(-) |
26 |
|
27 |
diff --git a/app-office/abiword/Manifest b/app-office/abiword/Manifest |
28 |
index b6385d129cb..435ebe1a12d 100644 |
29 |
--- a/app-office/abiword/Manifest |
30 |
+++ b/app-office/abiword/Manifest |
31 |
@@ -1 +1,2 @@ |
32 |
-DIST abiword-3.0.2.tar.gz 11154333 SHA256 afbfd458fd02989d8b0c6362ba8a4c14686d89666f54cfdb5501bd2090cf3522 SHA512 29ce9e80b3b85ab2933e7d39216771d8c4e05db5255eaed0cf8e1d032ffaac2cb1880bf24e754196ad5dae4969a1c2101ce4dc9c1db14604adc2f852b6a17fe3 WHIRLPOOL c916d144a68f6581927c6d75d12cac2ae39e213e1ca928f190c19ffd8843cb0c463e671ec4ef6b21ab0d4c49a084e04a8b7eeed75bf45fdc0f76dfa4391ff898 |
33 |
+DIST abiword-3.0.2-patchset.tar.gz 10475 BLAKE2B 41b4b894e1b433ca722270e09410de22be906920b551d19580db32b4c8557595902d23a7ed320cc71b1fc191f830e72178158ffb02cafb07e01c72d12ccd4faa SHA512 e81688bbe58cdc9c6848cd2bc74207bf9c6e8dd1f2652a707f007ce9a2f3cf8cc77eac65b04e24b67a694773f0b08ba14bdcf10db549e33cbb7ee5da634bdfb3 |
34 |
+DIST abiword-3.0.2.tar.gz 11154333 BLAKE2B af49570ad766b0e698313a4a88f14b2370a0a230866c4e8672f56780705060dba4207d4e13358cc290fb3c1a4a6a56efa05fed1f0540f10f7572d8e717e6cd20 SHA512 29ce9e80b3b85ab2933e7d39216771d8c4e05db5255eaed0cf8e1d032ffaac2cb1880bf24e754196ad5dae4969a1c2101ce4dc9c1db14604adc2f852b6a17fe3 |
35 |
|
36 |
diff --git a/app-office/abiword/abiword-3.0.2-r1.ebuild b/app-office/abiword/abiword-3.0.2-r1.ebuild |
37 |
index 3638c3f324b..98001c8f254 100644 |
38 |
--- a/app-office/abiword/abiword-3.0.2-r1.ebuild |
39 |
+++ b/app-office/abiword/abiword-3.0.2-r1.ebuild |
40 |
@@ -9,7 +9,8 @@ inherit gnome2 |
41 |
|
42 |
DESCRIPTION="Fully featured yet light and fast cross platform word processor" |
43 |
HOMEPAGE="http://www.abisource.com/" |
44 |
-SRC_URI="http://www.abisource.com/downloads/${PN}/${PV}/source/${P}.tar.gz" |
45 |
+SRC_URI="http://www.abisource.com/downloads/${PN}/${PV}/source/${P}.tar.gz |
46 |
+ https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.gz" |
47 |
|
48 |
LICENSE="GPL-2" |
49 |
SLOT="2" |
50 |
@@ -67,30 +68,30 @@ DEPEND="${RDEPEND} |
51 |
|
52 |
PATCHES=( |
53 |
# http://bugzilla.abisource.com/show_bug.cgi?id=13842 |
54 |
- "${FILESDIR}"/${PN}-2.8.3-desktop.patch |
55 |
+ "${WORKDIR}"/${P}-patchset/${PN}-2.8.3-desktop.patch |
56 |
|
57 |
# http://bugzilla.abisource.com/show_bug.cgi?id=13843 |
58 |
- "${FILESDIR}"/${PN}-2.6.0-boolean.patch |
59 |
+ "${WORKDIR}"/${P}-patchset/${PN}-2.6.0-boolean.patch |
60 |
|
61 |
# http://bugzilla.abisource.com/show_bug.cgi?id=13844 |
62 |
- "${FILESDIR}"/${PN}-3.0.0-librevenge.patch |
63 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.0-librevenge.patch |
64 |
|
65 |
# http://bugzilla.abisource.com/show_bug.cgi?id=13845 |
66 |
- "${FILESDIR}"/${PN}-3.0.0-link-grammar-5-second.patch |
67 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.0-link-grammar-5-second.patch |
68 |
|
69 |
# http://bugzilla.abisource.com/show_bug.cgi?id=13846 |
70 |
- "${FILESDIR}"/${PN}-3.0.0-libwp.patch |
71 |
- "${FILESDIR}"/${PN}-3.0.1-libwps-0.4.patch |
72 |
- "${FILESDIR}"/${PN}-3.0.1-fixwps.patch |
73 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.0-libwp.patch |
74 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.1-libwps-0.4.patch |
75 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.1-fixwps.patch |
76 |
|
77 |
# http://bugzilla.abisource.com/show_bug.cgi?id=13847 |
78 |
- "${FILESDIR}"/${PN}-3.0.2-fix-installing-readme.patch |
79 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.2-fix-installing-readme.patch |
80 |
|
81 |
# http://bugzilla.abisource.com/show_bug.cgi?id=13841 |
82 |
- "${FILESDIR}"/${PN}-3.0.2-fix-nullptr-c++98.patch |
83 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.2-fix-nullptr-c++98.patch |
84 |
|
85 |
# http://bugzilla.abisource.com/show_bug.cgi?id=13815 |
86 |
- "${FILESDIR}"/${PN}-3.0.2-fix-black-drawing-regression.patch |
87 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.2-fix-black-drawing-regression.patch |
88 |
) |
89 |
|
90 |
src_configure() { |
91 |
|
92 |
diff --git a/app-office/abiword/abiword-3.0.2.ebuild b/app-office/abiword/abiword-3.0.2.ebuild |
93 |
index cad3c647a5b..9a6ce7846e3 100644 |
94 |
--- a/app-office/abiword/abiword-3.0.2.ebuild |
95 |
+++ b/app-office/abiword/abiword-3.0.2.ebuild |
96 |
@@ -7,7 +7,8 @@ inherit autotools gnome2 |
97 |
|
98 |
DESCRIPTION="Fully featured yet light and fast cross platform word processor" |
99 |
HOMEPAGE="http://www.abisource.com/" |
100 |
-SRC_URI="http://www.abisource.com/downloads/${PN}/${PV}/source/${P}.tar.gz" |
101 |
+SRC_URI="http://www.abisource.com/downloads/${PN}/${PV}/source/${P}.tar.gz |
102 |
+ https://dev.gentoo.org/~mgorny/dist/${P}-patchset.tar.gz" |
103 |
|
104 |
LICENSE="GPL-2" |
105 |
SLOT="2" |
106 |
@@ -64,15 +65,15 @@ DEPEND="${RDEPEND} |
107 |
" |
108 |
|
109 |
PATCHES=( |
110 |
- "${FILESDIR}"/${PN}-2.8.3-desktop.patch |
111 |
- "${FILESDIR}"/${PN}-2.6.0-boolean.patch |
112 |
- "${FILESDIR}"/${PN}-3.0.0-librevenge.patch |
113 |
- "${FILESDIR}"/${PN}-3.0.0-link-grammar-5-second.patch |
114 |
- "${FILESDIR}"/${PN}-3.0.0-libwp.patch |
115 |
- "${FILESDIR}"/${PN}-3.0.1-libwps-0.4.patch |
116 |
- "${FILESDIR}"/${PN}-3.0.1-fixwps.patch |
117 |
- "${FILESDIR}"/${PN}-3.0.2-fix-installing-readme.patch |
118 |
- "${FILESDIR}"/${PN}-3.0.2-fix-nullptr-c++98.patch |
119 |
+ "${WORKDIR}"/${P}-patchset/${PN}-2.8.3-desktop.patch |
120 |
+ "${WORKDIR}"/${P}-patchset/${PN}-2.6.0-boolean.patch |
121 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.0-librevenge.patch |
122 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.0-link-grammar-5-second.patch |
123 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.0-libwp.patch |
124 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.1-libwps-0.4.patch |
125 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.1-fixwps.patch |
126 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.2-fix-installing-readme.patch |
127 |
+ "${WORKDIR}"/${P}-patchset/${PN}-3.0.2-fix-nullptr-c++98.patch |
128 |
) |
129 |
|
130 |
src_prepare() { |
131 |
|
132 |
diff --git a/app-office/abiword/files/abiword-2.6.0-boolean.patch b/app-office/abiword/files/abiword-2.6.0-boolean.patch |
133 |
deleted file mode 100644 |
134 |
index 9f226c0d237..00000000000 |
135 |
--- a/app-office/abiword/files/abiword-2.6.0-boolean.patch |
136 |
+++ /dev/null |
137 |
@@ -1,13 +0,0 @@ |
138 |
-diff -u -r abiword-2.6.0.orig/src/text/ptbl/xp/pd_Style.h abiword-2.6.0/src/text/ptbl/xp/pd_Style.h |
139 |
---- abiword-2.6.0.orig/src/text/ptbl/xp/pd_Style.h 2008-03-18 23:16:20.000000000 +0100 |
140 |
-+++ abiword-2.6.0/src/text/ptbl/xp/pd_Style.h 2008-03-25 17:14:23.000000000 +0100 |
141 |
-@@ -23,6 +23,9 @@ |
142 |
- #ifndef PD_STYLE_H |
143 |
- #define PD_STYLE_H |
144 |
- |
145 |
-+#ifndef FALSE |
146 |
-+#define FALSE 0 |
147 |
-+#endif /* FALSE */ |
148 |
- #include "ut_types.h" |
149 |
- #include "pt_Types.h" |
150 |
- #include "ut_xml.h" |
151 |
|
152 |
diff --git a/app-office/abiword/files/abiword-2.8.3-desktop.patch b/app-office/abiword/files/abiword-2.8.3-desktop.patch |
153 |
deleted file mode 100644 |
154 |
index d908ad48d53..00000000000 |
155 |
--- a/app-office/abiword/files/abiword-2.8.3-desktop.patch |
156 |
+++ /dev/null |
157 |
@@ -1,12 +0,0 @@ |
158 |
-diff -u -r abiword-2.8.3.orig/abiword.desktop abiword-2.8.3/abiword.desktop |
159 |
---- abiword-2.8.3.orig/abiword.desktop 2010-04-02 19:59:58.000000000 +0200 |
160 |
-+++ abiword-2.8.3/abiword.desktop 2010-04-08 09:07:01.000000000 +0200 |
161 |
-@@ -6,7 +6,7 @@ |
162 |
- Categories=Office;WordProcessor;GNOME;GTK;X-Red-Hat-Base; |
163 |
- StartupNotify=true |
164 |
- X-Desktop-File-Install-Version=0.9 |
165 |
--MimeType=application/x-abiword;text/x-abiword;text/x-xml-abiword;text/plain;application/msword;application/rtf;application/vnd.plain;application/xhtml+xml;text/html;application/x-crossmark;application/docbook+xml;application/x-t602;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.sun.xml.writer;application/vnd.stardivision.writer;text/vnd.wap.wml;application/wordperfect6;application/wordperfect5.1;application/vnd.wordperfect;application/x-abicollab; |
166 |
-+MimeType=application/x-abiword;text/x-abiword;text/x-xml-abiword;text/plain;application/msword;application/rtf;application/vnd.plain;application/xhtml+xml;text/html;application/x-crossmark;application/docbook+xml;application/x-t602;application/vnd.oasis.opendocument.text;application/vnd.oasis.opendocument.text-template;application/vnd.oasis.opendocument.text-web;application/vnd.sun.xml.writer;application/vnd.stardivision.writer;text/vnd.wap.wml;application/wordperfect6;application/wordperfect5.1;application/vnd.wordperfect;application/x-abicollab;application/x-applix-word;application/x-mswrite;application/x-kword;application/x-mif; |
167 |
- Name=AbiWord |
168 |
- GenericName=Word Processor |
169 |
- Comment=Compose, edit, and view documents |
170 |
|
171 |
diff --git a/app-office/abiword/files/abiword-3.0.0-librevenge.patch b/app-office/abiword/files/abiword-3.0.0-librevenge.patch |
172 |
deleted file mode 100644 |
173 |
index b2121eb3560..00000000000 |
174 |
--- a/app-office/abiword/files/abiword-3.0.0-librevenge.patch |
175 |
+++ /dev/null |
176 |
@@ -1,1169 +0,0 @@ |
177 |
---- a/plugins/wpg/xp/ie_impGraphic_WPG.cpp |
178 |
-+++ b/plugins/wpg/xp/ie_impGraphic_WPG.cpp |
179 |
-@@ -31,7 +31,7 @@ |
180 |
- #include <gsf/gsf-input-memory.h> |
181 |
- #include <gsf/gsf-input-stdio.h> |
182 |
- #include <gsf/gsf-infile-msole.h> |
183 |
--#include <libwpd-stream/libwpd-stream.h> |
184 |
-+#include <librevenge-0.0/librevenge-stream/librevenge-stream.h> |
185 |
- #include "xap_Module.h" |
186 |
- |
187 |
- using libwpg::WPGraphics; |
188 |
-@@ -38,30 +38,35 @@ |
189 |
- |
190 |
- ABI_PLUGIN_DECLARE("WPG") |
191 |
- |
192 |
--class AbiWordPerfectGraphicsInputStream : public WPXInputStream |
193 |
-+class AbiWordPerfectGraphicsInputStream : public librevenge::RVNGInputStream |
194 |
- { |
195 |
- public: |
196 |
- AbiWordPerfectGraphicsInputStream(GsfInput *input); |
197 |
- ~AbiWordPerfectGraphicsInputStream(); |
198 |
- |
199 |
-- virtual bool isOLEStream(); |
200 |
-- virtual WPXInputStream * getDocumentOLEStream(); |
201 |
-- virtual WPXInputStream * getDocumentOLEStream(const char * name); |
202 |
-+ virtual bool isStructured(); |
203 |
-+ virtual unsigned subStreamCount(); |
204 |
-+ virtual const char* subStreamName(unsigned); |
205 |
-+ bool existsSubStream(const char*); |
206 |
-+ virtual librevenge::RVNGInputStream* getSubStreamByName(const char*); |
207 |
-+ virtual librevenge::RVNGInputStream* getSubStreamById(unsigned); |
208 |
- virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); |
209 |
-- virtual int seek(long offset, WPX_SEEK_TYPE seekType); |
210 |
-+ virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType); |
211 |
- virtual long tell(); |
212 |
-- virtual bool atEOS(); |
213 |
-+ virtual bool isEnd(); |
214 |
- |
215 |
- private: |
216 |
- |
217 |
- GsfInput *m_input; |
218 |
- GsfInfile *m_ole; |
219 |
-+ std::map<unsigned, std::string> m_substreams; |
220 |
- }; |
221 |
- |
222 |
- AbiWordPerfectGraphicsInputStream::AbiWordPerfectGraphicsInputStream(GsfInput *input) : |
223 |
-- WPXInputStream(), |
224 |
-+ librevenge::RVNGInputStream(), |
225 |
- m_input(input), |
226 |
-- m_ole(NULL) |
227 |
-+ m_ole(NULL), |
228 |
-+ m_substreams() |
229 |
- { |
230 |
- g_object_ref(G_OBJECT(input)); |
231 |
- } |
232 |
-@@ -86,50 +91,120 @@ |
233 |
- return buf; |
234 |
- } |
235 |
- |
236 |
--int AbiWordPerfectGraphicsInputStream::seek(long offset, WPX_SEEK_TYPE seekType) |
237 |
-+int AbiWordPerfectGraphicsInputStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) |
238 |
- { |
239 |
- GSeekType gsfSeekType = G_SEEK_SET; |
240 |
- switch(seekType) |
241 |
- { |
242 |
-- case WPX_SEEK_CUR: |
243 |
-+ case librevenge::RVNG_SEEK_CUR: |
244 |
- gsfSeekType = G_SEEK_CUR; |
245 |
- break; |
246 |
-- case WPX_SEEK_SET: |
247 |
-+ case librevenge::RVNG_SEEK_SET: |
248 |
- gsfSeekType = G_SEEK_SET; |
249 |
- break; |
250 |
-+ case librevenge::RVNG_SEEK_END: |
251 |
-+ gsfSeekType = G_SEEK_END; |
252 |
-+ break; |
253 |
- } |
254 |
- |
255 |
- return gsf_input_seek(m_input, offset, gsfSeekType); |
256 |
- } |
257 |
- |
258 |
--bool AbiWordPerfectGraphicsInputStream::isOLEStream() |
259 |
-+bool AbiWordPerfectGraphicsInputStream::isStructured() |
260 |
- { |
261 |
- if (!m_ole) |
262 |
- m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
263 |
- |
264 |
-- if (m_ole != NULL) |
265 |
-+ if (!m_ole) |
266 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
267 |
-+ |
268 |
-+ if (m_ole) |
269 |
- return true; |
270 |
- |
271 |
- return false; |
272 |
- } |
273 |
- |
274 |
--WPXInputStream * AbiWordPerfectGraphicsInputStream::getDocumentOLEStream() |
275 |
-+unsigned AbiWordPerfectGraphicsInputStream::subStreamCount() |
276 |
- { |
277 |
-- return getDocumentOLEStream("PerfectOffice_MAIN"); |
278 |
-+ if (!m_ole) |
279 |
-+ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
280 |
-+ |
281 |
-+ if (!m_ole) |
282 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
283 |
-+ |
284 |
-+ if (m_ole) |
285 |
-+ { |
286 |
-+ int numChildren = gsf_infile_num_children(m_ole); |
287 |
-+ if (numChildren > 0) |
288 |
-+ return numChildren; |
289 |
-+ return 0; |
290 |
-+ } |
291 |
-+ |
292 |
-+ return 0; |
293 |
- } |
294 |
- |
295 |
--WPXInputStream * AbiWordPerfectGraphicsInputStream::getDocumentOLEStream(const char * name) |
296 |
-+const char * AbiWordPerfectGraphicsInputStream::subStreamName(unsigned id) |
297 |
- { |
298 |
-- WPXInputStream *documentStream = NULL; |
299 |
-+ if (!m_ole) |
300 |
-+ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
301 |
- |
302 |
- if (!m_ole) |
303 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
304 |
-+ |
305 |
-+ if (m_ole) |
306 |
-+ { |
307 |
-+ if ((int)id >= gsf_infile_num_children(m_ole)) |
308 |
-+ { |
309 |
-+ return 0; |
310 |
-+ } |
311 |
-+ std::map<unsigned, std::string>::iterator i = m_substreams.lower_bound(id); |
312 |
-+ if (i == m_substreams.end() || m_substreams.key_comp()(id, i->first)) |
313 |
-+ { |
314 |
-+ std::string name = gsf_infile_name_by_index(m_ole, (int)id); |
315 |
-+ i = m_substreams.insert(i, std::map<unsigned, std::string>::value_type(id, name)); |
316 |
-+ } |
317 |
-+ return i->second.c_str(); |
318 |
-+ } |
319 |
-+ |
320 |
-+ return 0; |
321 |
-+} |
322 |
-+ |
323 |
-+bool AbiWordPerfectGraphicsInputStream::existsSubStream(const char * name) |
324 |
-+{ |
325 |
-+ if (!m_ole) |
326 |
- m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
327 |
- |
328 |
-+ if (!m_ole) |
329 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
330 |
-+ |
331 |
- if (m_ole) |
332 |
- { |
333 |
- GsfInput *document = gsf_infile_child_by_name(m_ole, name); |
334 |
- if (document) |
335 |
- { |
336 |
-+ g_object_unref(G_OBJECT (document)); |
337 |
-+ return true; |
338 |
-+ } |
339 |
-+ } |
340 |
-+ |
341 |
-+ return false; |
342 |
-+} |
343 |
-+ |
344 |
-+librevenge::RVNGInputStream * AbiWordPerfectGraphicsInputStream::getSubStreamByName(const char * name) |
345 |
-+{ |
346 |
-+ librevenge::RVNGInputStream *documentStream = NULL; |
347 |
-+ |
348 |
-+ if (!m_ole) |
349 |
-+ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
350 |
-+ |
351 |
-+ if (!m_ole) |
352 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
353 |
-+ |
354 |
-+ if (m_ole) |
355 |
-+ { |
356 |
-+ GsfInput *document = gsf_infile_child_by_name(m_ole, name); |
357 |
-+ if (document) |
358 |
-+ { |
359 |
- documentStream = new AbiWordPerfectGraphicsInputStream(document); |
360 |
- g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream |
361 |
- } |
362 |
-@@ -138,12 +213,35 @@ |
363 |
- return documentStream; |
364 |
- } |
365 |
- |
366 |
-+librevenge::RVNGInputStream * AbiWordPerfectGraphicsInputStream::getSubStreamById(unsigned id) |
367 |
-+{ |
368 |
-+ librevenge::RVNGInputStream *documentStream = NULL; |
369 |
-+ |
370 |
-+ if (!m_ole) |
371 |
-+ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
372 |
-+ |
373 |
-+ if (!m_ole) |
374 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
375 |
-+ |
376 |
-+ if (m_ole) |
377 |
-+ { |
378 |
-+ GsfInput *document = gsf_infile_child_by_index(m_ole, (int)id); |
379 |
-+ if (document) |
380 |
-+ { |
381 |
-+ documentStream = new AbiWordPerfectGraphicsInputStream(document); |
382 |
-+ g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream |
383 |
-+ } |
384 |
-+ } |
385 |
-+ |
386 |
-+ return documentStream; |
387 |
-+} |
388 |
-+ |
389 |
- long AbiWordPerfectGraphicsInputStream::tell() |
390 |
- { |
391 |
- return gsf_input_tell(m_input); |
392 |
- } |
393 |
- |
394 |
--bool AbiWordPerfectGraphicsInputStream::atEOS() |
395 |
-+bool AbiWordPerfectGraphicsInputStream::isEnd() |
396 |
- { |
397 |
- return gsf_input_eof(m_input); |
398 |
- } |
399 |
-@@ -244,14 +342,24 @@ |
400 |
- UT_Error IE_Imp_WordPerfectGraphics::importGraphic(GsfInput *input, FG_Graphic **ppfg) |
401 |
- { |
402 |
- AbiWordPerfectGraphicsInputStream gsfInput(input); |
403 |
-- WPXString svgOutput; |
404 |
-- if (WPGraphics::generateSVG(&gsfInput, svgOutput)) |
405 |
-+ librevenge::RVNGString svgOutput; |
406 |
-+ librevenge::RVNGStringVector vec; |
407 |
-+ librevenge::RVNGSVGDrawingGenerator generator(vec, ""); |
408 |
-+ |
409 |
-+ if (!libwpg::WPGraphics::parse(&gsfInput, &generator) || vec.empty() || vec[0].empty()) |
410 |
- { |
411 |
-- GsfInput * svgInput = gsf_input_memory_new((const guint8*)svgOutput.cstr(), svgOutput.len(), false); |
412 |
-- UT_Error result = IE_ImpGraphic::loadGraphic(svgInput, IE_ImpGraphic::fileTypeForSuffix(".svg"), ppfg); |
413 |
-- g_object_unref(svgInput); |
414 |
-- return result; |
415 |
-+ return UT_ERROR; |
416 |
- } |
417 |
-- return UT_ERROR; |
418 |
-+ |
419 |
-+ svgOutput.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n"); |
420 |
-+ svgOutput.append("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\""); |
421 |
-+ svgOutput.append(" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n"); |
422 |
-+ svgOutput.append(vec[0]); |
423 |
-+ svgOutput.append("\n"); |
424 |
-+ |
425 |
-+ GsfInput * svgInput = gsf_input_memory_new((const guint8*)svgOutput.cstr(), svgOutput.len(), false); |
426 |
-+ UT_Error result = IE_ImpGraphic::loadGraphic(svgInput, IE_ImpGraphic::fileTypeForSuffix(".svg"), ppfg); |
427 |
-+ g_object_unref(svgInput); |
428 |
-+ return result; |
429 |
- } |
430 |
- |
431 |
---- a/plugins/wpg/plugin.m4 |
432 |
-+++ b/plugins/wpg/plugin.m4 |
433 |
-@@ -1,5 +1,5 @@ |
434 |
- |
435 |
--wpg_pkgs="$gsf_req libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0" |
436 |
-+wpg_pkgs="libwpg-0.3 $gsf_req" |
437 |
- wpg_deps="no" |
438 |
- |
439 |
- if test "$enable_wpg" != ""; then |
440 |
---- a/plugins/wordperfect/xp/ie_imp_WordPerfect.h |
441 |
-+++ b/plugins/wordperfect/xp/ie_imp_WordPerfect.h |
442 |
-@@ -30,7 +30,7 @@ |
443 |
- #define IE_IMP_WP_H |
444 |
- |
445 |
- #include <stdio.h> |
446 |
--#include <libwpd/libwpd.h> |
447 |
-+#include <librevenge-0.0/librevenge/librevenge.h> |
448 |
- #include "ie_imp.h" |
449 |
- #include "ut_string.h" |
450 |
- #include "ut_string_class.h" |
451 |
-@@ -92,7 +92,7 @@ |
452 |
- IE_Imp ** ppie); |
453 |
- }; |
454 |
- |
455 |
--class IE_Imp_WordPerfect : public IE_Imp, public WPXDocumentInterface |
456 |
-+class IE_Imp_WordPerfect : public IE_Imp, public librevenge::RVNGTextInterface |
457 |
- { |
458 |
- public: |
459 |
- IE_Imp_WordPerfect(PD_Document * pDocument); |
460 |
-@@ -101,69 +101,83 @@ |
461 |
- virtual void pasteFromBuffer(PD_DocumentRange * pDocRange, |
462 |
- UT_uint8 * pData, UT_uint32 lenData, const char * szEncoding = 0); |
463 |
- |
464 |
-- virtual void setDocumentMetaData(const WPXPropertyList &propList); |
465 |
-+ virtual void setDocumentMetaData(const librevenge::RVNGPropertyList &propList); |
466 |
- |
467 |
-- virtual void startDocument(); |
468 |
-- virtual void endDocument(); |
469 |
-+ virtual void startDocument(const librevenge::RVNGPropertyList &propList); |
470 |
-+ virtual void endDocument(); |
471 |
- |
472 |
-- virtual void openPageSpan(const WPXPropertyList &propList); |
473 |
-- virtual void closePageSpan() {} |
474 |
-- virtual void openHeader(const WPXPropertyList &propList); |
475 |
-- virtual void closeHeader(); |
476 |
-- virtual void openFooter(const WPXPropertyList &propList); |
477 |
-- virtual void closeFooter(); |
478 |
-+ virtual void defineEmbeddedFont(const librevenge::RVNGPropertyList & /* propList */) {} |
479 |
- |
480 |
-- virtual void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); |
481 |
-- virtual void closeParagraph() {} |
482 |
-+ virtual void definePageStyle(const librevenge::RVNGPropertyList &) {} |
483 |
-+ virtual void openPageSpan(const librevenge::RVNGPropertyList &propList); |
484 |
-+ virtual void closePageSpan() {} |
485 |
-+ virtual void openHeader(const librevenge::RVNGPropertyList &propList); |
486 |
-+ virtual void closeHeader(); |
487 |
-+ virtual void openFooter(const librevenge::RVNGPropertyList &propList); |
488 |
-+ virtual void closeFooter(); |
489 |
- |
490 |
-- virtual void openSpan(const WPXPropertyList &propList); |
491 |
-- virtual void closeSpan() {} |
492 |
-+ virtual void defineSectionStyle(const librevenge::RVNGPropertyList &) {} |
493 |
-+ virtual void openSection(const librevenge::RVNGPropertyList &propList); |
494 |
-+ virtual void closeSection() {} |
495 |
- |
496 |
-- virtual void openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns); |
497 |
-- virtual void closeSection() {} |
498 |
-+ virtual void defineParagraphStyle(const librevenge::RVNGPropertyList &) {} |
499 |
-+ virtual void openParagraph(const librevenge::RVNGPropertyList &propList); |
500 |
-+ virtual void closeParagraph() {} |
501 |
- |
502 |
-- virtual void insertTab(); |
503 |
-- virtual void insertText(const WPXString &text); |
504 |
-- virtual void insertLineBreak(); |
505 |
-+ virtual void defineCharacterStyle(const librevenge::RVNGPropertyList &) {} |
506 |
-+ virtual void openSpan(const librevenge::RVNGPropertyList &propList); |
507 |
-+ virtual void closeSpan() {} |
508 |
- |
509 |
-- virtual void defineOrderedListLevel(const WPXPropertyList &propList); |
510 |
-- virtual void defineUnorderedListLevel(const WPXPropertyList &propList); |
511 |
-- virtual void openOrderedListLevel(const WPXPropertyList &propList); |
512 |
-- virtual void openUnorderedListLevel(const WPXPropertyList &propList); |
513 |
-- virtual void closeOrderedListLevel(); |
514 |
-- virtual void closeUnorderedListLevel(); |
515 |
-- virtual void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); |
516 |
-- virtual void closeListElement() {} |
517 |
-+ virtual void openLink(const librevenge::RVNGPropertyList & /* propList */) {} |
518 |
-+ virtual void closeLink() {} |
519 |
- |
520 |
-- virtual void openFootnote(const WPXPropertyList &propList); |
521 |
-- virtual void closeFootnote(); |
522 |
-- virtual void openEndnote(const WPXPropertyList &propList); |
523 |
-- virtual void closeEndnote(); |
524 |
-+ virtual void insertTab(); |
525 |
-+ virtual void insertText(const librevenge::RVNGString &text); |
526 |
-+ virtual void insertSpace(); |
527 |
-+ virtual void insertLineBreak(); |
528 |
-+ virtual void insertField(const librevenge::RVNGPropertyList & /* propList */) {} |
529 |
- |
530 |
-- virtual void openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns); |
531 |
-- virtual void openTableRow(const WPXPropertyList &propList); |
532 |
-- virtual void closeTableRow() {} |
533 |
-- virtual void openTableCell(const WPXPropertyList &propList); |
534 |
-- virtual void closeTableCell() {} |
535 |
-- virtual void insertCoveredTableCell(const WPXPropertyList & /*propList*/) {} |
536 |
-- virtual void closeTable(); |
537 |
-+ virtual void openOrderedListLevel(const librevenge::RVNGPropertyList &propList); |
538 |
-+ virtual void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList); |
539 |
-+ virtual void closeOrderedListLevel(); |
540 |
-+ virtual void closeUnorderedListLevel(); |
541 |
-+ virtual void openListElement(const librevenge::RVNGPropertyList &propList); |
542 |
-+ virtual void closeListElement() {} |
543 |
- |
544 |
-- virtual void definePageStyle(const WPXPropertyList&) {} |
545 |
-- virtual void defineParagraphStyle(const WPXPropertyList&, const WPXPropertyListVector&) {} |
546 |
-- virtual void defineCharacterStyle(const WPXPropertyList&) {} |
547 |
-- virtual void defineSectionStyle(const WPXPropertyList&, const WPXPropertyListVector&) {} |
548 |
-- virtual void insertSpace() {} |
549 |
-- virtual void insertField(const WPXString&, const WPXPropertyList&) {} |
550 |
-- virtual void openComment(const WPXPropertyList&) {} |
551 |
-- virtual void closeComment() {} |
552 |
-- virtual void openTextBox(const WPXPropertyList&) {} |
553 |
-- virtual void closeTextBox() {} |
554 |
-- virtual void openFrame(const WPXPropertyList&) {} |
555 |
-- virtual void closeFrame() {} |
556 |
-- virtual void insertBinaryObject(const WPXPropertyList&, const WPXBinaryData&) {} |
557 |
-- virtual void insertEquation(const WPXPropertyList&, const WPXString&) {} |
558 |
-+ virtual void openFootnote(const librevenge::RVNGPropertyList &propList); |
559 |
-+ virtual void closeFootnote(); |
560 |
-+ virtual void openEndnote(const librevenge::RVNGPropertyList &propList); |
561 |
-+ virtual void closeEndnote(); |
562 |
-+ virtual void openComment(const librevenge::RVNGPropertyList & /* propList */) {} |
563 |
-+ virtual void closeComment() {} |
564 |
-+ virtual void openTextBox(const librevenge::RVNGPropertyList & /* propList */) {} |
565 |
-+ virtual void closeTextBox() {} |
566 |
- |
567 |
-+ virtual void openTable(const librevenge::RVNGPropertyList &propList); |
568 |
-+ virtual void openTableRow(const librevenge::RVNGPropertyList &propList); |
569 |
-+ virtual void closeTableRow() {} |
570 |
-+ virtual void openTableCell(const librevenge::RVNGPropertyList &propList); |
571 |
-+ virtual void closeTableCell() {} |
572 |
-+ virtual void insertCoveredTableCell(const librevenge::RVNGPropertyList & /* propList */) {} |
573 |
-+ virtual void closeTable(); |
574 |
- |
575 |
-+ virtual void openFrame(const librevenge::RVNGPropertyList & /* propList */) {} |
576 |
-+ virtual void closeFrame() {} |
577 |
-+ |
578 |
-+ virtual void openGroup(const librevenge::RVNGPropertyList & /* propList */) {} |
579 |
-+ virtual void closeGroup() {} |
580 |
-+ |
581 |
-+ virtual void defineGraphicStyle(const librevenge::RVNGPropertyList & /* propList */) {} |
582 |
-+ virtual void drawRectangle(const librevenge::RVNGPropertyList & /* propList */) {} |
583 |
-+ virtual void drawEllipse(const librevenge::RVNGPropertyList & /* propList */) {} |
584 |
-+ virtual void drawPolygon(const librevenge::RVNGPropertyList & /* propList */) {} |
585 |
-+ virtual void drawPolyline(const librevenge::RVNGPropertyList & /* propList */) {} |
586 |
-+ virtual void drawPath(const librevenge::RVNGPropertyList & /* propList */) {} |
587 |
-+ virtual void drawConnector(const librevenge::RVNGPropertyList & /* propList */) {} |
588 |
-+ |
589 |
-+ virtual void insertBinaryObject(const librevenge::RVNGPropertyList & /* propList */) {} |
590 |
-+ virtual void insertEquation(const librevenge::RVNGPropertyList & /* propList */) {} |
591 |
-+ |
592 |
- protected: |
593 |
- virtual UT_Error _loadFile(GsfInput * input); |
594 |
- UT_Error _appendSection(int numColumns, const float, const float); |
595 |
---- a/plugins/wordperfect/xp/ie_impexp_WordPerfect.cpp |
596 |
-+++ b/plugins/wordperfect/xp/ie_impexp_WordPerfect.cpp |
597 |
-@@ -35,7 +35,6 @@ |
598 |
- ABI_PLUGIN_DECLARE("WordPerfect") |
599 |
- |
600 |
- static IE_Imp_WordPerfect_Sniffer * m_ImpSniffer = 0; |
601 |
--static IE_Exp_WordPerfect_Sniffer * m_ExpSniffer = 0; |
602 |
- |
603 |
- #ifdef HAVE_LIBWPS |
604 |
- static IE_Imp_MSWorks_Sniffer * m_MSWorks_ImpSniffer = 0; |
605 |
-@@ -49,13 +48,7 @@ |
606 |
- m_ImpSniffer = new IE_Imp_WordPerfect_Sniffer (); |
607 |
- } |
608 |
- |
609 |
-- if (!m_ExpSniffer) |
610 |
-- { |
611 |
-- m_ExpSniffer = new IE_Exp_WordPerfect_Sniffer (); |
612 |
-- } |
613 |
-- |
614 |
- UT_ASSERT (m_ImpSniffer); |
615 |
-- UT_ASSERT (m_ExpSniffer); |
616 |
- |
617 |
- #ifdef HAVE_LIBWPS |
618 |
- if (!m_MSWorks_ImpSniffer) |
619 |
-@@ -79,7 +72,7 @@ |
620 |
- mi->usage = "No Usage"; |
621 |
- |
622 |
- IE_Imp::registerImporter (m_ImpSniffer); |
623 |
-- //IE_Exp::registerExporter (m_ExpSniffer); |
624 |
-+ |
625 |
- return 1; |
626 |
- } |
627 |
- |
628 |
-@@ -93,18 +86,11 @@ |
629 |
- mi->usage = 0; |
630 |
- |
631 |
- UT_ASSERT (m_ImpSniffer); |
632 |
-- UT_ASSERT (m_ExpSniffer); |
633 |
- |
634 |
- IE_Imp::unregisterImporter (m_ImpSniffer); |
635 |
- delete m_ImpSniffer; |
636 |
- m_ImpSniffer = 0; |
637 |
- |
638 |
-- /* |
639 |
-- IE_Exp::unregisterExporter (m_ExpSniffer); |
640 |
-- delete m_ExpSniffer; |
641 |
-- m_ExpSniffer = 0; |
642 |
-- */ |
643 |
-- |
644 |
- #ifdef HAVE_LIBWPS |
645 |
- IE_Imp::unregisterImporter (m_MSWorks_ImpSniffer); |
646 |
- delete m_MSWorks_ImpSniffer; |
647 |
---- a/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp |
648 |
-+++ b/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp |
649 |
-@@ -31,6 +31,8 @@ |
650 |
- #include <stdlib.h> |
651 |
- #include <string.h> |
652 |
- #include <math.h> |
653 |
-+#include <map> |
654 |
-+#include <string> |
655 |
- #include <gsf/gsf-utils.h> |
656 |
- #include <gsf/gsf-input-memory.h> |
657 |
- #include <gsf/gsf-input-stdio.h> |
658 |
-@@ -60,42 +62,47 @@ |
659 |
- |
660 |
- // Stream class |
661 |
- |
662 |
--#include <libwpd-stream/libwpd-stream.h> |
663 |
-+#include <librevenge-0.0/librevenge-stream/librevenge-stream.h> |
664 |
-+#include <libwpd/libwpd.h> |
665 |
- |
666 |
- #include <gsf/gsf-input.h> |
667 |
- #include <gsf/gsf-infile.h> |
668 |
- #include <gsf/gsf-infile-msole.h> |
669 |
-+#include <gsf/gsf-infile-zip.h> |
670 |
- |
671 |
- #ifdef HAVE_LIBWPS |
672 |
- #include <libwps/libwps.h> |
673 |
- #endif |
674 |
- |
675 |
--class AbiWordperfectInputStream : public WPXInputStream |
676 |
-+class AbiWordperfectInputStream : public librevenge::RVNGInputStream |
677 |
- { |
678 |
- public: |
679 |
- AbiWordperfectInputStream(GsfInput *input); |
680 |
- ~AbiWordperfectInputStream(); |
681 |
- |
682 |
-- virtual bool isOLEStream(); |
683 |
-- virtual WPXInputStream * getDocumentOLEStream(); |
684 |
-- |
685 |
-- virtual WPXInputStream * getDocumentOLEStream(const char * name); |
686 |
-- |
687 |
-+ virtual bool isStructured(); |
688 |
-+ virtual unsigned subStreamCount(); |
689 |
-+ virtual const char* subStreamName(unsigned); |
690 |
-+ bool existsSubStream(const char*); |
691 |
-+ virtual librevenge::RVNGInputStream* getSubStreamByName(const char*); |
692 |
-+ virtual librevenge::RVNGInputStream* getSubStreamById(unsigned); |
693 |
- virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); |
694 |
-- virtual int seek(long offset, WPX_SEEK_TYPE seekType); |
695 |
-+ virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType); |
696 |
- virtual long tell(); |
697 |
-- virtual bool atEOS(); |
698 |
-+ virtual bool isEnd(); |
699 |
- |
700 |
- private: |
701 |
- |
702 |
- GsfInput *m_input; |
703 |
- GsfInfile *m_ole; |
704 |
-+ std::map<unsigned, std::string> m_substreams; |
705 |
- }; |
706 |
- |
707 |
- AbiWordperfectInputStream::AbiWordperfectInputStream(GsfInput *input) : |
708 |
-- WPXInputStream(), |
709 |
-+ librevenge::RVNGInputStream(), |
710 |
- m_input(input), |
711 |
-- m_ole(NULL) |
712 |
-+ m_ole(NULL), |
713 |
-+ m_substreams() |
714 |
- { |
715 |
- g_object_ref(G_OBJECT(input)); |
716 |
- } |
717 |
-@@ -120,50 +127,120 @@ |
718 |
- return buf; |
719 |
- } |
720 |
- |
721 |
--int AbiWordperfectInputStream::seek(long offset, WPX_SEEK_TYPE seekType) |
722 |
-+int AbiWordperfectInputStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) |
723 |
- { |
724 |
- GSeekType gsfSeekType = G_SEEK_SET; |
725 |
- switch(seekType) |
726 |
- { |
727 |
-- case WPX_SEEK_CUR: |
728 |
-+ case librevenge::RVNG_SEEK_CUR: |
729 |
- gsfSeekType = G_SEEK_CUR; |
730 |
- break; |
731 |
-- case WPX_SEEK_SET: |
732 |
-+ case librevenge::RVNG_SEEK_SET: |
733 |
- gsfSeekType = G_SEEK_SET; |
734 |
- break; |
735 |
-+ case librevenge::RVNG_SEEK_END: |
736 |
-+ gsfSeekType = G_SEEK_END; |
737 |
-+ break; |
738 |
- } |
739 |
- |
740 |
- return gsf_input_seek(m_input, offset, gsfSeekType); |
741 |
- } |
742 |
- |
743 |
--bool AbiWordperfectInputStream::isOLEStream() |
744 |
-+bool AbiWordperfectInputStream::isStructured() |
745 |
- { |
746 |
- if (!m_ole) |
747 |
- m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
748 |
- |
749 |
-- if (m_ole != NULL) |
750 |
-+ if (!m_ole) |
751 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
752 |
-+ |
753 |
-+ if (m_ole) |
754 |
- return true; |
755 |
- |
756 |
- return false; |
757 |
- } |
758 |
- |
759 |
--WPXInputStream * AbiWordperfectInputStream::getDocumentOLEStream() |
760 |
-+unsigned AbiWordperfectInputStream::subStreamCount() |
761 |
- { |
762 |
-- return getDocumentOLEStream("PerfectOffice_MAIN"); |
763 |
-+ if (!m_ole) |
764 |
-+ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
765 |
-+ |
766 |
-+ if (!m_ole) |
767 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
768 |
-+ |
769 |
-+ if (m_ole) |
770 |
-+ { |
771 |
-+ int numChildren = gsf_infile_num_children(m_ole); |
772 |
-+ if (numChildren > 0) |
773 |
-+ return numChildren; |
774 |
-+ return 0; |
775 |
-+ } |
776 |
-+ |
777 |
-+ return 0; |
778 |
- } |
779 |
- |
780 |
--WPXInputStream * AbiWordperfectInputStream::getDocumentOLEStream(const char * name) |
781 |
-+const char * AbiWordperfectInputStream::subStreamName(unsigned id) |
782 |
- { |
783 |
-- WPXInputStream *documentStream = NULL; |
784 |
-+ if (!m_ole) |
785 |
-+ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
786 |
- |
787 |
- if (!m_ole) |
788 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
789 |
-+ |
790 |
-+ if (m_ole) |
791 |
-+ { |
792 |
-+ if ((int)id >= gsf_infile_num_children(m_ole)) |
793 |
-+ { |
794 |
-+ return 0; |
795 |
-+ } |
796 |
-+ std::map<unsigned, std::string>::iterator i = m_substreams.lower_bound(id); |
797 |
-+ if (i == m_substreams.end() || m_substreams.key_comp()(id, i->first)) |
798 |
-+ { |
799 |
-+ std::string name = gsf_infile_name_by_index(m_ole, (int)id); |
800 |
-+ i = m_substreams.insert(i, std::map<unsigned, std::string>::value_type(id, name)); |
801 |
-+ } |
802 |
-+ return i->second.c_str(); |
803 |
-+ } |
804 |
-+ |
805 |
-+ return 0; |
806 |
-+} |
807 |
-+ |
808 |
-+bool AbiWordperfectInputStream::existsSubStream(const char * name) |
809 |
-+{ |
810 |
-+ if (!m_ole) |
811 |
- m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
812 |
- |
813 |
-+ if (!m_ole) |
814 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
815 |
-+ |
816 |
- if (m_ole) |
817 |
- { |
818 |
- GsfInput *document = gsf_infile_child_by_name(m_ole, name); |
819 |
- if (document) |
820 |
- { |
821 |
-+ g_object_unref(G_OBJECT (document)); |
822 |
-+ return true; |
823 |
-+ } |
824 |
-+ } |
825 |
-+ |
826 |
-+ return false; |
827 |
-+} |
828 |
-+ |
829 |
-+librevenge::RVNGInputStream * AbiWordperfectInputStream::getSubStreamByName(const char * name) |
830 |
-+{ |
831 |
-+ librevenge::RVNGInputStream *documentStream = NULL; |
832 |
-+ |
833 |
-+ if (!m_ole) |
834 |
-+ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
835 |
-+ |
836 |
-+ if (!m_ole) |
837 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
838 |
-+ |
839 |
-+ if (m_ole) |
840 |
-+ { |
841 |
-+ GsfInput *document = gsf_infile_child_by_name(m_ole, name); |
842 |
-+ if (document) |
843 |
-+ { |
844 |
- documentStream = new AbiWordperfectInputStream(document); |
845 |
- g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream |
846 |
- } |
847 |
-@@ -172,12 +249,35 @@ |
848 |
- return documentStream; |
849 |
- } |
850 |
- |
851 |
-+librevenge::RVNGInputStream * AbiWordperfectInputStream::getSubStreamById(unsigned id) |
852 |
-+{ |
853 |
-+ librevenge::RVNGInputStream *documentStream = NULL; |
854 |
-+ |
855 |
-+ if (!m_ole) |
856 |
-+ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); |
857 |
-+ |
858 |
-+ if (!m_ole) |
859 |
-+ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); |
860 |
-+ |
861 |
-+ if (m_ole) |
862 |
-+ { |
863 |
-+ GsfInput *document = gsf_infile_child_by_index(m_ole, (int)id); |
864 |
-+ if (document) |
865 |
-+ { |
866 |
-+ documentStream = new AbiWordperfectInputStream(document); |
867 |
-+ g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream |
868 |
-+ } |
869 |
-+ } |
870 |
-+ |
871 |
-+ return documentStream; |
872 |
-+} |
873 |
-+ |
874 |
- long AbiWordperfectInputStream::tell() |
875 |
- { |
876 |
- return gsf_input_tell(m_input); |
877 |
- } |
878 |
- |
879 |
--bool AbiWordperfectInputStream::atEOS() |
880 |
-+bool AbiWordperfectInputStream::isEnd() |
881 |
- { |
882 |
- return gsf_input_eof(m_input); |
883 |
- } |
884 |
-@@ -247,13 +347,13 @@ |
885 |
- { |
886 |
- AbiWordperfectInputStream gsfInput(input); |
887 |
- |
888 |
-- WPDConfidence confidence = WPDocument::isFileFormatSupported(&gsfInput); |
889 |
-- |
890 |
-+ libwpd::WPDConfidence confidence = libwpd::WPDocument::isFileFormatSupported(&gsfInput); |
891 |
-+ |
892 |
- switch (confidence) |
893 |
- { |
894 |
-- case WPD_CONFIDENCE_NONE: |
895 |
-+ case libwpd::WPD_CONFIDENCE_NONE: |
896 |
- return UT_CONFIDENCE_ZILCH; |
897 |
-- case WPD_CONFIDENCE_EXCELLENT: |
898 |
-+ case libwpd::WPD_CONFIDENCE_EXCELLENT: |
899 |
- return UT_CONFIDENCE_PERFECT; |
900 |
- default: |
901 |
- return UT_CONFIDENCE_ZILCH; |
902 |
-@@ -312,9 +412,9 @@ |
903 |
- UT_Error IE_Imp_WordPerfect::_loadFile(GsfInput * input) |
904 |
- { |
905 |
- AbiWordperfectInputStream gsfInput(input); |
906 |
-- WPDResult error = WPDocument::parse(&gsfInput, static_cast<WPXDocumentInterface *>(this), NULL); |
907 |
-+ libwpd::WPDResult error = libwpd::WPDocument::parse(&gsfInput, static_cast<librevenge::RVNGTextInterface *>(this), NULL); |
908 |
- |
909 |
-- if (error != WPD_OK) |
910 |
-+ if (error != libwpd::WPD_OK) |
911 |
- { |
912 |
- UT_DEBUGMSG(("AbiWordPerfect: ERROR: %i!\n", (int)error)); |
913 |
- return UT_IE_IMPORTERROR; |
914 |
-@@ -329,7 +429,7 @@ |
915 |
- // nada |
916 |
- } |
917 |
- |
918 |
--void IE_Imp_WordPerfect::setDocumentMetaData(const WPXPropertyList &propList) |
919 |
-+void IE_Imp_WordPerfect::setDocumentMetaData(const librevenge::RVNGPropertyList &propList) |
920 |
- { |
921 |
- if (propList["dc:author"]) |
922 |
- getDoc()->setMetaDataProp(PD_META_KEY_CREATOR, propList["dc:author"]->getStr().cstr()); |
923 |
-@@ -339,15 +439,15 @@ |
924 |
- getDoc()->setMetaDataProp(PD_META_KEY_PUBLISHER, propList["dc:publisher"]->getStr().cstr()); |
925 |
- if (propList["dc:type"]) |
926 |
- getDoc()->setMetaDataProp(PD_META_KEY_TYPE, propList["dc:category"]->getStr().cstr()); |
927 |
-- if (propList["libwpd:keywords"]) |
928 |
-- getDoc()->setMetaDataProp(PD_META_KEY_KEYWORDS, propList["libwpd:keywords"]->getStr().cstr()); |
929 |
-+ if (propList["librevenge:keywords"]) |
930 |
-+ getDoc()->setMetaDataProp(PD_META_KEY_KEYWORDS, propList["librevenge:keywords"]->getStr().cstr()); |
931 |
- if (propList["dc:language"]) |
932 |
- getDoc()->setMetaDataProp(PD_META_KEY_LANGUAGE, propList["dc:language"]->getStr().cstr()); |
933 |
-- if (propList["libwpd:abstract"]) |
934 |
-- getDoc()->setMetaDataProp(PD_META_KEY_DESCRIPTION, propList["libwpd:abstract"]->getStr().cstr()); |
935 |
-+ if (propList["librevenge:abstract"]) |
936 |
-+ getDoc()->setMetaDataProp(PD_META_KEY_DESCRIPTION, propList["librevenge:abstract"]->getStr().cstr()); |
937 |
- } |
938 |
- |
939 |
--void IE_Imp_WordPerfect::startDocument() |
940 |
-+void IE_Imp_WordPerfect::startDocument(const librevenge::RVNGPropertyList & /* propList */) |
941 |
- { |
942 |
- UT_DEBUGMSG(("AbiWordPerfect: startDocument\n")); |
943 |
- } |
944 |
-@@ -357,7 +457,7 @@ |
945 |
- UT_DEBUGMSG(("AbiWordPerfect: endDocument\n")); |
946 |
- } |
947 |
- |
948 |
--void IE_Imp_WordPerfect::openPageSpan(const WPXPropertyList &propList) |
949 |
-+void IE_Imp_WordPerfect::openPageSpan(const librevenge::RVNGPropertyList &propList) |
950 |
- { |
951 |
- if (m_bHdrFtrOpenCount) return; // HACK |
952 |
- UT_DEBUGMSG(("AbiWordPerfect: openPageSpan\n")); |
953 |
-@@ -378,7 +478,7 @@ |
954 |
- |
955 |
- } |
956 |
- |
957 |
--void IE_Imp_WordPerfect::openHeader(const WPXPropertyList & /*propList*/) |
958 |
-+void IE_Imp_WordPerfect::openHeader(const librevenge::RVNGPropertyList & /*propList*/) |
959 |
- { |
960 |
- m_bHdrFtrOpenCount++; |
961 |
- |
962 |
-@@ -420,7 +520,7 @@ |
963 |
- */ |
964 |
- } |
965 |
- |
966 |
--void IE_Imp_WordPerfect::openFooter(const WPXPropertyList & /*propList*/) |
967 |
-+void IE_Imp_WordPerfect::openFooter(const librevenge::RVNGPropertyList & /*propList*/) |
968 |
- { |
969 |
- m_bHdrFtrOpenCount++; |
970 |
- // see above comments re: openHeader |
971 |
-@@ -432,7 +532,7 @@ |
972 |
- // see above comments re: closeHeader |
973 |
- } |
974 |
- |
975 |
--void IE_Imp_WordPerfect::openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) |
976 |
-+void IE_Imp_WordPerfect::openParagraph(const librevenge::RVNGPropertyList &propList) |
977 |
- { |
978 |
- if (m_bHdrFtrOpenCount) return; // HACK |
979 |
- UT_DEBUGMSG(("AbiWordPerfect: openParagraph()\n")); |
980 |
-@@ -478,13 +578,15 @@ |
981 |
- (int)(m_topMargin*72), (int)(m_bottomMargin*72), m_leftMarginOffset, m_rightMarginOffset, m_textIndent, lineSpacing); |
982 |
- propBuffer += tmpBuffer; |
983 |
- |
984 |
-- if (tabStops.count() > 0) // Append the tabstop information |
985 |
-+ const librevenge::RVNGPropertyListVector *tabStops = propList.child("style:tab-stops"); |
986 |
-+ |
987 |
-+ if (tabStops && tabStops->count()) // Append the tabstop information |
988 |
- { |
989 |
- propBuffer += "; tabstops:"; |
990 |
- tmpBuffer = ""; |
991 |
-- WPXPropertyListVector::Iter i(tabStops); |
992 |
-- for (i.rewind(); i.next();) |
993 |
-- { |
994 |
-+ librevenge::RVNGPropertyListVector::Iter i(*tabStops); |
995 |
-+ for (i.rewind(); i.next();) |
996 |
-+ { |
997 |
- propBuffer += tmpBuffer; |
998 |
- if (i()["style:position"]) |
999 |
- { |
1000 |
-@@ -515,8 +617,8 @@ |
1001 |
- propBuffer += "0"; |
1002 |
- |
1003 |
- tmpBuffer = ","; |
1004 |
-- } |
1005 |
-- } |
1006 |
-+ } |
1007 |
-+ } |
1008 |
- |
1009 |
- |
1010 |
- |
1011 |
-@@ -543,7 +645,7 @@ |
1012 |
- } |
1013 |
- } |
1014 |
- |
1015 |
--void IE_Imp_WordPerfect::openSpan(const WPXPropertyList &propList) |
1016 |
-+void IE_Imp_WordPerfect::openSpan(const librevenge::RVNGPropertyList &propList) |
1017 |
- { |
1018 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1019 |
- UT_DEBUGMSG(("AbiWordPerfect: Appending current text properties\n")); |
1020 |
-@@ -614,13 +716,14 @@ |
1021 |
- X_CheckDocumentError(appendFmt(propsArray)); |
1022 |
- } |
1023 |
- |
1024 |
--void IE_Imp_WordPerfect::openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns) |
1025 |
-+void IE_Imp_WordPerfect::openSection(const librevenge::RVNGPropertyList &propList) |
1026 |
- { |
1027 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1028 |
- UT_DEBUGMSG(("AbiWordPerfect: openSection\n")); |
1029 |
- |
1030 |
- float marginLeft = 0.0f, marginRight = 0.0f; |
1031 |
-- int columnsCount = ((columns.count() == 0) ? 1 : columns.count()); |
1032 |
-+ const librevenge::RVNGPropertyListVector *columns = propList.child("style:columns"); |
1033 |
-+ int columnsCount = ((!columns || !columns->count()) ? 1 : columns->count()); |
1034 |
- |
1035 |
- // TODO: support spaceAfter |
1036 |
- if (propList["fo:start-indent"]) |
1037 |
-@@ -647,7 +750,7 @@ |
1038 |
- X_CheckDocumentError(appendSpan(&ucs,1)); |
1039 |
- } |
1040 |
- |
1041 |
--void IE_Imp_WordPerfect::insertText(const WPXString &text) |
1042 |
-+void IE_Imp_WordPerfect::insertText(const librevenge::RVNGString &text) |
1043 |
- { |
1044 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1045 |
- if (text.len()) |
1046 |
-@@ -658,6 +761,15 @@ |
1047 |
- } |
1048 |
- } |
1049 |
- |
1050 |
-+void IE_Imp_WordPerfect::insertSpace() |
1051 |
-+{ |
1052 |
-+ if (m_bHdrFtrOpenCount) return; // HACK |
1053 |
-+ UT_DEBUGMSG(("AbiWordPerfect: insertSpace\n")); |
1054 |
-+ |
1055 |
-+ UT_UCS4Char ucs = UCS_SPACE; |
1056 |
-+ X_CheckDocumentError(appendSpan(&ucs,1)); |
1057 |
-+} |
1058 |
-+ |
1059 |
- void IE_Imp_WordPerfect::insertLineBreak() |
1060 |
- { |
1061 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1062 |
-@@ -668,12 +780,11 @@ |
1063 |
- } |
1064 |
- |
1065 |
- |
1066 |
-- |
1067 |
--void IE_Imp_WordPerfect::defineOrderedListLevel(const WPXPropertyList &propList) |
1068 |
-+void IE_Imp_WordPerfect::openOrderedListLevel(const librevenge::RVNGPropertyList &propList) |
1069 |
- { |
1070 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1071 |
-- UT_DEBUGMSG(("AbiWordPerfect: defineOrderedListLevel\n")); |
1072 |
-- |
1073 |
-+ UT_DEBUGMSG(("AbiWordPerfect: openOrderedListLevel\n")); |
1074 |
-+ |
1075 |
- int listID = 0, startingNumber = 0, level = 1; |
1076 |
- char listType = '1'; |
1077 |
- UT_UTF8String textBeforeNumber, textAfterNumber; |
1078 |
-@@ -680,12 +791,12 @@ |
1079 |
- float listLeftOffset = 0.0f; |
1080 |
- float listMinLabelWidth = 0.0f; |
1081 |
- |
1082 |
-- if (propList["libwpd:id"]) |
1083 |
-- listID = propList["libwpd:id"]->getInt(); |
1084 |
-+ if (propList["librevenge:id"]) |
1085 |
-+ listID = propList["librevenge:id"]->getInt(); |
1086 |
- if (propList["text:start-value"]) |
1087 |
- startingNumber = propList["text:start-value"]->getInt(); |
1088 |
-- if (propList["libwpd:level"]) |
1089 |
-- level = propList["libwpd:level"]->getInt(); |
1090 |
-+ if (propList["librevenge:level"]) |
1091 |
-+ level = propList["librevenge:level"]->getInt(); |
1092 |
- if (propList["style:num-prefix"]) |
1093 |
- textBeforeNumber += propList["style:num-prefix"]->getStr().cstr(); |
1094 |
- if (propList["style:num-suffix"]) |
1095 |
-@@ -716,22 +827,38 @@ |
1096 |
- m_pCurrentListDefinition->setListMinLabelWidth(level, listMinLabelWidth); |
1097 |
- _updateDocumentOrderedListDefinition(m_pCurrentListDefinition, level, listType, textBeforeNumber, textAfterNumber, startingNumber); |
1098 |
- } |
1099 |
-+ |
1100 |
-+ m_iCurrentListLevel++; |
1101 |
- } |
1102 |
- |
1103 |
--void IE_Imp_WordPerfect::defineUnorderedListLevel(const WPXPropertyList &propList) |
1104 |
-+void IE_Imp_WordPerfect::closeOrderedListLevel() |
1105 |
- { |
1106 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1107 |
-- UT_DEBUGMSG(("AbiWordPerfect: defineUnorderedListLevel\n")); |
1108 |
-+ UT_DEBUGMSG(("AbiWordPerfect: closeOrderedListLevel (level: %i)\n", m_iCurrentListLevel)); |
1109 |
-+ UT_ASSERT(m_iCurrentListLevel > 0); |
1110 |
-+ |
1111 |
-+ // every time we close a list level, the level above it is normally renumbered to start at "1" |
1112 |
-+ // again. this code takes care of that. |
1113 |
-+ if (m_iCurrentListLevel < (WP6_NUM_LIST_LEVELS-1)) |
1114 |
-+ m_pCurrentListDefinition->setLevelNumber(m_iCurrentListLevel + 1, 0); |
1115 |
-+ |
1116 |
-+ m_iCurrentListLevel--; |
1117 |
-+} |
1118 |
- |
1119 |
-+void IE_Imp_WordPerfect::openUnorderedListLevel(const librevenge::RVNGPropertyList &propList) |
1120 |
-+{ |
1121 |
-+ if (m_bHdrFtrOpenCount) return; // HACK |
1122 |
-+ UT_DEBUGMSG(("AbiWordPerfect: openUNorderedListLevel\n")); |
1123 |
-+ |
1124 |
- int listID = 0, level = 1; |
1125 |
-- WPXString textBeforeNumber, textAfterNumber; |
1126 |
-+ librevenge::RVNGString textBeforeNumber, textAfterNumber; |
1127 |
- float listLeftOffset = 0.0f; |
1128 |
- float listMinLabelWidth = 0.0f; |
1129 |
- |
1130 |
-- if (propList["libwpd:id"]) |
1131 |
-- listID = propList["libwpd:id"]->getInt(); |
1132 |
-- if (propList["libwpd:level"]) |
1133 |
-- level = propList["libwpd:level"]->getInt(); |
1134 |
-+ if (propList["librevenge:id"]) |
1135 |
-+ listID = propList["librevenge:id"]->getInt(); |
1136 |
-+ if (propList["librevenge:level"]) |
1137 |
-+ level = propList["librevenge:level"]->getInt(); |
1138 |
- if (propList["text:space-before"]) |
1139 |
- listLeftOffset = propList["text:space-before"]->getDouble(); |
1140 |
- if (propList["text:min-label-width"]) |
1141 |
-@@ -752,39 +879,10 @@ |
1142 |
- m_pCurrentListDefinition->setListMinLabelWidth(level, listMinLabelWidth); |
1143 |
- _updateDocumentUnorderedListDefinition(m_pCurrentListDefinition, level); |
1144 |
- } |
1145 |
--} |
1146 |
- |
1147 |
--//void IE_Imp_WordPerfect::openOrderedListLevel(const int listID) |
1148 |
--void IE_Imp_WordPerfect::openOrderedListLevel(const WPXPropertyList & /*propList*/) |
1149 |
--{ |
1150 |
-- if (m_bHdrFtrOpenCount) return; // HACK |
1151 |
-- UT_DEBUGMSG(("AbiWordPerfect: openOrderedListLevel\n")); |
1152 |
-- |
1153 |
- m_iCurrentListLevel++; |
1154 |
- } |
1155 |
- |
1156 |
--void IE_Imp_WordPerfect::closeOrderedListLevel() |
1157 |
--{ |
1158 |
-- if (m_bHdrFtrOpenCount) return; // HACK |
1159 |
-- UT_DEBUGMSG(("AbiWordPerfect: closeOrderedListLevel (level: %i)\n", m_iCurrentListLevel)); |
1160 |
-- UT_ASSERT(m_iCurrentListLevel > 0); |
1161 |
-- |
1162 |
-- // every time we close a list level, the level above it is normally renumbered to start at "1" |
1163 |
-- // again. this code takes care of that. |
1164 |
-- if (m_iCurrentListLevel < (WP6_NUM_LIST_LEVELS-1)) |
1165 |
-- m_pCurrentListDefinition->setLevelNumber(m_iCurrentListLevel + 1, 0); |
1166 |
-- |
1167 |
-- m_iCurrentListLevel--; |
1168 |
--} |
1169 |
-- |
1170 |
--void IE_Imp_WordPerfect::openUnorderedListLevel(const WPXPropertyList & /*propList*/) |
1171 |
--{ |
1172 |
-- if (m_bHdrFtrOpenCount) return; // HACK |
1173 |
-- UT_DEBUGMSG(("AbiWordPerfect: openUNorderedListLevel\n")); |
1174 |
-- |
1175 |
-- m_iCurrentListLevel++; |
1176 |
--} |
1177 |
-- |
1178 |
- void IE_Imp_WordPerfect::closeUnorderedListLevel() |
1179 |
- { |
1180 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1181 |
-@@ -796,7 +894,7 @@ |
1182 |
- |
1183 |
- // ASSUMPTION: We assume that unordered lists will always pass a number of "0". unpredictable behaviour |
1184 |
- // may result otherwise |
1185 |
--void IE_Imp_WordPerfect::openListElement(const WPXPropertyList &propList, const WPXPropertyListVector & /*tabStops*/) |
1186 |
-+void IE_Imp_WordPerfect::openListElement(const librevenge::RVNGPropertyList &propList) |
1187 |
- { |
1188 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1189 |
- UT_DEBUGMSG(("AbiWordPerfect: openListElement\n")); |
1190 |
-@@ -885,7 +983,7 @@ |
1191 |
- X_CheckDocumentError(appendSpan(&ucs,1)); |
1192 |
- } |
1193 |
- |
1194 |
--void IE_Imp_WordPerfect::openFootnote(const WPXPropertyList & /*propList*/) |
1195 |
-+void IE_Imp_WordPerfect::openFootnote(const librevenge::RVNGPropertyList & /*propList*/) |
1196 |
- { |
1197 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1198 |
- |
1199 |
-@@ -934,7 +1032,7 @@ |
1200 |
- X_CheckDocumentError(appendStrux(PTX_EndFootnote,NULL)); |
1201 |
- } |
1202 |
- |
1203 |
--void IE_Imp_WordPerfect::openEndnote(const WPXPropertyList & /*propList*/) |
1204 |
-+void IE_Imp_WordPerfect::openEndnote(const librevenge::RVNGPropertyList & /*propList*/) |
1205 |
- { |
1206 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1207 |
- const gchar** propsArray = NULL; |
1208 |
-@@ -975,7 +1073,7 @@ |
1209 |
- X_CheckDocumentError(appendStrux(PTX_EndEndnote,NULL)); |
1210 |
- } |
1211 |
- |
1212 |
--void IE_Imp_WordPerfect::openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns) |
1213 |
-+void IE_Imp_WordPerfect::openTable(const librevenge::RVNGPropertyList &propList) |
1214 |
- { |
1215 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1216 |
- // TODO: handle 'marginLeftOffset' and 'marginRightOffset' |
1217 |
-@@ -1000,14 +1098,18 @@ |
1218 |
- } |
1219 |
- } |
1220 |
- |
1221 |
-- propBuffer += "table-column-props:"; |
1222 |
-- WPXPropertyListVector::Iter i(columns); |
1223 |
-- for (i.rewind(); i.next();) |
1224 |
-+ const librevenge::RVNGPropertyListVector *columns = propList.child("librevenge:table-columns"); |
1225 |
-+ if (columns) |
1226 |
- { |
1227 |
-- UT_String tmpBuffer; |
1228 |
-- if (i()["style:column-width"]) |
1229 |
-- UT_String_sprintf(tmpBuffer, "%s/", i()["style:column-width"]->getStr().cstr()); |
1230 |
-- propBuffer += tmpBuffer; |
1231 |
-+ propBuffer += "table-column-props:"; |
1232 |
-+ librevenge::RVNGPropertyListVector::Iter i(*columns); |
1233 |
-+ for (i.rewind(); i.next();) |
1234 |
-+ { |
1235 |
-+ UT_String tmpBuffer; |
1236 |
-+ if (i()["style:column-width"]) |
1237 |
-+ UT_String_sprintf(tmpBuffer, "%s/", i()["style:column-width"]->getStr().cstr()); |
1238 |
-+ propBuffer += tmpBuffer; |
1239 |
-+ } |
1240 |
- } |
1241 |
- |
1242 |
- const gchar* propsArray[3]; |
1243 |
-@@ -1018,7 +1120,7 @@ |
1244 |
- X_CheckDocumentError(appendStrux(PTX_SectionTable, propsArray)); |
1245 |
- } |
1246 |
- |
1247 |
--void IE_Imp_WordPerfect::openTableRow(const WPXPropertyList & /*propList*/) |
1248 |
-+void IE_Imp_WordPerfect::openTableRow(const librevenge::RVNGPropertyList & /*propList*/) |
1249 |
- { |
1250 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1251 |
- UT_DEBUGMSG(("AbiWordPerfect: openRow\n")); |
1252 |
-@@ -1030,14 +1132,14 @@ |
1253 |
- m_bInCell = false; |
1254 |
- } |
1255 |
- |
1256 |
--void IE_Imp_WordPerfect::openTableCell(const WPXPropertyList &propList) |
1257 |
-+void IE_Imp_WordPerfect::openTableCell(const librevenge::RVNGPropertyList &propList) |
1258 |
- { |
1259 |
- if (m_bHdrFtrOpenCount) return; // HACK |
1260 |
- int col =0, row = 0, colSpan = 0, rowSpan = 0; |
1261 |
-- if (propList["libwpd:column"]) |
1262 |
-- col = propList["libwpd:column"]->getInt(); |
1263 |
-- if (propList["libwpd:row"]) |
1264 |
-- row = propList["libwpd:row"]->getInt(); |
1265 |
-+ if (propList["librevenge:column"]) |
1266 |
-+ col = propList["librevenge:column"]->getInt(); |
1267 |
-+ if (propList["librevenge:row"]) |
1268 |
-+ row = propList["librevenge:row"]->getInt(); |
1269 |
- if (propList["table:number-columns-spanned"]) |
1270 |
- colSpan = propList["table:number-columns-spanned"]->getInt(); |
1271 |
- if (propList["table:number-rows-spanned"]) |
1272 |
-@@ -1247,9 +1349,9 @@ |
1273 |
- virtual UT_Error _loadFile(GsfInput * input) |
1274 |
- { |
1275 |
- AbiWordperfectInputStream gsfInput(input); |
1276 |
-- WPSResult error = WPSDocument::parse(&gsfInput, static_cast<WPXDocumentInterface *>(this)); |
1277 |
-+ libwps::WPSResult error = libwps::WPSDocument::parse(&gsfInput, static_cast<librevenge::RVNGTextInterface *>(this)); |
1278 |
- |
1279 |
-- if (error != WPS_OK) |
1280 |
-+ if (error != libwps::WPS_OK) |
1281 |
- { |
1282 |
- UT_DEBUGMSG(("AbiMSWorks: ERROR: %i!\n", (int)error)); |
1283 |
- return UT_IE_IMPORTERROR; |
1284 |
-@@ -1286,13 +1388,17 @@ |
1285 |
- { |
1286 |
- AbiWordperfectInputStream gsfInput(input); |
1287 |
- |
1288 |
-- WPSConfidence confidence = WPSDocument::isFileFormatSupported(&gsfInput); |
1289 |
-+ libwps::WPSKind kind; |
1290 |
-+ libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&gsfInput, kind); |
1291 |
-+ |
1292 |
-+ if (kind != libwps::WPS_TEXT) |
1293 |
-+ confidence = libwps::WPS_CONFIDENCE_NONE; |
1294 |
- |
1295 |
- switch (confidence) |
1296 |
- { |
1297 |
-- case WPS_CONFIDENCE_NONE: |
1298 |
-+ case libwps::WPS_CONFIDENCE_NONE: |
1299 |
- return UT_CONFIDENCE_ZILCH; |
1300 |
-- case WPS_CONFIDENCE_EXCELLENT: |
1301 |
-+ case libwps::WPS_CONFIDENCE_EXCELLENT: |
1302 |
- return UT_CONFIDENCE_PERFECT; |
1303 |
- default: |
1304 |
- return UT_CONFIDENCE_ZILCH; |
1305 |
---- a/plugins/wordperfect/xp/Makefile.am |
1306 |
-+++ b/plugins/wordperfect/xp/Makefile.am |
1307 |
-@@ -6,8 +6,6 @@ |
1308 |
- -DABI_BUILD_VERSION=\"$(VERSION)\" |
1309 |
- |
1310 |
- libxp_la_SOURCES = \ |
1311 |
-- ie_exp_WordPerfect.cpp \ |
1312 |
-- ie_exp_WordPerfect.h \ |
1313 |
- ie_impexp_WordPerfect.cpp \ |
1314 |
- ie_impexp_WordPerfect.h \ |
1315 |
- ie_imp_WordPerfect.cpp \ |
1316 |
---- a/plugins/wordperfect/xp/ie_impexp_WordPerfect.h |
1317 |
-+++ b/plugins/wordperfect/xp/ie_impexp_WordPerfect.h |
1318 |
-@@ -24,7 +24,6 @@ |
1319 |
- */ |
1320 |
- |
1321 |
- #include "ie_imp_WordPerfect.h" |
1322 |
--#include "ie_exp_WordPerfect.h" |
1323 |
- #include "xap_Module.h" |
1324 |
- |
1325 |
- #define IE_MIMETYPE_WP_51 "application/wordperfect5.1" |
1326 |
---- a/plugins/wordperfect/plugin.m4 |
1327 |
-+++ b/plugins/wordperfect/plugin.m4 |
1328 |
-@@ -1,6 +1,6 @@ |
1329 |
- |
1330 |
--wordperfect_pkgs="libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0 $gsf_req" |
1331 |
--wordperfect_wps_pkgs='libwps-0.2 >= 0.1.0' |
1332 |
-+wordperfect_pkgs="libwpd-0.10 $gsf_req" |
1333 |
-+wordperfect_wps_pkgs='libwps-0.3' |
1334 |
- wordperfect_deps="no" |
1335 |
- |
1336 |
- WORDPERFECT_CFLAGS= |
1337 |
-@@ -29,7 +29,7 @@ |
1338 |
- |
1339 |
- PKG_CHECK_EXISTS([ $wordperfect_wps_pkgs ], |
1340 |
- [ |
1341 |
-- wp_deps_pkgs="$wp_deps_pkgs $wordperfect_wps_pkgs" |
1342 |
-+ wp_deps_pkgs="$wordperfect_wps_pkgs $wp_deps_pkgs" |
1343 |
- WPS_DEFINE=" -DHAVE_LIBWPS" |
1344 |
- ]) |
1345 |
- |
1346 |
|
1347 |
diff --git a/app-office/abiword/files/abiword-3.0.0-libwp.patch b/app-office/abiword/files/abiword-3.0.0-libwp.patch |
1348 |
deleted file mode 100644 |
1349 |
index 9f269bd4111..00000000000 |
1350 |
--- a/app-office/abiword/files/abiword-3.0.0-libwp.patch |
1351 |
+++ /dev/null |
1352 |
@@ -1,36 +0,0 @@ |
1353 |
-From 9734c2cc2638b16cc9b9c33adb2fbe5b793226f5 Mon Sep 17 00:00:00 2001 |
1354 |
-From: David Tardon <dtardon@××××××.com> |
1355 |
-Date: Sat, 6 Jun 2015 18:43:14 +0200 |
1356 |
-Subject: [PATCH] fix libwp? detection |
1357 |
- |
1358 |
---- |
1359 |
- plugin-configure.m4 | 6 +++--- |
1360 |
- 1 file changed, 3 insertions(+), 3 deletions(-) |
1361 |
- |
1362 |
-diff --git a/plugin-configure.m4 b/plugin-configure.m4 |
1363 |
-index 54998fb..92e4ec2 100644 |
1364 |
---- a/plugin-configure.m4 |
1365 |
-+++ b/plugin-configure.m4 |
1366 |
-@@ -1355,7 +1355,7 @@ AC_SUBST([BMP_CFLAGS]) |
1367 |
- AC_SUBST([BMP_LIBS]) |
1368 |
- |
1369 |
- |
1370 |
--wpg_pkgs="$gsf_req libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0" |
1371 |
-+wpg_pkgs="$gsf_req libwpg-0.3 libwpd-0.10 librevenge-0.0 librevenge-stream-0.0" |
1372 |
- wpg_deps="no" |
1373 |
- |
1374 |
- if test "$enable_wpg" != ""; then |
1375 |
-@@ -1469,8 +1469,8 @@ AC_SUBST([AIKSAURUS_CFLAGS]) |
1376 |
- AC_SUBST([AIKSAURUS_LIBS]) |
1377 |
- |
1378 |
- |
1379 |
--wordperfect_pkgs="libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0 $gsf_req" |
1380 |
--wordperfect_wps_pkgs='libwps-0.2 >= 0.1.0' |
1381 |
-+wordperfect_pkgs="libwpg-0.3 libwpd-0.10 librevenge-0.0 librevenge-stream-0.0 $gsf_req" |
1382 |
-+wordperfect_wps_pkgs='libwps-0.3' |
1383 |
- wordperfect_deps="no" |
1384 |
- |
1385 |
- WORDPERFECT_CFLAGS= |
1386 |
--- |
1387 |
-2.4.2 |
1388 |
- |
1389 |
|
1390 |
diff --git a/app-office/abiword/files/abiword-3.0.0-link-grammar-5-second.patch b/app-office/abiword/files/abiword-3.0.0-link-grammar-5-second.patch |
1391 |
deleted file mode 100644 |
1392 |
index d9f9cf35ce4..00000000000 |
1393 |
--- a/app-office/abiword/files/abiword-3.0.0-link-grammar-5-second.patch |
1394 |
+++ /dev/null |
1395 |
@@ -1,19 +0,0 @@ |
1396 |
---- a/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp |
1397 |
-+++ b/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp |
1398 |
-@@ -223,6 +223,7 @@ |
1399 |
- pErr = NULL; |
1400 |
- } |
1401 |
- |
1402 |
-+#ifdef DEAD_DEBUG_CODE |
1403 |
- // for(i=0; i< pT->m_vecGrammarErrors.getItemCount(); i++) |
1404 |
- // { |
1405 |
- // pErr = pT->m_vecGrammarErrors.getNthItem(i); |
1406 |
-@@ -231,6 +232,8 @@ |
1407 |
- UT_UTF8String sErr = linkage_get_violation_name(linkage); |
1408 |
- // UT_DEBUGMSG(("Top Level error message |%s|\n",sErr.utf8_str())); |
1409 |
- linkage_delete(linkage); |
1410 |
-+#endif // DEAD_DEBUG_CODE |
1411 |
-+ |
1412 |
- for(i=0; i< vecMapOfWords.getItemCount(); i++) |
1413 |
- { |
1414 |
- AbiGrammarError * p = vecMapOfWords.getNthItem(i); |
1415 |
|
1416 |
diff --git a/app-office/abiword/files/abiword-3.0.1-fixwps.patch b/app-office/abiword/files/abiword-3.0.1-fixwps.patch |
1417 |
deleted file mode 100644 |
1418 |
index 2929d5b1748..00000000000 |
1419 |
--- a/app-office/abiword/files/abiword-3.0.1-fixwps.patch |
1420 |
+++ /dev/null |
1421 |
@@ -1,31 +0,0 @@ |
1422 |
---- abiword-3.0.1/plugin-configure.m4.orig 2016-04-10 14:22:18.271356761 +0100 |
1423 |
-+++ abiword-3.0.1/plugin-configure.m4 2016-04-10 14:24:22.493303398 +0100 |
1424 |
-@@ -1355,7 +1355,7 @@ |
1425 |
- AC_SUBST([BMP_LIBS]) |
1426 |
- |
1427 |
- |
1428 |
--wpg_pkgs="$gsf_req libwpg-0.3 libwpd-0.10 librevenge-0.0 librevenge-stream-0.0" |
1429 |
-+wpg_pkgs="libwpg-0.3 $gsf_req" |
1430 |
- wpg_deps="no" |
1431 |
- |
1432 |
- if test "$enable_wpg" != ""; then |
1433 |
-@@ -1469,8 +1469,8 @@ |
1434 |
- AC_SUBST([AIKSAURUS_LIBS]) |
1435 |
- |
1436 |
- |
1437 |
--wordperfect_pkgs="libwpg-0.3 libwpd-0.10 librevenge-0.0 librevenge-stream-0.0 $gsf_req" |
1438 |
--wordperfect_wps_pkgs='libwps-0.4' |
1439 |
-+wordperfect_pkgs="libwpd-0.10 $gsf_req" |
1440 |
-+wordperfect_wps_pkgs='libwps-0.3' |
1441 |
- wordperfect_deps="no" |
1442 |
- |
1443 |
- WORDPERFECT_CFLAGS= |
1444 |
-@@ -1499,7 +1499,7 @@ |
1445 |
- |
1446 |
- PKG_CHECK_EXISTS([ $wordperfect_wps_pkgs ], |
1447 |
- [ |
1448 |
-- wp_deps_pkgs="$wp_deps_pkgs $wordperfect_wps_pkgs" |
1449 |
-+ wp_deps_pkgs="$wordperfect_wps_pkgs $wp_deps_pkgs" |
1450 |
- WPS_DEFINE=" -DHAVE_LIBWPS" |
1451 |
- ]) |
1452 |
- |
1453 |
|
1454 |
diff --git a/app-office/abiword/files/abiword-3.0.1-libwps-0.4.patch b/app-office/abiword/files/abiword-3.0.1-libwps-0.4.patch |
1455 |
deleted file mode 100644 |
1456 |
index 292f68164ae..00000000000 |
1457 |
--- a/app-office/abiword/files/abiword-3.0.1-libwps-0.4.patch |
1458 |
+++ /dev/null |
1459 |
@@ -1,54 +0,0 @@ |
1460 |
-From 6fcb43935bab90d61858eb1bc0f150c843586c54 Mon Sep 17 00:00:00 2001 |
1461 |
-From: David Tardon <dtardon@××××××.com> |
1462 |
-Date: Sat, 6 Jun 2015 21:48:02 +0200 |
1463 |
-Subject: [PATCH] adapt to libwps 0.4 |
1464 |
- |
1465 |
---- |
1466 |
- plugin-configure.m4 | 2 +- |
1467 |
- plugins/wordperfect/plugin.m4 | 2 +- |
1468 |
- plugins/wordperfect/xp/ie_imp_WordPerfect.cpp | 4 +++- |
1469 |
- 3 files changed, 5 insertions(+), 3 deletions(-) |
1470 |
- |
1471 |
-diff --git a/plugin-configure.m4 b/plugin-configure.m4 |
1472 |
-index 2757f4a..093fbcb 100644 |
1473 |
---- a/plugin-configure.m4 |
1474 |
-+++ b/plugin-configure.m4 |
1475 |
-@@ -1470,7 +1470,7 @@ AC_SUBST([AIKSAURUS_LIBS]) |
1476 |
- |
1477 |
- |
1478 |
- wordperfect_pkgs="libwpg-0.3 libwpd-0.10 librevenge-0.0 librevenge-stream-0.0 $gsf_req" |
1479 |
--wordperfect_wps_pkgs='libwps-0.3' |
1480 |
-+wordperfect_wps_pkgs='libwps-0.4' |
1481 |
- wordperfect_deps="no" |
1482 |
- |
1483 |
- WORDPERFECT_CFLAGS= |
1484 |
-diff --git a/plugins/wordperfect/plugin.m4 b/plugins/wordperfect/plugin.m4 |
1485 |
-index 0aadbaf..bc32d48 100644 |
1486 |
---- a/plugins/wordperfect/plugin.m4 |
1487 |
-+++ b/plugins/wordperfect/plugin.m4 |
1488 |
-@@ -1,6 +1,6 @@ |
1489 |
- |
1490 |
- wordperfect_pkgs="libwpd-0.10 $gsf_req" |
1491 |
--wordperfect_wps_pkgs='libwps-0.3' |
1492 |
-+wordperfect_wps_pkgs='libwps-0.4' |
1493 |
- wordperfect_deps="no" |
1494 |
- |
1495 |
- WORDPERFECT_CFLAGS= |
1496 |
-diff --git a/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp b/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp |
1497 |
-index bd19971..3e69f79 100644 |
1498 |
---- a/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp |
1499 |
-+++ b/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp |
1500 |
-@@ -1389,7 +1389,9 @@ UT_Confidence_t IE_Imp_MSWorks_Sniffer::recognizeContents (GsfInput * input) |
1501 |
- AbiWordperfectInputStream gsfInput(input); |
1502 |
- |
1503 |
- libwps::WPSKind kind; |
1504 |
-- libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&gsfInput, kind); |
1505 |
-+ libwps::WPSCreator creator; |
1506 |
-+ bool needsEncoding = false; |
1507 |
-+ libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&gsfInput, kind, creator, needsEncoding); |
1508 |
- |
1509 |
- if (kind != libwps::WPS_TEXT) |
1510 |
- confidence = libwps::WPS_CONFIDENCE_NONE; |
1511 |
--- |
1512 |
-2.4.2 |
1513 |
- |
1514 |
|
1515 |
diff --git a/app-office/abiword/files/abiword-3.0.2-fix-black-drawing-regression.patch b/app-office/abiword/files/abiword-3.0.2-fix-black-drawing-regression.patch |
1516 |
deleted file mode 100644 |
1517 |
index dbce8c696da..00000000000 |
1518 |
--- a/app-office/abiword/files/abiword-3.0.2-fix-black-drawing-regression.patch |
1519 |
+++ /dev/null |
1520 |
@@ -1,54 +0,0 @@ |
1521 |
-From cec2fda355b67b5b814a803c5ed128c425cbb030 Mon Sep 17 00:00:00 2001 |
1522 |
-From: Hubert Figuiere <hub@××××××××.net> |
1523 |
-Date: Thu, 8 Dec 2016 02:03:10 +0000 |
1524 |
-Subject: [PATCH] Bug 13815 - draw event should return TRUE |
1525 |
- |
1526 |
-This fix the black drawing regression with Gtk3.22 |
1527 |
- |
1528 |
-git-svn-id: svn+ssh://svn.abisource.com/svnroot/abiword/branches/ABI-3-0-0-STABLE@35394 bcba8976-2d24-0410-9c9c-aab3bd5fdfd6 |
1529 |
---- |
1530 |
- src/af/xap/gtk/xap_UnixFrameImpl.cpp | 6 +++--- |
1531 |
- src/af/xap/gtk/xap_UnixFrameImpl.h | 4 ++-- |
1532 |
- 2 files changed, 5 insertions(+), 5 deletions(-) |
1533 |
- |
1534 |
-diff --git a/src/af/xap/gtk/xap_UnixFrameImpl.cpp b/src/af/xap/gtk/xap_UnixFrameImpl.cpp |
1535 |
-index 780000e..10f8e00 100644 |
1536 |
---- a/src/af/xap/gtk/xap_UnixFrameImpl.cpp |
1537 |
-+++ b/src/af/xap/gtk/xap_UnixFrameImpl.cpp |
1538 |
-@@ -1208,9 +1208,9 @@ gint XAP_UnixFrameImpl::_fe::delete_event(GtkWidget * w, GdkEvent * /*event*/, g |
1539 |
- } |
1540 |
- |
1541 |
- #if GTK_CHECK_VERSION(3,0,0) |
1542 |
--gint XAP_UnixFrameImpl::_fe::draw(GtkWidget * w, cairo_t * cr) |
1543 |
-+gboolean XAP_UnixFrameImpl::_fe::draw(GtkWidget * w, cairo_t * cr) |
1544 |
- #else |
1545 |
--gint XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent) |
1546 |
-+gboolean XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent) |
1547 |
- #endif |
1548 |
- { |
1549 |
- XAP_UnixFrameImpl * pUnixFrameImpl = static_cast<XAP_UnixFrameImpl *>(g_object_get_data(G_OBJECT(w), "user_data")); |
1550 |
-@@ -1243,7 +1243,7 @@ gint XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent) |
1551 |
- pView->draw(&rClip); |
1552 |
- #endif |
1553 |
- } |
1554 |
-- return FALSE; |
1555 |
-+ return TRUE; |
1556 |
- } |
1557 |
- |
1558 |
- static bool bScrollWait = false; |
1559 |
-diff --git a/src/af/xap/gtk/xap_UnixFrameImpl.h b/src/af/xap/gtk/xap_UnixFrameImpl.h |
1560 |
-index 30ee5d8..a0ff57f 100644 |
1561 |
---- a/src/af/xap/gtk/xap_UnixFrameImpl.h |
1562 |
-+++ b/src/af/xap/gtk/xap_UnixFrameImpl.h |
1563 |
-@@ -152,9 +152,9 @@ class XAP_UnixFrameImpl : public XAP_FrameImpl |
1564 |
- static gint key_release_event(GtkWidget* w, GdkEventKey* e); |
1565 |
- static gint delete_event(GtkWidget * w, GdkEvent * /*event*/, gpointer /*data*/); |
1566 |
- #if GTK_CHECK_VERSION(3,0,0) |
1567 |
-- static gint draw(GtkWidget * w, cairo_t * cr); |
1568 |
-+ static gboolean draw(GtkWidget * w, cairo_t * cr); |
1569 |
- #else |
1570 |
-- static gint expose(GtkWidget * w, GdkEventExpose* pExposeEvent); |
1571 |
-+ static gboolean expose(GtkWidget * w, GdkEventExpose* pExposeEvent); |
1572 |
- #endif |
1573 |
- static gint do_ZoomUpdate( gpointer /* xap_UnixFrame * */ p); |
1574 |
- static void vScrollChanged(GtkAdjustment * w, gpointer /*data*/); |
1575 |
|
1576 |
diff --git a/app-office/abiword/files/abiword-3.0.2-fix-installing-readme.patch b/app-office/abiword/files/abiword-3.0.2-fix-installing-readme.patch |
1577 |
deleted file mode 100644 |
1578 |
index 34c6f4f5bb7..00000000000 |
1579 |
--- a/app-office/abiword/files/abiword-3.0.2-fix-installing-readme.patch |
1580 |
+++ /dev/null |
1581 |
@@ -1,19 +0,0 @@ |
1582 |
-Change the installation directory of the readme.txt file |
1583 |
-to match standard FHS conventions. |
1584 |
- |
1585 |
---- a/user/wp/Makefile.am |
1586 |
-+++ b/user/wp/Makefile.am |
1587 |
-@@ -9,10 +9,11 @@ |
1588 |
- EXTRA_DIST = \ |
1589 |
- $(wp_DATA) |
1590 |
- |
1591 |
-+doc_DATA = \ |
1592 |
-+ readme.txt |
1593 |
-+ |
1594 |
- wpdir = $(ABIWORD_DATADIR) |
1595 |
- wp_DATA = \ |
1596 |
-- readme.txt \ |
1597 |
-- readme.abw \ |
1598 |
- system.profile \ |
1599 |
- system.profile-am-ET \ |
1600 |
- system.profile-ar \ |
1601 |
|
1602 |
diff --git a/app-office/abiword/files/abiword-3.0.2-fix-nullptr-c++98.patch b/app-office/abiword/files/abiword-3.0.2-fix-nullptr-c++98.patch |
1603 |
deleted file mode 100644 |
1604 |
index f09319693fe..00000000000 |
1605 |
--- a/app-office/abiword/files/abiword-3.0.2-fix-nullptr-c++98.patch |
1606 |
+++ /dev/null |
1607 |
@@ -1,34 +0,0 @@ |
1608 |
-Replace 'nullptr' by NULL in order to allow compiling in C++98 mode. |
1609 |
-See also: https://bugs.gentoo.org/show_bug.cgi?id=599618 |
1610 |
- |
1611 |
---- a/src/af/gr/gtk/gr_UnixCairoGraphics.cpp |
1612 |
-+++ b/src/af/gr/gtk/gr_UnixCairoGraphics.cpp |
1613 |
-@@ -180,7 +180,7 @@ |
1614 |
- if (m_styleBg) { |
1615 |
- g_object_unref(m_styleBg); |
1616 |
- } |
1617 |
-- m_styleBg = XAP_GtkStyle_get_style(nullptr, "GtkButton"); // "button" |
1618 |
-+ m_styleBg = XAP_GtkStyle_get_style(NULL, "GtkButton"); // "button" |
1619 |
- // guess colours |
1620 |
- // WHITE |
1621 |
- GdkRGBA rgba2; |
1622 |
-@@ -627,7 +627,7 @@ |
1623 |
- _setProps(); |
1624 |
- cairo_save (m_cr); |
1625 |
- |
1626 |
-- GtkStyleContext *context = nullptr; |
1627 |
-+ GtkStyleContext *context = NULL; |
1628 |
- switch(c) { |
1629 |
- case GR_Graphics::CLR3D_Background: |
1630 |
- context = m_styleBg; |
1631 |
---- a/src/wp/ap/xp/ap_Dialog_Spell.cpp |
1632 |
-+++ b/src/wp/ap/xp/ap_Dialog_Spell.cpp |
1633 |
-@@ -251,7 +251,7 @@ |
1634 |
- UT_return_val_if_fail (m_Suggestions, false); |
1635 |
- |
1636 |
- // get suggestions from spelling engine |
1637 |
-- const UT_GenericVector<UT_UCSChar*> *cpvEngineSuggestions = nullptr; |
1638 |
-+ const UT_GenericVector<UT_UCSChar*> *cpvEngineSuggestions = NULL; |
1639 |
- |
1640 |
- if (checker->checkWord(m_pWord, m_iWordLength) == SpellChecker::LOOKUP_FAILED) |
1641 |
- { |