From f28739d5bcdace1b6aa4671e5c5483d941ca8c6e Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 29 Nov 2016 15:05:20 +0100 Subject: [PATCH 1/2] fix parsing of text block bg color in some cases It appears that if the color index is 0xff, no color should be set. Change-Id: I0dcea16ed5d61292d84e82904b863c1ccafd9d7a --- src/lib/VSDParser.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib/VSDParser.cpp b/src/lib/VSDParser.cpp index e82a678..8fc73d1 100644 --- a/src/lib/VSDParser.cpp +++ b/src/lib/VSDParser.cpp @@ -877,7 +877,8 @@ void libvisio::VSDParser::readTextBlock(librevenge::RVNGInputStream *input) input->seek(1, librevenge::RVNG_SEEK_CUR); double bottomMargin = readDouble(input); unsigned char verticalAlign = readU8(input); - bool isBgFilled = (!!readU8(input)); + const unsigned char bgColourIdx = readU8(input); + const bool isBgFilled = bgColourIdx != 0 && bgColourIdx != 0xff; Colour c; c.r = readU8(input); c.g = readU8(input); -- 2.9.3