[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.0' - external/libvisio
Andras Timar
andras.timar at collabora.com
Tue Jun 30 14:20:48 PDT 2015
external/libvisio/UnpackedTarball_libvisio.mk | 2
external/libvisio/tdf-92270-VSDX-theme-color-import-fix.patch | 28 +++++++++
external/libvisio/tdf-92271-fix-VSDX-char-background-handling.patch | 30 ++++++++++
3 files changed, 60 insertions(+)
New commits:
commit e448792ce35fa481470551bff6d68b6c4c87da40
Author: Andras Timar <andras.timar at collabora.com>
Date: Tue Jun 30 23:19:41 2015 +0200
libvisio fixes
Change-Id: If1bba0240b0a032a1bbbbb55329e2f0e5f507622
diff --git a/external/libvisio/UnpackedTarball_libvisio.mk b/external/libvisio/UnpackedTarball_libvisio.mk
index 4c55ece..db83360 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 0000000..14fd7ee
--- /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 0000000..ff58d50
--- /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:
More information about the Libreoffice-commits
mailing list