[Libreoffice-commits] libmspub.git: src/lib
Miklos Vajna
vmiklos at collabora.co.uk
Tue Nov 28 08:16:05 UTC 2017
src/lib/MSPUBParser.cpp | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
New commits:
commit 6990552c358226fdcb7c714a0c4e00b8b8124df7
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Nov 28 09:15:33 2017 +0100
MSPUBParser: reduce scope of shape width/height
They were write-only in the table case.
Change-Id: I10d480e9c621fd9dd6c4f1b2893f8dc9d9e955df
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);
More information about the Libreoffice-commits
mailing list