From 6990552c358226fdcb7c714a0c4e00b8b8124df7 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 28 Nov 2017 09:15:33 +0100 Subject: MSPUBParser: reduce scope of shape width/height They were write-only in the table case. Change-Id: I10d480e9c621fd9dd6c4f1b2893f8dc9d9e955df --- src/lib/MSPUBParser.cpp | 14 +++----------- 1 file 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); -- cgit v1.2.3