From 2d390031ef00860969a96ddabbeae3e386e6ef33 Mon Sep 17 00:00:00 2001 From: Bernhard M. Wiedemann Date: Sep 13 2019 14:29:36 +0000 Subject: restructure files to remain below github limit of 1000 entries --- diff --git a/abiword-fix-black-overlay.patch b/abiword-fix-black-overlay.patch new file mode 100644 index 0000000..9a7332d --- /dev/null +++ b/abiword-fix-black-overlay.patch @@ -0,0 +1,41 @@ +Index: abiword-3.0.2/src/af/xap/gtk/xap_UnixFrameImpl.cpp +=================================================================== +--- src/af/xap/gtk/xap_UnixFrameImpl.cpp ++++ src/af/xap/gtk/xap_UnixFrameImpl.cpp +@@ -1208,9 +1208,9 @@ gint XAP_UnixFrameImpl::_fe::delete_even + } + + #if GTK_CHECK_VERSION(3,0,0) +-gint XAP_UnixFrameImpl::_fe::draw(GtkWidget * w, cairo_t * cr) ++gboolean XAP_UnixFrameImpl::_fe::draw(GtkWidget * w, cairo_t * cr) + #else +-gint XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent) ++gboolean XAP_UnixFrameImpl::_fe::expose(GtkWidget * w, GdkEventExpose* pExposeEvent) + #endif + { + XAP_UnixFrameImpl * pUnixFrameImpl = static_cast(g_object_get_data(G_OBJECT(w), "user_data")); +@@ -1243,7 +1243,7 @@ gint XAP_UnixFrameImpl::_fe::expose(GtkW + pView->draw(&rClip); + #endif + } +- return FALSE; ++ return TRUE; + } + + static bool bScrollWait = false; +Index: abiword-3.0.2/src/af/xap/gtk/xap_UnixFrameImpl.h +=================================================================== +--- src/af/xap/gtk/xap_UnixFrameImpl.h ++++ src/af/xap/gtk/xap_UnixFrameImpl.h +@@ -152,9 +152,9 @@ protected: + static gint key_release_event(GtkWidget* w, GdkEventKey* e); + static gint delete_event(GtkWidget * w, GdkEvent * /*event*/, gpointer /*data*/); + #if GTK_CHECK_VERSION(3,0,0) +- static gint draw(GtkWidget * w, cairo_t * cr); ++ static gboolean draw(GtkWidget * w, cairo_t * cr); + #else +- static gint expose(GtkWidget * w, GdkEventExpose* pExposeEvent); ++ static gboolean expose(GtkWidget * w, GdkEventExpose* pExposeEvent); + #endif + static gint do_ZoomUpdate( gpointer /* xap_UnixFrame * */ p); + static void vScrollChanged(GtkAdjustment * w, gpointer /*data*/); diff --git a/abiword-librevenge.patch b/abiword-librevenge.patch new file mode 100644 index 0000000..f01c131 --- /dev/null +++ b/abiword-librevenge.patch @@ -0,0 +1,1186 @@ +Index: plugins/wordperfect/xp/ie_impexp_WordPerfect.cpp +=================================================================== +--- plugins/wordperfect/xp/ie_impexp_WordPerfect.cpp (revision 34460) ++++ plugins/wordperfect/xp/ie_impexp_WordPerfect.cpp (revision 34468) +@@ -35,7 +35,6 @@ + ABI_PLUGIN_DECLARE("WordPerfect") + + static IE_Imp_WordPerfect_Sniffer * m_ImpSniffer = 0; +-static IE_Exp_WordPerfect_Sniffer * m_ExpSniffer = 0; + + #ifdef HAVE_LIBWPS + static IE_Imp_MSWorks_Sniffer * m_MSWorks_ImpSniffer = 0; +@@ -49,13 +48,7 @@ + m_ImpSniffer = new IE_Imp_WordPerfect_Sniffer (); + } + +- if (!m_ExpSniffer) +- { +- m_ExpSniffer = new IE_Exp_WordPerfect_Sniffer (); +- } +- + UT_ASSERT (m_ImpSniffer); +- UT_ASSERT (m_ExpSniffer); + + #ifdef HAVE_LIBWPS + if (!m_MSWorks_ImpSniffer) +@@ -79,7 +72,7 @@ + mi->usage = "No Usage"; + + IE_Imp::registerImporter (m_ImpSniffer); +- //IE_Exp::registerExporter (m_ExpSniffer); ++ + return 1; + } + +@@ -93,18 +86,11 @@ + mi->usage = 0; + + UT_ASSERT (m_ImpSniffer); +- UT_ASSERT (m_ExpSniffer); + + IE_Imp::unregisterImporter (m_ImpSniffer); + delete m_ImpSniffer; + m_ImpSniffer = 0; + +- /* +- IE_Exp::unregisterExporter (m_ExpSniffer); +- delete m_ExpSniffer; +- m_ExpSniffer = 0; +- */ +- + #ifdef HAVE_LIBWPS + IE_Imp::unregisterImporter (m_MSWorks_ImpSniffer); + delete m_MSWorks_ImpSniffer; +Index: plugins/wordperfect/xp/ie_imp_WordPerfect.cpp +=================================================================== +--- plugins/wordperfect/xp/ie_imp_WordPerfect.cpp (revision 34460) ++++ plugins/wordperfect/xp/ie_imp_WordPerfect.cpp (revision 34468) +@@ -31,6 +31,8 @@ + #include + #include + #include ++#include ++#include + #include + #include + #include +@@ -60,42 +62,47 @@ + + // Stream class + +-#include ++#include ++#include + + #include + #include + #include ++#include + + #ifdef HAVE_LIBWPS + #include + #endif + +-class AbiWordperfectInputStream : public WPXInputStream ++class AbiWordperfectInputStream : public librevenge::RVNGInputStream + { + public: + AbiWordperfectInputStream(GsfInput *input); + ~AbiWordperfectInputStream(); + +- virtual bool isOLEStream(); +- virtual WPXInputStream * getDocumentOLEStream(); +- +- virtual WPXInputStream * getDocumentOLEStream(const char * name); +- ++ virtual bool isStructured(); ++ virtual unsigned subStreamCount(); ++ virtual const char* subStreamName(unsigned); ++ bool existsSubStream(const char*); ++ virtual librevenge::RVNGInputStream* getSubStreamByName(const char*); ++ virtual librevenge::RVNGInputStream* getSubStreamById(unsigned); + virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); +- virtual int seek(long offset, WPX_SEEK_TYPE seekType); ++ virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType); + virtual long tell(); +- virtual bool atEOS(); ++ virtual bool isEnd(); + + private: + + GsfInput *m_input; + GsfInfile *m_ole; ++ std::map m_substreams; + }; + + AbiWordperfectInputStream::AbiWordperfectInputStream(GsfInput *input) : +- WPXInputStream(), ++ librevenge::RVNGInputStream(), + m_input(input), +- m_ole(NULL) ++ m_ole(NULL), ++ m_substreams() + { + g_object_ref(G_OBJECT(input)); + } +@@ -120,50 +127,120 @@ + return buf; + } + +-int AbiWordperfectInputStream::seek(long offset, WPX_SEEK_TYPE seekType) ++int AbiWordperfectInputStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) + { + GSeekType gsfSeekType = G_SEEK_SET; + switch(seekType) + { +- case WPX_SEEK_CUR: ++ case librevenge::RVNG_SEEK_CUR: + gsfSeekType = G_SEEK_CUR; + break; +- case WPX_SEEK_SET: ++ case librevenge::RVNG_SEEK_SET: + gsfSeekType = G_SEEK_SET; + break; ++ case librevenge::RVNG_SEEK_END: ++ gsfSeekType = G_SEEK_END; ++ break; + } + + return gsf_input_seek(m_input, offset, gsfSeekType); + } + +-bool AbiWordperfectInputStream::isOLEStream() ++bool AbiWordperfectInputStream::isStructured() + { + if (!m_ole) + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); + +- if (m_ole != NULL) ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ ++ if (m_ole) + return true; + + return false; + } + +-WPXInputStream * AbiWordperfectInputStream::getDocumentOLEStream() ++unsigned AbiWordperfectInputStream::subStreamCount() + { +- return getDocumentOLEStream("PerfectOffice_MAIN"); ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); ++ ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ ++ if (m_ole) ++ { ++ int numChildren = gsf_infile_num_children(m_ole); ++ if (numChildren > 0) ++ return numChildren; ++ return 0; ++ } ++ ++ return 0; + } + +-WPXInputStream * AbiWordperfectInputStream::getDocumentOLEStream(const char * name) ++const char * AbiWordperfectInputStream::subStreamName(unsigned id) + { +- WPXInputStream *documentStream = NULL; ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); + + if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ ++ if (m_ole) ++ { ++ if ((int)id >= gsf_infile_num_children(m_ole)) ++ { ++ return 0; ++ } ++ std::map::iterator i = m_substreams.lower_bound(id); ++ if (i == m_substreams.end() || m_substreams.key_comp()(id, i->first)) ++ { ++ std::string name = gsf_infile_name_by_index(m_ole, (int)id); ++ i = m_substreams.insert(i, std::map::value_type(id, name)); ++ } ++ return i->second.c_str(); ++ } ++ ++ return 0; ++} ++ ++bool AbiWordperfectInputStream::existsSubStream(const char * name) ++{ ++ if (!m_ole) + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); + ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ + if (m_ole) + { + GsfInput *document = gsf_infile_child_by_name(m_ole, name); + if (document) + { ++ g_object_unref(G_OBJECT (document)); ++ return true; ++ } ++ } ++ ++ return false; ++} ++ ++librevenge::RVNGInputStream * AbiWordperfectInputStream::getSubStreamByName(const char * name) ++{ ++ librevenge::RVNGInputStream *documentStream = NULL; ++ ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); ++ ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ ++ if (m_ole) ++ { ++ GsfInput *document = gsf_infile_child_by_name(m_ole, name); ++ if (document) ++ { + documentStream = new AbiWordperfectInputStream(document); + g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream + } +@@ -172,12 +249,35 @@ + return documentStream; + } + ++librevenge::RVNGInputStream * AbiWordperfectInputStream::getSubStreamById(unsigned id) ++{ ++ librevenge::RVNGInputStream *documentStream = NULL; ++ ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); ++ ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ ++ if (m_ole) ++ { ++ GsfInput *document = gsf_infile_child_by_index(m_ole, (int)id); ++ if (document) ++ { ++ documentStream = new AbiWordperfectInputStream(document); ++ g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream ++ } ++ } ++ ++ return documentStream; ++} ++ + long AbiWordperfectInputStream::tell() + { + return gsf_input_tell(m_input); + } + +-bool AbiWordperfectInputStream::atEOS() ++bool AbiWordperfectInputStream::isEnd() + { + return gsf_input_eof(m_input); + } +@@ -247,13 +347,13 @@ + { + AbiWordperfectInputStream gsfInput(input); + +- WPDConfidence confidence = WPDocument::isFileFormatSupported(&gsfInput); +- ++ libwpd::WPDConfidence confidence = libwpd::WPDocument::isFileFormatSupported(&gsfInput); ++ + switch (confidence) + { +- case WPD_CONFIDENCE_NONE: ++ case libwpd::WPD_CONFIDENCE_NONE: + return UT_CONFIDENCE_ZILCH; +- case WPD_CONFIDENCE_EXCELLENT: ++ case libwpd::WPD_CONFIDENCE_EXCELLENT: + return UT_CONFIDENCE_PERFECT; + default: + return UT_CONFIDENCE_ZILCH; +@@ -312,9 +412,9 @@ + UT_Error IE_Imp_WordPerfect::_loadFile(GsfInput * input) + { + AbiWordperfectInputStream gsfInput(input); +- WPDResult error = WPDocument::parse(&gsfInput, static_cast(this), NULL); ++ libwpd::WPDResult error = libwpd::WPDocument::parse(&gsfInput, static_cast(this), NULL); + +- if (error != WPD_OK) ++ if (error != libwpd::WPD_OK) + { + UT_DEBUGMSG(("AbiWordPerfect: ERROR: %i!\n", (int)error)); + return UT_IE_IMPORTERROR; +@@ -329,7 +429,7 @@ + // nada + } + +-void IE_Imp_WordPerfect::setDocumentMetaData(const WPXPropertyList &propList) ++void IE_Imp_WordPerfect::setDocumentMetaData(const librevenge::RVNGPropertyList &propList) + { + if (propList["dc:author"]) + getDoc()->setMetaDataProp(PD_META_KEY_CREATOR, propList["dc:author"]->getStr().cstr()); +@@ -339,15 +439,15 @@ + getDoc()->setMetaDataProp(PD_META_KEY_PUBLISHER, propList["dc:publisher"]->getStr().cstr()); + if (propList["dc:type"]) + getDoc()->setMetaDataProp(PD_META_KEY_TYPE, propList["dc:category"]->getStr().cstr()); +- if (propList["libwpd:keywords"]) +- getDoc()->setMetaDataProp(PD_META_KEY_KEYWORDS, propList["libwpd:keywords"]->getStr().cstr()); ++ if (propList["librevenge:keywords"]) ++ getDoc()->setMetaDataProp(PD_META_KEY_KEYWORDS, propList["librevenge:keywords"]->getStr().cstr()); + if (propList["dc:language"]) + getDoc()->setMetaDataProp(PD_META_KEY_LANGUAGE, propList["dc:language"]->getStr().cstr()); +- if (propList["libwpd:abstract"]) +- getDoc()->setMetaDataProp(PD_META_KEY_DESCRIPTION, propList["libwpd:abstract"]->getStr().cstr()); ++ if (propList["librevenge:abstract"]) ++ getDoc()->setMetaDataProp(PD_META_KEY_DESCRIPTION, propList["librevenge:abstract"]->getStr().cstr()); + } + +-void IE_Imp_WordPerfect::startDocument() ++void IE_Imp_WordPerfect::startDocument(const librevenge::RVNGPropertyList & /* propList */) + { + UT_DEBUGMSG(("AbiWordPerfect: startDocument\n")); + } +@@ -357,7 +457,7 @@ + UT_DEBUGMSG(("AbiWordPerfect: endDocument\n")); + } + +-void IE_Imp_WordPerfect::openPageSpan(const WPXPropertyList &propList) ++void IE_Imp_WordPerfect::openPageSpan(const librevenge::RVNGPropertyList &propList) + { + if (m_bHdrFtrOpenCount) return; // HACK + UT_DEBUGMSG(("AbiWordPerfect: openPageSpan\n")); +@@ -378,7 +478,7 @@ + + } + +-void IE_Imp_WordPerfect::openHeader(const WPXPropertyList & /*propList*/) ++void IE_Imp_WordPerfect::openHeader(const librevenge::RVNGPropertyList & /*propList*/) + { + m_bHdrFtrOpenCount++; + +@@ -420,7 +520,7 @@ + */ + } + +-void IE_Imp_WordPerfect::openFooter(const WPXPropertyList & /*propList*/) ++void IE_Imp_WordPerfect::openFooter(const librevenge::RVNGPropertyList & /*propList*/) + { + m_bHdrFtrOpenCount++; + // see above comments re: openHeader +@@ -432,7 +532,7 @@ + // see above comments re: closeHeader + } + +-void IE_Imp_WordPerfect::openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) ++void IE_Imp_WordPerfect::openParagraph(const librevenge::RVNGPropertyList &propList) + { + if (m_bHdrFtrOpenCount) return; // HACK + UT_DEBUGMSG(("AbiWordPerfect: openParagraph()\n")); +@@ -478,13 +578,15 @@ + (int)(m_topMargin*72), (int)(m_bottomMargin*72), m_leftMarginOffset, m_rightMarginOffset, m_textIndent, lineSpacing); + propBuffer += tmpBuffer; + +- if (tabStops.count() > 0) // Append the tabstop information ++ const librevenge::RVNGPropertyListVector *tabStops = propList.child("style:tab-stops"); ++ ++ if (tabStops && tabStops->count()) // Append the tabstop information + { + propBuffer += "; tabstops:"; + tmpBuffer = ""; +- WPXPropertyListVector::Iter i(tabStops); +- for (i.rewind(); i.next();) +- { ++ librevenge::RVNGPropertyListVector::Iter i(*tabStops); ++ for (i.rewind(); i.next();) ++ { + propBuffer += tmpBuffer; + if (i()["style:position"]) + { +@@ -515,8 +617,8 @@ + propBuffer += "0"; + + tmpBuffer = ","; +- } +- } ++ } ++ } + + + +@@ -543,7 +645,7 @@ + } + } + +-void IE_Imp_WordPerfect::openSpan(const WPXPropertyList &propList) ++void IE_Imp_WordPerfect::openSpan(const librevenge::RVNGPropertyList &propList) + { + if (m_bHdrFtrOpenCount) return; // HACK + UT_DEBUGMSG(("AbiWordPerfect: Appending current text properties\n")); +@@ -614,13 +716,14 @@ + X_CheckDocumentError(appendFmt(propsArray)); + } + +-void IE_Imp_WordPerfect::openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns) ++void IE_Imp_WordPerfect::openSection(const librevenge::RVNGPropertyList &propList) + { + if (m_bHdrFtrOpenCount) return; // HACK + UT_DEBUGMSG(("AbiWordPerfect: openSection\n")); + + float marginLeft = 0.0f, marginRight = 0.0f; +- int columnsCount = ((columns.count() == 0) ? 1 : columns.count()); ++ const librevenge::RVNGPropertyListVector *columns = propList.child("style:columns"); ++ int columnsCount = ((!columns || !columns->count()) ? 1 : columns->count()); + + // TODO: support spaceAfter + if (propList["fo:start-indent"]) +@@ -647,7 +750,7 @@ + X_CheckDocumentError(appendSpan(&ucs,1)); + } + +-void IE_Imp_WordPerfect::insertText(const WPXString &text) ++void IE_Imp_WordPerfect::insertText(const librevenge::RVNGString &text) + { + if (m_bHdrFtrOpenCount) return; // HACK + if (text.len()) +@@ -658,6 +761,15 @@ + } + } + ++void IE_Imp_WordPerfect::insertSpace() ++{ ++ if (m_bHdrFtrOpenCount) return; // HACK ++ UT_DEBUGMSG(("AbiWordPerfect: insertSpace\n")); ++ ++ UT_UCS4Char ucs = UCS_SPACE; ++ X_CheckDocumentError(appendSpan(&ucs,1)); ++} ++ + void IE_Imp_WordPerfect::insertLineBreak() + { + if (m_bHdrFtrOpenCount) return; // HACK +@@ -668,12 +780,11 @@ + } + + +- +-void IE_Imp_WordPerfect::defineOrderedListLevel(const WPXPropertyList &propList) ++void IE_Imp_WordPerfect::openOrderedListLevel(const librevenge::RVNGPropertyList &propList) + { + if (m_bHdrFtrOpenCount) return; // HACK +- UT_DEBUGMSG(("AbiWordPerfect: defineOrderedListLevel\n")); +- ++ UT_DEBUGMSG(("AbiWordPerfect: openOrderedListLevel\n")); ++ + int listID = 0, startingNumber = 0, level = 1; + char listType = '1'; + UT_UTF8String textBeforeNumber, textAfterNumber; +@@ -680,12 +791,12 @@ + float listLeftOffset = 0.0f; + float listMinLabelWidth = 0.0f; + +- if (propList["libwpd:id"]) +- listID = propList["libwpd:id"]->getInt(); ++ if (propList["librevenge:id"]) ++ listID = propList["librevenge:id"]->getInt(); + if (propList["text:start-value"]) + startingNumber = propList["text:start-value"]->getInt(); +- if (propList["libwpd:level"]) +- level = propList["libwpd:level"]->getInt(); ++ if (propList["librevenge:level"]) ++ level = propList["librevenge:level"]->getInt(); + if (propList["style:num-prefix"]) + textBeforeNumber += propList["style:num-prefix"]->getStr().cstr(); + if (propList["style:num-suffix"]) +@@ -716,22 +827,38 @@ + m_pCurrentListDefinition->setListMinLabelWidth(level, listMinLabelWidth); + _updateDocumentOrderedListDefinition(m_pCurrentListDefinition, level, listType, textBeforeNumber, textAfterNumber, startingNumber); + } ++ ++ m_iCurrentListLevel++; + } + +-void IE_Imp_WordPerfect::defineUnorderedListLevel(const WPXPropertyList &propList) ++void IE_Imp_WordPerfect::closeOrderedListLevel() + { + if (m_bHdrFtrOpenCount) return; // HACK +- UT_DEBUGMSG(("AbiWordPerfect: defineUnorderedListLevel\n")); ++ UT_DEBUGMSG(("AbiWordPerfect: closeOrderedListLevel (level: %i)\n", m_iCurrentListLevel)); ++ UT_ASSERT(m_iCurrentListLevel > 0); ++ ++ // every time we close a list level, the level above it is normally renumbered to start at "1" ++ // again. this code takes care of that. ++ if (m_iCurrentListLevel < (WP6_NUM_LIST_LEVELS-1)) ++ m_pCurrentListDefinition->setLevelNumber(m_iCurrentListLevel + 1, 0); ++ ++ m_iCurrentListLevel--; ++} + ++void IE_Imp_WordPerfect::openUnorderedListLevel(const librevenge::RVNGPropertyList &propList) ++{ ++ if (m_bHdrFtrOpenCount) return; // HACK ++ UT_DEBUGMSG(("AbiWordPerfect: openUNorderedListLevel\n")); ++ + int listID = 0, level = 1; +- WPXString textBeforeNumber, textAfterNumber; ++ librevenge::RVNGString textBeforeNumber, textAfterNumber; + float listLeftOffset = 0.0f; + float listMinLabelWidth = 0.0f; + +- if (propList["libwpd:id"]) +- listID = propList["libwpd:id"]->getInt(); +- if (propList["libwpd:level"]) +- level = propList["libwpd:level"]->getInt(); ++ if (propList["librevenge:id"]) ++ listID = propList["librevenge:id"]->getInt(); ++ if (propList["librevenge:level"]) ++ level = propList["librevenge:level"]->getInt(); + if (propList["text:space-before"]) + listLeftOffset = propList["text:space-before"]->getDouble(); + if (propList["text:min-label-width"]) +@@ -752,39 +879,10 @@ + m_pCurrentListDefinition->setListMinLabelWidth(level, listMinLabelWidth); + _updateDocumentUnorderedListDefinition(m_pCurrentListDefinition, level); + } +-} + +-//void IE_Imp_WordPerfect::openOrderedListLevel(const int listID) +-void IE_Imp_WordPerfect::openOrderedListLevel(const WPXPropertyList & /*propList*/) +-{ +- if (m_bHdrFtrOpenCount) return; // HACK +- UT_DEBUGMSG(("AbiWordPerfect: openOrderedListLevel\n")); +- + m_iCurrentListLevel++; + } + +-void IE_Imp_WordPerfect::closeOrderedListLevel() +-{ +- if (m_bHdrFtrOpenCount) return; // HACK +- UT_DEBUGMSG(("AbiWordPerfect: closeOrderedListLevel (level: %i)\n", m_iCurrentListLevel)); +- UT_ASSERT(m_iCurrentListLevel > 0); +- +- // every time we close a list level, the level above it is normally renumbered to start at "1" +- // again. this code takes care of that. +- if (m_iCurrentListLevel < (WP6_NUM_LIST_LEVELS-1)) +- m_pCurrentListDefinition->setLevelNumber(m_iCurrentListLevel + 1, 0); +- +- m_iCurrentListLevel--; +-} +- +-void IE_Imp_WordPerfect::openUnorderedListLevel(const WPXPropertyList & /*propList*/) +-{ +- if (m_bHdrFtrOpenCount) return; // HACK +- UT_DEBUGMSG(("AbiWordPerfect: openUNorderedListLevel\n")); +- +- m_iCurrentListLevel++; +-} +- + void IE_Imp_WordPerfect::closeUnorderedListLevel() + { + if (m_bHdrFtrOpenCount) return; // HACK +@@ -796,7 +894,7 @@ + + // ASSUMPTION: We assume that unordered lists will always pass a number of "0". unpredictable behaviour + // may result otherwise +-void IE_Imp_WordPerfect::openListElement(const WPXPropertyList &propList, const WPXPropertyListVector & /*tabStops*/) ++void IE_Imp_WordPerfect::openListElement(const librevenge::RVNGPropertyList &propList) + { + if (m_bHdrFtrOpenCount) return; // HACK + UT_DEBUGMSG(("AbiWordPerfect: openListElement\n")); +@@ -885,7 +983,7 @@ + X_CheckDocumentError(appendSpan(&ucs,1)); + } + +-void IE_Imp_WordPerfect::openFootnote(const WPXPropertyList & /*propList*/) ++void IE_Imp_WordPerfect::openFootnote(const librevenge::RVNGPropertyList & /*propList*/) + { + if (m_bHdrFtrOpenCount) return; // HACK + +@@ -934,7 +1032,7 @@ + X_CheckDocumentError(appendStrux(PTX_EndFootnote,NULL)); + } + +-void IE_Imp_WordPerfect::openEndnote(const WPXPropertyList & /*propList*/) ++void IE_Imp_WordPerfect::openEndnote(const librevenge::RVNGPropertyList & /*propList*/) + { + if (m_bHdrFtrOpenCount) return; // HACK + const gchar** propsArray = NULL; +@@ -975,7 +1073,7 @@ + X_CheckDocumentError(appendStrux(PTX_EndEndnote,NULL)); + } + +-void IE_Imp_WordPerfect::openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns) ++void IE_Imp_WordPerfect::openTable(const librevenge::RVNGPropertyList &propList) + { + if (m_bHdrFtrOpenCount) return; // HACK + // TODO: handle 'marginLeftOffset' and 'marginRightOffset' +@@ -1000,14 +1098,18 @@ + } + } + +- propBuffer += "table-column-props:"; +- WPXPropertyListVector::Iter i(columns); +- for (i.rewind(); i.next();) ++ const librevenge::RVNGPropertyListVector *columns = propList.child("librevenge:table-columns"); ++ if (columns) + { +- UT_String tmpBuffer; +- if (i()["style:column-width"]) +- UT_String_sprintf(tmpBuffer, "%s/", i()["style:column-width"]->getStr().cstr()); +- propBuffer += tmpBuffer; ++ propBuffer += "table-column-props:"; ++ librevenge::RVNGPropertyListVector::Iter i(*columns); ++ for (i.rewind(); i.next();) ++ { ++ UT_String tmpBuffer; ++ if (i()["style:column-width"]) ++ UT_String_sprintf(tmpBuffer, "%s/", i()["style:column-width"]->getStr().cstr()); ++ propBuffer += tmpBuffer; ++ } + } + + const gchar* propsArray[3]; +@@ -1018,7 +1120,7 @@ + X_CheckDocumentError(appendStrux(PTX_SectionTable, propsArray)); + } + +-void IE_Imp_WordPerfect::openTableRow(const WPXPropertyList & /*propList*/) ++void IE_Imp_WordPerfect::openTableRow(const librevenge::RVNGPropertyList & /*propList*/) + { + if (m_bHdrFtrOpenCount) return; // HACK + UT_DEBUGMSG(("AbiWordPerfect: openRow\n")); +@@ -1030,14 +1132,14 @@ + m_bInCell = false; + } + +-void IE_Imp_WordPerfect::openTableCell(const WPXPropertyList &propList) ++void IE_Imp_WordPerfect::openTableCell(const librevenge::RVNGPropertyList &propList) + { + if (m_bHdrFtrOpenCount) return; // HACK + int col =0, row = 0, colSpan = 0, rowSpan = 0; +- if (propList["libwpd:column"]) +- col = propList["libwpd:column"]->getInt(); +- if (propList["libwpd:row"]) +- row = propList["libwpd:row"]->getInt(); ++ if (propList["librevenge:column"]) ++ col = propList["librevenge:column"]->getInt(); ++ if (propList["librevenge:row"]) ++ row = propList["librevenge:row"]->getInt(); + if (propList["table:number-columns-spanned"]) + colSpan = propList["table:number-columns-spanned"]->getInt(); + if (propList["table:number-rows-spanned"]) +@@ -1247,9 +1349,9 @@ + virtual UT_Error _loadFile(GsfInput * input) + { + AbiWordperfectInputStream gsfInput(input); +- WPSResult error = WPSDocument::parse(&gsfInput, static_cast(this)); ++ libwps::WPSResult error = libwps::WPSDocument::parse(&gsfInput, static_cast(this)); + +- if (error != WPS_OK) ++ if (error != libwps::WPS_OK) + { + UT_DEBUGMSG(("AbiMSWorks: ERROR: %i!\n", (int)error)); + return UT_IE_IMPORTERROR; +@@ -1286,13 +1388,17 @@ + { + AbiWordperfectInputStream gsfInput(input); + +- WPSConfidence confidence = WPSDocument::isFileFormatSupported(&gsfInput); ++ libwps::WPSKind kind; ++ libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&gsfInput, kind); ++ ++ if (kind != libwps::WPS_TEXT) ++ confidence = libwps::WPS_CONFIDENCE_NONE; + + switch (confidence) + { +- case WPS_CONFIDENCE_NONE: ++ case libwps::WPS_CONFIDENCE_NONE: + return UT_CONFIDENCE_ZILCH; +- case WPS_CONFIDENCE_EXCELLENT: ++ case libwps::WPS_CONFIDENCE_EXCELLENT: + return UT_CONFIDENCE_PERFECT; + default: + return UT_CONFIDENCE_ZILCH; +Index: plugins/wordperfect/xp/Makefile.am +=================================================================== +--- plugins/wordperfect/xp/Makefile.am (revision 34460) ++++ plugins/wordperfect/xp/Makefile.am (revision 34468) +@@ -6,8 +6,6 @@ + -DABI_BUILD_VERSION=\"$(VERSION)\" + + libxp_la_SOURCES = \ +- ie_exp_WordPerfect.cpp \ +- ie_exp_WordPerfect.h \ + ie_impexp_WordPerfect.cpp \ + ie_impexp_WordPerfect.h \ + ie_imp_WordPerfect.cpp \ +Index: plugins/wordperfect/xp/ie_impexp_WordPerfect.h +=================================================================== +--- plugins/wordperfect/xp/ie_impexp_WordPerfect.h (revision 34460) ++++ plugins/wordperfect/xp/ie_impexp_WordPerfect.h (revision 34468) +@@ -24,7 +24,6 @@ + */ + + #include "ie_imp_WordPerfect.h" +-#include "ie_exp_WordPerfect.h" + #include "xap_Module.h" + + #define IE_MIMETYPE_WP_51 "application/wordperfect5.1" +Index: plugins/wordperfect/xp/ie_imp_WordPerfect.h +=================================================================== +--- plugins/wordperfect/xp/ie_imp_WordPerfect.h (revision 34460) ++++ plugins/wordperfect/xp/ie_imp_WordPerfect.h (revision 34468) +@@ -30,7 +30,7 @@ + #define IE_IMP_WP_H + + #include +-#include ++#include + #include "ie_imp.h" + #include "ut_string.h" + #include "ut_string_class.h" +@@ -92,7 +92,7 @@ + IE_Imp ** ppie); + }; + +-class IE_Imp_WordPerfect : public IE_Imp, public WPXDocumentInterface ++class IE_Imp_WordPerfect : public IE_Imp, public librevenge::RVNGTextInterface + { + public: + IE_Imp_WordPerfect(PD_Document * pDocument); +@@ -101,69 +101,83 @@ + virtual void pasteFromBuffer(PD_DocumentRange * pDocRange, + UT_uint8 * pData, UT_uint32 lenData, const char * szEncoding = 0); + +- virtual void setDocumentMetaData(const WPXPropertyList &propList); ++ virtual void setDocumentMetaData(const librevenge::RVNGPropertyList &propList); + +- virtual void startDocument(); +- virtual void endDocument(); ++ virtual void startDocument(const librevenge::RVNGPropertyList &propList); ++ virtual void endDocument(); + +- virtual void openPageSpan(const WPXPropertyList &propList); +- virtual void closePageSpan() {} +- virtual void openHeader(const WPXPropertyList &propList); +- virtual void closeHeader(); +- virtual void openFooter(const WPXPropertyList &propList); +- virtual void closeFooter(); ++ virtual void defineEmbeddedFont(const librevenge::RVNGPropertyList & /* propList */) {} + +- virtual void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); +- virtual void closeParagraph() {} ++ virtual void definePageStyle(const librevenge::RVNGPropertyList &) {} ++ virtual void openPageSpan(const librevenge::RVNGPropertyList &propList); ++ virtual void closePageSpan() {} ++ virtual void openHeader(const librevenge::RVNGPropertyList &propList); ++ virtual void closeHeader(); ++ virtual void openFooter(const librevenge::RVNGPropertyList &propList); ++ virtual void closeFooter(); + +- virtual void openSpan(const WPXPropertyList &propList); +- virtual void closeSpan() {} ++ virtual void defineSectionStyle(const librevenge::RVNGPropertyList &) {} ++ virtual void openSection(const librevenge::RVNGPropertyList &propList); ++ virtual void closeSection() {} + +- virtual void openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns); +- virtual void closeSection() {} ++ virtual void defineParagraphStyle(const librevenge::RVNGPropertyList &) {} ++ virtual void openParagraph(const librevenge::RVNGPropertyList &propList); ++ virtual void closeParagraph() {} + +- virtual void insertTab(); +- virtual void insertText(const WPXString &text); +- virtual void insertLineBreak(); ++ virtual void defineCharacterStyle(const librevenge::RVNGPropertyList &) {} ++ virtual void openSpan(const librevenge::RVNGPropertyList &propList); ++ virtual void closeSpan() {} + +- virtual void defineOrderedListLevel(const WPXPropertyList &propList); +- virtual void defineUnorderedListLevel(const WPXPropertyList &propList); +- virtual void openOrderedListLevel(const WPXPropertyList &propList); +- virtual void openUnorderedListLevel(const WPXPropertyList &propList); +- virtual void closeOrderedListLevel(); +- virtual void closeUnorderedListLevel(); +- virtual void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); +- virtual void closeListElement() {} ++ virtual void openLink(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void closeLink() {} + +- virtual void openFootnote(const WPXPropertyList &propList); +- virtual void closeFootnote(); +- virtual void openEndnote(const WPXPropertyList &propList); +- virtual void closeEndnote(); ++ virtual void insertTab(); ++ virtual void insertText(const librevenge::RVNGString &text); ++ virtual void insertSpace(); ++ virtual void insertLineBreak(); ++ virtual void insertField(const librevenge::RVNGPropertyList & /* propList */) {} + +- virtual void openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns); +- virtual void openTableRow(const WPXPropertyList &propList); +- virtual void closeTableRow() {} +- virtual void openTableCell(const WPXPropertyList &propList); +- virtual void closeTableCell() {} +- virtual void insertCoveredTableCell(const WPXPropertyList & /*propList*/) {} +- virtual void closeTable(); ++ virtual void openOrderedListLevel(const librevenge::RVNGPropertyList &propList); ++ virtual void openUnorderedListLevel(const librevenge::RVNGPropertyList &propList); ++ virtual void closeOrderedListLevel(); ++ virtual void closeUnorderedListLevel(); ++ virtual void openListElement(const librevenge::RVNGPropertyList &propList); ++ virtual void closeListElement() {} + +- virtual void definePageStyle(const WPXPropertyList&) {} +- virtual void defineParagraphStyle(const WPXPropertyList&, const WPXPropertyListVector&) {} +- virtual void defineCharacterStyle(const WPXPropertyList&) {} +- virtual void defineSectionStyle(const WPXPropertyList&, const WPXPropertyListVector&) {} +- virtual void insertSpace() {} +- virtual void insertField(const WPXString&, const WPXPropertyList&) {} +- virtual void openComment(const WPXPropertyList&) {} +- virtual void closeComment() {} +- virtual void openTextBox(const WPXPropertyList&) {} +- virtual void closeTextBox() {} +- virtual void openFrame(const WPXPropertyList&) {} +- virtual void closeFrame() {} +- virtual void insertBinaryObject(const WPXPropertyList&, const WPXBinaryData&) {} +- virtual void insertEquation(const WPXPropertyList&, const WPXString&) {} ++ virtual void openFootnote(const librevenge::RVNGPropertyList &propList); ++ virtual void closeFootnote(); ++ virtual void openEndnote(const librevenge::RVNGPropertyList &propList); ++ virtual void closeEndnote(); ++ virtual void openComment(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void closeComment() {} ++ virtual void openTextBox(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void closeTextBox() {} + ++ virtual void openTable(const librevenge::RVNGPropertyList &propList); ++ virtual void openTableRow(const librevenge::RVNGPropertyList &propList); ++ virtual void closeTableRow() {} ++ virtual void openTableCell(const librevenge::RVNGPropertyList &propList); ++ virtual void closeTableCell() {} ++ virtual void insertCoveredTableCell(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void closeTable(); + ++ virtual void openFrame(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void closeFrame() {} ++ ++ virtual void openGroup(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void closeGroup() {} ++ ++ virtual void defineGraphicStyle(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void drawRectangle(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void drawEllipse(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void drawPolygon(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void drawPolyline(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void drawPath(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void drawConnector(const librevenge::RVNGPropertyList & /* propList */) {} ++ ++ virtual void insertBinaryObject(const librevenge::RVNGPropertyList & /* propList */) {} ++ virtual void insertEquation(const librevenge::RVNGPropertyList & /* propList */) {} ++ + protected: + virtual UT_Error _loadFile(GsfInput * input); + UT_Error _appendSection(int numColumns, const float, const float); +Index: plugins/wordperfect/plugin.m4 +=================================================================== +--- plugins/wordperfect/plugin.m4 (revision 34460) ++++ plugins/wordperfect/plugin.m4 (revision 34468) +@@ -1,6 +1,6 @@ + +-wordperfect_pkgs="libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0 $gsf_req" +-wordperfect_wps_pkgs='libwps-0.2 >= 0.1.0' ++wordperfect_pkgs="libwpd-0.10 $gsf_req" ++wordperfect_wps_pkgs='libwps-0.3' + wordperfect_deps="no" + + WORDPERFECT_CFLAGS= +@@ -29,7 +29,7 @@ + + PKG_CHECK_EXISTS([ $wordperfect_wps_pkgs ], + [ +- wp_deps_pkgs="$wp_deps_pkgs $wordperfect_wps_pkgs" ++ wp_deps_pkgs="$wordperfect_wps_pkgs $wp_deps_pkgs" + WPS_DEFINE=" -DHAVE_LIBWPS" + ]) + +Index: plugins/wpg/xp/ie_impGraphic_WPG.cpp +=================================================================== +--- plugins/wpg/xp/ie_impGraphic_WPG.cpp (revision 34460) ++++ plugins/wpg/xp/ie_impGraphic_WPG.cpp (revision 34468) +@@ -31,7 +31,8 @@ + #include + #include + #include +-#include ++#include ++#include + #include "xap_Module.h" + + using libwpg::WPGraphics; +@@ -38,30 +39,35 @@ + + ABI_PLUGIN_DECLARE("WPG") + +-class AbiWordPerfectGraphicsInputStream : public WPXInputStream ++class AbiWordPerfectGraphicsInputStream : public librevenge::RVNGInputStream + { + public: + AbiWordPerfectGraphicsInputStream(GsfInput *input); + ~AbiWordPerfectGraphicsInputStream(); + +- virtual bool isOLEStream(); +- virtual WPXInputStream * getDocumentOLEStream(); +- virtual WPXInputStream * getDocumentOLEStream(const char * name); ++ virtual bool isStructured(); ++ virtual unsigned subStreamCount(); ++ virtual const char* subStreamName(unsigned); ++ bool existsSubStream(const char*); ++ virtual librevenge::RVNGInputStream* getSubStreamByName(const char*); ++ virtual librevenge::RVNGInputStream* getSubStreamById(unsigned); + virtual const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); +- virtual int seek(long offset, WPX_SEEK_TYPE seekType); ++ virtual int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType); + virtual long tell(); +- virtual bool atEOS(); ++ virtual bool isEnd(); + + private: + + GsfInput *m_input; + GsfInfile *m_ole; ++ std::map m_substreams; + }; + + AbiWordPerfectGraphicsInputStream::AbiWordPerfectGraphicsInputStream(GsfInput *input) : +- WPXInputStream(), ++ librevenge::RVNGInputStream(), + m_input(input), +- m_ole(NULL) ++ m_ole(NULL), ++ m_substreams() + { + g_object_ref(G_OBJECT(input)); + } +@@ -86,50 +92,120 @@ + return buf; + } + +-int AbiWordPerfectGraphicsInputStream::seek(long offset, WPX_SEEK_TYPE seekType) ++int AbiWordPerfectGraphicsInputStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) + { + GSeekType gsfSeekType = G_SEEK_SET; + switch(seekType) + { +- case WPX_SEEK_CUR: ++ case librevenge::RVNG_SEEK_CUR: + gsfSeekType = G_SEEK_CUR; + break; +- case WPX_SEEK_SET: ++ case librevenge::RVNG_SEEK_SET: + gsfSeekType = G_SEEK_SET; + break; ++ case librevenge::RVNG_SEEK_END: ++ gsfSeekType = G_SEEK_END; ++ break; + } + + return gsf_input_seek(m_input, offset, gsfSeekType); + } + +-bool AbiWordPerfectGraphicsInputStream::isOLEStream() ++bool AbiWordPerfectGraphicsInputStream::isStructured() + { + if (!m_ole) + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); + +- if (m_ole != NULL) ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ ++ if (m_ole) + return true; + + return false; + } + +-WPXInputStream * AbiWordPerfectGraphicsInputStream::getDocumentOLEStream() ++unsigned AbiWordPerfectGraphicsInputStream::subStreamCount() + { +- return getDocumentOLEStream("PerfectOffice_MAIN"); ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); ++ ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ ++ if (m_ole) ++ { ++ int numChildren = gsf_infile_num_children(m_ole); ++ if (numChildren > 0) ++ return numChildren; ++ return 0; ++ } ++ ++ return 0; + } + +-WPXInputStream * AbiWordPerfectGraphicsInputStream::getDocumentOLEStream(const char * name) ++const char * AbiWordPerfectGraphicsInputStream::subStreamName(unsigned id) + { +- WPXInputStream *documentStream = NULL; ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); + + if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ ++ if (m_ole) ++ { ++ if ((int)id >= gsf_infile_num_children(m_ole)) ++ { ++ return 0; ++ } ++ std::map::iterator i = m_substreams.lower_bound(id); ++ if (i == m_substreams.end() || m_substreams.key_comp()(id, i->first)) ++ { ++ std::string name = gsf_infile_name_by_index(m_ole, (int)id); ++ i = m_substreams.insert(i, std::map::value_type(id, name)); ++ } ++ return i->second.c_str(); ++ } ++ ++ return 0; ++} ++ ++bool AbiWordPerfectGraphicsInputStream::existsSubStream(const char * name) ++{ ++ if (!m_ole) + m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); + ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ + if (m_ole) + { + GsfInput *document = gsf_infile_child_by_name(m_ole, name); + if (document) + { ++ g_object_unref(G_OBJECT (document)); ++ return true; ++ } ++ } ++ ++ return false; ++} ++ ++librevenge::RVNGInputStream * AbiWordPerfectGraphicsInputStream::getSubStreamByName(const char * name) ++{ ++ librevenge::RVNGInputStream *documentStream = NULL; ++ ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); ++ ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ ++ if (m_ole) ++ { ++ GsfInput *document = gsf_infile_child_by_name(m_ole, name); ++ if (document) ++ { + documentStream = new AbiWordPerfectGraphicsInputStream(document); + g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream + } +@@ -138,12 +214,35 @@ + return documentStream; + } + ++librevenge::RVNGInputStream * AbiWordPerfectGraphicsInputStream::getSubStreamById(unsigned id) ++{ ++ librevenge::RVNGInputStream *documentStream = NULL; ++ ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_msole_new (m_input, NULL)); ++ ++ if (!m_ole) ++ m_ole = GSF_INFILE(gsf_infile_zip_new (m_input, NULL)); ++ ++ if (m_ole) ++ { ++ GsfInput *document = gsf_infile_child_by_index(m_ole, (int)id); ++ if (document) ++ { ++ documentStream = new AbiWordPerfectGraphicsInputStream(document); ++ g_object_unref(G_OBJECT (document)); // the only reference should be encapsulated within the new stream ++ } ++ } ++ ++ return documentStream; ++} ++ + long AbiWordPerfectGraphicsInputStream::tell() + { + return gsf_input_tell(m_input); + } + +-bool AbiWordPerfectGraphicsInputStream::atEOS() ++bool AbiWordPerfectGraphicsInputStream::isEnd() + { + return gsf_input_eof(m_input); + } +@@ -244,14 +343,24 @@ + UT_Error IE_Imp_WordPerfectGraphics::importGraphic(GsfInput *input, FG_Graphic **ppfg) + { + AbiWordPerfectGraphicsInputStream gsfInput(input); +- WPXString svgOutput; +- if (WPGraphics::generateSVG(&gsfInput, svgOutput)) ++ librevenge::RVNGString svgOutput; ++ librevenge::RVNGStringVector vec; ++ librevenge::RVNGSVGDrawingGenerator generator(vec, ""); ++ ++ if (!libwpg::WPGraphics::parse(&gsfInput, &generator) || vec.empty() || vec[0].empty()) + { +- GsfInput * svgInput = gsf_input_memory_new((const guint8*)svgOutput.cstr(), svgOutput.len(), false); +- UT_Error result = IE_ImpGraphic::loadGraphic(svgInput, IE_ImpGraphic::fileTypeForSuffix(".svg"), ppfg); +- g_object_unref(svgInput); +- return result; ++ return UT_ERROR; + } +- return UT_ERROR; ++ ++ svgOutput.append("\n"); ++ svgOutput.append("\n"); ++ svgOutput.append(vec[0]); ++ svgOutput.append("\n"); ++ ++ GsfInput * svgInput = gsf_input_memory_new((const guint8*)svgOutput.cstr(), svgOutput.len(), false); ++ UT_Error result = IE_ImpGraphic::loadGraphic(svgInput, IE_ImpGraphic::fileTypeForSuffix(".svg"), ppfg); ++ g_object_unref(svgInput); ++ return result; + } + +Index: plugins/wpg/plugin.m4 +=================================================================== +--- plugins/wpg/plugin.m4 (revision 34460) ++++ plugins/wpg/plugin.m4 (revision 34468) +@@ -1,5 +1,5 @@ + +-wpg_pkgs="$gsf_req libwpg-0.2 >= 0.2.0 libwpd-0.9 >= 0.9.0 libwpd-stream-0.9 >= 0.9.0" ++wpg_pkgs="libwpg-0.3 $gsf_req" + wpg_deps="no" + + if test "$enable_wpg" != ""; then diff --git a/abiword-libwps-0.4.patch b/abiword-libwps-0.4.patch new file mode 100644 index 0000000..616bfd4 --- /dev/null +++ b/abiword-libwps-0.4.patch @@ -0,0 +1,41 @@ +From 6fcb43935bab90d61858eb1bc0f150c843586c54 Mon Sep 17 00:00:00 2001 +From: David Tardon +Date: Sat, 6 Jun 2015 21:48:02 +0200 +Subject: [PATCH] adapt to libwps 0.4 + +--- + plugins/wordperfect/plugin.m4 | 2 +- + plugins/wordperfect/xp/ie_imp_WordPerfect.cpp | 4 +++- + 3 files changed, 5 insertions(+), 3 deletions(-) + +diff --git a/plugins/wordperfect/plugin.m4 b/plugins/wordperfect/plugin.m4 +index 0aadbaf..bc32d48 100644 +--- plugins/wordperfect/plugin.m4 ++++ plugins/wordperfect/plugin.m4 +@@ -1,6 +1,6 @@ + + wordperfect_pkgs="libwpd-0.10 $gsf_req" +-wordperfect_wps_pkgs='libwps-0.3' ++wordperfect_wps_pkgs='libwps-0.4' + wordperfect_deps="no" + + WORDPERFECT_CFLAGS= +diff --git a/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp b/plugins/wordperfect/xp/ie_imp_WordPerfect.cpp +index bd19971..3e69f79 100644 +--- plugins/wordperfect/xp/ie_imp_WordPerfect.cpp ++++ plugins/wordperfect/xp/ie_imp_WordPerfect.cpp +@@ -1389,7 +1389,9 @@ UT_Confidence_t IE_Imp_MSWorks_Sniffer::recognizeContents (GsfInput * input) + AbiWordperfectInputStream gsfInput(input); + + libwps::WPSKind kind; +- libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&gsfInput, kind); ++ libwps::WPSCreator creator; ++ bool needsEncoding = false; ++ libwps::WPSConfidence confidence = libwps::WPSDocument::isFileFormatSupported(&gsfInput, kind, creator, needsEncoding); + + if (kind != libwps::WPS_TEXT) + confidence = libwps::WPS_CONFIDENCE_NONE; +-- +2.4.2 + + diff --git a/abiword.appdata.xml b/abiword.appdata.xml new file mode 100644 index 0000000..e0ee24f --- /dev/null +++ b/abiword.appdata.xml @@ -0,0 +1,34 @@ + + + + + + + abiword.desktop + CC0-1.0 + +

+ AbiWord is a free word processing program similar to Microsoft® Word. + It is suitable for a wide variety of word processing tasks. +

+

+ AbiWord allows you to collaborate with multiple people on one document at the + same time. + It is tightly integrated with the AbiCollab.net web service, which lets you + store documents online, allows easy document sharing with your friends, and + performs format conversions on the fly. +

+ +
+ http://www.abisource.com/ + + + http://www.abisource.com/screenshots/AbiWord-2.0-Gnome.png + + +
diff --git a/abiword.changes b/abiword.changes new file mode 100644 index 0000000..65a3840 --- /dev/null +++ b/abiword.changes @@ -0,0 +1,845 @@ +------------------------------------------------------------------- +Wed Mar 21 20:28:12 UTC 2018 - dimstar@opensuse.org + +- Drop --with-pic configure parameter: since we disable static + libs, it has no effect. + +------------------------------------------------------------------- +Sun Mar 18 09:37:21 UTC 2018 - bjorn.lie@gmail.com + +- Add missing pkgconfig(libjpeg) BuildRequires: Previously pulled + in by libwmf. +- Stop handling desktop_database_post(un) in post(un), no longer + needed since file-triggers takes care of this now. +- Drop update-desktop-files BuildRequires and stop passing + suse_update_desktop_file macro. +- Run spec-cleaner, modernize spec. + +------------------------------------------------------------------- +Mon May 1 14:59:15 UTC 2017 - dufresnep@gmail.com + +- Add abiword-fix-black-overlay.patch: Remove the black covering + full window and make all unreadable, patch from upstream. + +------------------------------------------------------------------- +Tue Jan 17 16:03:35 UTC 2017 - adam.majer@suse.de + +- Add boost_asio.patch: Add support for boost::asio. +- Drop asio-devel BuildRequires, merged into boost 1.62. +- Replace boost-devel with libboost_headers-devel BuildRequires. +- Drop obsolete conditional for post(un) handling. + +------------------------------------------------------------------- +Wed Jan 4 17:31:06 UTC 2017 - zaitor@opensuse.org + +- Update to version 3.0.2: + + See http://www.abisource.com/release-notes/3.0.2.phtml for an + overview of all bugs fixed in this release. +- Drop abiword-3.0.0-linkgrammar.patch and + abiword-3.0.1-gcc6.patch: Fixed upstream. + +------------------------------------------------------------------- +Fri Jun 17 13:08:40 UTC 2016 - normand@linux.vnet.ibm.com + +- Add abiword-3.0.1-gcc6.patch: Fix build with gcc6 (boo#985070). + +------------------------------------------------------------------- +Mon May 9 13:35:56 UTC 2016 - dimstar@opensuse.org + +- Re-add abiword-librevenge.patch that was wrongly dropped when + upgrading to Abiword 3.0.1. +- Add libtool BuildRequires and an injected copy of abiword's + autogen.sh, as above patch touches the build system. +- Add abiword-libwps-0.4.patch: Port to libwps 0.4. +- Change pkgconfig(libwps-0.3) BuildRequires to + pkgconfig(libwps-0.4) in order to enable Microsoft Works Document + support again. +- Drop explicit libabiword-3_0 and link-grammar Requires: they are + auto-detected. + +------------------------------------------------------------------- +Wed Feb 25 14:40:40 UTC 2015 - dimstar@opensuse.org + +- Drop loudmouth-devel BuildRequires: loudmouth is dead upstream + and not worth to be maintained. + +------------------------------------------------------------------- +Wed Jan 28 13:55:08 UTC 2015 - dimstar@opensuse.org + +- Update to version 3.0.1: + + See http://www.abiword.org/release-notes/3.0.1.phtml for an + overview of all bugs fixed in this release. +- Drop upstream fixed patches: abiword-3.0.0-html_segfault.patch, + abiword-boost.patch, abiword-gcrypt-1.6.0.patch and + abiword-librevenge.patch. +- Drop libtool, autogen and automake BuildRequires: we don't touch + the buildsystem anymore. +- Drop the in-file copy of upstream's autogen.sh: as we don't have + to bootstrap, there is no need to preserve this code piece. If + we ever need it again, we better sync up with upstreams changes + at that moment again. + +------------------------------------------------------------------- +Mon Oct 6 19:47:40 UTC 2014 - dimstar@opensuse.org + +- Add abiword.appdata.xml to the package. + +------------------------------------------------------------------- +Wed Jul 23 20:47:25 UTC 2014 - dimstar@opensuse.org + +- Update old-style -devel BuildRequires with pkgconfig()-style, + matching what configure checks for: + + Old: libgsf-devel, fribidi-devel, wv-devel, libxslt-devel, + enchant-devel, gtk3-devel. + + New pkgconfig(): libgsf-1, fribidi,, wv-1.0, libxslt, enchant, + gtk+-3.0, cairo. + +------------------------------------------------------------------- +Tue Jul 22 13:55:02 UTC 2014 - fstrba@suse.com + +- Add abiword-3.0.0-html_segfault.patch: + + upstream patch to fix segfault in the html conversion. + + this will fix build of abiword-docs on some platforms. + +------------------------------------------------------------------- +Tue Jul 22 09:59:47 UTC 2014 - fstrba@suse.com + +- Add abiword-3.0.0-linkgrammar.patch: + + upstream patch to fix building with newer versions of + linkgrammar. + +------------------------------------------------------------------- +Wed May 28 09:42:33 UTC 2014 - fstrba@suse.com + +- Add abiword-librevenge.patch: + + upstream patch to build against libwpd 0.10.x, libwpg 0.3.x + and libwps 0.3.x that have different ABI from their + predecessors. +- Add pkgconfig(librevenge-0.0) BuildRequires: the new base + framework library for the 3 above-mentioned libraries +- Replace old-style -devel BuildRequires with pkgconfig() style: + + old: libpwd-devel, libwpg-devel, libwps-devel. + + new: pkgconfig(libwpd-0.10,libwpg-0.3,libwps-0.3). +- As above patches touch the build system: + - Add libtool, autoconf and automake BuildRequires. + - Add copy of autogen-common.sh to correctly bootstrap the + sources. + +------------------------------------------------------------------- +Thu May 1 15:28:48 UTC 2014 - dimstar@opensuse.org + +- Add abiword-boost.patch: Fix build with boost: missing includes. + +------------------------------------------------------------------- +Sun Jan 19 08:59:50 UTC 2014 - zaitor@opensuse.org + +- Drop psiconv-devel BuildRequires, as I doubt there are any users + left of this. + +------------------------------------------------------------------- +Sun Jan 5 20:59:40 UTC 2014 - dimstar@opensuse.org + +- Add abiword-gcrypt-1.6.0.patch: Fix build with gcrypt 1.6.0. + +------------------------------------------------------------------- +Thu Oct 24 11:12:35 UTC 2013 - cornelis@solcon.nl + +- Update to final release 3.0.0: + + Besides porting to GTK+ 3.x, the AbiWord 3.0 release has a heck + of a lot of bug-fixes, much-improved internationalization, RDF + drag-and-drop, double-buffering of drawings to reduce screen + flickering, and numerous other changes throughout the entire + code-base. + +------------------------------------------------------------------- +Sat Sep 21 14:25:55 UTC 2013 - dimstar@opensuse.org + +- Change RPM Group of shared library package to System/Libraries. + +------------------------------------------------------------------- +Wed Aug 14 12:41:18 UTC 2013 - cornelis@solcon.nl + +- Update to svn. + +------------------------------------------------------------------- +Fri Jun 14 20:39:07 UTC 2013 - cornelis@solcon.nl + +- gtk2 is not supported, so back to gtk3, now done everywhere in + spec file: + + Replace gtk2-devel BuildRequires with gtk3-devel. + +------------------------------------------------------------------- +Fri Jun 14 19:38:21 UTC 2013 - cornelis@solcon.nl + +- Use gtk2 again: + + Replace gtk3-devel BuildRequires with gtk2-devel. + +------------------------------------------------------------------- +Sun Jun 2 07:25:53 UTC 2013 - cornelis@solcon.nl + +- Update to svn 3_0_0 branch + + Switch to GTK3. +- Replace gtk2-devel BuildRequires with gtk3-devel. +- Add libxslt-devel BuildRequires: new dependency. +- Replace pkgconfig(libgoffice-0.8) BuildRequires with + pkgconfig(libgoffice-0.10). +- Rename libabiword-2_8 subpackage to libabiword-3_0 and + libabiword-2_8-devel to libabiword-3_0-devel +- Remove all patches (are upstream now): + + abiword-gcc46.patch + + abiword-glib-2.31.patch + + abiword-libpng15.patch + +------------------------------------------------------------------- +Wed Oct 3 19:04:19 UTC 2012 - pgajdos@suse.com + +- build also with libpng15 + * libpng15.patch + +------------------------------------------------------------------- +Thu Jan 19 07:23:31 UTC 2012 - vuntz@opensuse.org + +- Change goffice-devel BuildRequires to pkgconfig(libgoffice-0.8) + to prepare for goffice bump to 0.9 and new goffice-0_8 source + package. + +------------------------------------------------------------------- +Mon Jan 9 13:02:49 UTC 2012 - vuntz@opensuse.org + +- Add libgcrypt-devel BuildRequires: gcrypt.h is being included in + some code, even if configure doesn't look for libgcrypt yet. Not + that in the current development releases, libgcrypt is being + explicitly checked for in configure, so this is a change we'd + have to do in the future anyway. + +------------------------------------------------------------------- +Mon Nov 28 22:03:52 UTC 2011 - dimstar@opensuse.org + +- Add abiword-glib-2.31.patch: Fix build with glib 2.31. + +------------------------------------------------------------------- +Sat Sep 17 10:42:11 UTC 2011 - jengelh@medozas.de + +- Remove redundant tags/sections from specfile +- Use %_smp_mflags for parallel build + +------------------------------------------------------------------- +Mon May 16 09:49:58 UTC 2011 - dimstar@opensuse.org + +- Add abiword-gcc46.patch: Fix build with gcc 4.6. + +------------------------------------------------------------------- +Sat Feb 12 16:46:19 CET 2011 - vuntz@opensuse.org + +- Call relevant macros in %post/%postun: + + %desktop_database_post/postun because the package ships at + least one desktop file. +- Improve descriptions by removing outdated references. + +------------------------------------------------------------------- +Tue Jul 27 22:32:10 UTC 2010 - andrea@opensuse.org + +- Update to version 2.8.6: + + Preserve character properties when typing. +- Changes from version 2.8.5: + + Fix paste of rich text from HTML and ODT, where previously some + formatting properties were not closed properly + + Add a number of robustness fixes to the layout engine + + Fix a table selection bug + + OpenDocument Import/Export: + - Significant OpenDocument filter improvements + + Collaboration Plugin: + - Fix a potential crash when more than 2 people are + collaborating on a document and one of the collaborators + disconnects + - Don't include document names that a buddy does not have + access to in the list of available shared documents that is + sent to him + - Fix some small memory leaks in the *.abicollab importer + - Honor SRV DNS records when collaborating over XMPP + + MS Write Plugin: + - Improved MS Write filter support +- Changes from version 2.8.4: + + Fix a bug where deleting a character in non-Western scripts + caused a random number of characters to be deleted. + + Fix cursor movement for complex scripts, as text cluster + boundaries are now honored. + + Fix the text rendering of complex scripts when text is selected + + Fix text rendering errors when font substitution was involved + + GNOME Office Plugin: + - Use double click to select a component type and close the + dialog +- Changes from version 2.8.3: + + Fix random crashes mostly observed on Linux/Unix platforms + coupled with PulseAudio (it's not Pulse's fault!) + + Abiword Format Import/Export: + - Meta data is escaped twice in the AbiWord exporter + + OpenDocument Import/Export: + - Fix crash in OpenDocument importer + - Add tabstop/tableader/tab default interval support to the + OpenDocument import/export filters + - Support opening password protected OpenDocument files + - Add application/vnd.oasis.opendocument.text-web as a + supported mimetype in the ODF importer. Also add + application/vnd.oasis.opendocument.text-{template,web} to + abiword.desktop. + - Add AbiWord's version and platform in the meta:generator + field. + +------------------------------------------------------------------- +Sat Feb 13 13:47:56 CET 2010 - vuntz@opensuse.org + +- Update to version 2.8.2: + + See http://abisource.com/changelogs/2.8.2.phtml for the full + list of changes. + + Fix German smart-quote support + + Fix landscape printing on GTK+ platforms + + Improved OpenDocument compatibility + + Add an abiword(1) manpage +- Remove gnome-vfs2-devel BuildRequires and Requires in devel + package: it's only needed if gio is not there. +- Remove gucharmap-devel BuildRequires and Requires in devel + package: the support has been removed because of unstable API. +- Add goffice-devel to Requires of devel package since it's now + successfully used in the build. + +------------------------------------------------------------------- +Sat Dec 5 16:00:40 CET 2009 - vuntz@opensuse.org + +- Update to version 2.8.1: + + See http://abisource.com/release-notes/2.8.0.phtml for the list + of major changes in the 2.8 series. + + Improved Collaboration support, with abicollab.net + + Annotation / Comment support + + Proper Smart Quote support + + Multi-Page View + + True Scalable Vector Graphics (SVG) support + + Improved OpenDocument Format (.odt) support + + Improved Office Open XML (.docx) support + + New printing framework +- Add gnome-vfs2-devel, goffice-devel, gtk2-devel, gucharmap-devel, + libsoup-devel, libwmf-devel, libwpg-devel, libwps-devel + BuildRequires. +- Add cairo-devel, gucharmap-devel, librsvg-devel to Requires of + devel package. +- Remove gtkmathview-devel, libglade2-devel, libgnomeprintui-devel, + nautilus-devel BuildRequires +- Remove fontconfig-devel, freetype2-devel, libglade2-devel, + libgnomeprint-devel, libgnomeprintui-devel, libgnomeui-devel, + libpng-devel, xorg-x11-devel Requires of devel + package. +- Drop abiword-plugins-glibc-const.patch: fixed upstream. +- Drop abiword-plugins-ncurses.patch: not needed anymore. +- Remove py_requires macro, there's no python here. +- Remove --enable-libabiword from configure, and instead pass + --enable-dynamic to configure, as recommended for pyabiword. +- Pass --enable-plugins, --enable-clipart, --enable-templates to + configure. +- Pass --enable-emacs-keybinding and --enable-vi-keybinding to + configure. +- Fix self-obsoletion of libabiword-devel. +- Use fdupes. +- The abiword-extras and abiword-plugins tarballs have been merged + with the main abiword package, and the abiword-doc tarball will + move to another package, so adapt the build for this. + +------------------------------------------------------------------- +Wed Jun 10 21:25:23 CEST 2009 - vuntz@novell.com + +- Add abiword-plugins-glibc-const.patch to fix build failure with + latest glibc. + +------------------------------------------------------------------- +Fri May 22 19:51:25 CEST 2009 - vuntz@novell.com + +- Add bison, flex, gtkmathview-devel BuildRequires for the plugins. + +------------------------------------------------------------------- +Fri Apr 24 20:46:07 CEST 2009 - vuntz@novell.com + +- Completely reorganize the spec file to make it clearer what + applies to abiword, and what applies to abiword-plugins. + (Note: we can't split abiword and abiword-plugins in two source + packages since abiword-plugins needs to be built with abiword + source code) +- Also compile abiword-extras and abiword-docs in the package, + since it's useful stuff for the user. +- Add some BuildRequires: dbus-1-glib-devel, libglade2-devel +- Comment some BuildRequires that won't work for various reasons: + goffice-devel, gucharmap-devel, libgda-4_0-devel, + libgnomedb-devel +- Remove unneeded BuildRequires: aspell-devel, gnutls-devel, + libtiff-devel, libwnck-devel, mDNSResponder-devel +- Add some notes about missing BuildRequires for libraries that are + not in openSUSE. +- Add missing requires to the devel package: enchant-devel, + fontconfig-devel, fribidi-devel, gnome-vfs2-devel, libgsf-devel, + libpng-devel, wv-devel, xorg-x11-devel. +- Pass --with-abicollab-sugar-backend to the configure of + abiword-plugins to get the sugar backend of abicollab too. +- Do not add categories to the desktop files. +- Remove checks for old versions of openSUSE. +- Move the plugins and data files in the libabiword-2_6 package + instead of just the abiword package since other applications + using libabiword-2_6 need them. +- Add abiword-plugins-ncurses.patch to make the abicommand plugin + compile. + +------------------------------------------------------------------- +Sun Apr 12 00:50:23 CEST 2009 - mboman@suse.de + +- Update to version 2.6.8: + + See http://www.abisource.com/changelogs/2.6.8.phtml for what's + new in this version +- Remove abiword-fixes.patch. Fixed upstream +- Merge -devel into libabiword-2_6-devel +- Clean up requires for libabiword-2_6-devel +- Remove %if statements <= 10.2 +- Use CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing" + +------------------------------------------------------------------- +Tue Feb 24 04:32:34 CET 2009 - vuntz@novell.com + +- Remove eel-devel BuildRequires. + +------------------------------------------------------------------- +Sat Feb 7 23:48:17 EST 2009 - hfiguiere@suse.de + +- Added abiword-fixes.patch for some crasher fixes from upstream. + +------------------------------------------------------------------- +Sun Jan 25 02:34:54 CET 2009 - vuntz@novell.com + +- Don't use -n for %suse_update_desktop_file on abiword, to alllow + update of translations. Part of bnc#445728. + +------------------------------------------------------------------- +Sat Jan 10 14:30:40 EST 2009 - hfiguiere@suse.de + +- Update to version 2.6.6: + + Add further error-checking to the handling of dimension units + + Fix a bug that caused scrolling in the opposite direction when + scrolling quickly + + Fix a mismatched delete in the AbiWidget + + Show the right and left alignment toolbar buttons regardless of + locale + + Bug 11898: MS Office Open XML exporter conflicts with other exporters + + Bug 11852: ODT: Font family is not imported correctly + + Bug 11854: ODT: Single document files are not imported at all + + Bug 11896: ODT: Non-breaking spaces are not imported correctly + + Update the Slovak (sk-SK) translation + +------------------------------------------------------------------- +Mon Dec 29 12:11:28 EST 2008 - mboman@suse.de + +- Update to version 2.6.5: + + Added first iteraton of an Office Open XML filter + + Vastly improved LaTeX export filter + + Fixed a couple of annoying crashes in the GTK frontend + + Fixed a bug that prevented the correct shaping of glyphs + + Translation updates + +------------------------------------------------------------------- +Fri Aug 29 23:24:01 IST 2008 - cyberorg@opensuse.org + +- Enable libabiword required for OLPC's Write application + +------------------------------------------------------------------- +Fri Jul 18 16:23:51 CEST 2008 - jpr@suse.de + +- Update to 2.6.4 + * Fixed inconsistent text rendering and layout with different zoom + levels on Unix platforms. + * The usual set of OpenDocument filter updates, most notably the + added ability to import MathML formulas. + * Add the ability to export specific pages and page ranges on the + command line using the PostScript and PDF exporters on Linux. +- Drop abiword-no-return.diff, it was upstreamed + +------------------------------------------------------------------- +Wed May 7 17:25:47 CEST 2008 - hfiguiere@suse.de + +- Patch : abiword-no-return-diff: fix now fatal compilation warnings. + +------------------------------------------------------------------- +Sun Apr 6 19:25:03 EDT 2008 - hfiguiere@suse.de + +- Upgrade to AbiWord 2.6.2 + * Make the presentation plugin work. + * Fix a bunch of small bugs in our XSL-FO, Applix, LaTeX, WML and HTML + import/export filters. +- Remove all current patches +- Don't disable AbiCollab on configure + +------------------------------------------------------------------- +Sat Apr 5 20:23:07 EDT 2008 - hfiguiere@suse.de + +- Add asio-devel in BuildRequires to enable AbiCollab +- Remove duplicate BuildRequires. +- Fix a warning with non executable script. +- Split -devel files. + +------------------------------------------------------------------- +Thu Apr 3 12:29:13 EDT 2008 - hfiguiere@suse.de + +- Fix a bad build failure from last minute related to %fdupes + misuse + +------------------------------------------------------------------- +Wed Apr 2 19:50:51 EDT 2008 - hfiguiere@suse.de + +- Upgrade to AbiWord 2.6 (bnc#374240) + * New pango renderer (but support for asian languages) + * GNOME Office plugin + * Gnome-VFS support + * Better ODF support + * OOX support + * Lot of bug fixes (bnc#234432) +- Grammar checking support + +------------------------------------------------------------------- +Tue Nov 6 18:30:21 CET 2007 - maw@suse.de + +- Add abiword-gcc4.3-fixes.patch, which fixes the build against + newer versions of poppler +- Use %fdupes. + +------------------------------------------------------------------- +Fri Nov 2 15:42:41 CET 2007 - sbrabec@suse.cz + +- Reverted one chunk of poppler patch to follow poppler changes. + +------------------------------------------------------------------- +Tue Oct 23 20:59:25 CEST 2007 - meissner@suse.de + +- fixed gcc 4.3 build + +------------------------------------------------------------------- +Thu Oct 11 18:40:37 CEST 2007 - sbrabec@suse.cz + +- poppler devel package names prepended by "lib". + +------------------------------------------------------------------- +Mon Oct 8 17:27:59 CEST 2007 - sbrabec@suse.cz + +- Fixed build with poppler 0.6. + +------------------------------------------------------------------- +Tue Jul 31 21:54:38 CEST 2007 - jpr@suse.de + +-Update to 2.4.6 +- Fix IDEF vulnerabilities IDEF1613 and IDEF1614 in the MS Word +import library wvWare +- Fix a longstanding bug that made AbiWord crash on Windows when the +WordPerfect plugin was installed +- Massive updates to the OpenDocument, WML, XSL-FO and AbiCommand plugins +-Remove upstreamed patch + +------------------------------------------------------------------- +Fri Mar 16 12:30:41 CET 2007 - sbrabec@suse.cz + +- Added c++ packages to BuildRequires. + +------------------------------------------------------------------- +Wed Feb 21 18:52:16 CET 2007 - mvaner@suse.cz + +- Array bounds (#242029) + - array-bounds.patch + +------------------------------------------------------------------- +Thu Jan 4 13:49:41 CET 2007 - sbrabec@suse.cz + +- Prefix changed to /usr. +- Spec file cleanup. + +------------------------------------------------------------------- +Tue Dec 19 10:28:55 CET 2006 - meissner@suse.de + +- fixed build fail due to warnings. + +------------------------------------------------------------------- +Tue Nov 7 13:36:32 CET 2006 - ro@suse.de + +- fix icon permission + +------------------------------------------------------------------- +Tue Oct 31 22:05:38 CET 2006 - jhargadon@suse.de + +- added a patch to remove call to FcFini from the XAP_UnixApp + destructor to resolve crashes that occur during shutdown of the + application. + +------------------------------------------------------------------- +Sat Sep 30 08:00:46 CEST 2006 - aj@suse.de + +- Cleanup BuildRequires. + +------------------------------------------------------------------- +Fri Sep 1 23:47:48 CEST 2006 - jhargadon@suse.de + +- update to version 2.4.5 +- many bug fixes +- grammar checker added +- added tight mage wrapping +- added equations +- added OpenDocument support +- added Gnome-Office charting +- patch for compiler warnings + +------------------------------------------------------------------- +Thu Aug 31 18:29:03 CEST 2006 - gekker@suse.de + +- Remove unnecessary gal2-devel from BuildRequires + +------------------------------------------------------------------- +Wed Aug 9 22:38:30 CEST 2006 - gekker@suse.de + +- Fix missing sentinel warnings + +------------------------------------------------------------------- +Fri Jul 7 14:17:46 CEST 2006 - aj@suse.de + +- Fix build with new poppler version. + +------------------------------------------------------------------- +Sun Mar 26 23:15:47 CEST 2006 - olh@suse.de + +- remove -ansi -pedantic from CFLAGS to allow compilation with + perl use64bitint and c++ + +------------------------------------------------------------------- +Fri Feb 24 13:52:00 CET 2006 - sbrabec@suse.cz + +- Improved Categories. + +------------------------------------------------------------------- +Mon Feb 6 00:01:58 CET 2006 - ro@suse.de + +- use -fstack-protector only for > 10.0 + +------------------------------------------------------------------- +Wed Jan 25 21:31:13 CET 2006 - mls@suse.de + +- converted neededforbuild to BuildRequires + +------------------------------------------------------------------- +Mon Jan 16 15:53:19 CET 2006 - sbrabec@suse.cz + +- Updated to version 2.4.2. + +------------------------------------------------------------------- +Fri Jan 13 10:14:13 CET 2006 - meissner@suse.de + +- Added -fno-strict-aliasing -fstack-protector. + +------------------------------------------------------------------- +Fri Nov 4 15:20:44 CET 2005 - sbrabec@suse.cz + +- Updated to version 2.4.1. + +------------------------------------------------------------------- +Sun Oct 30 22:09:00 CET 2005 - ro@suse.de + +- remove extra qualifications to fix build with gcc-4.1 + +------------------------------------------------------------------- +Wed Oct 19 18:50:30 CEST 2005 - sbrabec@suse.cz + +- Build with libwpd. + +------------------------------------------------------------------- +Wed Oct 5 11:20:02 CEST 2005 - sbrabec@suse.cz + +- Updated to version 2.4.0. +- Fixed more buffer overflows in RTF importer (#120097). + +------------------------------------------------------------------- +Tue Sep 27 19:37:38 CEST 2005 - sbrabec@suse.cz + +- Updated to version 2.2.10 (#118545, CESA-2005-004 - rev 1). + +------------------------------------------------------------------- +Thu Jul 28 18:19:16 CEST 2005 - sbrabec@suse.cz + +- Updated to version 2.2.9. + +------------------------------------------------------------------- +Sat Jul 9 07:30:03 CEST 2005 - gekker@suse.de + +- Fix uninitialzed variables and remove .la files + +------------------------------------------------------------------- +Mon May 23 15:21:47 CEST 2005 - schwab@suse.de + +- Fix missing declaration. + +------------------------------------------------------------------- +Tue Apr 26 16:19:05 CEST 2005 - sbrabec@suse.cz + +- Updated to version 2.2.7. + +------------------------------------------------------------------- +Fri Apr 15 15:37:23 CEST 2005 - sbrabec@suse.de + +- Fixed cast from pointer to integer. + +------------------------------------------------------------------- +Tue Feb 22 12:33:27 CET 2005 - sbrabec@suse.cz + +- Updated to version 2.2.4. + +------------------------------------------------------------------- +Sun Jan 23 16:23:33 CET 2005 - meissner@suse.de + +- use system wv lib, drop -fstrict-aliasing. + +------------------------------------------------------------------- +Thu Jan 20 17:14:09 CET 2005 - sbrabec@suse.cz + +- Updated to version 2.2.3. + +------------------------------------------------------------------- +Tue Jan 11 18:45:18 CET 2005 - sbrabec@suse.cz + +- Update to version 2.2.2. + +------------------------------------------------------------------- +Fri Dec 10 01:58:13 CET 2004 - ro@suse.de + +- install icon file + +------------------------------------------------------------------- +Thu Nov 11 15:21:13 CET 2004 - sbrabec@suse.cz + +- Fixed buffer overflow in the wvHandleDateTimePicture function in wv + library: CAN-2004-0645 (#47767). + +------------------------------------------------------------------- +Tue Sep 14 18:53:29 CEST 2004 - ro@suse.de + +- added ImageMagick-Magick++-devel to neededforbuild + +------------------------------------------------------------------- +Tue Jun 29 01:11:29 CEST 2004 - ro@suse.de + +- added libtiff to neededforbuild + +------------------------------------------------------------------- +Thu May 13 02:38:33 CEST 2004 - clahey@suse.de + +- Added patch to fix two missing return values. + +------------------------------------------------------------------- +Tue May 11 14:22:29 CEST 2004 - ro@suse.de + +- added libcroco,libcroco-devel to neededforbuild + +------------------------------------------------------------------- +Wed Apr 21 16:38:58 CEST 2004 - sbrabec@suse.cz + +- Updated to version 2.0.6. + +------------------------------------------------------------------- +Wed Mar 17 14:21:36 CET 2004 - sbrabec@suse.cz + +- Updated to version 2.0.5. + +------------------------------------------------------------------- +Mon Mar 08 12:37:28 CET 2004 - sbrabec@suse.cz + +- Updated to version 2.0.4. + +------------------------------------------------------------------- +Sat Feb 21 10:04:21 CET 2004 - ro@suse.de + +- updated neededforbuild + +------------------------------------------------------------------- +Fri Feb 20 13:01:31 CET 2004 - sbrabec@suse.cz + +- Package renamed to abiword. + +------------------------------------------------------------------- +Mon Feb 16 18:44:58 CET 2004 - sbrabec@suse.cz + +- Updated to version 2.0.3. + +------------------------------------------------------------------- +Sat Jan 10 15:28:30 CET 2004 - adrian@suse.de + +- add %defattr + +------------------------------------------------------------------- +Wed Oct 29 18:52:21 CET 2003 - sbrabec@suse.cz + +- Removed garbage from spec file (move to pixmaps). + +------------------------------------------------------------------- +Wed Oct 29 18:00:48 CET 2003 - sbrabec@suse.cz + +- Updated to version 2.0.1. +- Fixed wv wmf to png support. + +------------------------------------------------------------------- +Tue Oct 28 01:49:27 CET 2003 - ro@suse.de + +- added gtksourceview to neededforbuild + +------------------------------------------------------------------- +Thu Sep 18 12:29:45 CEST 2003 - meissner@suse.de + +- drop glib and glib-devel from neededforbuild, no longer needed. + +------------------------------------------------------------------- +Tue Sep 16 11:47:21 CEST 2003 - sbrabec@suse.cz + +- Provide and obsolete abiword (bug #31002). + +------------------------------------------------------------------- +Mon Sep 1 15:01:27 CEST 2003 - adrian@suse.de + +- install desktop file + +------------------------------------------------------------------- +Thu Aug 28 15:50:17 CEST 2003 - sbrabec@suse.cz + +- Updated to version 1.99.5. +- Added gnome-libs-devel to neededforbuild (for gnome-config). +- Fixed Python 2.3 support. + +------------------------------------------------------------------- +Tue Aug 26 19:13:08 CEST 2003 - sbrabec@suse.cz + +- Fixed GNOME-DB support. + +------------------------------------------------------------------- +Wed Aug 20 15:07:27 CEST 2003 - sbrabec@suse.cz + +- Updated to version 1.99.4. + +------------------------------------------------------------------- +Tue Aug 19 15:25:09 CEST 2003 - sbrabec@suse.cz + +- Updated neededforbuild (rename of librsvg2, eel2). + +------------------------------------------------------------------- +Mon Aug 18 18:38:01 CEST 2003 - sbrabec@suse.cz + +- Use libgda instead of libgda2 (package was renamed). + +------------------------------------------------------------------- +Thu Jul 31 11:23:31 CEST 2003 - sf@suse.de + +- fixed broken VA_COPY (use __va_copy) + +------------------------------------------------------------------- +Mon Jul 14 15:21:25 CEST 2003 - sbrabec@suse.cz + +- GNOME prefix change to /opt/gnome. + +------------------------------------------------------------------- +Mon Jun 16 16:57:22 CEST 2003 - sbrabec@suse.cz + +- Initial SuSE version of GNOME2 port. + + diff --git a/abiword.spec b/abiword.spec new file mode 100644 index 0000000..6aecaf1 --- /dev/null +++ b/abiword.spec @@ -0,0 +1,182 @@ +# +# spec file for package abiword +# +# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: abiword +Version: 3.0.2 +Release: 0 +Summary: A Multiplatform Word Processor +# FIXME next version: check if the telepathy support still requires old version of empathy (with libempathy-gtk) +# FIXME: package aiksaurus, libots, mathview-frontend-libxml2 +License: GPL-2.0-or-later +Group: Productivity/Office/Word Processor +URL: http://www.abisource.com/ +Source0: http://abisource.com/downloads/abiword/latest/source/%{name}-%{version}.tar.gz +Source1: abiword.appdata.xml +# PATCH-FIX-UPSTREAM abiword-librevenge.patch fstrba@suse.com -- Fix build against librevenge-based libraries (svn revs 34461, 34462, 34463, 34464 and 34468) +Patch5: abiword-librevenge.patch +# PATCH-FIX-UPSTREAM abiword-libwps-0.4.patch dimstar@opensuse.org -- Port to libwps-0.4; patch taken from Fedora. +Patch6: abiword-libwps-0.4.patch +# PATCH-FIX-UPSTREAM boost_asio.patch adam.majer@suse.de -- Aadd support for boost::asio +Patch7: boost_asio.patch +#PATCH-FIX-UPSTREAM abiword-fix-black-overlay.patch -- Remove the black that covers the full window and make all unreadable +Patch8: abiword-fix-black-overlay.patch +BuildRequires: bison +BuildRequires: dbus-1-glib-devel +BuildRequires: fdupes +BuildRequires: flex +BuildRequires: gcc-c++ +BuildRequires: libboost_headers-devel +BuildRequires: libgcrypt-devel +BuildRequires: librsvg-devel +BuildRequires: libsoup-devel +BuildRequires: libtool +BuildRequires: libwmf-devel +BuildRequires: link-grammar-devel +BuildRequires: readline-devel +BuildRequires: pkgconfig +BuildRequires: pkgconfig(cairo) >= 1.10 +BuildRequires: pkgconfig(enchant) >= 1.2.0 +BuildRequires: pkgconfig(fribidi) >= 0.10.4 +BuildRequires: pkgconfig(gtk+-3.0) >= 3.0.8 +BuildRequires: pkgconfig(libgoffice-0.10) >= 0.10.0 +BuildRequires: pkgconfig(libgsf-1) >= 1.14.18 +BuildRequires: pkgconfig(libjpeg) +BuildRequires: pkgconfig(librevenge-0.0) +BuildRequires: pkgconfig(libwpd-0.10) +BuildRequires: pkgconfig(libwpg-0.3) +BuildRequires: pkgconfig(libwps-0.4) +BuildRequires: pkgconfig(libxslt) +BuildRequires: pkgconfig(wv-1.0) >= 1.2.0 +# FIXME: requires libgda >= 1.2.0 libgnomedb >= 1.2.0 and we have +# libgda-[34].0.pc +#BuildRequires: libgda-4_0-devel +#BuildRequires: libgnomedb-devel +# FIXME: missing BuildRequires as of 05/12/2009: +# Aiksaurus.h not found +# libots-1 >= 0.5.0 +# mathview-frontend-libxml2 >= 0.7.5 +Conflicts: abiword-unstable + +%description +AbiWord is a multiplatform word processor with a GTK+ interface on the +UNIX platform. + +%package -n libabiword-3_0 +Summary: A Multiplatform Word Processor - Library files +Group: System/Libraries + +%description -n libabiword-3_0 +AbiWord is a multiplatform word processor with a GTK+ interface on the +UNIX platform. + +%package -n libabiword-3_0-devel +Summary: A Multiplatform Word Processor - Development files +Group: Development/Libraries/GNOME +Requires: cairo-devel +Requires: enchant-devel +Requires: fribidi-devel +Requires: glib2-devel +Requires: goffice-devel +Requires: gtk3-devel +Requires: libabiword-3_0 = %{version} +Requires: libgsf-devel +Requires: librsvg-devel +Requires: pango-devel +Requires: wv-devel +Provides: %{name}-devel = %{version} +Obsoletes: %{name}-devel < %{version} + +%description -n libabiword-3_0-devel +AbiWord is a multiplatform word processor with a GTK+ interface on the +UNIX platform. + +%prep +%setup -q +%patch5 +%patch6 +%patch7 +%patch8 + +%build +# We modified plugin configuration and thus we need to regenerate the whole build system +# The following script is lifted from upstream autogen-common.sh file that is not +# distributed in the release tarball. +rm -rf plugins/aiksaurus +find plugins -name Makefile.am | sed 's|.am$||g' > plugin-makefiles.m4 +find plugins -maxdepth 1 -type d | grep -v -e '^\.$' -e '\./\.' | sed 's|plugins/||g' | xargs echo > plugin-list.m4 +(for plugin in `cat plugin-list.m4`; do + u=`echo $plugin | tr '[:lower:]' '[:upper:]'` + echo 'AM_CONDITIONAL(['$u'_BUILTIN], test "$enable_'$plugin'_builtin" = "yes")' +done) > plugin-builtin.m4 +find plugins -name plugin.m4 | xargs cat > plugin-configure.m4 +for f in ` find ./plugins -name '*.m4' | grep -v 'plugin\.m4'`; do + ln -sf $f +done +libtoolize --force --copy --install +autoreconf -fi + +# -fno-strict-aliasing added 2009-04-12. Leave it in because we are +# not sure it is not needed any more and the performance cost of this +# option is cheaper then random undefined behaviours. +CFLAGS="%{optflags} -fno-strict-aliasing" +%configure \ + --disable-static \ + --enable-dynamic \ + --enable-plugins \ + --enable-clipart \ + --enable-templates \ + --enable-collab-backend-xmpp \ + --enable-collab-backend-tcp \ + --enable-collab-backend-sugar \ + --enable-collab-backend-service \ + --enable-emacs-keybinding \ + --enable-vi-keybinding \ + %{nil} +%make_build + +%install +%make_install +find %{buildroot} -type f -name "*.la" -delete -print +install -dm 0755 %{buildroot}%{_datadir}/appdata +install -Dm 0644 %{S:1} %{buildroot}%{_datadir}/appdata/abiword.appdata.xml +%fdupes %{buildroot} + + +%post -n libabiword-3_0 -p /sbin/ldconfig +%postun -n libabiword-3_0 -p /sbin/ldconfig + +%files +%license COPYING +%doc AUTHORS COPYRIGHT.TXT +%{_bindir}/* +%dir %{_datadir}/appdata +%{_datadir}/appdata/abiword.appdata.xml +%{_datadir}/applications/abiword.desktop +%{_datadir}/icons/hicolor/*/apps/abiword.* +%{_mandir}/man?/abiword.* + +%files -n libabiword-3_0 +%{_libdir}/libabiword-*.so +%{_libdir}/abiword-3.0/ +%{_datadir}/abiword-3.0/ + +%files -n libabiword-3_0-devel +%{_includedir}/abiword-3.0/ +%{_libdir}/pkgconfig/abiword-3.0.pc + +%changelog diff --git a/boost_asio.patch b/boost_asio.patch new file mode 100644 index 0000000..184dea3 --- /dev/null +++ b/boost_asio.patch @@ -0,0 +1,141 @@ +Author: Adam Majer +Date: Wed Jan 18 13:26:11 CET 2017 +Upstream: http://bugzilla.abisource.com/show_bug.cgi?id=13839 +Summary: Allow compilation with Boost::Asio + +Index: plugins/collab/backends/service/xp/AsyncWorker.h +=================================================================== +--- plugins/collab/backends/service/xp/AsyncWorker.h.orig ++++ plugins/collab/backends/service/xp/AsyncWorker.h +@@ -19,7 +19,12 @@ + #ifndef __ASYNC_WORKER__ + #define __ASYNC_WORKER__ + +-#include ++#if defined(HAVE_BOOST_ASIO_HPP) ++# include ++#else ++# include ++#endif ++ + #include + #include + #include +Index: plugins/collab/backends/service/xp/RealmConnection.h +=================================================================== +--- plugins/collab/backends/service/xp/RealmConnection.h.orig ++++ plugins/collab/backends/service/xp/RealmConnection.h +@@ -21,7 +21,11 @@ + + #include + #include +-#include ++#if defined(HAVE_BOOST_ASIO_HPP) ++# include ++#else ++# include ++#endif + #include + #include + #include "ut_types.h" +Index: plugins/collab/backends/service/xp/RealmProtocol.h +=================================================================== +--- plugins/collab/backends/service/xp/RealmProtocol.h.orig ++++ plugins/collab/backends/service/xp/RealmProtocol.h +@@ -9,7 +9,11 @@ + #include + #endif + #include +-#include ++#if defined(HAVE_BOOST_ASIO_HPP) ++# include ++#else ++# include ++#endif + + namespace realm { + +Index: plugins/collab/backends/service/xp/tls_tunnel.h +=================================================================== +--- plugins/collab/backends/service/xp/tls_tunnel.h.orig ++++ plugins/collab/backends/service/xp/tls_tunnel.h +@@ -33,7 +33,11 @@ + #include + #include + #include +-#include ++#if defined(HAVE_BOOST_ASIO_HPP) ++# include ++#else ++# include ++#endif + #include + #include + #ifdef _MSC_VER +Index: plugins/collab/backends/tcp/xp/IOServerHandler.h +=================================================================== +--- plugins/collab/backends/tcp/xp/IOServerHandler.h.orig ++++ plugins/collab/backends/tcp/xp/IOServerHandler.h +@@ -23,7 +23,11 @@ + + #include + #include +-#include ++#if defined(HAVE_BOOST_ASIO_HPP) ++# include ++#else ++# include ++#endif + + #include + #include "Session.h" +Index: plugins/collab/plugin.m4 +=================================================================== +--- plugins/collab/plugin.m4.orig ++++ plugins/collab/plugin.m4 +@@ -59,18 +59,20 @@ AC_ARG_ENABLE([collab-backend-tcp], + enable_collab_backend_tcp=$enableval + if test "$enable_collab_backend_tcp" != "no"; then + AC_LANG_PUSH(C++) +- AC_CHECK_HEADERS([asio.hpp], [], ++ AC_CHECK_HEADERS([asio.hpp], [], ++ [AC_CHECK_HEADERS([boost/asio.hpp], [AC_DEFINE([HAVE_BOOST_ASIO_HPP])], + [ + AC_MSG_ERROR([collab plugin: asio is required for the collab plugin TCP backend, see http://think-async.com/]) +- ]) ++ ])]) + AC_LANG_POP + fi + ], [ + AC_LANG_PUSH(C++) + AC_CHECK_HEADERS([asio.hpp], ++ [AC_CHECK_HEADERS([boost/asio.hpp], [AC_DEFINE([HAVE_BOOST_ASIO_HPP])], + [ + enable_collab_backend_tcp="yes" +- ]) ++ ])]) + AC_LANG_POP + ]) + AC_MSG_CHECKING([for collab tcp backend]) +@@ -99,17 +101,19 @@ AC_ARG_ENABLE([collab-backend-service], + if test "$enable_collab_backend_service" != "no"; then + AC_LANG_PUSH(C++) + AC_CHECK_HEADERS([asio.hpp], [], ++ [AC_CHECK_HEADERS([boost/asio.hpp], [AC_DEFINE([HAVE_BOOST_ASIO_HPP])], + [ + AC_MSG_ERROR([collab plugin: asio is required for the the abicollab.net backend, see http://think-async.com/]) +- ]) ++ ])]) + AC_LANG_POP + fi + ], [ + AC_LANG_PUSH(C++) + AC_CHECK_HEADERS([asio.hpp], ++ [AC_CHECK_HEADERS([boost/asio.hpp], [AC_DEFINE([HAVE_BOOST_ASIO_HPP])], + [ + enable_collab_backend_service="yes" +- ]) ++ ])]) + AC_LANG_POP + ]) + test "$enable_collab_backend_service" = "yes" && collab_pkgs="$collab_pkgs $collab_service_req"