[Libreoffice-commits] core.git: download.lst external/libabw filter/source

Fridrich Å trba fridrich.strba at bluewin.ch
Wed Jan 15 06:25:26 PST 2014


 download.lst                                                     |    4 
 external/libabw/ExternalProject_libabw.mk                        |    3 
 external/libabw/UnpackedTarball_libabw.mk                        |    6 
 external/libabw/libabw-0.0.0-footendnote.patch.1                 |  101 ----------
 external/libabw/libabw-0.0.0-listshape.patch.1                   |   67 ------
 external/libabw/libabw-0.0.0-mimetype.patch.1                    |   13 -
 filter/source/config/fragments/types/writer_AbiWord_Document.xcu |    2 
 7 files changed, 4 insertions(+), 192 deletions(-)

New commits:
commit 838c8889491b7e5b08f681b7f85740784c0c1a3b
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date:   Wed Jan 15 13:57:57 2014 +0100

    Uploading libabw-0.0.1 (support of zabw files too)
    
    Change-Id: Ie04cae9b9a362cb43b671fe8986545865822a953

diff --git a/download.lst b/download.lst
index dad1352..acbe37b 100644
--- a/download.lst
+++ b/download.lst
@@ -1,5 +1,5 @@
-ABW_MD5SUM := dffe43760ff660c831c9a89c992dd18c
-export ABW_TARBALL := libabw-0.0.0.tar.bz2
+ABW_MD5SUM := af3ccc1f1884e68389088d490d596409
+export ABW_TARBALL := libabw-0.0.1.tar.bz2
 CDR_MD5SUM := d88f9b94df880d2c05be943b000ca112
 export CDR_TARBALL := libcdr-0.0.14.tar.bz2
 EBOOK_MD5SUM := 3a62e10c57270718cabfdfc4b7b4e095
diff --git a/external/libabw/ExternalProject_libabw.mk b/external/libabw/ExternalProject_libabw.mk
index 5d6b62d..d3b3b9f 100644
--- a/external/libabw/ExternalProject_libabw.mk
+++ b/external/libabw/ExternalProject_libabw.mk
@@ -19,6 +19,7 @@ $(eval $(call gb_ExternalProject_use_externals,libabw,\
 	boost_headers \
 	libxml2 \
 	wpd \
+	zlib \
 ))
 
 $(call gb_ExternalProject_get_state_target,libabw,build) :
@@ -35,8 +36,6 @@ $(call gb_ExternalProject_get_state_target,libabw,build) :
 			CXXFLAGS="$(if $(filter NO,$(SYSTEM_BOOST)),-I$(call gb_UnpackedTarball_get_dir,boost) -I$(BUILDDIR)/config_$(gb_Side),$(BOOST_CPPFLAGS)) \
 			$(if $(filter NO,$(SYSTEM_LIBXML)),-I$(call gb_UnpackedTarball_get_dir,xml2)/include)" \
 			$(if $(filter YES,$(CROSS_COMPILING)),--build=$(BUILD_PLATFORM) --host=$(HOST_PLATFORM)) \
-			LIBXML2_CFLAGS="$(LIBXML_CFLAGS)" \
-			LIBXML2_LIBS="$(LIBXML_LIBS)" \
 		&& (cd $(EXTERNAL_WORKDIR)/src/lib && \
 		    $(if $(VERBOSE)$(verbose),V=1) \
 		    $(MAKE)) \
diff --git a/external/libabw/UnpackedTarball_libabw.mk b/external/libabw/UnpackedTarball_libabw.mk
index 843100c..6288b0e 100644
--- a/external/libabw/UnpackedTarball_libabw.mk
+++ b/external/libabw/UnpackedTarball_libabw.mk
@@ -11,10 +11,4 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libabw))
 
 $(eval $(call gb_UnpackedTarball_set_tarball,libabw,$(ABW_TARBALL)))
 
-$(eval $(call gb_UnpackedTarball_add_patches,libabw,\
-	external/libabw/libabw-0.0.0-footendnote.patch.1 \
-	external/libabw/libabw-0.0.0-listshape.patch.1 \
-	external/libabw/libabw-0.0.0-mimetype.patch.1 \
-))
-
 # vim: set noet sw=4 ts=4:
diff --git a/external/libabw/libabw-0.0.0-footendnote.patch.1 b/external/libabw/libabw-0.0.0-footendnote.patch.1
deleted file mode 100644
index 4c9e813..0000000
--- a/external/libabw/libabw-0.0.0-footendnote.patch.1
+++ /dev/null
@@ -1,101 +0,0 @@
---- a/src/lib/ABWContentCollector.cpp
-+++ b/src/lib/ABWContentCollector.cpp
-@@ -289,6 +289,7 @@ libabw::ABWContentParsingState::ABWContentParsingState() :
-   m_isSpanOpened(false),
-   m_isParagraphOpened(false),
-   m_isListElementOpened(false),
-+  m_inParagraphOrListElement(false),
- 
-   m_currentSectionStyle(),
-   m_currentParagraphStyle(),
-@@ -334,6 +335,7 @@ libabw::ABWContentParsingState::ABWContentParsingState(const ABWContentParsingSt
-   m_isSpanOpened(ps.m_isSpanOpened),
-   m_isParagraphOpened(ps.m_isParagraphOpened),
-   m_isListElementOpened(ps.m_isListElementOpened),
-+  m_inParagraphOrListElement(ps.m_inParagraphOrListElement),
- 
-   m_currentSectionStyle(ps.m_currentSectionStyle),
-   m_currentParagraphStyle(ps.m_currentParagraphStyle),
-@@ -500,6 +502,7 @@ void libabw::ABWContentCollector::collectParagraphProperties(const char *level,
-     parsePropString(props, tmpProps);
-   for (std::map<std::string, std::string>::const_iterator iter = tmpProps.begin(); iter != tmpProps.end(); ++iter)
-     m_ps->m_currentParagraphStyle[iter->first] = iter->second;
-+  m_ps->m_inParagraphOrListElement = true;
- }
- 
- void libabw::ABWContentCollector::collectCharacterProperties(const char *style, const char *props)
-@@ -748,6 +751,7 @@ void libabw::ABWContentCollector::closeParagraphOrListElement()
-   _closeParagraph();
-   _closeListElement();
-   m_ps->m_currentParagraphStyle.clear();
-+  m_ps->m_inParagraphOrListElement = false;
- }
- 
- void libabw::ABWContentCollector::openLink(const char *href)
-@@ -807,6 +811,8 @@ void libabw::ABWContentCollector::insertPageBreak()
- 
- void libabw::ABWContentCollector::insertText(const WPXString &text)
- {
-+  if (!m_ps->m_inParagraphOrListElement)
-+    return;
-   if (!m_ps->m_isSpanOpened)
-     _openSpan();
- 
---- a/src/lib/ABWContentCollector.h
-+++ b/src/lib/ABWContentCollector.h
-@@ -71,6 +71,7 @@ struct ABWContentParsingState
-   bool m_isSpanOpened;
-   bool m_isParagraphOpened;
-   bool m_isListElementOpened;
-+  bool m_inParagraphOrListElement;
- 
-   std::map<std::string, std::string> m_currentSectionStyle;
-   std::map<std::string, std::string> m_currentParagraphStyle;
---- a/src/lib/ABWParser.cpp
-+++ b/src/lib/ABWParser.cpp
-@@ -92,7 +92,7 @@ void appendFromBase64(WPXBinaryData &data, const char *base64Data)
- } // namespace libabw
- 
- libabw::ABWParser::ABWParser(WPXInputStream *input, WPXDocumentInterface *iface)
--  : m_input(input), m_iface(iface), m_collector(0), m_inParagraph(false)
-+  : m_input(input), m_iface(iface), m_collector(0)
- {
- }
- 
-@@ -173,8 +173,7 @@ void libabw::ABWParser::processXmlNode(xmlTextReaderPtr reader)
-   {
-     WPXString text((const char *)xmlTextReaderConstValue(reader));
-     ABW_DEBUG_MSG(("ABWParser::processXmlNode: text %s\n", text.cstr()));
--    if (m_inParagraph && m_collector)
--      m_collector->insertText(text);
-+    m_collector->insertText(text);
-   }
-   switch (tokenId)
-   {
-@@ -219,16 +218,10 @@ void libabw::ABWParser::processXmlNode(xmlTextReaderPtr reader)
-     break;
-   case XML_P:
-     if (XML_READER_TYPE_ELEMENT == tokenType)
--    {
-       readP(reader);
--      m_inParagraph = true;
--    }
-     if (XML_READER_TYPE_END_ELEMENT == tokenType || emptyToken > 0)
--    {
--      m_inParagraph = false;
-       if (m_collector)
-         m_collector->closeParagraphOrListElement();
--    }
-     break;
-   case XML_C:
-     if (XML_READER_TYPE_ELEMENT == tokenType)
---- a/src/lib/ABWParser.h
-+++ b/src/lib/ABWParser.h
-@@ -61,7 +61,6 @@ private:
-   WPXInputStream *m_input;
-   WPXDocumentInterface *m_iface;
-   ABWCollector *m_collector;
--  bool m_inParagraph;
- };
- 
- } // namespace libabw
diff --git a/external/libabw/libabw-0.0.0-listshape.patch.1 b/external/libabw/libabw-0.0.0-listshape.patch.1
deleted file mode 100644
index f0e2525..0000000
--- a/external/libabw/libabw-0.0.0-listshape.patch.1
+++ /dev/null
@@ -1,67 +0,0 @@
---- a/src/lib/ABWContentCollector.cpp
-+++ b/src/lib/ABWContentCollector.cpp
-@@ -928,7 +928,8 @@ void libabw::ABWContentCollector::_openHeader()
-   m_ps->m_isHeaderOpened = true;
- }
- 
--void libabw::ABWContentCollector::_fillParagraphProperties(WPXPropertyList &propList, WPXPropertyListVector &tabStops)
-+void libabw::ABWContentCollector::_fillParagraphProperties(WPXPropertyList &propList, WPXPropertyListVector &tabStops,
-+                                                           bool isListElement)
- {
-   ABWUnit unit(ABW_NONE);
-   double value(0.0);
-@@ -937,17 +938,20 @@ void libabw::ABWContentCollector::_fillParagraphProperties(WPXPropertyList &prop
-   if (findDouble(_findParagraphProperty("margin-right"), value, unit) && unit == ABW_IN)
-     propList.insert("fo:margin-right", value);
- 
--  if (findDouble(_findParagraphProperty("margin-left"), value, unit) && unit == ABW_IN)
--    propList.insert("fo:margin-left", value);
--
-   if (findDouble(_findParagraphProperty("margin-top"), value, unit) && unit == ABW_IN)
-     propList.insert("fo:margin-top", value);
- 
-   if (findDouble(_findParagraphProperty("margin-bottom"), value, unit) && unit == ABW_IN)
-     propList.insert("fo:margin-bottom", value);
- 
--  if (findDouble(_findParagraphProperty("text-indent"), value, unit) && unit == ABW_IN)
--    propList.insert("fo:text-indent", value);
-+  if (!isListElement)
-+  {
-+    if (findDouble(_findParagraphProperty("margin-left"), value, unit) && unit == ABW_IN)
-+      propList.insert("fo:margin-left", value);
-+
-+    if (findDouble(_findParagraphProperty("text-indent"), value, unit) && unit == ABW_IN)
-+      propList.insert("fo:text-indent", value);
-+  }
- 
-   std::string sValue = _findParagraphProperty("text-align");
-   if (!sValue.empty())
-@@ -1029,7 +1033,7 @@ void libabw::ABWContentCollector::_openParagraph()
- 
-     WPXPropertyList propList;
-     WPXPropertyListVector tabStops;
--    _fillParagraphProperties(propList, tabStops);
-+    _fillParagraphProperties(propList, tabStops, false);
- 
-     m_ps->m_deferredPageBreak = false;
-     m_ps->m_deferredColumnBreak = false;
-@@ -1070,7 +1074,7 @@ void libabw::ABWContentCollector::_openListElement()
- 
-     WPXPropertyList propList;
-     WPXPropertyListVector tabStops;
--    _fillParagraphProperties(propList, tabStops);
-+    _fillParagraphProperties(propList, tabStops, true);
- 
-     m_outputElements.addOpenListElement(propList, tabStops);
- 
---- a/src/lib/ABWContentCollector.h
-+++ b/src/lib/ABWContentCollector.h
-@@ -194,7 +194,7 @@ private:
-   std::string _findCellProperty(const char *name);
-   std::string _findSectionProperty(const char *name);
- 
--  void _fillParagraphProperties(WPXPropertyList &propList, WPXPropertyListVector &tabStops);
-+  void _fillParagraphProperties(WPXPropertyList &propList, WPXPropertyListVector &tabStops, bool isListElement);
- 
-   ABWContentParsingState *m_ps;
-   WPXDocumentInterface *m_iface;
diff --git a/external/libabw/libabw-0.0.0-mimetype.patch.1 b/external/libabw/libabw-0.0.0-mimetype.patch.1
deleted file mode 100644
index 3856e31..0000000
--- a/external/libabw/libabw-0.0.0-mimetype.patch.1
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/src/lib/ABWContentCollector.cpp b/src/lib/ABWContentCollector.cpp
-index 53b8d81..14dd840 100644
---- a/src/lib/ABWContentCollector.cpp
-+++ b/src/lib/ABWContentCollector.cpp
-@@ -1537,7 +1537,7 @@ void libabw::ABWContentCollector::insertImage(const char *dataid, const char *pr
-       m_outputElements.addOpenFrame(propList);
- 
-       propList.clear();
--      propList.insert("libwpd:mime-type", iter->second.m_mimeType);
-+      propList.insert("libwpd:mimetype", iter->second.m_mimeType);
- 
-       m_outputElements.addInsertBinaryObject(propList, iter->second.m_binaryData);
- 
diff --git a/filter/source/config/fragments/types/writer_AbiWord_Document.xcu b/filter/source/config/fragments/types/writer_AbiWord_Document.xcu
index 0521fed..bb45277 100644
--- a/filter/source/config/fragments/types/writer_AbiWord_Document.xcu
+++ b/filter/source/config/fragments/types/writer_AbiWord_Document.xcu
@@ -18,7 +18,7 @@
     <node oor:name="writer_AbiWord_Document" oor:op="replace" >
         <prop oor:name="DetectService"><value>com.sun.star.comp.Writer.AbiWordImportFilter</value></prop>
         <prop oor:name="URLPattern"/>
-        <prop oor:name="Extensions"><value>abw</value></prop>
+        <prop oor:name="Extensions"><value>abw zabw</value></prop>
         <prop oor:name="MediaType"><value>application/x-abiword</value></prop>
         <prop oor:name="Preferred"><value>true</value></prop>
         <prop oor:name="PreferredFilter"><value>AbiWord</value></prop>


More information about the Libreoffice-commits mailing list