summaryrefslogtreecommitdiff
path: root/libvisio
diff options
context:
space:
mode:
authorFridrich Štrba <fridrich.strba@bluewin.ch>2013-07-13 08:13:39 +0200
committerNorbert Thiebaud <nthiebaud@gmail.com>2013-07-13 18:39:18 +0000
commit6180917f2d8280f643b14a69abdca79d91820f86 (patch)
treeac22edca53df0d91579d1fab0b6bbb788d6c97e1 /libvisio
parent56ed1221d4d578260d9e20715d073b70a099efa4 (diff)
Fix some runtime exceptions with msvc-built libvisio
The previous code was causing silent exceptions in some particular cases. Passing through a temporary works well. Change-Id: I71a9a58b98b5f392da4d8a4c8d08ddc1487ec79f (cherry picked from commit ae9003af4c3942aa184b67c3cb7687f9dfc7dd5e) Reviewed-on: https://gerrit.libreoffice.org/4878 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
Diffstat (limited to 'libvisio')
-rw-r--r--libvisio/UnpackedTarball_libvisio.mk4
-rw-r--r--libvisio/libvisio-0.0.30-msvc.patch.112
2 files changed, 16 insertions, 0 deletions
diff --git a/libvisio/UnpackedTarball_libvisio.mk b/libvisio/UnpackedTarball_libvisio.mk
index e4c0561f72f8..8b41f4a74ef4 100644
--- a/libvisio/UnpackedTarball_libvisio.mk
+++ b/libvisio/UnpackedTarball_libvisio.mk
@@ -11,4 +11,8 @@ $(eval $(call gb_UnpackedTarball_UnpackedTarball,libvisio))
$(eval $(call gb_UnpackedTarball_set_tarball,libvisio,$(VISIO_TARBALL)))
+$(eval $(call gb_UnpackedTarball_add_patches,libvisio,\
+ libvisio/libvisio-0.0.30-msvc.patch.1 \
+))
+
# vim: set noet sw=4 ts=4:
diff --git a/libvisio/libvisio-0.0.30-msvc.patch.1 b/libvisio/libvisio-0.0.30-msvc.patch.1
new file mode 100644
index 000000000000..448380629669
--- /dev/null
+++ b/libvisio/libvisio-0.0.30-msvc.patch.1
@@ -0,0 +1,12 @@
+--- a/src/lib/VSDContentCollector.cpp
++++ b/src/lib/VSDContentCollector.cpp
+@@ -655,7 +655,8 @@ void libvisio::VSDContentCollector::_flushText()
+ {
+ // Insert duplicate
+ std::vector<VSDCharStyle>::iterator charIt = m_charFormats.begin() + charIndex;
+- m_charFormats.insert(charIt, m_charFormats[charIndex]);
++ VSDCharStyle tmpCharFormat = m_charFormats[charIndex];
++ m_charFormats.insert(charIt, tmpCharFormat);
+ m_charFormats[charIndex].charCount = paraCharCount;
+ m_charFormats[charIndex+1].charCount -= paraCharCount;
+ }