src/lib/VSDContentCollector.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-)
New commits: commit f81b6a04609f1164ea4a006af43c2e9ce6dbf242 Author: Fridrich Å trba <[email protected]> Date: Sun Dec 27 22:55:40 2015 +0100 Avoid paragraphs without span and thus fix make check Change-Id: Id9376f0c4f63d092771d6c505b0ef9989e531005 diff --git a/src/lib/VSDContentCollector.cpp b/src/lib/VSDContentCollector.cpp index 17a6a38..899c837 100644 --- a/src/lib/VSDContentCollector.cpp +++ b/src/lib/VSDContentCollector.cpp @@ -468,6 +468,7 @@ void libvisio::VSDContentCollector::_flushText() bool isParagraphOpened(false); bool isSpanOpened(false); + bool isParagraphWithoutSpan(false); std::vector<VSDParaStyle>::const_iterator paraIt = m_paraFormats.begin(); std::vector<VSDCharStyle>::const_iterator charIt = m_charFormats.begin(); @@ -516,9 +517,13 @@ void libvisio::VSDContentCollector::_flushText() else m_shapeOutputText->addOpenListElement(paraProps); isParagraphOpened = true; + isParagraphWithoutSpan = true; } - if (!isSpanOpened && (*(textIt()) != '\n')) // Avoid an empty span + /* Avoid empty span but also a paragraph without span at all. + * This allows editing of the empty paragraph after the import, + * using the original span properties. */ + if (!isSpanOpened && ((*(textIt()) != '\n') || isParagraphWithoutSpan)) { librevenge::RVNGPropertyList textProps; _fillCharProperties(textProps, *charIt); @@ -534,6 +539,7 @@ void libvisio::VSDContentCollector::_flushText() } m_shapeOutputText->addOpenSpan(textProps); isSpanOpened = true; + isParagraphWithoutSpan = false; } if (*(textIt()) == '\n')
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
