summaryrefslogtreecommitdiff
path: root/external
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2015-06-30 23:19:41 +0200
committerAndras Timar <andras.timar@collabora.com>2015-06-30 23:19:41 +0200
commite448792ce35fa481470551bff6d68b6c4c87da40 (patch)
tree0577cb50731ceca7a2cacfce2117db30e1b5d5bc /external
parent83632a63a177f5c94cdab4db8c66104c886d6c6c (diff)
libvisio fixes
Change-Id: If1bba0240b0a032a1bbbbb55329e2f0e5f507622
Diffstat (limited to 'external')
-rw-r--r--external/libvisio/UnpackedTarball_libvisio.mk2
-rw-r--r--external/libvisio/tdf-92270-VSDX-theme-color-import-fix.patch28
-rw-r--r--external/libvisio/tdf-92271-fix-VSDX-char-background-handling.patch30
3 files changed, 60 insertions, 0 deletions
diff --git a/external/libvisio/UnpackedTarball_libvisio.mk b/external/libvisio/UnpackedTarball_libvisio.mk
index 4c55ecec1baf..db83360da3c1 100644
--- a/external/libvisio/UnpackedTarball_libvisio.mk
+++ b/external/libvisio/UnpackedTarball_libvisio.mk
@@ -16,6 +16,8 @@ $(eval $(call gb_UnpackedTarball_set_patchlevel,libvisio,0))
$(eval $(call gb_UnpackedTarball_add_patches,libvisio,\
external/libvisio/vsd-msvc-max.patch.1 \
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)
diff --git a/external/libvisio/tdf-92270-VSDX-theme-color-import-fix.patch b/external/libvisio/tdf-92270-VSDX-theme-color-import-fix.patch
new file mode 100644
index 000000000000..14fd7ee7735f
--- /dev/null
+++ b/external/libvisio/tdf-92270-VSDX-theme-color-import-fix.patch
@@ -0,0 +1,28 @@
+--- 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;
diff --git a/external/libvisio/tdf-92271-fix-VSDX-char-background-handling.patch b/external/libvisio/tdf-92271-fix-VSDX-char-background-handling.patch
new file mode 100644
index 000000000000..ff58d50eebe3
--- /dev/null
+++ b/external/libvisio/tdf-92271-fix-VSDX-char-background-handling.patch
@@ -0,0 +1,30 @@
+--- 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: