summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-12-30 18:26:27 +0100
committerDavid Tardon <dtardon@redhat.com>2014-12-30 18:26:27 +0100
commitfc4fdd7b1ab4278d14c88946f2c837d7eb4d880f (patch)
treef17666abeb3bc6f5872babb38f91891f94573016
parentb42a9c54d0fceec246dd4fef8679898efd611d60 (diff)
flush remaining text before checking spanslibmspub-0.1.2
Change-Id: I6938b0b13959a3ee83cfecae728c0a1a7baf531f
-rw-r--r--src/lib/MSPUBParser.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp
index 3154294..2f2b805 100644
--- a/src/lib/MSPUBParser.cpp
+++ b/src/lib/MSPUBParser.cpp
@@ -1101,14 +1101,14 @@ bool MSPUBParser::parseQuill(librevenge::RVNGInputStream *input)
readSpans.clear();
}
}
+ if (!text.empty() && currentTextSpan != spans.end())
+ {
+ readSpans.push_back(TextSpan(text, currentTextSpan->charStyle));
+ MSPUB_DEBUG_MSG(("Saw text span %d in the current text paragraph.\n", (unsigned)readSpans.size()));
+ }
+ text.clear();
if (!readSpans.empty() && currentTextPara != paras.end())
{
- if (!text.empty() && currentTextSpan != spans.end())
- {
- readSpans.push_back(TextSpan(text, currentTextSpan->charStyle));
- MSPUB_DEBUG_MSG(("Saw text span %d in the current text paragraph.\n", (unsigned)readSpans.size()));
- }
- text.clear();
readParas.push_back(TextParagraph(readSpans, currentTextPara->paraStyle));
MSPUB_DEBUG_MSG(("Saw paragraph %d in the current text block.\n", (unsigned)readParas.size()));
}