archrelease: copy trunk to extra-x86_64
[arch-packages.git] / abiword / repos / extra-x86_64 / abiword-3.0.0-librevenge.patch
blob9ff7aea2432cc7527c695bcdc7326643d4007f43
1 Index: plugins/wpg/xp/ie_impGraphic_WPG.cpp
2 ===================================================================
3 --- plugins/wpg/xp/ie_impGraphic_WPG.cpp (revision 34460)
4 +++ plugins/wpg/xp/ie_impGraphic_WPG.cpp (working copy)
5 @@ -31,7 +31,7 @@
6 #include <gsf/gsf-input-memory.h>
7 #include <gsf/gsf-input-stdio.h>
8 #include <gsf/gsf-infile-msole.h>
9 -#include <libwpd-stream/libwpd-stream.h>
10 +#include <librevenge-stream/librevenge-stream.h>
11 #include "xap_Module.h"
13 using libwpg::WPGraphics;
14 @@ -38,30 +38,35 @@
16 ABI_PLUGIN_DECLARE("WPG")
18 -class AbiWordPerfectGraphicsInputStream : public WPXInputStream
19 +class AbiWordPerfectGraphicsInputStream : public librevenge::RVNGInputStream
21 public:
22 AbiWordPerfectGraphicsInputStream(GsfInput *input);
23 ~AbiWordPerfectGraphicsInputStream();
25 - virtual bool isOLEStream();
26 - virtual WPXInputStream * getDocumentOLEStream();
27 - virtual WPXInputStream * getDocumentOLEStream(const char * name);
28 + virtual bool isStructured();
29 + virtual unsigned subStreamCount();
30 + virtual const char* subStreamName(unsigned);
31 + bool existsSubStream(const char*);
32 + virtual librevenge::RVNGInputStream* getSubStreamByName(const char*);
33 + virtual librevenge::RVNGInputStream* getSubStreamById(unsigned);
34 virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
35 - virtual int seek(long offset, WPX_SEEK_TYPE seekType);
36 + virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
37 virtual long tell();
38 - virtual bool atEOS();
39 + virtual bool isEnd();
41 private:
43 GsfInput *m_input;
44 GsfInfile *m_ole;
45 + std::map<unsigned, std::string> m_substreams;
48 AbiWordPerfectGraphicsInputStream::AbiWordPerfectGraphicsInputStream(GsfInput *input) :
49 - WPXInputStream(),
50 + librevenge::RVNGInputStream(),
51 m_input(input),
52 - m_ole(NULL)
53 + m_ole(NULL),
54 + m_substreams()
56 g_object_ref(G_OBJECT(input));
58 @@ -86,50 +91,120 @@
59 return buf;
62 -int AbiWordPerfectGraphicsInputStream::seek(long offset, WPX_SEEK_TYPE seekType)
63 +int AbiWordPerfectGraphicsInputStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
65 GSeekType gsfSeekType = G_SEEK_SET;
66 switch(seekType)
68 - case WPX_SEEK_CUR:
69 + case librevenge::RVNG_SEEK_CUR:
70 gsfSeekType = G_SEEK_CUR;
71 break;
72 - case WPX_SEEK_SET:
73 + case librevenge::RVNG_SEEK_SET:
74 gsfSeekType = G_SEEK_SET;
75 break;
76 + case librevenge::RVNG_SEEK_END:
77 + gsfSeekType = G_SEEK_END;
78 + break;
81 return gsf_input_seek(m_input, offset, gsfSeekType);
84 -bool AbiWordPerfectGraphicsInputStream::isOLEStream()
85 +bool AbiWordPerfectGraphicsInputStream::isStructured()
87 if (!m_ole)
88 m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
90 - if (m_ole != NULL)
91 + if (!m_ole)
92 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
94 + if (m_ole)
95 return true;
97 return false;
100 -WPXInputStream * AbiWordPerfectGraphicsInputStream::getDocumentOLEStream()
101 +unsigned AbiWordPerfectGraphicsInputStream::subStreamCount()
103 - return getDocumentOLEStream("PerfectOffice_MAIN");
104 + if (!m_ole)
105 + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
107 + if (!m_ole)
108 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
110 + if (m_ole)
112 + int numChildren = gsf_infile_num_children(m_ole);
113 + if (numChildren > 0)
114 + return numChildren;
115 + return 0;
118 + return 0;
121 -WPXInputStream * AbiWordPerfectGraphicsInputStream::getDocumentOLEStream(const char * name)
122 +const char * AbiWordPerfectGraphicsInputStream::subStreamName(unsigned id)
124 - WPXInputStream *documentStream = NULL;
125 + if (!m_ole)
126 + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
128 if (!m_ole)
129 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
131 + if (m_ole)
133 + if ((int)id >= gsf_infile_num_children(m_ole))
135 + return 0;
137 + std::map<unsigned, std::string>::iterator i = m_substreams.lower_bound(id);
138 + if (i == m_substreams.end() || m_substreams.key_comp()(id, i->first))
140 + std::string name = gsf_infile_name_by_index(m_ole, (int)id);
141 + i = m_substreams.insert(i, std::map<unsigned, std::string>::value_type(id, name));
143 + return i->second.c_str();
146 + return 0;
149 +bool AbiWordPerfectGraphicsInputStream::existsSubStream(const char * name)
151 + if (!m_ole)
152 m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
154 + if (!m_ole)
155 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
157 if (m_ole)
159 GsfInput *document = gsf_infile_child_by_name(m_ole, name);
160 if (document)
162 + g_object_unref(G_OBJECT (document));
163 + return true;
167 + return false;
170 +librevenge::RVNGInputStream * AbiWordPerfectGraphicsInputStream::getSubStreamByName(const char * name)
172 + librevenge::RVNGInputStream *documentStream = NULL;
174 + if (!m_ole)
175 + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
177 + if (!m_ole)
178 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
180 + if (m_ole)
182 + GsfInput *document = gsf_infile_child_by_name(m_ole, name);
183 + if (document)
185 documentStream = new AbiWordPerfectGraphicsInputStream(document);
186 g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream
188 @@ -138,12 +213,35 @@
189 return documentStream;
192 +librevenge::RVNGInputStream * AbiWordPerfectGraphicsInputStream::getSubStreamById(unsigned id)
194 + librevenge::RVNGInputStream *documentStream = NULL;
196 + if (!m_ole)
197 + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
199 + if (!m_ole)
200 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
202 + if (m_ole)
204 + GsfInput *document = gsf_infile_child_by_index(m_ole, (int)id);
205 + if (document)
207 + documentStream = new AbiWordPerfectGraphicsInputStream(document);
208 + g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream
212 + return documentStream;
215 long AbiWordPerfectGraphicsInputStream::tell()
217 return gsf_input_tell(m_input);
220 -bool AbiWordPerfectGraphicsInputStream::atEOS()
221 +bool AbiWordPerfectGraphicsInputStream::isEnd()
223 return gsf_input_eof(m_input);
225 @@ -244,14 +342,24 @@
226 UT_Error IE_Imp_WordPerfectGraphics::importGraphic(GsfInput *input, FG_Graphic **ppfg)
228 AbiWordPerfectGraphicsInputStream gsfInput(input);
229 - WPXString svgOutput;
230 - if (WPGraphics::generateSVG(&gsfInput, svgOutput))
231 + librevenge::RVNGString svgOutput;
232 + librevenge::RVNGStringVector vec;
233 + librevenge::RVNGSVGDrawingGenerator generator(vec, "");
235 + if (!libwpg::WPGraphics::parse(&gsfInput, &generator) || vec.empty() || vec[0].empty())
237 - GsfInput * svgInput = gsf_input_memory_new((const guint8*)svgOutput.cstr(), svgOutput.len(), false);
238 - UT_Error result = IE_ImpGraphic::loadGraphic(svgInput, IE_ImpGraphic::fileTypeForSuffix(".svg"), ppfg);
239 - g_object_unref(svgInput);
240 - return result;
241 + return UT_ERROR;
243 - return UT_ERROR;
245 + svgOutput.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n");
246 + svgOutput.append("<!DOCTYPE svg PUBLIC \"-//W3C//DTD SVG 1.1//EN\"");
247 + svgOutput.append(" \"http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd\">\n");
248 + svgOutput.append(vec[0]);
249 + svgOutput.append("\n");
251 + GsfInput * svgInput = gsf_input_memory_new((const guint8*)svgOutput.cstr(), svgOutput.len(), false);
252 + UT_Error result = IE_ImpGraphic::loadGraphic(svgInput, IE_ImpGraphic::fileTypeForSuffix(".svg"), ppfg);
253 + g_object_unref(svgInput);
254 + return result;
257 Index: plugins/wpg/plugin.m4
258 ===================================================================
259 --- plugins/wpg/plugin.m4 (revision 34460)
260 +++ plugins/wpg/plugin.m4 (working copy)
261 @@ -1,5 +1,5 @@
263 -wpg_pkgs="$gsf_req libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0"
264 +wpg_pkgs="libwpg-0.3 $gsf_req"
265 wpg_deps="no"
267 if test "$enable_wpg" != ""; then
268 Index: plugins/wordperfect/xp/ie_imp_WordPerfect.h
269 ===================================================================
270 --- plugins/wordperfect/xp/ie_imp_WordPerfect.h (revision 34460)
271 +++ plugins/wordperfect/xp/ie_imp_WordPerfect.h (working copy)
272 @@ -30,7 +30,7 @@
273 #define IE_IMP_WP_H
275 #include <stdio.h>
276 -#include <libwpd/libwpd.h>
277 +#include <librevenge/librevenge.h>
278 #include "ie_imp.h"
279 #include "ut_string.h"
280 #include "ut_string_class.h"
281 @@ -92,7 +92,7 @@
282 IE_Imp ** ppie);
285 -class IE_Imp_WordPerfect : public IE_Imp, public WPXDocumentInterface
286 +class IE_Imp_WordPerfect : public IE_Imp, public librevenge::RVNGTextInterface
288 public:
289 IE_Imp_WordPerfect(PD_Document * pDocument);
290 @@ -101,69 +101,83 @@
291 virtual void pasteFromBuffer(PD_DocumentRange * pDocRange,
292 UT_uint8 * pData, UT_uint32 lenData, const char * szEncoding = 0);
294 - virtual void setDocumentMetaData(const WPXPropertyList &propList);
295 + virtual void setDocumentMetaData(const librevenge::RVNGPropertyList &propList);
297 - virtual void startDocument();
298 - virtual void endDocument();
299 + virtual void startDocument(const librevenge::RVNGPropertyList &propList);
300 + virtual void endDocument();
302 - virtual void openPageSpan(const WPXPropertyList &propList);
303 - virtual void closePageSpan() {}
304 - virtual void openHeader(const WPXPropertyList &propList);
305 - virtual void closeHeader();
306 - virtual void openFooter(const WPXPropertyList &propList);
307 - virtual void closeFooter();
308 + virtual void defineEmbeddedFont(const librevenge::RVNGPropertyList & /* propList */) {}
310 - virtual void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops);
311 - virtual void closeParagraph() {}
312 + virtual void definePageStyle(const librevenge::RVNGPropertyList &) {}
313 + virtual void openPageSpan(const librevenge::RVNGPropertyList &propList);
314 + virtual void closePageSpan() {}
315 + virtual void openHeader(const librevenge::RVNGPropertyList &propList);
316 + virtual void closeHeader();
317 + virtual void openFooter(const librevenge::RVNGPropertyList &propList);
318 + virtual void closeFooter();
320 - virtual void openSpan(const WPXPropertyList &propList);
321 - virtual void closeSpan() {}
322 + virtual void defineSectionStyle(const librevenge::RVNGPropertyList &) {}
323 + virtual void openSection(const librevenge::RVNGPropertyList &propList);
324 + virtual void closeSection() {}
326 - virtual void openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns);
327 - virtual void closeSection() {}
328 + virtual void defineParagraphStyle(const librevenge::RVNGPropertyList &) {}
329 + virtual void openParagraph(const librevenge::RVNGPropertyList &propList);
330 + virtual void closeParagraph() {}
332 - virtual void insertTab();
333 - virtual void insertText(const WPXString &text);
334 - virtual void insertLineBreak();
335 + virtual void defineCharacterStyle(const librevenge::RVNGPropertyList &) {}
336 + virtual void openSpan(const librevenge::RVNGPropertyList &propList);
337 + virtual void closeSpan() {}
339 - virtual void defineOrderedListLevel(const WPXPropertyList &propList);
340 - virtual void defineUnorderedListLevel(const WPXPropertyList &propList);
341 - virtual void openOrderedListLevel(const WPXPropertyList &propList);
342 - virtual void openUnorderedListLevel(const WPXPropertyList &propList);
343 - virtual void closeOrderedListLevel();
344 - virtual void closeUnorderedListLevel();
345 - virtual void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops);
346 - virtual void closeListElement() {}
347 + virtual void openLink(const librevenge::RVNGPropertyList & /* propList */) {}
348 + virtual void closeLink() {}
350 - virtual void openFootnote(const WPXPropertyList &propList);
351 - virtual void closeFootnote();
352 - virtual void openEndnote(const WPXPropertyList &propList);
353 - virtual void closeEndnote();
354 + virtual void insertTab();
355 + virtual void insertText(const librevenge::RVNGString &text);
356 + virtual void insertSpace();
357 + virtual void insertLineBreak();
358 + virtual void insertField(const librevenge::RVNGPropertyList & /* propList */) {}
360 - virtual void openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns);
361 - virtual void openTableRow(const WPXPropertyList &propList);
362 - virtual void closeTableRow() {}
363 - virtual void openTableCell(const WPXPropertyList &propList);
364 - virtual void closeTableCell() {}
365 - virtual void insertCoveredTableCell(const WPXPropertyList & /*propList*/) {}
366 - virtual void closeTable();
367 + virtual void openOrderedListLevel(const librevenge::RVNGPropertyList &propList);
368 + virtual void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList);
369 + virtual void closeOrderedListLevel();
370 + virtual void closeUnorderedListLevel();
371 + virtual void openListElement(const librevenge::RVNGPropertyList &propList);
372 + virtual void closeListElement() {}
374 - virtual void definePageStyle(const WPXPropertyList&) {}
375 - virtual void defineParagraphStyle(const WPXPropertyList&, const WPXPropertyListVector&) {}
376 - virtual void defineCharacterStyle(const WPXPropertyList&) {}
377 - virtual void defineSectionStyle(const WPXPropertyList&, const WPXPropertyListVector&) {}
378 - virtual void insertSpace() {}
379 - virtual void insertField(const WPXString&, const WPXPropertyList&) {}
380 - virtual void openComment(const WPXPropertyList&) {}
381 - virtual void closeComment() {}
382 - virtual void openTextBox(const WPXPropertyList&) {}
383 - virtual void closeTextBox() {}
384 - virtual void openFrame(const WPXPropertyList&) {}
385 - virtual void closeFrame() {}
386 - virtual void insertBinaryObject(const WPXPropertyList&, const WPXBinaryData&) {}
387 - virtual void insertEquation(const WPXPropertyList&, const WPXString&) {}
388 + virtual void openFootnote(const librevenge::RVNGPropertyList &propList);
389 + virtual void closeFootnote();
390 + virtual void openEndnote(const librevenge::RVNGPropertyList &propList);
391 + virtual void closeEndnote();
392 + virtual void openComment(const librevenge::RVNGPropertyList & /* propList */) {}
393 + virtual void closeComment() {}
394 + virtual void openTextBox(const librevenge::RVNGPropertyList & /* propList */) {}
395 + virtual void closeTextBox() {}
397 + virtual void openTable(const librevenge::RVNGPropertyList &propList);
398 + virtual void openTableRow(const librevenge::RVNGPropertyList &propList);
399 + virtual void closeTableRow() {}
400 + virtual void openTableCell(const librevenge::RVNGPropertyList &propList);
401 + virtual void closeTableCell() {}
402 + virtual void insertCoveredTableCell(const librevenge::RVNGPropertyList & /* propList */) {}
403 + virtual void closeTable();
405 + virtual void openFrame(const librevenge::RVNGPropertyList & /* propList */) {}
406 + virtual void closeFrame() {}
408 + virtual void openGroup(const librevenge::RVNGPropertyList & /* propList */) {}
409 + virtual void closeGroup() {}
411 + virtual void defineGraphicStyle(const librevenge::RVNGPropertyList & /* propList */) {}
412 + virtual void drawRectangle(const librevenge::RVNGPropertyList & /* propList */) {}
413 + virtual void drawEllipse(const librevenge::RVNGPropertyList & /* propList */) {}
414 + virtual void drawPolygon(const librevenge::RVNGPropertyList & /* propList */) {}
415 + virtual void drawPolyline(const librevenge::RVNGPropertyList & /* propList */) {}
416 + virtual void drawPath(const librevenge::RVNGPropertyList & /* propList */) {}
417 + virtual void drawConnector(const librevenge::RVNGPropertyList & /* propList */) {}
419 + virtual void insertBinaryObject(const librevenge::RVNGPropertyList & /* propList */) {}
420 + virtual void insertEquation(const librevenge::RVNGPropertyList & /* propList */) {}
422 protected:
423 virtual UT_Error _loadFile(GsfInput * input);
424 UT_Error _appendSection(int numColumns, const float, const float);
425 Index: plugins/wordperfect/xp/ie_impexp_WordPerfect.cpp
426 ===================================================================
427 --- plugins/wordperfect/xp/ie_impexp_WordPerfect.cpp (revision 34460)
428 +++ plugins/wordperfect/xp/ie_impexp_WordPerfect.cpp (working copy)
429 @@ -35,7 +35,6 @@
430 ABI_PLUGIN_DECLARE("WordPerfect")
432 static IE_Imp_WordPerfect_Sniffer * m_ImpSniffer = 0;
433 -static IE_Exp_WordPerfect_Sniffer * m_ExpSniffer = 0;
435 #ifdef HAVE_LIBWPS
436 static IE_Imp_MSWorks_Sniffer * m_MSWorks_ImpSniffer = 0;
437 @@ -49,13 +48,7 @@
438 m_ImpSniffer = new IE_Imp_WordPerfect_Sniffer ();
441 - if (!m_ExpSniffer)
443 - m_ExpSniffer = new IE_Exp_WordPerfect_Sniffer ();
446 UT_ASSERT (m_ImpSniffer);
447 - UT_ASSERT (m_ExpSniffer);
449 #ifdef HAVE_LIBWPS
450 if (!m_MSWorks_ImpSniffer)
451 @@ -79,7 +72,7 @@
452 mi->usage = "No Usage";
454 IE_Imp::registerImporter (m_ImpSniffer);
455 - //IE_Exp::registerExporter (m_ExpSniffer);
457 return 1;
460 @@ -93,18 +86,11 @@
461 mi->usage = 0;
463 UT_ASSERT (m_ImpSniffer);
464 - UT_ASSERT (m_ExpSniffer);
466 IE_Imp::unregisterImporter (m_ImpSniffer);
467 delete m_ImpSniffer;
468 m_ImpSniffer = 0;
470 - /*
471 - IE_Exp::unregisterExporter (m_ExpSniffer);
472 - delete m_ExpSniffer;
473 - m_ExpSniffer = 0;
474 - */
476 #ifdef HAVE_LIBWPS
477 IE_Imp::unregisterImporter (m_MSWorks_ImpSniffer);
478 delete m_MSWorks_ImpSniffer;
479 Index: plugins/wordperfect/xp/ie_imp_WordPerfect.cpp
480 ===================================================================
481 --- plugins/wordperfect/xp/ie_imp_WordPerfect.cpp (revision 34460)
482 +++ plugins/wordperfect/xp/ie_imp_WordPerfect.cpp (working copy)
483 @@ -31,6 +31,8 @@
484 #include <stdlib.h>
485 #include <string.h>
486 #include <math.h>
487 +#include <map>
488 +#include <string>
489 #include <gsf/gsf-utils.h>
490 #include <gsf/gsf-input-memory.h>
491 #include <gsf/gsf-input-stdio.h>
492 @@ -60,42 +62,47 @@
494 // Stream class
496 -#include <libwpd-stream/libwpd-stream.h>
497 +#include <librevenge-stream/librevenge-stream.h>
498 +#include <libwpd/libwpd.h>
500 #include <gsf/gsf-input.h>
501 #include <gsf/gsf-infile.h>
502 #include <gsf/gsf-infile-msole.h>
503 +#include <gsf/gsf-infile-zip.h>
505 #ifdef HAVE_LIBWPS
506 #include <libwps/libwps.h>
507 #endif
509 -class AbiWordperfectInputStream : public WPXInputStream
510 +class AbiWordperfectInputStream : public librevenge::RVNGInputStream
512 public:
513 AbiWordperfectInputStream(GsfInput *input);
514 ~AbiWordperfectInputStream();
516 - virtual bool isOLEStream();
517 - virtual WPXInputStream * getDocumentOLEStream();
519 - virtual WPXInputStream * getDocumentOLEStream(const char * name);
521 + virtual bool isStructured();
522 + virtual unsigned subStreamCount();
523 + virtual const char* subStreamName(unsigned);
524 + bool existsSubStream(const char*);
525 + virtual librevenge::RVNGInputStream* getSubStreamByName(const char*);
526 + virtual librevenge::RVNGInputStream* getSubStreamById(unsigned);
527 virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead);
528 - virtual int seek(long offset, WPX_SEEK_TYPE seekType);
529 + virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType);
530 virtual long tell();
531 - virtual bool atEOS();
532 + virtual bool isEnd();
534 private:
536 GsfInput *m_input;
537 GsfInfile *m_ole;
538 + std::map<unsigned, std::string> m_substreams;
541 AbiWordperfectInputStream::AbiWordperfectInputStream(GsfInput *input) :
542 - WPXInputStream(),
543 + librevenge::RVNGInputStream(),
544 m_input(input),
545 - m_ole(NULL)
546 + m_ole(NULL),
547 + m_substreams()
549 g_object_ref(G_OBJECT(input));
551 @@ -120,50 +127,120 @@
552 return buf;
555 -int AbiWordperfectInputStream::seek(long offset, WPX_SEEK_TYPE seekType)
556 +int AbiWordperfectInputStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType)
558 GSeekType gsfSeekType = G_SEEK_SET;
559 switch(seekType)
561 - case WPX_SEEK_CUR:
562 + case librevenge::RVNG_SEEK_CUR:
563 gsfSeekType = G_SEEK_CUR;
564 break;
565 - case WPX_SEEK_SET:
566 + case librevenge::RVNG_SEEK_SET:
567 gsfSeekType = G_SEEK_SET;
568 break;
569 + case librevenge::RVNG_SEEK_END:
570 + gsfSeekType = G_SEEK_END;
571 + break;
574 return gsf_input_seek(m_input, offset, gsfSeekType);
577 -bool AbiWordperfectInputStream::isOLEStream()
578 +bool AbiWordperfectInputStream::isStructured()
580 if (!m_ole)
581 m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
583 - if (m_ole != NULL)
584 + if (!m_ole)
585 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
587 + if (m_ole)
588 return true;
590 return false;
593 -WPXInputStream * AbiWordperfectInputStream::getDocumentOLEStream()
594 +unsigned AbiWordperfectInputStream::subStreamCount()
596 - return getDocumentOLEStream("PerfectOffice_MAIN");
597 + if (!m_ole)
598 + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
600 + if (!m_ole)
601 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
603 + if (m_ole)
605 + int numChildren = gsf_infile_num_children(m_ole);
606 + if (numChildren > 0)
607 + return numChildren;
608 + return 0;
611 + return 0;
614 -WPXInputStream * AbiWordperfectInputStream::getDocumentOLEStream(const char * name)
615 +const char * AbiWordperfectInputStream::subStreamName(unsigned id)
617 - WPXInputStream *documentStream = NULL;
618 + if (!m_ole)
619 + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
621 if (!m_ole)
622 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
624 + if (m_ole)
626 + if ((int)id >= gsf_infile_num_children(m_ole))
628 + return 0;
630 + std::map<unsigned, std::string>::iterator i = m_substreams.lower_bound(id);
631 + if (i == m_substreams.end() || m_substreams.key_comp()(id, i->first))
633 + std::string name = gsf_infile_name_by_index(m_ole, (int)id);
634 + i = m_substreams.insert(i, std::map<unsigned, std::string>::value_type(id, name));
636 + return i->second.c_str();
639 + return 0;
642 +bool AbiWordperfectInputStream::existsSubStream(const char * name)
644 + if (!m_ole)
645 m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
647 + if (!m_ole)
648 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
650 if (m_ole)
652 GsfInput *document = gsf_infile_child_by_name(m_ole, name);
653 if (document)
655 + g_object_unref(G_OBJECT (document));
656 + return true;
660 + return false;
663 +librevenge::RVNGInputStream * AbiWordperfectInputStream::getSubStreamByName(const char * name)
665 + librevenge::RVNGInputStream *documentStream = NULL;
667 + if (!m_ole)
668 + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
670 + if (!m_ole)
671 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
673 + if (m_ole)
675 + GsfInput *document = gsf_infile_child_by_name(m_ole, name);
676 + if (document)
678 documentStream = new AbiWordperfectInputStream(document);
679 g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream
681 @@ -172,12 +249,35 @@
682 return documentStream;
685 +librevenge::RVNGInputStream * AbiWordperfectInputStream::getSubStreamById(unsigned id)
687 + librevenge::RVNGInputStream *documentStream = NULL;
689 + if (!m_ole)
690 + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL));
692 + if (!m_ole)
693 + m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL));
695 + if (m_ole)
697 + GsfInput *document = gsf_infile_child_by_index(m_ole, (int)id);
698 + if (document)
700 + documentStream = new AbiWordperfectInputStream(document);
701 + g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream
705 + return documentStream;
708 long AbiWordperfectInputStream::tell()
710 return gsf_input_tell(m_input);
713 -bool AbiWordperfectInputStream::atEOS()
714 +bool AbiWordperfectInputStream::isEnd()
716 return gsf_input_eof(m_input);
718 @@ -247,13 +347,13 @@
720 AbiWordperfectInputStream gsfInput(input);
722 - WPDConfidence confidence = WPDocument::isFileFormatSupported(&gsfInput);
724 + libwpd::WPDConfidence confidence = libwpd::WPDocument::isFileFormatSupported(&gsfInput);
726 switch (confidence)
728 - case WPD_CONFIDENCE_NONE:
729 + case libwpd::WPD_CONFIDENCE_NONE:
730 return UT_CONFIDENCE_ZILCH;
731 - case WPD_CONFIDENCE_EXCELLENT:
732 + case libwpd::WPD_CONFIDENCE_EXCELLENT:
733 return UT_CONFIDENCE_PERFECT;
734 default:
735 return UT_CONFIDENCE_ZILCH;
736 @@ -312,9 +412,9 @@
737 UT_Error IE_Imp_WordPerfect::_loadFile(GsfInput * input)
739 AbiWordperfectInputStream gsfInput(input);
740 - WPDResult error = WPDocument::parse(&gsfInput, static_cast<WPXDocumentInterface *>(this), NULL);
741 + libwpd::WPDResult error = libwpd::WPDocument::parse(&gsfInput, static_cast<librevenge::RVNGTextInterface *>(this), NULL);
743 - if (error != WPD_OK)
744 + if (error != libwpd::WPD_OK)
746 UT_DEBUGMSG(("AbiWordPerfect: ERROR: %i!\n", (int)error));
747 return UT_IE_IMPORTERROR;
748 @@ -329,7 +429,7 @@
749 // nada
752 -void IE_Imp_WordPerfect::setDocumentMetaData(const WPXPropertyList &propList)
753 +void IE_Imp_WordPerfect::setDocumentMetaData(const librevenge::RVNGPropertyList &propList)
755 if (propList["dc:author"])
756 getDoc()->setMetaDataProp(PD_META_KEY_CREATOR, propList["dc:author"]->getStr().cstr());
757 @@ -339,15 +439,15 @@
758 getDoc()->setMetaDataProp(PD_META_KEY_PUBLISHER, propList["dc:publisher"]->getStr().cstr());
759 if (propList["dc:type"])
760 getDoc()->setMetaDataProp(PD_META_KEY_TYPE, propList["dc:category"]->getStr().cstr());
761 - if (propList["libwpd:keywords"])
762 - getDoc()->setMetaDataProp(PD_META_KEY_KEYWORDS, propList["libwpd:keywords"]->getStr().cstr());
763 + if (propList["librevenge:keywords"])
764 + getDoc()->setMetaDataProp(PD_META_KEY_KEYWORDS, propList["librevenge:keywords"]->getStr().cstr());
765 if (propList["dc:language"])
766 getDoc()->setMetaDataProp(PD_META_KEY_LANGUAGE, propList["dc:language"]->getStr().cstr());
767 - if (propList["libwpd:abstract"])
768 - getDoc()->setMetaDataProp(PD_META_KEY_DESCRIPTION, propList["libwpd:abstract"]->getStr().cstr());
769 + if (propList["librevenge:abstract"])
770 + getDoc()->setMetaDataProp(PD_META_KEY_DESCRIPTION, propList["librevenge:abstract"]->getStr().cstr());
773 -void IE_Imp_WordPerfect::startDocument()
774 +void IE_Imp_WordPerfect::startDocument(const librevenge::RVNGPropertyList & /* propList */)
776 UT_DEBUGMSG(("AbiWordPerfect: startDocument\n"));
778 @@ -357,7 +457,7 @@
779 UT_DEBUGMSG(("AbiWordPerfect: endDocument\n"));
782 -void IE_Imp_WordPerfect::openPageSpan(const WPXPropertyList &propList)
783 +void IE_Imp_WordPerfect::openPageSpan(const librevenge::RVNGPropertyList &propList)
785 if (m_bHdrFtrOpenCount) return; // HACK
786 UT_DEBUGMSG(("AbiWordPerfect: openPageSpan\n"));
787 @@ -378,7 +478,7 @@
791 -void IE_Imp_WordPerfect::openHeader(const WPXPropertyList & /*propList*/)
792 +void IE_Imp_WordPerfect::openHeader(const librevenge::RVNGPropertyList & /*propList*/)
794 m_bHdrFtrOpenCount++;
796 @@ -420,7 +520,7 @@
800 -void IE_Imp_WordPerfect::openFooter(const WPXPropertyList & /*propList*/)
801 +void IE_Imp_WordPerfect::openFooter(const librevenge::RVNGPropertyList & /*propList*/)
803 m_bHdrFtrOpenCount++;
804 // see above comments re: openHeader
805 @@ -432,7 +532,7 @@
806 // see above comments re: closeHeader
809 -void IE_Imp_WordPerfect::openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops)
810 +void IE_Imp_WordPerfect::openParagraph(const librevenge::RVNGPropertyList &propList)
812 if (m_bHdrFtrOpenCount) return; // HACK
813 UT_DEBUGMSG(("AbiWordPerfect: openParagraph()\n"));
814 @@ -478,13 +578,15 @@
815 (int)(m_topMargin*72), (int)(m_bottomMargin*72), m_leftMarginOffset, m_rightMarginOffset, m_textIndent, lineSpacing);
816 propBuffer += tmpBuffer;
818 - if (tabStops.count() > 0) // Append the tabstop information
819 + const librevenge::RVNGPropertyListVector *tabStops = propList.child("style:tab-stops");
821 + if (tabStops && tabStops->count()) // Append the tabstop information
823 propBuffer += "; tabstops:";
824 tmpBuffer = "";
825 - WPXPropertyListVector::Iter i(tabStops);
826 - for (i.rewind(); i.next();)
828 + librevenge::RVNGPropertyListVector::Iter i(*tabStops);
829 + for (i.rewind(); i.next();)
831 propBuffer += tmpBuffer;
832 if (i()["style:position"])
834 @@ -515,8 +617,8 @@
835 propBuffer += "0";
837 tmpBuffer = ",";
845 @@ -543,7 +645,7 @@
849 -void IE_Imp_WordPerfect::openSpan(const WPXPropertyList &propList)
850 +void IE_Imp_WordPerfect::openSpan(const librevenge::RVNGPropertyList &propList)
852 if (m_bHdrFtrOpenCount) return; // HACK
853 UT_DEBUGMSG(("AbiWordPerfect: Appending current text properties\n"));
854 @@ -614,13 +716,14 @@
855 X_CheckDocumentError(appendFmt(propsArray));
858 -void IE_Imp_WordPerfect::openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns)
859 +void IE_Imp_WordPerfect::openSection(const librevenge::RVNGPropertyList &propList)
861 if (m_bHdrFtrOpenCount) return; // HACK
862 UT_DEBUGMSG(("AbiWordPerfect: openSection\n"));
864 float marginLeft = 0.0f, marginRight = 0.0f;
865 - int columnsCount = ((columns.count() == 0) ? 1 : columns.count());
866 + const librevenge::RVNGPropertyListVector *columns = propList.child("style:columns");
867 + int columnsCount = ((!columns || !columns->count()) ? 1 : columns->count());
869 // TODO: support spaceAfter
870 if (propList["fo:start-indent"])
871 @@ -647,7 +750,7 @@
872 X_CheckDocumentError(appendSpan(&ucs,1));
875 -void IE_Imp_WordPerfect::insertText(const WPXString &text)
876 +void IE_Imp_WordPerfect::insertText(const librevenge::RVNGString &text)
878 if (m_bHdrFtrOpenCount) return; // HACK
879 if (text.len())
880 @@ -658,6 +761,15 @@
884 +void IE_Imp_WordPerfect::insertSpace()
886 + if (m_bHdrFtrOpenCount) return; // HACK
887 + UT_DEBUGMSG(("AbiWordPerfect: insertSpace\n"));
889 + UT_UCS4Char ucs = UCS_SPACE;
890 + X_CheckDocumentError(appendSpan(&ucs,1));
893 void IE_Imp_WordPerfect::insertLineBreak()
895 if (m_bHdrFtrOpenCount) return; // HACK
896 @@ -668,12 +780,11 @@
901 -void IE_Imp_WordPerfect::defineOrderedListLevel(const WPXPropertyList &propList)
902 +void IE_Imp_WordPerfect::openOrderedListLevel(const librevenge::RVNGPropertyList &propList)
904 if (m_bHdrFtrOpenCount) return; // HACK
905 - UT_DEBUGMSG(("AbiWordPerfect: defineOrderedListLevel\n"));
907 + UT_DEBUGMSG(("AbiWordPerfect: openOrderedListLevel\n"));
909 int listID = 0, startingNumber = 0, level = 1;
910 char listType = '1';
911 UT_UTF8String textBeforeNumber, textAfterNumber;
912 @@ -680,12 +791,12 @@
913 float listLeftOffset = 0.0f;
914 float listMinLabelWidth = 0.0f;
916 - if (propList["libwpd:id"])
917 - listID = propList["libwpd:id"]->getInt();
918 + if (propList["librevenge:id"])
919 + listID = propList["librevenge:id"]->getInt();
920 if (propList["text:start-value"])
921 startingNumber = propList["text:start-value"]->getInt();
922 - if (propList["libwpd:level"])
923 - level = propList["libwpd:level"]->getInt();
924 + if (propList["librevenge:level"])
925 + level = propList["librevenge:level"]->getInt();
926 if (propList["style:num-prefix"])
927 textBeforeNumber += propList["style:num-prefix"]->getStr().cstr();
928 if (propList["style:num-suffix"])
929 @@ -716,22 +827,38 @@
930 m_pCurrentListDefinition->setListMinLabelWidth(level, listMinLabelWidth);
931 _updateDocumentOrderedListDefinition(m_pCurrentListDefinition, level, listType, textBeforeNumber, textAfterNumber, startingNumber);
934 + m_iCurrentListLevel++;
937 -void IE_Imp_WordPerfect::defineUnorderedListLevel(const WPXPropertyList &propList)
938 +void IE_Imp_WordPerfect::closeOrderedListLevel()
940 if (m_bHdrFtrOpenCount) return; // HACK
941 - UT_DEBUGMSG(("AbiWordPerfect: defineUnorderedListLevel\n"));
942 + UT_DEBUGMSG(("AbiWordPerfect: closeOrderedListLevel (level: %i)\n", m_iCurrentListLevel));
943 + UT_ASSERT(m_iCurrentListLevel > 0);
945 + // every time we close a list level, the level above it is normally renumbered to start at "1"
946 + // again. this code takes care of that.
947 + if (m_iCurrentListLevel < (WP6_NUM_LIST_LEVELS-1))
948 + m_pCurrentListDefinition->setLevelNumber(m_iCurrentListLevel + 1, 0);
950 + m_iCurrentListLevel--;
953 +void IE_Imp_WordPerfect::openUnorderedListLevel(const librevenge::RVNGPropertyList &propList)
955 + if (m_bHdrFtrOpenCount) return; // HACK
956 + UT_DEBUGMSG(("AbiWordPerfect: openUNorderedListLevel\n"));
958 int listID = 0, level = 1;
959 - WPXString textBeforeNumber, textAfterNumber;
960 + librevenge::RVNGString textBeforeNumber, textAfterNumber;
961 float listLeftOffset = 0.0f;
962 float listMinLabelWidth = 0.0f;
964 - if (propList["libwpd:id"])
965 - listID = propList["libwpd:id"]->getInt();
966 - if (propList["libwpd:level"])
967 - level = propList["libwpd:level"]->getInt();
968 + if (propList["librevenge:id"])
969 + listID = propList["librevenge:id"]->getInt();
970 + if (propList["librevenge:level"])
971 + level = propList["librevenge:level"]->getInt();
972 if (propList["text:space-before"])
973 listLeftOffset = propList["text:space-before"]->getDouble();
974 if (propList["text:min-label-width"])
975 @@ -752,39 +879,10 @@
976 m_pCurrentListDefinition->setListMinLabelWidth(level, listMinLabelWidth);
977 _updateDocumentUnorderedListDefinition(m_pCurrentListDefinition, level);
981 -//void IE_Imp_WordPerfect::openOrderedListLevel(const int listID)
982 -void IE_Imp_WordPerfect::openOrderedListLevel(const WPXPropertyList & /*propList*/)
984 - if (m_bHdrFtrOpenCount) return; // HACK
985 - UT_DEBUGMSG(("AbiWordPerfect: openOrderedListLevel\n"));
987 m_iCurrentListLevel++;
990 -void IE_Imp_WordPerfect::closeOrderedListLevel()
992 - if (m_bHdrFtrOpenCount) return; // HACK
993 - UT_DEBUGMSG(("AbiWordPerfect: closeOrderedListLevel (level: %i)\n", m_iCurrentListLevel));
994 - UT_ASSERT(m_iCurrentListLevel > 0);
996 - // every time we close a list level, the level above it is normally renumbered to start at "1"
997 - // again. this code takes care of that.
998 - if (m_iCurrentListLevel < (WP6_NUM_LIST_LEVELS-1))
999 - m_pCurrentListDefinition->setLevelNumber(m_iCurrentListLevel + 1, 0);
1001 - m_iCurrentListLevel--;
1004 -void IE_Imp_WordPerfect::openUnorderedListLevel(const WPXPropertyList & /*propList*/)
1006 - if (m_bHdrFtrOpenCount) return; // HACK
1007 - UT_DEBUGMSG(("AbiWordPerfect: openUNorderedListLevel\n"));
1009 - m_iCurrentListLevel++;
1012 void IE_Imp_WordPerfect::closeUnorderedListLevel()
1014 if (m_bHdrFtrOpenCount) return; // HACK
1015 @@ -796,7 +894,7 @@
1017 // ASSUMPTION: We assume that unordered lists will always pass a number of "0". unpredictable behaviour
1018 // may result otherwise
1019 -void IE_Imp_WordPerfect::openListElement(const WPXPropertyList &propList, const WPXPropertyListVector & /*tabStops*/)
1020 +void IE_Imp_WordPerfect::openListElement(const librevenge::RVNGPropertyList &propList)
1022 if (m_bHdrFtrOpenCount) return; // HACK
1023 UT_DEBUGMSG(("AbiWordPerfect: openListElement\n"));
1024 @@ -885,7 +983,7 @@
1025 X_CheckDocumentError(appendSpan(&ucs,1));
1028 -void IE_Imp_WordPerfect::openFootnote(const WPXPropertyList & /*propList*/)
1029 +void IE_Imp_WordPerfect::openFootnote(const librevenge::RVNGPropertyList & /*propList*/)
1031 if (m_bHdrFtrOpenCount) return; // HACK
1033 @@ -934,7 +1032,7 @@
1034 X_CheckDocumentError(appendStrux(PTX_EndFootnote,NULL));
1037 -void IE_Imp_WordPerfect::openEndnote(const WPXPropertyList & /*propList*/)
1038 +void IE_Imp_WordPerfect::openEndnote(const librevenge::RVNGPropertyList & /*propList*/)
1040 if (m_bHdrFtrOpenCount) return; // HACK
1041 const gchar** propsArray = NULL;
1042 @@ -975,7 +1073,7 @@
1043 X_CheckDocumentError(appendStrux(PTX_EndEndnote,NULL));
1046 -void IE_Imp_WordPerfect::openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns)
1047 +void IE_Imp_WordPerfect::openTable(const librevenge::RVNGPropertyList &propList)
1049 if (m_bHdrFtrOpenCount) return; // HACK
1050 // TODO: handle 'marginLeftOffset' and 'marginRightOffset'
1051 @@ -1000,14 +1098,18 @@
1055 - propBuffer += "table-column-props:";
1056 - WPXPropertyListVector::Iter i(columns);
1057 - for (i.rewind(); i.next();)
1058 + const librevenge::RVNGPropertyListVector *columns = propList.child("librevenge:table-columns");
1059 + if (columns)
1061 - UT_String tmpBuffer;
1062 - if (i()["style:column-width"])
1063 - UT_String_sprintf(tmpBuffer, "%s/", i()["style:column-width"]->getStr().cstr());
1064 - propBuffer += tmpBuffer;
1065 + propBuffer += "table-column-props:";
1066 + librevenge::RVNGPropertyListVector::Iter i(*columns);
1067 + for (i.rewind(); i.next();)
1069 + UT_String tmpBuffer;
1070 + if (i()["style:column-width"])
1071 + UT_String_sprintf(tmpBuffer, "%s/", i()["style:column-width"]->getStr().cstr());
1072 + propBuffer += tmpBuffer;
1076 const gchar* propsArray[3];
1077 @@ -1018,7 +1120,7 @@
1078 X_CheckDocumentError(appendStrux(PTX_SectionTable, propsArray));
1081 -void IE_Imp_WordPerfect::openTableRow(const WPXPropertyList & /*propList*/)
1082 +void IE_Imp_WordPerfect::openTableRow(const librevenge::RVNGPropertyList & /*propList*/)
1084 if (m_bHdrFtrOpenCount) return; // HACK
1085 UT_DEBUGMSG(("AbiWordPerfect: openRow\n"));
1086 @@ -1030,14 +1132,14 @@
1087 m_bInCell = false;
1090 -void IE_Imp_WordPerfect::openTableCell(const WPXPropertyList &propList)
1091 +void IE_Imp_WordPerfect::openTableCell(const librevenge::RVNGPropertyList &propList)
1093 if (m_bHdrFtrOpenCount) return; // HACK
1094 int col =0, row = 0, colSpan = 0, rowSpan = 0;
1095 - if (propList["libwpd:column"])
1096 - col = propList["libwpd:column"]->getInt();
1097 - if (propList["libwpd:row"])
1098 - row = propList["libwpd:row"]->getInt();
1099 + if (propList["librevenge:column"])
1100 + col = propList["librevenge:column"]->getInt();
1101 + if (propList["librevenge:row"])
1102 + row = propList["librevenge:row"]->getInt();
1103 if (propList["table:number-columns-spanned"])
1104 colSpan = propList["table:number-columns-spanned"]->getInt();
1105 if (propList["table:number-rows-spanned"])
1106 @@ -1247,9 +1349,9 @@
1107 virtual UT_Error _loadFile(GsfInput * input)
1109 AbiWordperfectInputStream gsfInput(input);
1110 - WPSResult error = WPSDocument::parse(&gsfInput, static_cast<WPXDocumentInterface *>(this));
1111 + libwps::WPSResult error = libwps::WPSDocument::parse(&gsfInput, static_cast<librevenge::RVNGTextInterface *>(this));
1113 - if (error != WPS_OK)
1114 + if (error != libwps::WPS_OK)
1116 UT_DEBUGMSG(("AbiMSWorks: ERROR: %i!\n", (int)error));
1117 return UT_IE_IMPORTERROR;
1118 @@ -1286,13 +1388,17 @@
1120 AbiWordperfectInputStream gsfInput(input);
1122 - WPSConfidence confidence = WPSDocument::isFileFormatSupported(&gsfInput);
1123 + libwps::WPSKind kind;
1124 + libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&gsfInput, kind);
1126 + if (kind != libwps::WPS_TEXT)
1127 + confidence = libwps::WPS_CONFIDENCE_NONE;
1129 switch (confidence)
1131 - case WPS_CONFIDENCE_NONE:
1132 + case libwps::WPS_CONFIDENCE_NONE:
1133 return UT_CONFIDENCE_ZILCH;
1134 - case WPS_CONFIDENCE_EXCELLENT:
1135 + case libwps::WPS_CONFIDENCE_EXCELLENT:
1136 return UT_CONFIDENCE_PERFECT;
1137 default:
1138 return UT_CONFIDENCE_ZILCH;
1139 Index: plugins/wordperfect/xp/Makefile.am
1140 ===================================================================
1141 --- plugins/wordperfect/xp/Makefile.am (revision 34460)
1142 +++ plugins/wordperfect/xp/Makefile.am (working copy)
1143 @@ -6,8 +6,6 @@
1144 -DABI_BUILD_VERSION=\"$(VERSION)\"
1146 libxp_la_SOURCES = \
1147 - ie_exp_WordPerfect.cpp \
1148 - ie_exp_WordPerfect.h \
1149 ie_impexp_WordPerfect.cpp \
1150 ie_impexp_WordPerfect.h \
1151 ie_imp_WordPerfect.cpp \
1152 Index: plugins/wordperfect/xp/ie_impexp_WordPerfect.h
1153 ===================================================================
1154 --- plugins/wordperfect/xp/ie_impexp_WordPerfect.h (revision 34460)
1155 +++ plugins/wordperfect/xp/ie_impexp_WordPerfect.h (working copy)
1156 @@ -24,7 +24,6 @@
1159 #include "ie_imp_WordPerfect.h"
1160 -#include "ie_exp_WordPerfect.h"
1161 #include "xap_Module.h"
1163 #define IE_MIMETYPE_WP_51 "application/wordperfect5.1"
1164 Index: plugins/wordperfect/plugin.m4
1165 ===================================================================
1166 --- plugins/wordperfect/plugin.m4 (revision 34460)
1167 +++ plugins/wordperfect/plugin.m4 (working copy)
1168 @@ -1,6 +1,6 @@
1170 -wordperfect_pkgs="libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0 $gsf_req"
1171 -wordperfect_wps_pkgs='libwps-0.2 >= 0.1.0'
1172 +wordperfect_pkgs="libwpd-0.10 $gsf_req"
1173 +wordperfect_wps_pkgs='libwps-0.3'
1174 wordperfect_deps="no"
1176 WORDPERFECT_CFLAGS=
1177 @@ -29,7 +29,7 @@
1179 PKG_CHECK_EXISTS([ $wordperfect_wps_pkgs ],
1181 - wp_deps_pkgs="$wp_deps_pkgs $wordperfect_wps_pkgs"
1182 + wp_deps_pkgs="$wordperfect_wps_pkgs $wp_deps_pkgs"
1183 WPS_DEFINE=" -DHAVE_LIBWPS"