[libqxp] 01/03: New upstream version 0.0.1

Rene Engelhard rene at moszumanska.debian.org
Sun Dec 31 18:07:58 UTC 2017


This is an automated email from the git hooks/post-receive script.

rene pushed a commit to branch master
in repository libqxp.

commit 27b30e5c62bf92beef1e2a705d61b3dd392bb6ee
Author: Rene Engelhard <rene at rene-engelhard.de>
Date:   Sun Dec 31 18:42:45 2017 +0100

    New upstream version 0.0.1
---
 ChangeLog                       | 259 +++++++++++++++++++++++++++++++++
 Makefile.in                     |   5 +-
 NEWS                            |   7 +
 aclocal.m4                      |  46 +++---
 autogen.sh                      |  32 ++++-
 build/Makefile.in               |   5 +-
 build/win32/Makefile.in         |   5 +-
 compile                         |   9 +-
 configure                       | 311 ++++++++++++----------------------------
 configure.ac                    |  38 ++---
 depcomp                         |   6 +-
 docs/Makefile.in                |   5 +-
 docs/doxygen/Makefile.in        |   5 +-
 inc/Makefile.in                 |   5 +-
 inc/libqxp/Makefile.in          |   5 +-
 m4/ax_cxx_compile_stdcxx.m4     |   2 +-
 missing                         |   6 +-
 src/Makefile.in                 |   5 +-
 src/conv/Makefile.in            |   5 +-
 src/conv/raw/Makefile.in        |   5 +-
 src/conv/svg/Makefile.in        |   5 +-
 src/conv/text/Makefile.in       |   5 +-
 src/fuzz/Makefile.in            |   5 +-
 src/fuzz/qxpfuzzer.cpp          |   4 +-
 src/lib/Makefile.am             |   1 -
 src/lib/Makefile.in             |   6 +-
 src/lib/QXP33Parser.cpp         |  32 ++---
 src/lib/QXP33Parser.h           |   4 +-
 src/lib/QXP4Deobfuscator.cpp    |   2 +-
 src/lib/QXP4Parser.cpp          |  68 +++++----
 src/lib/QXP4Parser.h            |   4 +-
 src/lib/QXPBlockParser.cpp      |  84 +++++++++--
 src/lib/QXPBlockParser.h        |   2 +
 src/lib/QXPContentCollector.cpp |  38 +++--
 src/lib/QXPContentCollector.h   |   2 +-
 src/lib/QXPMacFileParser.cpp    |   9 +-
 src/lib/QXPMemoryStream.h       |   2 +-
 src/lib/QXPParser.cpp           |  38 ++++-
 src/lib/QXPParser.h             |   4 +
 src/lib/QXPTextParser.cpp       |  89 +++++-------
 src/lib/libqxp.rc               |   8 +-
 src/lib/libqxp_utils.cpp        |   8 +-
 src/lib/libqxp_utils.h          |   4 +-
 src/test/Makefile.in            |   5 +-
 src/test/QXPBlockParserTest.cpp |   4 +-
 src/test/QXPTextParserTest.cpp  |   4 +-
 src/test/UtilsTest.cpp          |  17 +++
 47 files changed, 729 insertions(+), 491 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 9686525..9e79a2c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,262 @@
+2017-12-31  David Tardon  <dtardon at redhat.com>  [1381edd899cac68950dc0b8421cbcef889573de3]
+
+	cid#216093 improve error checking in chain parser
+
+	Change-Id: I8428de670acac2c5fc24e224aebb341a5786e1cc
+
+2017-12-31  David Tardon  <dtardon at redhat.com>  [0648a481b358938694168de1f78778087508b7ea]
+
+	prepare for a release
+
+	Change-Id: I7d44e6a811c2ea211518290ed7a0c9f2d2c1eab1
+
+2017-10-28  David Tardon  <dtardon at redhat.com>  [fd3f5e9aa55bcbd63f88c00cabf5c3be2df201ac]
+
+	drop outdated MSVC project file skels
+
+
+2017-10-28  David Tardon  <dtardon at redhat.com>  [6296051cfa7a25fdde15b1a45fece9e82dea0426]
+
+	save some vertical space
+
+
+2017-10-02  David Tardon  <dtardon at redhat.com>  [bc9ad50bc8e168ba830db14d9cf0179823731bf3]
+
+	ofz#3226 avoid overflow causing big allocation
+
+	Change-Id: Ib2be6aa0ec2d17602373b478052b11c98b18f2b6
+
+2017-09-28  David Tardon  <dtardon at redhat.com>  [0eb2db818abe114a046a853eaf7f7ced77eab2f6]
+
+	avoid output from fuzzer
+
+	Change-Id: I73396c886d1d1fab614f3ae568778383984b12df
+
+2017-09-27  David Tardon  <dtardon at redhat.com>  [ac975cd20421b8a7ee152d9570f35bd8e89b2e26]
+
+	ofz#3378 ensure sane font size
+
+	Change-Id: I2119424965882046320391c28faf24d0957a401f
+
+2017-09-27  David Tardon  <dtardon at redhat.com>  [9fc70628b6f46cb868150c464b4e005d1694db4f]
+
+	ofz#3365 avoid null pointer dereference
+
+
+2017-09-27  David Tardon  <dtardon at redhat.com>  [7a6bd768aa7c934a0bb92f20afed5cae89ab0769]
+
+	ofz#3212 ensure that format always exists
+
+
+2017-09-27  David Tardon  <dtardon at redhat.com>  [03b97ec988bf31ba8dfba4359131a79ae61c75cb]
+
+	update autogen to install hooks automatically
+
+	Change-Id: Ic68fff2bf52dd833f4a6b2c91a66b249c36e47c2
+
+2017-09-27  David Tardon  <dtardon at redhat.com>  [6d8ce3dd480bc0363ab3ccadd7ed7d7786849801]
+
+	set up git-review
+
+
+2017-09-27  David Tardon  <dtardon at redhat.com>  [d7a1206a120e7bc180c98df711fc712ea92765f3]
+
+	add git hooks
+
+
+2017-09-12  David Tardon  <dtardon at redhat.com>  [c369f81acea232d205ccaa20ace5cb4ca6374445]
+
+	use for loop
+
+
+2017-09-12  David Tardon  <dtardon at redhat.com>  [586c526dc9ee36a7b1cd5c65a2d5415ef2442c39]
+
+	ofz#3355 check for cycles in groups
+
+
+2017-09-12  David Tardon  <dtardon at redhat.com>  [b61cb7e9bcb6f1281c0a0762d656bb2d466bb85b]
+
+	skip invalid group element indices
+
+
+2017-09-12  David Tardon  <dtardon at redhat.com>  [e274b1e2d6227cbbb6988c8fc81950347ad05e2d]
+
+	ofz#3359 avoid undefined shift
+
+
+2017-09-10  Miklos Vajna  <vmiklos at collabora.co.uk>  [1e81ef5d4acb550dfa283f63d5d39608fe11c5d2]
+
+	m4: MSVC defines __cplusplus as 199711L still
+
+	See e.g.
+	<https://stackoverflow.com/questions/37503029/cplusplus-is-equal-to-199711-in-msvc-does-it-support-c11>,
+	on MSVC we can't depend on the value of __cplusplus, since that one is a
+	too low value, even if everything else works fine.
+
+2017-09-10  David Tardon  <dtardon at redhat.com>  [031d75b159dc3d3391d0cf0dcb00bcbc7c79bd7d]
+
+	sanitize # of blocks
+
+
+2017-09-10  David Tardon  <dtardon at redhat.com>  [8cfee891ac0bc832fc493f839acb2eae72723640]
+
+	detect cycles in chains
+
+
+2017-09-10  David Tardon  <dtardon at redhat.com>  [a91a82e4e335e88b68e141331371765d19b00c3c]
+
+	ofz#3190 read as much of the block structure as possible
+
+
+2017-09-08  David Tardon  <dtardon at redhat.com>  [1273cd3767db1ef7efa6bd7656b928c12f237f04]
+
+	make librevenge-stream and -generators really optional
+
+
+2017-09-01  David Tardon  <dtardon at redhat.com>  [da2707e1807c6413c5a38615d335b1fbcf20ff7f]
+
+	reduce the amount of copypasta
+
+
+2017-09-01  David Tardon  <dtardon at redhat.com>  [959cccbf7f3091224d9696298483806ab77c8088]
+
+	fix new/delete mismatch
+
+
+2017-08-30  David Tardon  <dtardon at redhat.com>  [e09ed760ee6bfd994032197064fcae8eac0c3937]
+
+	cid#167066 untrusted loop bound
+
+
+2017-08-30  David Tardon  <dtardon at redhat.com>  [f0d487dd927bf717ca827335cb5266ba893f248f]
+
+	the number can never be negative
+
+
+2017-08-30  David Tardon  <dtardon at redhat.com>  [c7bcbc0310ae02580ea8b1ff07cabcb1548fec82]
+
+	check result of seek directly
+
+
+2017-08-30  David Tardon  <dtardon at redhat.com>  [9f8fc2ba628c8da471b951966241ca6def6c27ea]
+
+	cid#167076 untrusted loop bound
+
+
+2017-08-30  David Tardon  <dtardon at redhat.com>  [be8e80d2efdfdf7077badc33106fe7d920f704f1]
+
+	cid#167070 untrusted loop bound
+
+
+2017-08-30  David Tardon  <dtardon at redhat.com>  [bf5d1e5371f63a5b3802bcbfc8309c50f11d6002]
+
+	emplace_back does not make any sense here
+
+
+2017-08-30  David Tardon  <dtardon at redhat.com>  [c77211fcd4e652541532cd61223f4bdff03321f0]
+
+	cid#167069 untrusted loop bound
+
+
+2017-08-30  David Tardon  <dtardon at redhat.com>  [3f99c1c94df9859f02e30b78f7abb27e267ae923]
+
+	cid#167068 untrusted loop bound
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [d2402f84d2546cb2c82cfed86e1183d361de4c59]
+
+	cid#167067 sanitize tempate count
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [3b0ea4f9552419b6a0da84c84e1be4281f28747d]
+
+	sanitize record length
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [1e99a5cfc6411ac3317aabe1439d0866bd988b11]
+
+	just fail if length is too big
+
+	There is nothing to parse in that case anyway.
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [1c39f81bdb530fb1a6c996390ff8d5a9a3e49af5]
+
+	cid#167065 sanitize length
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [4459100084b73619518729ff3c76e9835fce86ea]
+
+	add a test for getRemainingLength
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [fd117f863d73c1c15c6801b8f1201ac167b64516]
+
+	getLength -> getRemainingLength
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [49827b3b535c1757d7b9f41a77539f83cd03d54f]
+
+	librevenge-stream headers are not needed
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [139dc3d8cecb3bf12a61411daf4623a83b5be33e]
+
+	cid#167077 improper use of negative value
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [ce06a8979b71534ba85667c21f3d7aacbb666e33]
+
+	cid#167074 operands don't affect result
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [cdd8b4f995be03d1ff348a041154092c2c386303]
+
+	cid#167072 operands don't affect result
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [d642b2773cddabb6e6ebc6ddc87e9a9ab36fa378]
+
+	cid#167071 operands don't affect result
+
+
+2017-08-29  David Tardon  <dtardon at redhat.com>  [1daf69b46bdb5aeec2e8b34ae33965bb8d961c5e]
+
+	cid#167064 operands don't affect result
+
+
+2017-08-28  David Tardon  <dtardon at redhat.com>  [1b6b8f1cc9cea273ddd64cfcb50e3287a4d98d9e]
+
+	assume modern-enough ICU is available
+
+	The separate .pc files already exist in 46.0, possibly even in older
+	versions.
+
+2017-08-28  David Tardon  <dtardon at redhat.com>  [41db6b9e3b9fc7b9b2fc830e66f1dc5e38048c4d]
+
+	check for the right ICU module
+
+
+2017-08-28  David Tardon  <dtardon at redhat.com>  [3d0b78eb855dc3797e614a72019afbebbebc536a]
+
+	WaE: narrowing conversion
+
+	error C2398: Element '3': conversion from 'unsigned __int64' to 'unsigned long' requires a narrowing conversion
+
+2017-08-27  Aleksas Pantechovskis  <alex.pantec at gmail.com>  [5658a197de7dd7827e6cb2ba9acd8ed7934e9e83]
+
+	add missing includes
+
+
+2017-08-27  Aleksas Pantechovskis  <alex.pantec at gmail.com>  [4118cfa23d2e251278a55f7fd44c246c84c41ab5]
+
+	don't use RVNGStringStream in the main lib
+
+	librevenge-stream is not used in libreoffice
+2017-08-27  David Tardon  <dtardon at redhat.com>  [fe901f2eae09a501472453c807057df9fd74b4ad]
+
+	bump version
+
+
 2017-08-27  David Tardon  <dtardon at redhat.com>  [f151069681f0af64ddc9dd8ffe0d9c7a413a0080]
 
 	update AUTHORS
diff --git a/Makefile.in b/Makefile.in
index 970bff0..8487f5a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -276,7 +276,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/NEWS b/NEWS
index 01f5dd1..865bdac 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,10 @@
+libqxp-0.0.1
+
+- Fix build with MSVC.
+- Fix various issues found by Coverity and oss-fuzz.
+- Make build dependencies librevenge-stream and librevenge-generators
+  optional. They are only needed for tests and conversion tools.
+
 libqxp-0.0.0
 
 - First release.
diff --git a/aclocal.m4 b/aclocal.m4
index d2ad1f6..76fc704 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,6 +1,6 @@
-# generated automatically by aclocal 1.15 -*- Autoconf -*-
+# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -402,7 +402,7 @@ AS_IF([test "$AS_TR_SH([with_]m4_tolower([$1]))" = "yes"],
         [AC_DEFINE([HAVE_][$1], 1, [Enable ]m4_tolower([$1])[ support])])
 ])dnl PKG_HAVE_DEFINE_WITH_MODULES
 
-# Copyright (C) 2002-2014 Free Software Foundation, Inc.
+# Copyright (C) 2002-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -417,7 +417,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
 [am__api_version='1.15'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.15], [],
+m4_if([$1], [1.15.1], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -433,12 +433,12 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.15])dnl
+[AM_AUTOMAKE_VERSION([1.15.1])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
 
-# Copyright (C) 2011-2014 Free Software Foundation, Inc.
+# Copyright (C) 2011-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -500,7 +500,7 @@ AC_SUBST([AR])dnl
 
 # AM_AUX_DIR_EXPAND                                         -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -552,7 +552,7 @@ am_aux_dir=`cd "$ac_aux_dir" && pwd`
 
 # AM_CONDITIONAL                                            -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -583,7 +583,7 @@ AC_CONFIG_COMMANDS_PRE(
 Usually this means the macro was only invoked conditionally.]])
 fi])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -774,7 +774,7 @@ _AM_SUBST_NOTMAKE([am__nodep])dnl
 
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -850,7 +850,7 @@ AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
 
 # Do all the work for Automake.                             -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1047,7 +1047,7 @@ for _am_header in $config_headers :; do
 done
 echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1068,7 +1068,7 @@ if test x"${install_sh+set}" != xset; then
 fi
 AC_SUBST([install_sh])])
 
-# Copyright (C) 2003-2014 Free Software Foundation, Inc.
+# Copyright (C) 2003-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1089,7 +1089,7 @@ AC_SUBST([am__leading_dot])])
 
 # Check to see how 'make' treats includes.	            -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1139,7 +1139,7 @@ rm -f confinc confmf
 
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997-2014 Free Software Foundation, Inc.
+# Copyright (C) 1997-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1178,7 +1178,7 @@ fi
 
 # Helper functions for option handling.                     -*- Autoconf -*-
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1207,7 +1207,7 @@ AC_DEFUN([_AM_SET_OPTIONS],
 AC_DEFUN([_AM_IF_OPTION],
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1254,7 +1254,7 @@ AC_LANG_POP([C])])
 # For backward compatibility.
 AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1273,7 +1273,7 @@ AC_DEFUN([AM_RUN_LOG],
 
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1354,7 +1354,7 @@ AC_CONFIG_COMMANDS_PRE(
 rm -f conftest.file
 ])
 
-# Copyright (C) 2009-2014 Free Software Foundation, Inc.
+# Copyright (C) 2009-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1414,7 +1414,7 @@ AC_SUBST([AM_BACKSLASH])dnl
 _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
-# Copyright (C) 2001-2014 Free Software Foundation, Inc.
+# Copyright (C) 2001-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1442,7 +1442,7 @@ fi
 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
 AC_SUBST([INSTALL_STRIP_PROGRAM])])
 
-# Copyright (C) 2006-2014 Free Software Foundation, Inc.
+# Copyright (C) 2006-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -1461,7 +1461,7 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
 
 # Check how to create a tarball.                            -*- Autoconf -*-
 
-# Copyright (C) 2004-2014 Free Software Foundation, Inc.
+# Copyright (C) 2004-2017 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/autogen.sh b/autogen.sh
index c6b17b9..16d525f 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -1,4 +1,20 @@
 #!/bin/sh
+
+set_git_hooks()
+{
+    # assume that the current directory is the source tree
+    if [ -d ".git" ] ; then
+        for hook in $(ls -1 .git-hooks) ; do
+            cd .git/hooks
+            if [ ! -e "${hook?}" -o -L "${hook?}" ] ; then
+                rm -f "${hook?}"
+                ln -sf "../../.git-hooks/${hook?}" "${hook?}"
+            fi
+            cd - > /dev/null
+        done
+    fi
+}
+
 TESTLIBTOOLIZE="glibtoolize libtoolize"
 
 LIBTOOLIZEFOUND="0"
@@ -9,6 +25,8 @@ test -z "$srcdir" && srcdir=.
 olddir=`pwd`
 cd $srcdir
 
+set_git_hooks
+
 aclocal --version > /dev/null 2> /dev/null || {
     echo "error: aclocal not found"
     exit 1
@@ -19,16 +37,16 @@ automake --version > /dev/null 2> /dev/null || {
 }
 
 for i in $TESTLIBTOOLIZE; do
-	if which $i > /dev/null 2>&1; then
-		LIBTOOLIZE=$i
-		LIBTOOLIZEFOUND="1"
-		break
-	fi
+    if which $i > /dev/null 2>&1; then
+        LIBTOOLIZE=$i
+        LIBTOOLIZEFOUND="1"
+        break
+    fi
 done
 
 if [ "$LIBTOOLIZEFOUND" = "0" ]; then
-	echo "$0: need libtoolize tool to build libqxp" >&2
-	exit 1
+    echo "$0: need libtoolize tool to build libqxp" >&2
+    exit 1
 fi
 
 amcheck=`automake --version | grep 'automake (GNU automake) 1.5'`
diff --git a/build/Makefile.in b/build/Makefile.in
index 28560db..951b4ae 100644
--- a/build/Makefile.in
+++ b/build/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -223,7 +223,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/build/win32/Makefile.in b/build/win32/Makefile.in
index 2d78cf1..d57f4af 100644
--- a/build/win32/Makefile.in
+++ b/build/win32/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -163,7 +163,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/compile b/compile
index a85b723..2ab71e4 100755
--- a/compile
+++ b/compile
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand '-c -o'.
 
-scriptversion=2012-10-14.11; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 # Written by Tom Tromey <tromey at cygnus.com>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -255,7 +255,8 @@ EOF
     echo "compile $scriptversion"
     exit $?
     ;;
-  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+  cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \
+  icl | *[/\\]icl | icl.exe | *[/\\]icl.exe )
     func_cl_wrapper "$@"      # Doesn't return...
     ;;
 esac
@@ -342,6 +343,6 @@ exit $ret
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/configure b/configure
index c770ae3..6ff8264 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libqxp 0.0.0.
+# Generated by GNU Autoconf 2.69 for libqxp 0.0.1.
 #
 #
 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
@@ -587,8 +587,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='libqxp'
 PACKAGE_TARNAME='libqxp'
-PACKAGE_VERSION='0.0.0'
-PACKAGE_STRING='libqxp 0.0.0'
+PACKAGE_VERSION='0.0.1'
+PACKAGE_STRING='libqxp 0.0.1'
 PACKAGE_BUGREPORT=''
 PACKAGE_URL=''
 
@@ -663,7 +663,6 @@ QXP_VERSION
 QXP_MICRO_VERSION
 QXP_MINOR_VERSION
 QXP_MAJOR_VERSION
-ICU_CONFIG
 ICU_LIBS
 ICU_CFLAGS
 BOOST_CFLAGS
@@ -1383,7 +1382,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures libqxp 0.0.0 to adapt to many kinds of systems.
+\`configure' configures libqxp 0.0.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1453,7 +1452,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of libqxp 0.0.0:";;
+     short | recursive ) echo "Configuration of libqxp 0.0.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1599,7 +1598,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-libqxp configure 0.0.0
+libqxp configure 0.0.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2029,7 +2028,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by libqxp $as_me 0.0.0, which was
+It was created by libqxp $as_me 0.0.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -2895,7 +2894,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='libqxp'
- VERSION='0.0.0'
+ VERSION='0.0.1'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -17095,7 +17094,7 @@ else
 
 #error "This is not a C++ compiler"
 
-#elif __cplusplus < 201103L
+#elif __cplusplus < 201103L && !(defined _MSC_VER)
 
 #error "This is not a C++11 compiler"
 
@@ -17408,7 +17407,7 @@ else
 
 #error "This is not a C++ compiler"
 
-#elif __cplusplus < 201103L
+#elif __cplusplus < 201103L && !(defined _MSC_VER)
 
 #error "This is not a C++11 compiler"
 
@@ -17730,7 +17729,7 @@ else
 
 #error "This is not a C++ compiler"
 
-#elif __cplusplus < 201103L
+#elif __cplusplus < 201103L && !(defined _MSC_VER)
 
 #error "This is not a C++11 compiler"
 
@@ -18361,18 +18360,12 @@ if test -n "$REVENGE_CFLAGS"; then
     pkg_cv_REVENGE_CFLAGS="$REVENGE_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
-    librevenge-0.0
-\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "
-    librevenge-0.0
-") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"librevenge-0.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "librevenge-0.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_REVENGE_CFLAGS=`$PKG_CONFIG --cflags "
-    librevenge-0.0
-" 2>/dev/null`
+  pkg_cv_REVENGE_CFLAGS=`$PKG_CONFIG --cflags "librevenge-0.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -18384,18 +18377,12 @@ if test -n "$REVENGE_LIBS"; then
     pkg_cv_REVENGE_LIBS="$REVENGE_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
-    librevenge-0.0
-\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "
-    librevenge-0.0
-") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"librevenge-0.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "librevenge-0.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_REVENGE_LIBS=`$PKG_CONFIG --libs "
-    librevenge-0.0
-" 2>/dev/null`
+  pkg_cv_REVENGE_LIBS=`$PKG_CONFIG --libs "librevenge-0.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -18416,20 +18403,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        REVENGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
-    librevenge-0.0
-" 2>&1`
+	        REVENGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "librevenge-0.0" 2>&1`
         else
-	        REVENGE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
-    librevenge-0.0
-" 2>&1`
+	        REVENGE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "librevenge-0.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$REVENGE_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (
-    librevenge-0.0
-) were not met:
+	as_fn_error $? "Package requirements (librevenge-0.0) were not met:
 
 $REVENGE_PKG_ERRORS
 
@@ -18495,13 +18476,6 @@ CPPFLAGS="${saved_CPPFLAGS}"
 # ========
 # Find icu
 # ========
-if test "${ICU_CFLAGS+set}" = set; then :
-
-	ICU_CFLAGS_overriden=yes
-else
-
-	ICU_CFLAGS_overriden=no
-fi
 
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICU" >&5
@@ -18511,12 +18485,12 @@ if test -n "$ICU_CFLAGS"; then
     pkg_cv_ICU_CFLAGS="$ICU_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "icu-i18n") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "icu-uc") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-i18n" 2>/dev/null`
+  pkg_cv_ICU_CFLAGS=`$PKG_CONFIG --cflags "icu-uc" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -18528,12 +18502,12 @@ if test -n "$ICU_LIBS"; then
     pkg_cv_ICU_LIBS="$ICU_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-i18n\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "icu-i18n") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"icu-uc\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "icu-uc") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-i18n" 2>/dev/null`
+  pkg_cv_ICU_LIBS=`$PKG_CONFIG --libs "icu-uc" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -18554,135 +18528,44 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-i18n" 2>&1`
+	        ICU_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "icu-uc" 2>&1`
         else
-	        ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-i18n" 2>&1`
+	        ICU_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "icu-uc" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$ICU_PKG_ERRORS" >&5
 
+	as_fn_error $? "Package requirements (icu-uc) were not met:
 
-	# Extract the first word of "icu-config", so it can be a program name with args.
-set dummy icu-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ICU_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ICU_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ICU_CONFIG="$ICU_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ICU_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ICU_CONFIG=$ac_cv_path_ICU_CONFIG
-if test -n "$ICU_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_CONFIG" >&5
-$as_echo "$ICU_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU installation" >&5
-$as_echo_n "checking ICU installation... " >&6; }
-	if ${ICU_CONFIG} --cflags >/dev/null 2>&1; then :
-
-		ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath --cxxflags`
-		ICU_LIBS=`${ICU_CONFIG} --ldflags`
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
-else
+$ICU_PKG_ERRORS
 
-		as_fn_error $? "libicu config program icu-config not found" "$LINENO" 5
-fi
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
 
+Alternatively, you may set the environment variables ICU_CFLAGS
+and ICU_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details." "$LINENO" 5
 elif test $pkg_failed = untried; then
      	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
 $as_echo "no" >&6; }
+	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "The pkg-config script could not be found or is too old.  Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
 
-	# Extract the first word of "icu-config", so it can be a program name with args.
-set dummy icu-config; ac_word=$2
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if ${ac_cv_path_ICU_CONFIG+:} false; then :
-  $as_echo_n "(cached) " >&6
-else
-  case $ICU_CONFIG in
-  [\\/]* | ?:[\\/]*)
-  ac_cv_path_ICU_CONFIG="$ICU_CONFIG" # Let the user override the test with a path.
-  ;;
-  *)
-  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-    for ac_exec_ext in '' $ac_executable_extensions; do
-  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
-    ac_cv_path_ICU_CONFIG="$as_dir/$ac_word$ac_exec_ext"
-    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-  done
-IFS=$as_save_IFS
-
-  ;;
-esac
-fi
-ICU_CONFIG=$ac_cv_path_ICU_CONFIG
-if test -n "$ICU_CONFIG"; then
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICU_CONFIG" >&5
-$as_echo "$ICU_CONFIG" >&6; }
-else
-  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking ICU installation" >&5
-$as_echo_n "checking ICU installation... " >&6; }
-	if ${ICU_CONFIG} --cflags >/dev/null 2>&1; then :
-
-		ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath --cxxflags`
-		ICU_LIBS=`${ICU_CONFIG} --ldflags`
-		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5
-$as_echo "found" >&6; }
-else
-
-		as_fn_error $? "libicu config program icu-config not found" "$LINENO" 5
-fi
+Alternatively, you may set the environment variables ICU_CFLAGS
+and ICU_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.
 
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.
+See \`config.log' for more details" "$LINENO" 5; }
 else
 	ICU_CFLAGS=$pkg_cv_ICU_CFLAGS
 	ICU_LIBS=$pkg_cv_ICU_LIBS
         { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
 $as_echo "yes" >&6; }
 
-	if test "${ICU_CFLAGS_overriden}" = no; then :
-
-		ICU_CFLAGS="${ICU_CFLAGS} `${PKG_CONFIG} icu-i18n --variable=CXXFLAGS`"
-fi
-
 fi
 
 
@@ -18694,9 +18577,9 @@ QXP_MAJOR_VERSION=0
 
 QXP_MINOR_VERSION=0
 
-QXP_MICRO_VERSION=0
+QXP_MICRO_VERSION=1
 
-QXP_VERSION=0.0.0
+QXP_VERSION=0.0.1
 
 # AC_SUBST(LT_RELEASE, [libqxp_version_major.libqxp_version_minor])
 LT_CURRENT=`expr 100 '*' 0 + 0`
@@ -18704,7 +18587,7 @@ LT_CURRENT=`expr 100 '*' 0 + 0`
 LT_AGE=0
 # LT_AGE=libqxp_version_minor
 
-LT_REVISION=0
+LT_REVISION=1
 
 
 
@@ -19139,6 +19022,9 @@ else
   WITH_TESTS_FALSE=
 fi
 
+if test "x$enable_tests" = "xyes"; then :
+  need_stream=yes
+fi
 
 # =============
 # Documentation
@@ -19245,6 +19131,9 @@ else
   BUILD_TOOLS_FALSE=
 fi
 
+if test "x$enable_tools" = "xyes"; then :
+  need_stream=yes; need_generators=yes
+fi
 
 # =======
 # Fuzzers
@@ -19265,6 +19154,11 @@ else
   BUILD_FUZZERS_FALSE=
 fi
 
+if test "x$enable_fuzzers" = "xyes"; then :
+  need_stream=yes; need_generators=yes
+fi
+
+if test "x$need_generators" = "xyes"; then :
 
 
 pkg_failed=no
@@ -19275,18 +19169,12 @@ if test -n "$REVENGE_GENERATORS_CFLAGS"; then
     pkg_cv_REVENGE_GENERATORS_CFLAGS="$REVENGE_GENERATORS_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
-    librevenge-generators-0.0
-\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "
-    librevenge-generators-0.0
-") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"librevenge-generators-0.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "librevenge-generators-0.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_REVENGE_GENERATORS_CFLAGS=`$PKG_CONFIG --cflags "
-    librevenge-generators-0.0
-" 2>/dev/null`
+  pkg_cv_REVENGE_GENERATORS_CFLAGS=`$PKG_CONFIG --cflags "librevenge-generators-0.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -19298,18 +19186,12 @@ if test -n "$REVENGE_GENERATORS_LIBS"; then
     pkg_cv_REVENGE_GENERATORS_LIBS="$REVENGE_GENERATORS_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
-    librevenge-generators-0.0
-\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "
-    librevenge-generators-0.0
-") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"librevenge-generators-0.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "librevenge-generators-0.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_REVENGE_GENERATORS_LIBS=`$PKG_CONFIG --libs "
-    librevenge-generators-0.0
-" 2>/dev/null`
+  pkg_cv_REVENGE_GENERATORS_LIBS=`$PKG_CONFIG --libs "librevenge-generators-0.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -19330,20 +19212,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        REVENGE_GENERATORS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
-    librevenge-generators-0.0
-" 2>&1`
+	        REVENGE_GENERATORS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "librevenge-generators-0.0" 2>&1`
         else
-	        REVENGE_GENERATORS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
-    librevenge-generators-0.0
-" 2>&1`
+	        REVENGE_GENERATORS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "librevenge-generators-0.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$REVENGE_GENERATORS_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (
-    librevenge-generators-0.0
-) were not met:
+	as_fn_error $? "Package requirements (librevenge-generators-0.0) were not met:
 
 $REVENGE_GENERATORS_PKG_ERRORS
 
@@ -19376,6 +19252,13 @@ $as_echo "yes" >&6; }
 
 fi
 
+fi
+
+
+
+if test "x$need_stream" = "xyes"; then :
+
+
 pkg_failed=no
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for REVENGE_STREAM" >&5
 $as_echo_n "checking for REVENGE_STREAM... " >&6; }
@@ -19384,18 +19267,12 @@ if test -n "$REVENGE_STREAM_CFLAGS"; then
     pkg_cv_REVENGE_STREAM_CFLAGS="$REVENGE_STREAM_CFLAGS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
-    librevenge-stream-0.0
-\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "
-    librevenge-stream-0.0
-") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"librevenge-stream-0.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "librevenge-stream-0.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_REVENGE_STREAM_CFLAGS=`$PKG_CONFIG --cflags "
-    librevenge-stream-0.0
-" 2>/dev/null`
+  pkg_cv_REVENGE_STREAM_CFLAGS=`$PKG_CONFIG --cflags "librevenge-stream-0.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -19407,18 +19284,12 @@ if test -n "$REVENGE_STREAM_LIBS"; then
     pkg_cv_REVENGE_STREAM_LIBS="$REVENGE_STREAM_LIBS"
  elif test -n "$PKG_CONFIG"; then
     if test -n "$PKG_CONFIG" && \
-    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"
-    librevenge-stream-0.0
-\""; } >&5
-  ($PKG_CONFIG --exists --print-errors "
-    librevenge-stream-0.0
-") 2>&5
+    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"librevenge-stream-0.0\""; } >&5
+  ($PKG_CONFIG --exists --print-errors "librevenge-stream-0.0") 2>&5
   ac_status=$?
   $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
   test $ac_status = 0; }; then
-  pkg_cv_REVENGE_STREAM_LIBS=`$PKG_CONFIG --libs "
-    librevenge-stream-0.0
-" 2>/dev/null`
+  pkg_cv_REVENGE_STREAM_LIBS=`$PKG_CONFIG --libs "librevenge-stream-0.0" 2>/dev/null`
 		      test "x$?" != "x0" && pkg_failed=yes
 else
   pkg_failed=yes
@@ -19439,20 +19310,14 @@ else
         _pkg_short_errors_supported=no
 fi
         if test $_pkg_short_errors_supported = yes; then
-	        REVENGE_STREAM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "
-    librevenge-stream-0.0
-" 2>&1`
+	        REVENGE_STREAM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "librevenge-stream-0.0" 2>&1`
         else
-	        REVENGE_STREAM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "
-    librevenge-stream-0.0
-" 2>&1`
+	        REVENGE_STREAM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "librevenge-stream-0.0" 2>&1`
         fi
 	# Put the nasty error message in config.log where it belongs
 	echo "$REVENGE_STREAM_PKG_ERRORS" >&5
 
-	as_fn_error $? "Package requirements (
-    librevenge-stream-0.0
-) were not met:
+	as_fn_error $? "Package requirements (librevenge-stream-0.0) were not met:
 
 $REVENGE_STREAM_PKG_ERRORS
 
@@ -19485,6 +19350,10 @@ $as_echo "yes" >&6; }
 
 fi
 
+fi
+
+
+
 # =====================
 # Prepare all .in files
 # =====================
@@ -20052,7 +19921,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by libqxp $as_me 0.0.0, which was
+This file was extended by libqxp $as_me 0.0.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -20118,7 +19987,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-libqxp config.status 0.0.0
+libqxp config.status 0.0.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index f7b20af..81f48e8 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8,7 +8,7 @@ AC_PREREQ([2.65])
 # ====================
 m4_define([libqxp_version_major],[0])
 m4_define([libqxp_version_minor],[0])
-m4_define([libqxp_version_micro],[0])
+m4_define([libqxp_version_micro],[1])
 m4_define([libqxp_version],[libqxp_version_major.libqxp_version_minor.libqxp_version_micro])
 
 # =============
@@ -43,9 +43,7 @@ PKG_PROG_PKG_CONFIG([0.20])
 # ====================
 # Find additional apps
 # ====================
-PKG_CHECK_MODULES([REVENGE],[
-    librevenge-0.0
-])
+PKG_CHECK_MODULES([REVENGE],[librevenge-0.0])
 
 # ==================
 # Find boost headers
@@ -69,21 +67,7 @@ AC_SUBST([BOOST_CFLAGS])
 # ========
 # Find icu
 # ========
-AS_IF([test "${ICU_CFLAGS+set}" = set],[
-	ICU_CFLAGS_overriden=yes],[
-	ICU_CFLAGS_overriden=no])
-PKG_CHECK_MODULES([ICU],[icu-i18n],[
-	AS_IF([test "${ICU_CFLAGS_overriden}" = no], [
-		ICU_CFLAGS="${ICU_CFLAGS} `${PKG_CONFIG} icu-i18n --variable=CXXFLAGS`"])
-	], [
-	AC_PATH_PROG([ICU_CONFIG],[icu-config])
-	AC_MSG_CHECKING([ICU installation])
-	AS_IF([${ICU_CONFIG} --cflags >/dev/null 2>&1],[
-		ICU_CFLAGS=`${ICU_CONFIG} --cppflags-searchpath --cxxflags`
-		ICU_LIBS=`${ICU_CONFIG} --ldflags`
-		AC_MSG_RESULT([found])],[
-		AC_MSG_ERROR([libicu config program icu-config not found])])]
-)
+PKG_CHECK_MODULES([ICU], [icu-uc])
 AC_SUBST(ICU_CFLAGS)
 AC_SUBST(ICU_LIBS)
 
@@ -255,6 +239,7 @@ AS_IF([test "x$enable_tests" = "xyes"], [
 AC_SUBST([CPPUNIT_CFLAGS])
 AC_SUBST([CPPUNIT_LIBS])
 AM_CONDITIONAL(WITH_TESTS, [test "x$enable_tests" = "xyes"])
+AS_IF([test "x$enable_tests" = "xyes"], [need_stream=yes])
 
 # =============
 # Documentation
@@ -283,6 +268,7 @@ AC_ARG_ENABLE(tools,
     [AS_IF([test "x$native_win32" = "xyes"], [enable_tools=no], [enable_tools=yes])]
 )
 AM_CONDITIONAL([BUILD_TOOLS], [test "x$enable_tools" = "xyes"])
+AS_IF([test "x$enable_tools" = "xyes"], [need_stream=yes; need_generators=yes])
 
 # =======
 # Fuzzers
@@ -293,13 +279,19 @@ AC_ARG_ENABLE([fuzzers],
     [enable_fuzzers=no]
 )
 AM_CONDITIONAL([BUILD_FUZZERS], [test "x$enable_fuzzers" = "xyes"])
+AS_IF([test "x$enable_fuzzers" = "xyes"], [need_stream=yes; need_generators=yes])
 
-PKG_CHECK_MODULES([REVENGE_GENERATORS],[
-    librevenge-generators-0.0
+AS_IF([test "x$need_generators" = "xyes"], [
+    PKG_CHECK_MODULES([REVENGE_GENERATORS],[librevenge-generators-0.0])
 ])
-PKG_CHECK_MODULES([REVENGE_STREAM],[
-    librevenge-stream-0.0
+AC_SUBST([REVENGE_GENERATORS_CFLAGS])
+AC_SUBST([REVENGE_GENERATORS_LIBS])
+
+AS_IF([test "x$need_stream" = "xyes"], [
+    PKG_CHECK_MODULES([REVENGE_STREAM],[librevenge-stream-0.0])
 ])
+AC_SUBST([REVENGE_STREAM_CFLAGS])
+AC_SUBST([REVENGE_STREAM_LIBS])
 
 # =====================
 # Prepare all .in files
diff --git a/depcomp b/depcomp
index fc98710..b39f98f 100755
--- a/depcomp
+++ b/depcomp
@@ -1,9 +1,9 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2013-05-30.07; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1999-2014 Free Software Foundation, Inc.
+# Copyright (C) 1999-2017 Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -786,6 +786,6 @@ exit 0
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/docs/Makefile.in b/docs/Makefile.in
index 863cc81..e418620 100644
--- a/docs/Makefile.in
+++ b/docs/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -223,7 +223,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/docs/doxygen/Makefile.in b/docs/doxygen/Makefile.in
index 6a6e625..62febc7 100644
--- a/docs/doxygen/Makefile.in
+++ b/docs/doxygen/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -163,7 +163,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/inc/Makefile.in b/inc/Makefile.in
index bedc369..e04c82d 100644
--- a/inc/Makefile.in
+++ b/inc/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -223,7 +223,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/inc/libqxp/Makefile.in b/inc/libqxp/Makefile.in
index 695a9cc..3bc76eb 100644
--- a/inc/libqxp/Makefile.in
+++ b/inc/libqxp/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -212,7 +212,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/m4/ax_cxx_compile_stdcxx.m4 b/m4/ax_cxx_compile_stdcxx.m4
index 5032bba..acc0db2 100644
--- a/m4/ax_cxx_compile_stdcxx.m4
+++ b/m4/ax_cxx_compile_stdcxx.m4
@@ -174,7 +174,7 @@ m4_define([_AX_CXX_COMPILE_STDCXX_testbody_new_in_11], [[
 
 #error "This is not a C++ compiler"
 
-#elif __cplusplus < 201103L
+#elif __cplusplus < 201103L && !(defined _MSC_VER)
 
 #error "This is not a C++11 compiler"
 
diff --git a/missing b/missing
index f62bbae..c6e3795 100755
--- a/missing
+++ b/missing
@@ -1,9 +1,9 @@
 #! /bin/sh
 # Common wrapper for a few potentially missing GNU programs.
 
-scriptversion=2013-10-28.13; # UTC
+scriptversion=2016-01-11.22; # UTC
 
-# Copyright (C) 1996-2014 Free Software Foundation, Inc.
+# Copyright (C) 1996-2017 Free Software Foundation, Inc.
 # Originally written by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -210,6 +210,6 @@ exit $st
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
 # time-stamp-format: "%:y-%02m-%02d.%02H"
-# time-stamp-time-zone: "UTC"
+# time-stamp-time-zone: "UTC0"
 # time-stamp-end: "; # UTC"
 # End:
diff --git a/src/Makefile.in b/src/Makefile.in
index 37412a3..16d0e02 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -226,7 +226,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/src/conv/Makefile.in b/src/conv/Makefile.in
index 4729391..ed042f7 100644
--- a/src/conv/Makefile.in
+++ b/src/conv/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -223,7 +223,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/src/conv/raw/Makefile.in b/src/conv/raw/Makefile.in
index 9f4124e..eab1650 100644
--- a/src/conv/raw/Makefile.in
+++ b/src/conv/raw/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -215,7 +215,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/src/conv/svg/Makefile.in b/src/conv/svg/Makefile.in
index 1991be8..6e5aa15 100644
--- a/src/conv/svg/Makefile.in
+++ b/src/conv/svg/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -215,7 +215,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/src/conv/text/Makefile.in b/src/conv/text/Makefile.in
index b5b88af..c7edab1 100644
--- a/src/conv/text/Makefile.in
+++ b/src/conv/text/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -215,7 +215,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/src/fuzz/Makefile.in b/src/fuzz/Makefile.in
index 7cdb660..f222eca 100644
--- a/src/fuzz/Makefile.in
+++ b/src/fuzz/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -216,7 +216,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/src/fuzz/qxpfuzzer.cpp b/src/fuzz/qxpfuzzer.cpp
index bcb8eea..2ecdf81 100644
--- a/src/fuzz/qxpfuzzer.cpp
+++ b/src/fuzz/qxpfuzzer.cpp
@@ -10,7 +10,7 @@
 #include <cstdint>
 #include <cstdlib>
 
-#include <librevenge-generators/librevenge-generators.h>
+#include <librevenge-generators/RVNGDummyDrawingGenerator.h>
 
 #include <librevenge-stream/librevenge-stream.h>
 
@@ -19,7 +19,7 @@
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size)
 {
   librevenge::RVNGStringStream input(data, size);
-  librevenge::RVNGRawDrawingGenerator generator(true);
+  librevenge::RVNGDummyDrawingGenerator generator;
   libqxp::QXPDocument::parse(&input, &generator);
   return 0;
 }
diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am
index 82dfae6..844582b 100644
--- a/src/lib/Makefile.am
+++ b/src/lib/Makefile.am
@@ -13,7 +13,6 @@ AM_CXXFLAGS = \
 	-DLIBQXP_BUILD=1 \
 	-I$(top_srcdir)/inc \
 	$(REVENGE_CFLAGS) \
-	$(REVENGE_STREAM_CFLAGS) \
 	$(BOOST_CFLAGS) \
 	$(ICU_CFLAGS) \
 	$(DEBUG_CXXFLAGS)
diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
index eba90ee..b54be22 100644
--- a/src/lib/Makefile.in
+++ b/src/lib/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -278,7 +278,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
@@ -398,7 +397,6 @@ AM_CXXFLAGS = \
 	-DLIBQXP_BUILD=1 \
 	-I$(top_srcdir)/inc \
 	$(REVENGE_CFLAGS) \
-	$(REVENGE_STREAM_CFLAGS) \
 	$(BOOST_CFLAGS) \
 	$(ICU_CFLAGS) \
 	$(DEBUG_CXXFLAGS)
diff --git a/src/lib/QXP33Parser.cpp b/src/lib/QXP33Parser.cpp
index 808d9fa..52861e3 100644
--- a/src/lib/QXP33Parser.cpp
+++ b/src/lib/QXP33Parser.cpp
@@ -105,8 +105,7 @@ bool QXP33Parser::parsePages(const std::shared_ptr<librevenge::RVNGInputStream>
   QXP33Deobfuscator deobfuscate(m_header->seed(), m_header->increment());
   QXPDummyCollector dummyCollector;
 
-  unsigned ind = 0;
-  while (ind < m_header->pagesCount() + m_header->masterPagesCount())
+  for (unsigned ind = 0; ind < m_header->pagesCount() + m_header->masterPagesCount(); ++ind)
   {
     // don't output master pages, everything is included in normal pages
     QXPCollector &coll = ind < m_header->masterPagesCount() ? dummyCollector : collector;
@@ -116,13 +115,13 @@ bool QXP33Parser::parsePages(const std::shared_ptr<librevenge::RVNGInputStream>
 
     for (unsigned i = 0; i < page.objectsCount; ++i)
     {
-      parseObject(stream, deobfuscate, coll, page);
+
+      parseObject(stream, deobfuscate, coll, page, i);
       deobfuscate.next();
     }
 
+    m_groupObjects.clear();
     coll.endPage();
-
-    ind++;
   }
 
   return true;
@@ -251,7 +250,7 @@ Page QXP33Parser::parsePage(const std::shared_ptr<librevenge::RVNGInputStream> &
   return page;
 }
 
-void QXP33Parser::parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP33Deobfuscator &deobfuscate, QXPCollector &collector, const Page &page)
+void QXP33Parser::parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP33Deobfuscator &deobfuscate, QXPCollector &collector, const Page &page, const unsigned index)
 {
   const auto header = parseObjectHeader(stream, deobfuscate);
 
@@ -282,7 +281,7 @@ void QXP33Parser::parseObject(const std::shared_ptr<librevenge::RVNGInputStream>
     parseTextBox(stream, header, collector);
     break;
   case ContentType::OBJECTS:
-    parseGroup(stream, header, collector, page);
+    parseGroup(stream, header, collector, page, index);
     break;
   default:
     QXP_DEBUG_MSG(("Unsupported content\n"));
@@ -362,8 +361,8 @@ QXP33Parser::ObjectHeader QXP33Parser::parseObjectHeader(const std::shared_ptr<l
 
   skip(stream, 4);
 
-  const bool boxFlag1 = readU8(stream);
-  const bool boxFlag2 = readU8(stream);
+  const uint8_t boxFlag1 = readU8(stream);
+  const uint8_t boxFlag2 = readU8(stream);
   bool beveled;
   bool concave;
   if (be)
@@ -673,7 +672,7 @@ void QXP33Parser::parseEmptyBox(const std::shared_ptr<librevenge::RVNGInputStrea
   collector.collectBox(box);
 }
 
-void QXP33Parser::parseGroup(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const QXP33Parser::ObjectHeader &header, QXPCollector &collector, const Page &page)
+void QXP33Parser::parseGroup(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const QXP33Parser::ObjectHeader &header, QXPCollector &collector, const Page &page, const unsigned index)
 {
   skip(stream, 10);
   const unsigned count = readU16(stream, be);
@@ -687,16 +686,7 @@ void QXP33Parser::parseGroup(const std::shared_ptr<librevenge::RVNGInputStream>
   auto group = make_shared<Group>();
   group->boundingBox = header.boundingBox;
 
-  group->objectsIndexes.resize(count);
-  for (unsigned &ind : group->objectsIndexes)
-  {
-    ind = readU32(stream, be);
-    if (ind >= page.objectsCount)
-    {
-      QXP_DEBUG_MSG(("Invalid group element index %u\n", ind));
-      throw ParseError();
-    }
-  }
+  readGroupElements(stream, count, page.objectsCount, index, group->objectsIndexes);
 
   collector.collectGroup(group);
 }
@@ -715,7 +705,7 @@ Frame QXP33Parser::readFrame(const std::shared_ptr<librevenge::RVNGInputStream>
 std::vector<Point> QXP33Parser::readPolygonData(const std::shared_ptr<librevenge::RVNGInputStream> &stream)
 {
   const unsigned length = readU32(stream, be);
-  if (length > getLength(stream))
+  if (length < 18 || length > getRemainingLength(stream))
   {
     QXP_DEBUG_MSG(("Invalid polygon data length %u\n", length));
     throw ParseError();
diff --git a/src/lib/QXP33Parser.h b/src/lib/QXP33Parser.h
index f3f7a08..ef13656 100644
--- a/src/lib/QXP33Parser.h
+++ b/src/lib/QXP33Parser.h
@@ -83,14 +83,14 @@ private:
 
   Page parsePage(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
 
-  void parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP33Deobfuscator &deobfuscate, QXPCollector &collector, const Page &page);
+  void parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP33Deobfuscator &deobfuscate, QXPCollector &collector, const Page &page, unsigned index);
   ObjectHeader parseObjectHeader(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP33Deobfuscator &deobfuscate);
   void readObjectFlags(const std::shared_ptr<librevenge::RVNGInputStream> &stream, bool &noColor, bool &noRunaround);
   void parseLine(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
   void parseTextBox(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
   void parsePictureBox(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
   void parseEmptyBox(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
-  void parseGroup(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector, const Page &page);
+  void parseGroup(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector, const Page &page, unsigned index);
 
   Frame readFrame(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
   std::vector<Point> readPolygonData(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
diff --git a/src/lib/QXP4Deobfuscator.cpp b/src/lib/QXP4Deobfuscator.cpp
index 0bc0e05..f13bb94 100644
--- a/src/lib/QXP4Deobfuscator.cpp
+++ b/src/lib/QXP4Deobfuscator.cpp
@@ -58,7 +58,7 @@ void QXP4Deobfuscator::nextRev()
 
 void QXP4Deobfuscator::nextShift(uint16_t count)
 {
-  m_seed = shift(m_seed, count);
+  m_seed = shift(m_seed, count & 0xf);
 }
 
 }
diff --git a/src/lib/QXP4Parser.cpp b/src/lib/QXP4Parser.cpp
index c748e3e..d336840 100644
--- a/src/lib/QXP4Parser.cpp
+++ b/src/lib/QXP4Parser.cpp
@@ -15,11 +15,11 @@
 #include "QXP4Deobfuscator.h"
 #include "QXP4Header.h"
 #include "QXPCollector.h"
+#include "QXPMemoryStream.h"
 
 namespace libqxp
 {
 
-using librevenge::RVNGStringStream;
 using std::make_shared;
 using std::shared_ptr;
 
@@ -97,8 +97,7 @@ bool QXP4Parser::parsePages(const std::shared_ptr<librevenge::RVNGInputStream> &
   QXP4Deobfuscator deobfuscate(m_header->seed(), m_header->increment());
   QXPDummyCollector dummyCollector;
 
-  unsigned ind = 0;
-  while (ind < m_header->pagesCount() + m_header->masterPagesCount())
+  for (unsigned ind = 0; ind < m_header->pagesCount() + m_header->masterPagesCount(); ++ind)
   {
     // don't output master pages, everything is included in normal pages
     QXPCollector &coll = ind < m_header->masterPagesCount() ? dummyCollector : collector;
@@ -109,12 +108,11 @@ bool QXP4Parser::parsePages(const std::shared_ptr<librevenge::RVNGInputStream> &
 
     for (unsigned i = 0; i < page.objectsCount; ++i)
     {
-      parseObject(stream, deobfuscate, coll, page);
+      parseObject(stream, deobfuscate, coll, page, i);
     }
 
+    m_groupObjects.clear();
     coll.endPage();
-
-    ind++;
   }
 
   return true;
@@ -123,7 +121,13 @@ bool QXP4Parser::parsePages(const std::shared_ptr<librevenge::RVNGInputStream> &
 void QXP4Parser::parseColors(const std::shared_ptr<librevenge::RVNGInputStream> &docStream)
 {
   unsigned length = readU32(docStream, be);
-  auto stream = make_shared<RVNGStringStream>(readNBytes(docStream, length), length);
+  if (length > getRemainingLength(docStream))
+  {
+    QXP_DEBUG_MSG(("Invalid colors length %u\n", length));
+    throw ParseError();
+  }
+
+  auto stream = make_shared<QXPMemoryStream>(readNBytes(docStream, length), length);
 
   try
   {
@@ -192,7 +196,13 @@ void QXP4Parser::parseColor(const std::shared_ptr<librevenge::RVNGInputStream> &
 
 void QXP4Parser::skipParagraphStylesheets(const std::shared_ptr<librevenge::RVNGInputStream> &stream)
 {
-  const unsigned end = readRecordEndOffset(stream);
+  const unsigned length = readU32(stream, be);
+  if (length > getRemainingLength(stream))
+  {
+    QXP_DEBUG_MSG(("Invalid paragraph stylesheets length %u\n", length));
+    throw ParseError();
+  }
+  const long end = stream->tell() + length;
 
   unsigned tabRecordsCount = 0;
   while (stream->tell() < end)
@@ -321,11 +331,22 @@ void QXP4Parser::parseLineStyles(const std::shared_ptr<librevenge::RVNGInputStre
 
 void QXP4Parser::skipTemplates(const std::shared_ptr<librevenge::RVNGInputStream> &stream)
 {
-  const unsigned indexEnd = readRecordEndOffset(stream);
+  const unsigned length = readU32(stream, be);
+  if (length > getRemainingLength(stream))
+  {
+    QXP_DEBUG_MSG(("Invalid templates index length %u\n", length));
+    throw ParseError();
+  }
 
   const unsigned count = readU32(stream, be);
 
-  seek(stream, indexEnd);
+  skip(stream, length - 4);
+
+  if (count > getRemainingLength(stream) / 4)
+  {
+    QXP_DEBUG_MSG(("Invalid template count %u\n", count));
+    throw ParseError();
+  }
 
   for (unsigned i = 0; i < count; ++i)
   {
@@ -336,7 +357,7 @@ void QXP4Parser::skipTemplates(const std::shared_ptr<librevenge::RVNGInputStream
 void QXP4Parser::parseTabStops(const std::shared_ptr<librevenge::RVNGInputStream> &stream)
 {
   const unsigned specLength = readU32(stream, be);
-  if (specLength > getLength(stream))
+  if (specLength > getRemainingLength(stream))
   {
     QXP_DEBUG_MSG(("Invalid tab stop spec length %u\n", specLength));
     throw ParseError();
@@ -348,7 +369,7 @@ void QXP4Parser::parseTabStops(const std::shared_ptr<librevenge::RVNGInputStream
   {
     skip(stream, 2);
     const unsigned count = readU16(stream, be);
-    if (count > getLength(stream) / 8)
+    if (count > getRemainingLength(stream) / 8)
     {
       QXP_DEBUG_MSG(("Invalid tab stop count %u\n", count));
       throw ParseError();
@@ -442,7 +463,7 @@ Page QXP4Parser::parsePage(const std::shared_ptr<librevenge::RVNGInputStream> &s
   return page;
 }
 
-void QXP4Parser::parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP4Deobfuscator &deobfuscate, QXPCollector &collector, const Page &page)
+void QXP4Parser::parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP4Deobfuscator &deobfuscate, QXPCollector &collector, const Page &page, const unsigned index)
 {
   const auto header = parseObjectHeader(stream, deobfuscate);
 
@@ -517,7 +538,7 @@ void QXP4Parser::parseObject(const std::shared_ptr<librevenge::RVNGInputStream>
     }
     break;
   case ContentType::OBJECTS:
-    parseGroup(stream, header, collector, page);
+    parseGroup(stream, header, collector, page, index);
     break;
   default:
     QXP_DEBUG_MSG(("Unsupported content\n"));
@@ -557,8 +578,8 @@ QXP4Parser::ObjectHeader QXP4Parser::parseObjectHeader(const std::shared_ptr<lib
 
   skip(stream, 4);
 
-  const bool boxFlag1 = readU8(stream);
-  const bool boxFlag2 = readU8(stream);
+  const uint8_t boxFlag1 = readU8(stream);
+  const uint8_t boxFlag2 = readU8(stream);
   if (be)
   {
     result.hflip = boxFlag1 & 0x80;
@@ -952,7 +973,7 @@ void QXP4Parser::parseTextBox(const std::shared_ptr<librevenge::RVNGInputStream>
   }
 }
 
-void QXP4Parser::parseGroup(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const QXP4Parser::ObjectHeader &, QXPCollector &collector, const Page &page)
+void QXP4Parser::parseGroup(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const QXP4Parser::ObjectHeader &, QXPCollector &collector, const Page &page, const unsigned index)
 {
   auto group = make_shared<Group>();
 
@@ -970,16 +991,7 @@ void QXP4Parser::parseGroup(const std::shared_ptr<librevenge::RVNGInputStream> &
   }
   skip(stream, 10);
 
-  group->objectsIndexes.resize(count);
-  for (unsigned &ind : group->objectsIndexes)
-  {
-    ind = readU32(stream, be);
-    if (ind >= page.objectsCount)
-    {
-      QXP_DEBUG_MSG(("Invalid group element index %u\n", ind));
-      throw ParseError();
-    }
-  }
+  readGroupElements(stream, count, page.objectsCount, index, group->objectsIndexes);
 
   collector.collectGroup(group);
 }
@@ -1103,7 +1115,7 @@ void QXP4Parser::readImageData(const std::shared_ptr<librevenge::RVNGInputStream
 void QXP4Parser::readBezierData(const std::shared_ptr<librevenge::RVNGInputStream> &stream, std::vector<CurveComponent> &curveComponents, Rect &bbox)
 {
   const unsigned length = readU32(stream, be);
-  if (length > getLength(stream))
+  if (length > getRemainingLength(stream))
   {
     QXP_DEBUG_MSG(("Invalid bezier data length %ul\n", length));
     throw ParseError();
diff --git a/src/lib/QXP4Parser.h b/src/lib/QXP4Parser.h
index b6a6a82..07ed19d 100644
--- a/src/lib/QXP4Parser.h
+++ b/src/lib/QXP4Parser.h
@@ -99,7 +99,7 @@ private:
 
   Page parsePage(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP4Deobfuscator &deobfuscate);
 
-  void parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP4Deobfuscator &deobfuscate, QXPCollector &collector, const Page &page);
+  void parseObject(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP4Deobfuscator &deobfuscate, QXPCollector &collector, const Page &page, unsigned index);
   ObjectHeader parseObjectHeader(const std::shared_ptr<librevenge::RVNGInputStream> &stream, QXP4Deobfuscator &deobfuscate);
   void parseLine(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
   void parseBezierLine(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
@@ -111,7 +111,7 @@ private:
   void parseBezierText(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
   void parseBezierTextBox(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
   void parseTextBox(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector);
-  void parseGroup(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector, const Page &page);
+  void parseGroup(const std::shared_ptr<librevenge::RVNGInputStream> &stream, const ObjectHeader &header, QXPCollector &collector, const Page &page, unsigned index);
 
   Frame readFrame(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
   bool readRunaround(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
diff --git a/src/lib/QXPBlockParser.cpp b/src/lib/QXPBlockParser.cpp
index 58cecb9..affcb4c 100644
--- a/src/lib/QXPBlockParser.cpp
+++ b/src/lib/QXPBlockParser.cpp
@@ -11,32 +11,59 @@
 
 #include <librevenge-stream/librevenge-stream.h>
 #include <algorithm>
+#include <cassert>
 #include <memory>
+#include <set>
 #include <vector>
+#include <iterator>
 
 #include "QXPHeader.h"
+#include "QXPMemoryStream.h"
+#include "libqxp_utils.h"
 
 namespace libqxp
 {
 
 using librevenge::RVNGInputStream;
-using librevenge::RVNGStringStream;
 using std::make_shared;
 using std::vector;
 
+namespace
+{
+
+unsigned long getLength(RVNGInputStream *const input)
+{
+  assert(input);
+  const unsigned long pos = input->tell();
+  seek(input, 0);
+  const unsigned long len = getRemainingLength(input);
+  seek(input, pos);
+  return len;
+}
+
+}
+
 QXPBlockParser::QXPBlockParser(const std::shared_ptr<RVNGInputStream> &input, const std::shared_ptr<QXPHeader> &header)
   : m_input(input)
   , m_header(header)
   , be(header->isBigEndian())
+  , m_length(getLength(m_input.get()))
   , m_blockLength(256)
+  , m_lastBlock(m_length > 0 ? m_length / m_blockLength + 1 : 0)
 {
 }
 
 std::shared_ptr<RVNGInputStream> QXPBlockParser::getBlock(const uint32_t index)
 {
-  seek(m_input, (index - 1) * m_blockLength);
-  auto block = readNBytes(m_input, m_blockLength);
-  return make_shared<RVNGStringStream>(block, m_blockLength);
+  if (index > 0 && index <= m_lastBlock)
+  {
+    seek(m_input, (index - 1) * m_blockLength);
+    unsigned long bytes = 0;
+    auto block = m_input->read(m_blockLength, bytes);
+    if (bytes > 0)
+      return make_shared<QXPMemoryStream>(block, bytes);
+  }
+  return nullptr;
 }
 
 std::shared_ptr<RVNGInputStream> QXPBlockParser::getChain(const uint32_t index)
@@ -46,20 +73,49 @@ std::shared_ptr<RVNGInputStream> QXPBlockParser::getChain(const uint32_t index)
   vector<unsigned char> chain;
   bool isBig = false;
   uint32_t next = index;
-  while (next > 0)
+  try
   {
-    seek(m_input, (next - 1) * m_blockLength);
-    const uint16_t count = isBig ? readU16(m_input, be) : 1;
+    std::set<uint32_t> visited;
+
+    while (next > 0 && next <= m_lastBlock)
+    {
+      seek(m_input, (next - 1) * m_blockLength);
+      uint16_t count = isBig ? readU16(m_input, be) : 1;
+      if (count > m_lastBlock - next)
+        count = m_lastBlock - next;
+      bool stop = false;
+
+      // Cycle/overlap detection
+      // If this is a big block, we read data up to the previously read
+      // block and only then stop.
+      for (uint32_t i = next - 1; i < next - 1 + count; ++i)
+      {
+        stop = !visited.insert(i).second;
+        if (stop)
+          count = uint16_t(i - next - 1);
+      }
+      if (count == 0)
+        break;
 
-    uint32_t len = (next - 1 + count) * m_blockLength - (bigIdx ? 4 : 2) - m_input->tell();
-    auto block = readNBytes(m_input, len);
-    std::copy(block, block + len, std::back_inserter(chain));
+      uint32_t len = (next - 1 + count) * m_blockLength - (bigIdx ? 4 : 2) - m_input->tell();
+      unsigned long bytes = 0;
+      auto block = m_input->read(len, bytes);
+      if (bool(block) && bytes > 0)
+        std::copy(block, block + bytes, std::back_inserter(chain));
 
-    const int32_t nextVal = bigIdx ? readS32(m_input, be) : readS16(m_input, be);
-    isBig = nextVal < 0;
-    next = abs(nextVal);
+      if (stop || bytes < len) // A cycle was detected or we're at the end already
+        break;
+
+      const int32_t nextVal = bigIdx ? readS32(m_input, be) : readS16(m_input, be);
+      isBig = nextVal < 0;
+      next = abs(nextVal);
+    }
+  }
+  catch (...)
+  {
+    // Just retrieve what's possible
   }
-  return make_shared<RVNGStringStream>(chain.data(), chain.size());
+  return make_shared<QXPMemoryStream>(chain.data(), chain.size());
 }
 
 }
diff --git a/src/lib/QXPBlockParser.h b/src/lib/QXPBlockParser.h
index 84aedf2..b33c022 100644
--- a/src/lib/QXPBlockParser.h
+++ b/src/lib/QXPBlockParser.h
@@ -34,7 +34,9 @@ private:
   const std::shared_ptr<QXPHeader> m_header;
   const bool be; // big endian
 
+  const unsigned long m_length;
   const uint32_t m_blockLength;
+  const uint32_t m_lastBlock;
 };
 
 }
diff --git a/src/lib/QXPContentCollector.cpp b/src/lib/QXPContentCollector.cpp
index 0a5a2c9..e5e5498 100644
--- a/src/lib/QXPContentCollector.cpp
+++ b/src/lib/QXPContentCollector.cpp
@@ -11,6 +11,7 @@
 
 #include <algorithm>
 #include <utility>
+#include <iterator>
 
 #include <boost/range/adaptor/reversed.hpp>
 #include <boost/variant.hpp>
@@ -36,17 +37,24 @@ void writeBorder(RVNGPropertyList &propList, const char *const name, const doubl
   border.sprintf("%fpt", width);
 
   border.append(" ");
-  if (lineStyle->isStripe)
+  if (lineStyle)
   {
-    border.append("double");
-  }
-  if (lineStyle->segmentLengths.size() == 2)
-  {
-    border.append("dotted");
-  }
-  if (lineStyle->segmentLengths.size() > 2)
-  {
-    border.append("dashed");
+    if (lineStyle->isStripe)
+    {
+      border.append("double");
+    }
+    if (lineStyle->segmentLengths.size() == 2)
+    {
+      border.append("dotted");
+    }
+    if (lineStyle->segmentLengths.size() > 2)
+    {
+      border.append("dashed");
+    }
+    else
+    {
+      border.append("solid");
+    }
   }
   else
   {
@@ -942,7 +950,9 @@ void QXPContentCollector::drawText(const std::shared_ptr<Text> &text, const Link
         break;
       }
 
-      const unsigned long spanTextEnd = std::min<unsigned long>({ charFormat.afterEndIndex(), paragraph.afterEndIndex(), text->text.length(), textEnd });
+      const auto spanTextEnd = static_cast<unsigned long>(
+                                 std::min<uint64_t>({ charFormat.afterEndIndex(), paragraph.afterEndIndex(), text->text.length(), textEnd })
+                               );
 
       if (charFormat.format->isControlChars)
       {
@@ -952,8 +962,10 @@ void QXPContentCollector::drawText(const std::shared_ptr<Text> &text, const Link
 
       librevenge::RVNGPropertyList spanPropList;
 
+      const double fontSize = std::max(charFormat.format->fontSize, 1.);
+
       spanPropList.insert("style:font-name", charFormat.format->fontName);
-      spanPropList.insert("fo:font-size", charFormat.format->fontSize, librevenge::RVNG_POINT);
+      spanPropList.insert("fo:font-size", fontSize, librevenge::RVNG_POINT);
       spanPropList.insert("fo:font-weight", charFormat.format->bold ? "bold" : "normal");
       spanPropList.insert("fo:font-style", charFormat.format->italic ? "italic" : "normal");
       if (charFormat.format->underline || charFormat.format->wordUnderline)
@@ -992,7 +1004,7 @@ void QXPContentCollector::drawText(const std::shared_ptr<Text> &text, const Link
       else if (charFormat.format->superior)
       {
         // approximate "superior" positioning (char ascents are aligned with the cap height of the current font)
-        const double offset = (charFormat.format->fontSize * (1.0 - m_docProps.superiorVScale)) / charFormat.format->fontSize;
+        const double offset = (fontSize * (1.0 - m_docProps.superiorVScale)) / fontSize;
         writeTextPosition(spanPropList, offset + charFormat.format->baselineShift, m_docProps.superiorVScale);
         spanPropList.insert("style:text-scale", m_docProps.superiorHScale, librevenge::RVNG_PERCENT);
       }
diff --git a/src/lib/QXPContentCollector.h b/src/lib/QXPContentCollector.h
index 97c4ef0..87765f8 100644
--- a/src/lib/QXPContentCollector.h
+++ b/src/lib/QXPContentCollector.h
@@ -139,7 +139,7 @@ private:
   std::shared_ptr<CollectedObject<T>> addObject(const std::shared_ptr<T> &obj, const ObjectHandlerMember<T, QXPContentCollector> &handler)
   {
     auto collectedObj = std::make_shared<CollectedObject<T>>(obj, std::bind(handler, this, std::placeholders::_1, std::placeholders::_2));
-    getInsertionPage(obj).objects.emplace_back(collectedObj);
+    getInsertionPage(obj).objects.push_back(collectedObj);
     return collectedObj;
   }
 
diff --git a/src/lib/QXPMacFileParser.cpp b/src/lib/QXPMacFileParser.cpp
index 57729ae..23faf21 100644
--- a/src/lib/QXPMacFileParser.cpp
+++ b/src/lib/QXPMacFileParser.cpp
@@ -999,7 +999,9 @@ bool MWAWInputStream::unMacMIME(MWAWInputStream *inp,
     }
     inp->seek(16, librevenge::RVNG_SEEK_CUR); // filename
     long numEntries = long(inp->readULong(2));
-    if (inp->isEnd() || numEntries <= 0)
+    if (inp->checkPosition(inp->tell() + 12 * numEntries)) // minimal sanity check
+      numEntries = (inp->size() - inp->tell()) / 12;
+    if (inp->isEnd() || numEntries == 0)
     {
       QXP_DEBUG_MSG(("MWAWInputStream::unMacMIME: can not read number of entries\n"));
       return false;
@@ -1012,7 +1014,7 @@ bool MWAWInputStream::unMacMIME(MWAWInputStream *inp,
       "MSDosInfo", "AFPName", "AFPInfo", "AFPDirId"
     };
 #endif
-    for (int i = 0; i < numEntries; i++)
+    for (int i = 0; i < numEntries && !inp->isEnd(); i++)
     {
       long pos = inp->tell();
       int wh = static_cast<int>(inp->readULong(4));
@@ -1040,8 +1042,7 @@ bool MWAWInputStream::unMacMIME(MWAWInputStream *inp,
         return false;
       }
       /* try to read the data */
-      inp->seek(entryPos, librevenge::RVNG_SEEK_SET);
-      if (inp->tell() != entryPos)
+      if (inp->seek(entryPos, librevenge::RVNG_SEEK_SET) != 0)
       {
         QXP_DEBUG_MSG(("MWAWInputStream::unMacMIME: can not seek entry pos %lx\n", static_cast<long unsigned int>(entryPos)));
         return false;
diff --git a/src/lib/QXPMemoryStream.h b/src/lib/QXPMemoryStream.h
index 98dbf18..7b131ac 100644
--- a/src/lib/QXPMemoryStream.h
+++ b/src/lib/QXPMemoryStream.h
@@ -40,7 +40,7 @@ public:
   bool isEnd() override;
 
 private:
-  std::unique_ptr<unsigned char> m_data;
+  std::unique_ptr<unsigned char[]> m_data;
   const long m_length;
   long m_pos;
 };
diff --git a/src/lib/QXPParser.cpp b/src/lib/QXPParser.cpp
index 54abd7e..ae8144b 100644
--- a/src/lib/QXPParser.cpp
+++ b/src/lib/QXPParser.cpp
@@ -18,7 +18,6 @@
 namespace libqxp
 {
 
-using librevenge::RVNGStringStream;
 using std::make_shared;
 
 QXPParser::QXPParser(const std::shared_ptr<librevenge::RVNGInputStream> &input, librevenge::RVNGDrawingInterface *painter, const std::shared_ptr<QXPHeader> &header)
@@ -34,6 +33,7 @@ QXPParser::QXPParser(const std::shared_ptr<librevenge::RVNGInputStream> &input,
   , m_lineStyles()
   , m_arrows()
   , m_hjs()
+  , m_groupObjects()
   , m_header(header)
 {
   // default colors, in case parsing fails
@@ -124,7 +124,13 @@ void QXPParser::skipRecord(const std::shared_ptr<librevenge::RVNGInputStream> &s
 
 void QXPParser::parseFonts(const std::shared_ptr<librevenge::RVNGInputStream> &stream)
 {
-  const unsigned end = readRecordEndOffset(stream);
+  unsigned length = readU32(stream, be);
+  if (length > getRemainingLength(stream))
+  {
+    QXP_DEBUG_MSG(("Invalid record length %u\n", length));
+    throw ParseError();
+  }
+  const long end = stream->tell() + length;
 
   try
   {
@@ -163,7 +169,7 @@ void QXPParser::parseCharFormats(const std::shared_ptr<librevenge::RVNGInputStre
   m_charFormats.clear();
   parseCollection(stream, [=]()
   {
-    m_charFormats.emplace_back(make_shared<CharFormat>(parseCharFormat(stream)));
+    m_charFormats.push_back(make_shared<CharFormat>(parseCharFormat(stream)));
   });
 }
 
@@ -226,13 +232,19 @@ void QXPParser::parseParagraphFormats(const std::shared_ptr<librevenge::RVNGInpu
   m_paragraphFormats.clear();
   parseCollection(stream, [=]()
   {
-    m_paragraphFormats.emplace_back(make_shared<ParagraphFormat>(parseParagraphFormat(stream)));
+    m_paragraphFormats.push_back(make_shared<ParagraphFormat>(parseParagraphFormat(stream)));
   });
 }
 
 void QXPParser::parseCollection(const std::shared_ptr<librevenge::RVNGInputStream> stream, std::function<void()> itemHandler)
 {
-  const unsigned end = readRecordEndOffset(stream);
+  unsigned length = readU32(stream, be);
+  if (length > getRemainingLength(stream))
+  {
+    QXP_DEBUG_MSG(("Invalid record length %u\n", length));
+    throw ParseError();
+  }
+  const long end = stream->tell() + length;
 
   try
   {
@@ -545,6 +557,22 @@ TabStopType QXPParser::convertTabStopType(unsigned type)
   }
 }
 
+void QXPParser::readGroupElements(const std::shared_ptr<librevenge::RVNGInputStream> &stream, unsigned count, const unsigned objectsCount, const unsigned index, std::vector<unsigned> &elements)
+{
+  elements.reserve(count);
+  for (unsigned i = 0; i < count; ++i)
+  {
+    const unsigned ind = readU32(stream, be);
+    if (ind >= objectsCount || ind == index)
+    {
+      QXP_DEBUG_MSG(("Invalid group element index %u\n", ind));
+      continue;
+    }
+    if (m_groupObjects.insert(ind).second)
+      elements.push_back(ind);
+  }
+}
+
 }
 
 /* vim:set shiftwidth=2 softtabstop=2 expandtab: */
diff --git a/src/lib/QXPParser.h b/src/lib/QXPParser.h
index a79db2a..b22116a 100644
--- a/src/lib/QXPParser.h
+++ b/src/lib/QXPParser.h
@@ -18,6 +18,7 @@
 #include <deque>
 #include <functional>
 #include <map>
+#include <set>
 #include <vector>
 
 namespace libqxp
@@ -54,6 +55,8 @@ protected:
   std::vector<Arrow> m_arrows;
   std::deque<std::shared_ptr<HJ>> m_hjs;
 
+  std::set<unsigned> m_groupObjects;
+
   Color getColor(unsigned id, Color defaultColor = Color(0, 0, 0)) const;
   const LineStyle *getLineStyle(unsigned id) const;
   std::string getFont(int id, std::string defaultFont = "Arial") const;
@@ -93,6 +96,7 @@ protected:
   std::shared_ptr<ParagraphRule> readParagraphRule(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
   uint8_t readParagraphFlags(const std::shared_ptr<librevenge::RVNGInputStream> &stream, bool &incrementalLeading, bool &ruleAbove, bool &ruleBelow);
   uint8_t readObjectFlags(const std::shared_ptr<librevenge::RVNGInputStream> &stream, bool &noColor);
+  void readGroupElements(const std::shared_ptr<librevenge::RVNGInputStream> &stream, unsigned count, unsigned objectsCount, unsigned index, std::vector<unsigned> &elements);
   void setArrow(const unsigned index, Frame &frame) const;
   void skipFileInfo(const std::shared_ptr<librevenge::RVNGInputStream> &stream);
 
diff --git a/src/lib/QXPTextParser.cpp b/src/lib/QXPTextParser.cpp
index de782c4..fb76e81 100644
--- a/src/lib/QXPTextParser.cpp
+++ b/src/lib/QXPTextParser.cpp
@@ -17,6 +17,42 @@ namespace libqxp
 
 using std::make_shared;
 
+namespace
+{
+
+template <class Format, class FormatSpec>
+void parseFormatSpec(
+  const std::shared_ptr<librevenge::RVNGInputStream> &infoStream,
+  const std::vector<std::shared_ptr<Format>> &formats,
+  unsigned version, bool be,
+  std::vector<FormatSpec> &textFormats)
+{
+  unsigned specLength = readU32(infoStream, be);
+  if (specLength > getRemainingLength(infoStream))
+    specLength = unsigned(getRemainingLength(infoStream));
+  const long end = infoStream->tell() + specLength;
+  while (infoStream->tell() < end)
+  {
+    const unsigned formatIndex = version >= QXP_4 ? readU32(infoStream, be) : readU16(infoStream, be);
+    const unsigned length = readU32(infoStream, be);
+    const unsigned startIndex = textFormats.empty() ? 0 : textFormats.back().afterEndIndex();
+
+    std::shared_ptr<Format> format;
+    if (formatIndex >= formats.size())
+    {
+      QXP_DEBUG_MSG(("Char format %u not found\n", formatIndex));
+      format = formats.empty() ? std::make_shared<Format>() : formats[0];
+    }
+    else
+    {
+      format = formats[formatIndex];
+    }
+    textFormats.push_back(FormatSpec(format, startIndex, length));
+  }
+}
+
+}
+
 QXPTextParser::QXPTextParser(const std::shared_ptr<librevenge::RVNGInputStream> &input, const std::shared_ptr<QXPHeader> &header)
   : m_header(header)
   , be(header->isBigEndian())
@@ -48,57 +84,8 @@ std::shared_ptr<Text> QXPTextParser::parseText(unsigned index,
     }
   }
 
-  {
-    const unsigned charSpecLength = readU32(infoStream, be);
-    const long end = infoStream->tell() + charSpecLength;
-    while (infoStream->tell() < end)
-    {
-      const unsigned charFormatIndex = m_header->version() >= QXP_4 ? readU32(infoStream, be) : readU16(infoStream, be);
-      const unsigned length = readU32(infoStream, be);
-      const unsigned startIndex = text->charFormats.empty() ? 0 : text->charFormats.back().afterEndIndex();
-
-      std::shared_ptr<CharFormat> charFormat;
-      if (charFormatIndex >= charFormats.size())
-      {
-        QXP_DEBUG_MSG(("Char format %u not found\n", charFormatIndex));
-        if (!charFormats.empty())
-        {
-          charFormat = charFormats[0];
-        }
-      }
-      else
-      {
-        charFormat = charFormats[charFormatIndex];
-      }
-      text->charFormats.emplace_back(CharFormatSpec(charFormat, startIndex, length));
-    }
-  }
-
-  {
-    const unsigned paragraphSpecLength = readU32(infoStream, be);
-    const long end = infoStream->tell() + paragraphSpecLength;
-    while (infoStream->tell() < end)
-    {
-      const unsigned paragraphFormatIndex = m_header->version() >= QXP_4 ? readU32(infoStream, be) : readU16(infoStream, be);
-      const unsigned length = readU32(infoStream, be);
-      const unsigned startIndex = text->paragraphs.empty() ? 0 : text->paragraphs.back().afterEndIndex();
-
-      std::shared_ptr<ParagraphFormat> paragraphFormat;
-      if (paragraphFormatIndex >= paragraphFormats.size())
-      {
-        QXP_DEBUG_MSG(("Paragraph format %u not found\n", paragraphFormatIndex));
-        if (!paragraphFormats.empty())
-        {
-          paragraphFormat = paragraphFormats[0];
-        }
-      }
-      else
-      {
-        paragraphFormat = paragraphFormats[paragraphFormatIndex];
-      }
-      text->paragraphs.emplace_back(ParagraphSpec(paragraphFormat, startIndex, length));
-    }
-  }
+  parseFormatSpec(infoStream, charFormats, m_header->version(), be, text->charFormats);
+  parseFormatSpec(infoStream, paragraphFormats, m_header->version(), be, text->paragraphs);
 
   return text;
 }
diff --git a/src/lib/libqxp.rc b/src/lib/libqxp.rc
index 3aa4e85..d0698e9 100644
--- a/src/lib/libqxp.rc
+++ b/src/lib/libqxp.rc
@@ -1,8 +1,8 @@
 #include <winver.h>
 
 VS_VERSION_INFO VERSIONINFO
-  FILEVERSION 0,0,0,BUILDNUMBER
-  PRODUCTVERSION 0,0,0,0
+  FILEVERSION 0,0,1,BUILDNUMBER
+  PRODUCTVERSION 0,0,1,0
   FILEFLAGSMASK 0
   FILEFLAGS 0
   FILEOS VOS__WINDOWS32
@@ -15,12 +15,12 @@ VS_VERSION_INFO VERSIONINFO
       BEGIN
 	VALUE "CompanyName", "The libqxp developer community"
 	VALUE "FileDescription", "libqxp"
-	VALUE "FileVersion", "0.0.0.BUILDNUMBER"
+	VALUE "FileVersion", "0.0.1.BUILDNUMBER"
 	VALUE "InternalName", "libqxp-0.0"
 	VALUE "LegalCopyright", "Copyright (C) 2017 David Tardon, other contributors"
 	VALUE "OriginalFilename", "libqxp-0.0.dll"
 	VALUE "ProductName", "libqxp"
-	VALUE "ProductVersion", "0.0.0"
+	VALUE "ProductVersion", "0.0.1"
       END
     END
     BLOCK "VarFileInfo"
diff --git a/src/lib/libqxp_utils.cpp b/src/lib/libqxp_utils.cpp
index 324811f..eb4c999 100644
--- a/src/lib/libqxp_utils.cpp
+++ b/src/lib/libqxp_utils.cpp
@@ -256,9 +256,9 @@ void seekRelative(librevenge::RVNGInputStream *const input, const long pos)
     throw SeekFailedException();
 }
 
-unsigned long getLength(librevenge::RVNGInputStream *const input)
+unsigned long getRemainingLength(librevenge::RVNGInputStream *const input)
 {
-  if (!input)
+  if (!input || input->tell() < 0)
     throw SeekFailedException();
 
   const unsigned long begin = input->tell();
@@ -361,9 +361,9 @@ void seekRelative(const std::shared_ptr<librevenge::RVNGInputStream> input, cons
   seekRelative(input.get(), pos);
 }
 
-unsigned long getLength(const std::shared_ptr<librevenge::RVNGInputStream> input)
+unsigned long getRemainingLength(const std::shared_ptr<librevenge::RVNGInputStream> &input)
 {
-  return getLength(input.get());
+  return getRemainingLength(input.get());
 }
 
 EndOfStreamException::EndOfStreamException()
diff --git a/src/lib/libqxp_utils.h b/src/lib/libqxp_utils.h
index 7c9aab8..f0cc930 100644
--- a/src/lib/libqxp_utils.h
+++ b/src/lib/libqxp_utils.h
@@ -91,7 +91,7 @@ void skip(librevenge::RVNGInputStream *input, unsigned long numBytes);
 void seek(librevenge::RVNGInputStream *input, unsigned long pos);
 void seekRelative(librevenge::RVNGInputStream *input, long pos);
 
-unsigned long getLength(librevenge::RVNGInputStream *input);
+unsigned long getRemainingLength(librevenge::RVNGInputStream *input);
 
 uint8_t readU8(std::shared_ptr<librevenge::RVNGInputStream> input, bool = false);
 uint16_t readU16(std::shared_ptr<librevenge::RVNGInputStream> input, bool bigEndian=false);
@@ -114,7 +114,7 @@ void skip(std::shared_ptr<librevenge::RVNGInputStream> input, unsigned long numB
 void seek(std::shared_ptr<librevenge::RVNGInputStream> input, unsigned long pos);
 void seekRelative(std::shared_ptr<librevenge::RVNGInputStream> input, long pos);
 
-unsigned long getLength(std::shared_ptr<librevenge::RVNGInputStream> input);
+unsigned long getRemainingLength(const std::shared_ptr<librevenge::RVNGInputStream> &input);
 
 double deg2rad(double value);
 double normalizeDegAngle(double degAngle);
diff --git a/src/test/Makefile.in b/src/test/Makefile.in
index 121b109..193e900 100644
--- a/src/test/Makefile.in
+++ b/src/test/Makefile.in
@@ -1,7 +1,7 @@
-# Makefile.in generated by automake 1.15 from Makefile.am.
+# Makefile.in generated by automake 1.15.1 from Makefile.am.
 # @configure_input@
 
-# Copyright (C) 1994-2014 Free Software Foundation, Inc.
+# Copyright (C) 1994-2017 Free Software Foundation, Inc.
 
 # This Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -434,7 +434,6 @@ FGREP = @FGREP@
 GREP = @GREP@
 HAVE_CXX11 = @HAVE_CXX11@
 ICU_CFLAGS = @ICU_CFLAGS@
-ICU_CONFIG = @ICU_CONFIG@
 ICU_LIBS = @ICU_LIBS@
 INSTALL = @INSTALL@
 INSTALL_DATA = @INSTALL_DATA@
diff --git a/src/test/QXPBlockParserTest.cpp b/src/test/QXPBlockParserTest.cpp
index 905144e..5fe4d8d 100644
--- a/src/test/QXPBlockParserTest.cpp
+++ b/src/test/QXPBlockParserTest.cpp
@@ -32,7 +32,7 @@ using libqxp::QXPDetector;
 using libqxp::QXPHeader;
 using libqxp::QXPBlockParser;
 using libqxp::readString;
-using libqxp::getLength;
+using libqxp::getRemainingLength;
 
 using librevenge::RVNGInputStream;
 using std::string;
@@ -124,7 +124,7 @@ void QXPBlockParserTest::testGetDocChain()
 
     auto parser = createParser(name);
     auto stream = parser->getChain(3);
-    CPPUNIT_ASSERT_EQUAL_MESSAGE(name, expectedSize, getLength(stream));
+    CPPUNIT_ASSERT_EQUAL_MESSAGE(name, expectedSize, getRemainingLength(stream));
   }
 }
 
diff --git a/src/test/QXPTextParserTest.cpp b/src/test/QXPTextParserTest.cpp
index 0b49c95..cfcb174 100644
--- a/src/test/QXPTextParserTest.cpp
+++ b/src/test/QXPTextParserTest.cpp
@@ -99,9 +99,9 @@ void QXPTextParserTest::testParseText()
     const auto index = item.second;
 
     vector<shared_ptr<CharFormat>> charFormats;
-    charFormats.emplace_back(make_shared<CharFormat>(CharFormat()));
+    charFormats.push_back(make_shared<CharFormat>(CharFormat()));
     vector<shared_ptr<ParagraphFormat>> paragraphFormats;
-    paragraphFormats.emplace_back(make_shared<ParagraphFormat>(ParagraphFormat()));
+    paragraphFormats.push_back(make_shared<ParagraphFormat>(ParagraphFormat()));
 
     auto parser = createParser(name);
     auto text = parser->parseText(index, charFormats, paragraphFormats);
diff --git a/src/test/UtilsTest.cpp b/src/test/UtilsTest.cpp
index 97bd33d..0dd2c9e 100644
--- a/src/test/UtilsTest.cpp
+++ b/src/test/UtilsTest.cpp
@@ -35,11 +35,13 @@ private:
   CPPUNIT_TEST_SUITE(UtilsTest);
   CPPUNIT_TEST(testFloat16);
   CPPUNIT_TEST(testReadFraction);
+  CPPUNIT_TEST(testGetRemainingLength);
   CPPUNIT_TEST_SUITE_END();
 
 private:
   void testFloat16();
   void testReadFraction();
+  void testGetRemainingLength();
 };
 
 void UtilsTest::setUp()
@@ -90,6 +92,21 @@ void UtilsTest::testReadFraction()
   CPPUNIT_ASSERT_DOUBLES_EQUAL(-8.5, readFraction(stream, true), 0.001);
 }
 
+void UtilsTest::testGetRemainingLength()
+{
+  uint8_t data[] = { 0, 1, 2, 3, 4, 5, 6, 7 };
+  auto stream = make_shared<RVNGStringStream>(data, sizeof(data));
+
+  using libqxp::getRemainingLength;
+  CPPUNIT_ASSERT_EQUAL(sizeof(data), size_t(getRemainingLength(stream)));
+  stream->seek(2, librevenge::RVNG_SEEK_CUR);
+  CPPUNIT_ASSERT_EQUAL(sizeof(data) - 2, size_t(getRemainingLength(stream)));
+  stream->seek(2, librevenge::RVNG_SEEK_CUR);
+  CPPUNIT_ASSERT_EQUAL(sizeof(data) - 4, size_t(getRemainingLength(stream)));
+  stream->seek(0, librevenge::RVNG_SEEK_END);
+  CPPUNIT_ASSERT_EQUAL(0ul, getRemainingLength(stream));
+}
+
 CPPUNIT_TEST_SUITE_REGISTRATION(UtilsTest);
 
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-openoffice/libqxp.git



More information about the Pkg-openoffice-commits mailing list