external/libabw/UnpackedTarball_libabw.mk | 1 external/libabw/libabw-0.0.0-listshape.patch.1 | 67 +++++++++++++++++++++++++ 2 files changed, 68 insertions(+)
New commits: commit f8bf3e3cd4b55099a1427d611af06a45460034e7 Author: Fridrich Å trba <fridrich.st...@bluewin.ch> Date: Tue Jan 14 09:40:13 2014 +0100 Fix ABW list shapes Change-Id: Ibbbfddf10677e8c5b654cee9c5fda1603a298a67 diff --git a/external/libabw/UnpackedTarball_libabw.mk b/external/libabw/UnpackedTarball_libabw.mk index 8a565fb..d6b72e1 100644 --- a/external/libabw/UnpackedTarball_libabw.mk +++ b/external/libabw/UnpackedTarball_libabw.mk @@ -13,6 +13,7 @@ $(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 \ )) # vim: set noet sw=4 ts=4: diff --git a/external/libabw/libabw-0.0.0-listshape.patch.1 b/external/libabw/libabw-0.0.0-listshape.patch.1 new file mode 100644 index 0000000..f0e2525 --- /dev/null +++ b/external/libabw/libabw-0.0.0-listshape.patch.1 @@ -0,0 +1,67 @@ +--- 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;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits