[Libreoffice-commits] libvisio.git: src/lib
Fridrich Štrba
fridrich.strba at bluewin.ch
Sun Dec 27 13:56:10 PST 2015
src/lib/VSDContentCollector.cpp | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
New commits:
commit f81b6a04609f1164ea4a006af43c2e9ce6dbf242
Author: Fridrich Štrba <fridrich.strba at bluewin.ch>
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')
More information about the Libreoffice-commits
mailing list