[Libreoffice-commits] libmspub.git: src/lib
David Tardon
dtardon at redhat.com
Tue Aug 18 02:52:16 PDT 2015
src/lib/MSPUBParser2k.cpp | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit 1023378fcd0974c38d23fce906d8552406dbe599
Author: David Tardon <dtardon at redhat.com>
Date: Tue Aug 18 11:51:53 2015 +0200
fix brain fart
Change-Id: Ifa0015945255b2a6e2c9da25b89b0b4648465290
diff --git a/src/lib/MSPUBParser2k.cpp b/src/lib/MSPUBParser2k.cpp
index 7003b72..3f2aaf3 100644
--- a/src/lib/MSPUBParser2k.cpp
+++ b/src/lib/MSPUBParser2k.cpp
@@ -564,11 +564,13 @@ bool MSPUBParser2k::parseGroup(librevenge::RVNGInputStream *input, unsigned seqN
bool retVal = true;
m_collector->beginGroup();
m_collector->setCurrentGroupSeqNum(seqNum);
- if (seqNum < m_chunkChildIndicesById.size())
+ const std::map<unsigned, std::vector<unsigned> >::const_iterator it = m_chunkChildIndicesById.find(seqNum);
+ if (it != m_chunkChildIndicesById.end())
{
- for (unsigned i = 0; i < m_chunkChildIndicesById[seqNum].size(); ++i)
+ const std::vector<unsigned> &chunkChildIndices = it->second;
+ for (unsigned i = 0; i < chunkChildIndices.size(); ++i)
{
- const ContentChunkReference &childChunk = m_contentChunks.at(m_chunkChildIndicesById[seqNum][i]);
+ const ContentChunkReference &childChunk = m_contentChunks.at(chunkChildIndices[i]);
if (childChunk.type == SHAPE || childChunk.type == GROUP)
{
retVal = retVal && parse2kShapeChunk(childChunk, input, page, false);
More information about the Libreoffice-commits
mailing list