diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2014-01-14 09:40:13 +0100 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2014-01-14 09:40:24 +0100 |
commit | f8bf3e3cd4b55099a1427d611af06a45460034e7 (patch) | |
tree | ab5b1efd615ccbe8d1747f3508573c5a0be55315 /external | |
parent | ffcbe1a609489a4e2350f3796af259ade3467a73 (diff) |
Fix ABW list shapes
Change-Id: Ibbbfddf10677e8c5b654cee9c5fda1603a298a67
Diffstat (limited to 'external')
-rw-r--r-- | external/libabw/UnpackedTarball_libabw.mk | 1 | ||||
-rw-r--r-- | external/libabw/libabw-0.0.0-listshape.patch.1 | 67 |
2 files changed, 68 insertions, 0 deletions
diff --git a/external/libabw/UnpackedTarball_libabw.mk b/external/libabw/UnpackedTarball_libabw.mk index 8a565fb66abb..d6b72e19408d 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 000000000000..f0e252501171 --- /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; |