summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2014-01-15 13:57:57 +0100
committerFridrich Štrba <fridrich.strba@bluewin.ch>2014-01-15 15:25:06 +0100
commit838c8889491b7e5b08f681b7f85740784c0c1a3b (patch)
treef619e34c3f48cec595dabc4e146468625cbc7098 /external
parentbf535c47728aa874dd9f0d7fba6ba478adb26073 (diff)
Uploading libabw-0.0.1 (support of zabw files too)
Change-Id: Ie04cae9b9a362cb43b671fe8986545865822a953
Diffstat (limited to 'external')
-rw-r--r--external/libabw/ExternalProject_libabw.mk3
-rw-r--r--external/libabw/UnpackedTarball_libabw.mk6
-rw-r--r--external/libabw/libabw-0.0.0-footendnote.patch.1101
-rw-r--r--external/libabw/libabw-0.0.0-listshape.patch.167
-rw-r--r--external/libabw/libabw-0.0.0-mimetype.patch.113
5 files changed, 1 insertions, 189 deletions
diff --git a/external/libabw/ExternalProject_libabw.mk b/external/libabw/ExternalProject_libabw.mk
index 5d6b62dcdb0a..d3b3b9f97caf 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 843100ce1d28..6288b0ef83aa 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 4c9e81308098..000000000000
--- 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 f0e252501171..000000000000
--- 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 3856e315c1bb..000000000000
--- 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);
-