diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-11-28 09:15:33 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-11-28 09:15:33 +0100 |
commit | 6990552c358226fdcb7c714a0c4e00b8b8124df7 (patch) | |
tree | 6d09d13fe3b3905e7059c820db7d8a66b4503578 | |
parent | e0def2a0eed45d6b201c2c45bcfff69a06077253 (diff) |
MSPUBParser: reduce scope of shape width/height
They were write-only in the table case.
Change-Id: I10d480e9c621fd9dd6c4f1b2893f8dc9d9e955df
-rw-r--r-- | src/lib/MSPUBParser.cpp | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/src/lib/MSPUBParser.cpp b/src/lib/MSPUBParser.cpp index 25a8e73..179f8ae 100644 --- a/src/lib/MSPUBParser.cpp +++ b/src/lib/MSPUBParser.cpp @@ -652,8 +652,6 @@ bool MSPUBParser::parseShape(librevenge::RVNGInputStream *input, MSPUB_DEBUG_MSG(("parseShape: seqNum 0x%x\n", chunk.seqNum)); unsigned long pos = input->tell(); unsigned length = readU32(input); - unsigned width = 0; - unsigned height = 0; bool isTable = chunk.type == TABLE; bool isGroup = chunk.type == GROUP || chunk.type == LOGO; if (isTable) @@ -666,15 +664,7 @@ bool MSPUBParser::parseShape(librevenge::RVNGInputStream *input, while (stillReading(input, pos + length)) { MSPUBBlockInfo info = parseBlock(input, true); - if (info.id == TABLE_WIDTH) - { - width = info.data; - } - else if (info.id == TABLE_HEIGHT) - { - height = info.data; - } - else if (info.id == TABLE_CELLS_SEQNUM) + if (info.id == TABLE_CELLS_SEQNUM) { cellsSeqNum = info.data; } @@ -824,6 +814,8 @@ bool MSPUBParser::parseShape(librevenge::RVNGInputStream *input, bool isText = false; bool shouldStretchBorderArt = true; unsigned textId = 0; + unsigned width = 0; + unsigned height = 0; while (stillReading(input, pos + length)) { MSPUBBlockInfo info = parseBlock(input, true); |