diff options
author | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-06-29 18:40:32 +0200 |
---|---|---|
committer | Fridrich Štrba <fridrich.strba@bluewin.ch> | 2011-06-29 18:40:32 +0200 |
commit | 4e52b6596b0b02040ba112fa5aa7a7c9fde0b6c0 (patch) | |
tree | 143f4f3a7adeec3a96ee9ed8c2e7f0861bdea6cb /src/lib/VSDXParser.cpp | |
parent | b7f4192b4e13abddb3535ab9bbafaaf015043e99 (diff) |
prototype shapes reordering (not yet there though)
Diffstat (limited to 'src/lib/VSDXParser.cpp')
-rw-r--r-- | src/lib/VSDXParser.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp index 8bb2bf7..c3071f8 100644 --- a/src/lib/VSDXParser.cpp +++ b/src/lib/VSDXParser.cpp @@ -209,13 +209,13 @@ void libvisio::VSDXParser::readShapeID(WPXInputStream *input) void libvisio::VSDXParser::readShapeList(WPXInputStream *input) { - input->seek(0x33, WPX_SEEK_CUR); - - std::vector<unsigned int> shapeList; - for (unsigned int i = 0; i < m_header.list; i++) - { + uint32_t subHeaderLength = readU32(input); + uint32_t childrenListLength = readU32(input); + input->seek(subHeaderLength, WPX_SEEK_CUR); + std::vector<unsigned> shapeList; + shapeList.reserve(childrenListLength / sizeof(uint32_t)); + for (unsigned i = 0; i < (childrenListLength / sizeof(uint32_t)); i++) shapeList.push_back(readU32(input)); - } m_collector->collectShapeList(m_header.id, m_header.level, shapeList); } |