[Libreoffice-commits] .: Branch 'libreoffice-3-5' - 2 commits - codemaker/source libvisio/libvisio-0.0.16-fdo50178.patch libvisio/makefile.mk

Michael Stahl mst at kemper.freedesktop.org
Fri May 25 13:19:08 PDT 2012


 codemaker/source/javamaker/classfile.cxx |    2 +-
 libvisio/libvisio-0.0.16-fdo50178.patch  |   29 +++++++++++++++++++++++++++++
 libvisio/makefile.mk                     |    1 +
 3 files changed, 31 insertions(+), 1 deletion(-)

New commits:
commit 7e6a58014864ddafe534ed7a08ecca75fa4e4860
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri May 18 00:50:25 2012 +0200

    codemaker: write version 49 (1.5) class files
    
    The trick of writing generic types into class files of versions < 49
    does no longer work with javac from OpenJDK 7:
    
    /comphelper/qa/complex/comphelper/Map.java:154: error: type Pair does
    not take parameters
      Pair< ?, ? >[] initialMappings = new Pair< ?, ? >[ _keys.length ];
    
    There appears to be a related JDK bug for this, at some time javac had
    an undocumented option to produce similar class files that are also
    rejected now, this has been closed as "Not a Defect":
    
    http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7078419
    
    Change-Id: I8a504f6cbb3bb58cd914aebb88637cc6feb0bd48
    (cherry picked from commit 26643fb59e0005f0bc83708b785d20d62d8e7411)
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>
    Signed-off-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/codemaker/source/javamaker/classfile.cxx b/codemaker/source/javamaker/classfile.cxx
index 4f74781..59d386e 100644
--- a/codemaker/source/javamaker/classfile.cxx
+++ b/codemaker/source/javamaker/classfile.cxx
@@ -693,7 +693,7 @@ void ClassFile::addMethod(
 void ClassFile::write(FileStream & file) const {
     writeU4(file, 0xCAFEBABE);
     writeU2(file, 0);
-    writeU2(file, 46);
+    writeU2(file, 49); // class file version of JRE 1.5
     writeU2(file, m_constantPoolCount);
     writeStream(file, m_constantPool);
     writeU2(file, static_cast< sal_uInt16 >(m_accessFlags));
commit 85fbe039a520f2ae42a3022af4269fa82cc4bf39
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu May 24 20:36:21 2012 +0200

    Resolves: fdo#50178 Reading Visio file causes crash
    
    Problem with iterators, more info here :
    http://nabble.documentfoundation.org/PATCH-fix-proposed-for-fdo-50178-Visio-td3985678.html
    
    Change-Id: Ie7131e8bc79539b3a2a5f86608a4574e1ac0fbf8
    (cherry picked from commit 03764e29978bcf0b59a3738166b5af31d0af582a)
    
    Signed-off-by: Michael Stahl <mstahl at redhat.com>

diff --git a/libvisio/libvisio-0.0.16-fdo50178.patch b/libvisio/libvisio-0.0.16-fdo50178.patch
new file mode 100644
index 0000000..e05887a
--- /dev/null
+++ b/libvisio/libvisio-0.0.16-fdo50178.patch
@@ -0,0 +1,29 @@
+--- misc/build/libvisio-0.0.16/src/lib/VSDXContentCollector.cpp	2012-04-14 17:29:03.000000000 +0200
++++ misc/libvisio-0.0.16/src/lib/VSDXContentCollector.cpp	2012-05-23 22:30:44.542099908 +0200
+@@ -1470,7 +1470,8 @@
+ /* NURBS with incomplete data */
+ void libvisio::VSDXContentCollector::collectNURBSTo(unsigned id, unsigned level, double x2, double y2, double knot, double knotPrev, double weight, double weightPrev, unsigned dataID)
+ {
+-  std::map<unsigned, NURBSData>::const_iterator iter;
++  std::map<unsigned, NURBSData>::const_iterator iter;
++  std::map<unsigned, NURBSData>::const_iterator iterEnd;
+   NURBSData data;
+   if (dataID == 0xFFFFFFFE) // Use stencil NURBS data
+   {
+@@ -1490,13 +1491,15 @@
+     }
+     dataID = tmpElement->m_dataID;
+     iter = m_stencilShape->m_nurbsData.find(dataID);
++    iterEnd =  m_stencilShape->m_nurbsData.end();
+   }
+   else // No stencils involved, directly get dataID and fill in missing parts
+   {
+     iter = m_NURBSData.find(dataID);
++    iterEnd = m_NURBSData.end();
+   }
+ 
+-  if (iter != m_NURBSData.end())
++  if (iter != iterEnd)
+   {
+     data = iter->second;
+     data.knots.push_back(knot);
diff --git a/libvisio/makefile.mk b/libvisio/makefile.mk
index 2a1be7e..29e8658 100644
--- a/libvisio/makefile.mk
+++ b/libvisio/makefile.mk
@@ -59,6 +59,7 @@ TARFILE_MD5=2fa6028324347860e684e75310818d43
 
 PATCH_FILES=\
     $(TARFILE_NAME)-nothrow.patch \
+    $(TARFILE_NAME)-fdo50178.patch \
     $(TARFILE_NAME).patch
 
 


More information about the Libreoffice-commits mailing list