[Libreoffice-commits] .: Branch 'libreoffice-3-5-5' - 3 commits - libvisio/libvisio-0.0.17-fdo48601_part1.patch libvisio/libvisio-0.0.17-fdo48601_part2.patch libvisio/libvisio-0.0.17-fdo50988.patch libvisio/makefile.mk
Eike Rathke
erack at kemper.freedesktop.org
Mon Jun 18 09:08:35 PDT 2012
libvisio/libvisio-0.0.17-fdo48601_part1.patch | 26 ++++++++++
libvisio/libvisio-0.0.17-fdo48601_part2.patch | 64 ++++++++++++++++++++++++++
libvisio/libvisio-0.0.17-fdo50988.patch | 27 ++++++++++
libvisio/makefile.mk | 3 +
4 files changed, 120 insertions(+)
New commits:
commit 4dc81a8c3a3ca1054c2c62cc96e75eec4c896409
Author: Fridrich Å trba <fridrich.strba at bluewin.ch>
Date: Mon Jun 18 10:20:27 2012 +0200
Trying to solve out of bonds in fdo#48601
Change-Id: Idf9d56714d658a14af826a74c58aad26a9e29414
Signed-off-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
(cherry picked from commit 1969514f20cde8728a1d732e0cc3f566ca1400e1)
Signed-off-by: Eike Rathke <erack at redhat.com>
Signed-off-by: Tor Lillqvist <tml at iki.fi>
diff --git a/libvisio/libvisio-0.0.17-fdo48601_part2.patch b/libvisio/libvisio-0.0.17-fdo48601_part2.patch
new file mode 100644
index 0000000..5b65d8d
--- /dev/null
+++ b/libvisio/libvisio-0.0.17-fdo48601_part2.patch
@@ -0,0 +1,64 @@
+--- misc/libvisio-0.0.17/src/lib/VSDXContentCollector.cpp 2012-06-18 10:18:48.450129329 +0200
++++ misc/build/libvisio-0.0.17/src/lib/VSDXContentCollector.cpp 2012-06-18 10:18:17.935927778 +0200
+@@ -91,7 +91,8 @@
+ else if (m_fillPattern == 1)
+ {
+ m_fillType = "solid";
+- m_styleProps.insert("draw:fill-color", getColourString(m_colours[colourIndexFG]));
++ if (colourIndexFG < m_colours.size())
++ m_styleProps.insert("draw:fill-color", getColourString(m_colours[colourIndexFG]));
+ if (m_fillFGTransparency > 0)
+ m_styleProps.insert("draw:opacity", (double)(1 - m_fillFGTransparency/255.0), WPX_PERCENT);
+ else
+@@ -101,8 +102,10 @@
+ {
+ m_fillType = "gradient";
+ m_styleProps.insert("draw:style", "axial");
+- m_styleProps.insert("draw:start-color", getColourString(m_colours[colourIndexFG]));
+- m_styleProps.insert("draw:end-color", getColourString(m_colours[colourIndexBG]));
++ if (colourIndexFG < m_colours.size())
++ m_styleProps.insert("draw:start-color", getColourString(m_colours[colourIndexFG]));
++ if (colourIndexBG < m_colours.size())
++ m_styleProps.insert("draw:end-color", getColourString(m_colours[colourIndexBG]));
+ m_styleProps.remove("draw:opacity");
+ if (m_fillBGTransparency > 0)
+ m_styleProps.insert("libwpg:start-opacity", (double)(1 - m_fillBGTransparency/255.0), WPX_PERCENT);
+@@ -123,8 +126,10 @@
+ {
+ m_fillType = "gradient";
+ m_styleProps.insert("draw:style", "linear");
+- m_styleProps.insert("draw:start-color", getColourString(m_colours[colourIndexBG]));
+- m_styleProps.insert("draw:end-color", getColourString(m_colours[colourIndexFG]));
++ if (colourIndexBG < m_colours.size())
++ m_styleProps.insert("draw:start-color", getColourString(m_colours[colourIndexBG]));
++ if (colourIndexFG < m_colours.size())
++ m_styleProps.insert("draw:end-color", getColourString(m_colours[colourIndexFG]));
+ m_styleProps.remove("draw:opacity");
+ if (m_fillBGTransparency > 0)
+ m_styleProps.insert("libwpg:start-opacity", (double)(1 - m_fillBGTransparency/255.0), WPX_PERCENT);
+@@ -170,8 +175,10 @@
+ m_styleProps.insert("draw:style", "rectangular");
+ m_styleProps.insert("svg:cx", 0.5, WPX_PERCENT);
+ m_styleProps.insert("svg:cy", 0.5, WPX_PERCENT);
+- m_styleProps.insert("draw:start-color", getColourString(m_colours[colourIndexBG]));
+- m_styleProps.insert("draw:end-color", getColourString(m_colours[colourIndexFG]));
++ if (colourIndexBG < m_colours.size())
++ m_styleProps.insert("draw:start-color", getColourString(m_colours[colourIndexBG]));
++ if (colourIndexFG < m_colours.size())
++ m_styleProps.insert("draw:end-color", getColourString(m_colours[colourIndexFG]));
+ m_styleProps.remove("draw:opacity");
+ if (m_fillBGTransparency > 0)
+ m_styleProps.insert("libwpg:start-opacity", (double)(1 - m_fillBGTransparency/255.0), WPX_PERCENT);
+@@ -188,8 +195,10 @@
+ {
+ m_fillType = "gradient";
+ m_styleProps.insert("draw:style", "radial");
+- m_styleProps.insert("draw:start-color", getColourString(m_colours[colourIndexBG]));
+- m_styleProps.insert("draw:end-color", getColourString(m_colours[colourIndexFG]));
++ if (colourIndexBG < m_colours.size())
++ m_styleProps.insert("draw:start-color", getColourString(m_colours[colourIndexBG]));
++ if (colourIndexFG < m_colours.size())
++ m_styleProps.insert("draw:end-color", getColourString(m_colours[colourIndexFG]));
+ m_styleProps.remove("draw:opacity");
+ if (m_fillBGTransparency > 0)
+ m_styleProps.insert("libwpg:start-opacity", (double)(1 - m_fillBGTransparency/255.0), WPX_PERCENT);
diff --git a/libvisio/makefile.mk b/libvisio/makefile.mk
index 2855741..1de538b 100644
--- a/libvisio/makefile.mk
+++ b/libvisio/makefile.mk
@@ -60,6 +60,7 @@ TARFILE_MD5=90010e213dd25648e70f0cc12f8fed55
PATCH_FILES=\
$(TARFILE_NAME)-fdo50988.patch \
$(TARFILE_NAME)-fdo48601_part1.patch \
+ $(TARFILE_NAME)-fdo48601_part2.patch \
$(TARFILE_NAME).patch
BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
commit f7c639ba95ddf2b66401f9ce6943e7c40fa925f2
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Sat Jun 16 15:01:23 2012 +0200
Related: fdo#48601 FILEOPEN: Open Visio's file with bitmap's blocks
This fdo contains 2 files with which I had a different crash for each of them.
This patch fixes one of the 2 crashes.
Change-Id: Ic67cad4de4b66e913debe95efc04db3ae6fbf781
Signed-off-by: Fridrich Å trba <fridrich.strba at bluewin.ch>
(cherry picked from commit 84464c91aec92fec6eda49629ac8eb11507dd42a)
Signed-off-by: Eike Rathke <erack at redhat.com>
Signed-off-by: Michael Meeks <michael.meeks at suse.com>
Signed-off-by: Fridrich Strba <fridrich.strba at graduateinstitute.ch>
diff --git a/libvisio/libvisio-0.0.17-fdo48601_part1.patch b/libvisio/libvisio-0.0.17-fdo48601_part1.patch
new file mode 100644
index 0000000..c73af00
--- /dev/null
+++ b/libvisio/libvisio-0.0.17-fdo48601_part1.patch
@@ -0,0 +1,26 @@
+--- misc/build/libvisio-0.0.17/src/lib/VSDXContentCollector.cpp 2012-06-16 13:41:40.583153038 +0200
++++ misc/libvisio-0.0.17/src/lib/VSDXContentCollector.cpp 2012-06-16 13:44:16.311155881 +0200
+@@ -1131,14 +1131,16 @@
+ if (x <= m_pageWidth && x >= 0)
+ points[x] = y;
+
+- xmove = points.begin()->first;
+- ymove = points.begin()->second;
+- for (std::map<double, double>::iterator iter = points.begin(); iter != points.end(); ++iter)
+- {
+- if (iter->first != xmove || iter->second != ymove)
++ if (!points.empty()) {
++ xmove = points.begin()->first;
++ ymove = points.begin()->second;
++ for (std::map<double, double>::iterator iter = points.begin(); iter != points.end(); ++iter)
+ {
+- xline = iter->first;
+- yline = iter->second;
++ if (iter->first != xmove || iter->second != ymove)
++ {
++ xline = iter->first;
++ yline = iter->second;
++ }
+ }
+ }
+ }
diff --git a/libvisio/makefile.mk b/libvisio/makefile.mk
index 305a32b..2855741 100644
--- a/libvisio/makefile.mk
+++ b/libvisio/makefile.mk
@@ -59,6 +59,7 @@ TARFILE_MD5=90010e213dd25648e70f0cc12f8fed55
PATCH_FILES=\
$(TARFILE_NAME)-fdo50988.patch \
+ $(TARFILE_NAME)-fdo48601_part1.patch \
$(TARFILE_NAME).patch
BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
commit c49a512e630fdba3a706f582cd37424f9d695281
Author: Julien Nabet <serval2412 at yahoo.fr>
Date: Thu Jun 14 21:57:06 2012 +0200
Resolves: fdo#50988
Fix Draw crashes on loading MS Logical Design Diagram example visio file
It was a problem with an iterator. The comparison was OK only on "else" part.
In the "if" part, iterators are from different sequences.
Change-Id: I1ccc82a1c24289c0c2e89ef0275f0f5163dc8a8d
(cherry picked from commit cc85e1303fbdf7d1ff9c5b63ed9942206b53ddac)
Signed-off-by: Eike Rathke <erack at redhat.com>
Signed-off-by: Fridrich Strba <fridrich.strba at graduateinstitute.ch>
Signed-off-by: Michael Meeks <michael.meeks at suse.com>
diff --git a/libvisio/libvisio-0.0.17-fdo50988.patch b/libvisio/libvisio-0.0.17-fdo50988.patch
new file mode 100644
index 0000000..50b2dba
--- /dev/null
+++ b/libvisio/libvisio-0.0.17-fdo50988.patch
@@ -0,0 +1,27 @@
+--- misc/build/libvisio-0.0.17/src/lib/VSDXContentCollector.cpp 2012-06-12 20:44:51.773937254 +0200
++++ misc/libvisio-0.0.17/src/lib/VSDXContentCollector.cpp 2012-06-14 21:38:10.947384110 +0200
+@@ -1601,6 +1601,7 @@
+ void libvisio::VSDXContentCollector::collectPolylineTo(unsigned id, unsigned level, double x, double y, unsigned dataID)
+ {
+ std::map<unsigned, PolylineData>::const_iterator iter;
++ std::map<unsigned, PolylineData>::const_iterator iterEnd;
+ if (dataID == 0xFFFFFFFE) // Use stencil polyline data
+ {
+ if (!m_stencilShape || m_stencilShape->m_geometries.size() < m_currentGeometryCount)
+@@ -1613,13 +1614,15 @@
+ VSDXGeometryListElement *element = m_stencilShape->m_geometries[m_currentGeometryCount-1].getElement(id);
+ dataID = dynamic_cast<VSDXPolylineTo2 *>(element)->m_dataID;
+ iter = m_stencilShape->m_polylineData.find(dataID);
++ iterEnd = m_stencilShape->m_polylineData.end();
+ }
+ else // No stencils involved, directly get dataID
+ {
+ iter = m_polylineData.find(dataID);
++ iterEnd = m_polylineData.end();
+ }
+
+- if (iter != m_polylineData.end())
++ if (iter != iterEnd)
+ {
+ PolylineData data = iter->second;
+ collectPolylineTo(id, level, x, y, data.xType, data.yType, data.points);
diff --git a/libvisio/makefile.mk b/libvisio/makefile.mk
index ac76289..305a32b 100644
--- a/libvisio/makefile.mk
+++ b/libvisio/makefile.mk
@@ -58,6 +58,7 @@ TARFILE_NAME=libvisio-0.0.17
TARFILE_MD5=90010e213dd25648e70f0cc12f8fed55
PATCH_FILES=\
+ $(TARFILE_NAME)-fdo50988.patch \
$(TARFILE_NAME).patch
BUILD_ACTION=dmake $(MFLAGS) $(CALLMACROS)
More information about the Libreoffice-commits
mailing list