Kaydet (Commit) e448792c authored tarafından Andras Timar's avatar Andras Timar

libvisio fixes

Change-Id: If1bba0240b0a032a1bbbbb55329e2f0e5f507622
üst 83632a63
...@@ -16,6 +16,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libvisio,0)) ...@@ -16,6 +16,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libvisio,0))
$(eval $(call gb_UnpackedTarball_add_patches,libvisio,\ $(eval $(call gb_UnpackedTarball_add_patches,libvisio,\
external/libvisio/vsd-msvc-max.patch.1 \ external/libvisio/vsd-msvc-max.patch.1 \
external/libvisio/ubsan.patch \ external/libvisio/ubsan.patch \
external/libvisio/tdf-92270-VSDX-theme-color-import-fix.patch \
external/libvisio/tdf-92271-fix-VSDX-char-background-handling.patch \
)) ))
ifeq ($(COM_GCC_IS_CLANG),TRUE) ifeq ($(COM_GCC_IS_CLANG),TRUE)
......
--- src/lib/VSDXTheme.cpp
+++ src/lib/VSDXTheme.cpp
@@ -341,18 +341,25 @@ boost::optional<libvisio::Colour> libvisio::VSDXTheme::getThemeColour(unsigned v
switch (value)
{
case 100:
+ case 200:
return m_clrScheme.m_variationClrSchemeLst[variationIndex].m_varColor1;
case 101:
+ case 201:
return m_clrScheme.m_variationClrSchemeLst[variationIndex].m_varColor2;
case 102:
+ case 202:
return m_clrScheme.m_variationClrSchemeLst[variationIndex].m_varColor3;
case 103:
+ case 203:
return m_clrScheme.m_variationClrSchemeLst[variationIndex].m_varColor4;
case 104:
+ case 204:
return m_clrScheme.m_variationClrSchemeLst[variationIndex].m_varColor5;
case 105:
+ case 205:
return m_clrScheme.m_variationClrSchemeLst[variationIndex].m_varColor6;
case 106:
+ case 206:
return m_clrScheme.m_variationClrSchemeLst[variationIndex].m_varColor7;
default:
break;
--- src/lib/VSDStyles.h
+++ src/lib/VSDStyles.h
@@ -426,7 +426,7 @@ struct VSDTextBlockStyle
{
VSDTextBlockStyle() :
leftMargin(0.0), rightMargin(0.0), topMargin(0.0), bottomMargin(0.0), verticalAlign(1),
- isTextBkgndFilled(true), textBkgndColour(0xff,0xff,0xff,0), defaultTabStop(0.5), textDirection(0) {}
+ isTextBkgndFilled(false), textBkgndColour(0xff,0xff,0xff,0), defaultTabStop(0.5), textDirection(0) {}
VSDTextBlockStyle(double lm, double rm, double tm, double bm, unsigned char va,
bool isBgFilled, Colour bgClr, double defTab, unsigned char td) :
leftMargin(lm), rightMargin(rm), topMargin(tm), bottomMargin(bm), verticalAlign(va),
--- src/lib/VSDXParser.cpp
+++ src/lib/VSDXParser.cpp
@@ -939,7 +939,7 @@ int libvisio::VSDXParser::getElementDepth(xmlTextReaderPtr reader)
void libvisio::VSDXParser::readShapeProperties(xmlTextReaderPtr reader)
{
// Text block properties
- long bgClrId = 0;
+ long bgClrId = -1;
int ret = 1;
int tokenId = XML_TOKEN_INVALID;
@@ -1213,6 +1213,7 @@ void libvisio::VSDXParser::readShapeProperties(xmlTextReaderPtr reader)
textBkgndColour = Colour(0xff, 0xff, 0xff, 0);
}
m_shape.m_textBlockStyle.textBkgndColour = textBkgndColour;
+ m_shape.m_textBlockStyle.isTextBkgndFilled = true;
}
break;
case XML_DEFAULTTABSTOP:
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment