diff -Nru libabw-0.0.2/build/Makefile.in libabw-0.1.0/build/Makefile.in --- libabw-0.0.2/build/Makefile.in 2014-02-10 14:49:17.000000000 +0000 +++ libabw-0.1.0/build/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -252,16 +252,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libabw-0.0.2/build/win32/Makefile.in libabw-0.1.0/build/win32/Makefile.in --- libabw-0.0.2/build/win32/Makefile.in 2014-02-10 14:49:17.000000000 +0000 +++ libabw-0.1.0/build/win32/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -192,16 +192,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libabw-0.0.2/ChangeLog libabw-0.1.0/ChangeLog --- libabw-0.0.2/ChangeLog 2014-02-10 14:49:47.000000000 +0000 +++ libabw-0.1.0/ChangeLog 2014-05-23 14:30:58.000000000 +0000 @@ -1,10 +1,34 @@ -2014-02-10 David Tardon [47057a7fdce703813f41223d908237a180b75b57] +2014-05-23 David Tardon [3c0b37ba5d225ea71f42c3179f4438b12ec5abcb] prepare for a new release - Change-Id: I387df9a26538bf37248cb2f8a1a1c083e9628b1d + Change-Id: I34cbd95ad975afdfc8892c38ebe06c90030b37fb -2014-02-07 David Tardon [b4c2bd396d73204a46cf084bc444d254949920ae] +2014-05-23 David Tardon [51e28e34f0bfb5e4a0eff2e444add3f62b796a23] + + put the newest version on top + + Change-Id: Icb44c9efd0246b4c17334b357c1454bd60a53dc5 + +2014-04-16 David Tardon [f43bb981cab1df2daa5823a3d7d53c54170cca92] + + add other used projects to .pc file + + Change-Id: I7dfe0a26b53857b9ac7625ff973540bc3eeaf08a + +2014-04-16 David Tardon [2d459731222782fcfc0833698c4acc74ba2cf597] + + require librevenge-stream too + + Change-Id: I2bc0ebad7e4734a6fc42a7d0fae9755d07f77600 + +2014-02-10 David Tardon [0bcf974769248d8e7b5b35733d2c655653585903] + + drop stray files + + Change-Id: I45260ebcee40ce2b12196bf95dda573b1ce38a49 + +2014-01-29 David Tardon [f16e6cf59bdc681d410cd356e4eff89abd98e372] CID#1165311 missing break @@ -12,157 +36,167 @@ anyway. Change-Id: I390a4f67c907d75c554673f976b952e1008c94ae - (cherry picked from commit f16e6cf59bdc681d410cd356e4eff89abd98e372) -2014-02-07 David Tardon [ed285b772d124ef9a900f9fd9f53a9b72fdb34de] +2014-01-29 David Tardon [f3723f79a20de230b3159b8d73debb567bb520f4] add myself to contributors Change-Id: I8fea4c66e58690ef808b8ae48bcb1e3186deb07d - (cherry picked from commit f3723f79a20de230b3159b8d73debb567bb520f4) -2014-01-23 Fridrich Štrba [d6fcd4af658079dd6399559a0603b9c356b61197] +2014-01-23 Fridrich Štrba [1b941a8b1e2aa1909c1f6a0d2c8aeeb04f8ec4b2] Ignore cells if not inside the
tags Change-Id: I5dfc2d05a6191f9cbf97d300a9ca1624b40e21e9 - (cherry picked from commit 1b941a8b1e2aa1909c1f6a0d2c8aeeb04f8ec4b2) -2014-01-21 Fridrich Štrba [1d98978ccd026b4e2372faf3a373682a1a96605b] +2014-01-21 Fridrich Štrba [393f2b5bb8bbb802526771baf1087725cf920452] std::string constructor with null string might crash in some cases Change-Id: Ie692ffbece7235fe32abf46e84d4f2a29442e96f - (cherry picked from commit 393f2b5bb8bbb802526771baf1087725cf920452) -2014-01-17 Fridrich Štrba [095b595a81cc18f3f16960c202079d2e961d1634] +2014-01-17 Fridrich Štrba [bd1b2b63526efecc3d57c12a801b14dae7a3f47a] Put as much as you can into the try block + (cherry picked from commit 095b595a81cc18f3f16960c202079d2e961d1634) + + Conflicts: + src/lib/AbiDocument.cpp + Change-Id: Id9c4193228bc7af7da685edb0db07c91f6c8de24 -2014-01-17 Fridrich Štrba [e68f8f29ec365cc07edf6f1b1dc15c7f75f40051] +2014-01-17 Fridrich Štrba [0c16f59fe7a3aed7cc055a81facbbc1fb35998d7] All invocation of xmlReaderForStream use the same options + (cherry picked from commit e68f8f29ec365cc07edf6f1b1dc15c7f75f40051) + + Conflicts: + src/lib/ABWXMLHelper.cpp + src/lib/ABWXMLHelper.h + src/lib/AbiDocument.cpp + Change-Id: I6f61c92db22114e3592cd5d24516bcd879422566 -2014-01-16 Fridrich Štrba [2b21394e42767ece602741538e485c2ec3cb5c85] +2014-01-16 Fridrich Štrba [720f251278f53d3066670eef60eb2611aa95bbbc] No need to use the stuff from inttypes here + (cherry picked from commit 2b21394e42767ece602741538e485c2ec3cb5c85) + + Conflicts: + src/lib/ABWStylesCollector.cpp + Change-Id: Ia8087ed0b18c8ed12ec75d272bf8f409038f33b0 -2014-01-15 Fridrich Štrba [54c72c4e27dc26bb74473f2fccaa5dcf9dba01d7] +2014-01-15 Fridrich Štrba [87e73a202a1ea96fbf361f32e71ad8efc42367d0] Strip first tab in a list text Change-Id: I46a4d0f36b2d255a30c669f24dabe65852c35d61 -2014-01-15 Fridrich Štrba [b0a20439bd67fae0fb1aeb71909e7c48f4ab6979] - - Bump version - - Change-Id: I10e27439fc33587a16411bb29fe268ed9ca60de8 - -2014-01-15 Fridrich Štrba [9817ef41ad922387d56a0a8c5abb862977f33dea] +2014-01-15 Fridrich Štrba [902454110899751868ba9ab56f0ef554f8239eb5] Some NEWS Change-Id: I47e4a37628da83d467bbe757efe6f336b30cbe32 + (cherry picked from commit 9817ef41ad922387d56a0a8c5abb862977f33dea) -2014-01-14 Fridrich Štrba [87ebca42ee32d9953af77d939cbbf527d885ce82] +2014-01-14 Fridrich Štrba [b643e3b093e21f99257b147ea40089b9dd5aa809] Some Fridrich less + (cherry picked from commit 87ebca42ee32d9953af77d939cbbf527d885ce82) + + Conflicts: + src/lib/ABWZlibStream.cpp + Change-Id: Ic1b972d90b0d4fb76aa294190eaa1014d68b17ca -2014-01-14 David Tardon [48be70f4563514fbdae1880cff1eec6345a9a9dd] +2014-01-14 David Tardon [387f0c76bfa22db281145bdaef735500d1645e1b] add git-review setup Change-Id: Ifcf4a5e6868d9572397bbf7b6a16899e200cd617 - (cherry picked from commit 387f0c76bfa22db281145bdaef735500d1645e1b) -2014-01-14 David Tardon [2341d1d9dbdd230523f7885baeb0c5e85bfd41ea] +2014-01-14 David Tardon [c6e64450e877c8594ad443e8e4ea303be57a205a] set git hooks automatically -2014-01-14 Fridrich Štrba [d04605a6e7c9179686714bb3d9f5178f90584166] +2014-01-14 Fridrich Štrba [57e1ee75d48303cb05e2060fd719b49163d5db5c] Support also compressed zabw documents + (cherry picked from commit d04605a6e7c9179686714bb3d9f5178f90584166) -2014-01-14 Fridrich Štrba [cbb494786a057a01756f57086043500a0eee4643] - - libwpd:mime-type -> libwpd:mimetype - + Conflicts: + src/lib/AbiDocument.cpp + src/lib/Makefile.am -2014-01-14 Fridrich Štrba [e1f26cd3d85b78d008004f7cf4f08e564d0c5d3e] +2014-01-14 Fridrich Štrba [96888911318a3923b22e707989de9ad4ad690e27] The left position of the list is already factored into the open*ListLevel -2014-01-13 Fridrich Štrba [d2147985f4e1eb13e6b52a33511c9154632a4b38] +2014-01-13 Fridrich Štrba [964e40650dfb714f9c628b89e2f390b287a4e9c6] Fix a silly with footnotes and endnotes - (cherry picked from commit 964e40650dfb714f9c628b89e2f390b287a4e9c6) - Conflicts: - src/lib/ABWParser.cpp - -2014-01-13 Fridrich Štrba [ce6c5a536ae05b855fee08dc8213d586a852f6cd] +2014-01-13 Fridrich Štrba [184a12501019486285ad71b57b9d07b22e706474] Make LO build easier + Conflicts: + src/lib/Makefile.am -2014-01-13 Fridrich Štrba [a70b8584d2fea1d6e309ef7e4f6711cb217b7388] +2014-01-13 Fridrich Štrba [a773a802c2b66e6cda8a44be59ad147daa495821] It seems that AbiWord gets the real number of columns in the table this way -2014-01-13 Fridrich Štrba [c0437e7a7d6d3e1118158cbece01c12dfe2ed023] - - libwpd:occurence was misspelled in libwpd-0.9 - - -2014-01-13 Fridrich Štrba [357cf9d824e91ec2d4a8b23928720f1ca8ae00eb] +2014-01-13 Fridrich Štrba [717a03f9bbbfa6c3ad6bd6a42be266e5c9f2d61b] Write dummy list levels when a list starts with level bigger then 1 -2014-01-13 Fridrich Štrba [b7ee83b98d13bef7bf8ed75412d551db4d96b7e0] +2014-01-13 Fridrich Štrba [1ed58902ba50c922c321a74699a8c78ff0a51379] More robust list handling -2014-01-12 Fridrich Štrba [ffdf5c6aa4071bf1a39e2d2ad41a33a53370853a] +2014-01-12 Fridrich Štrba [6073137e510ee7826587c5a930017af8908cec22] Fix handling of para margin-bottom -2014-01-11 Fridrich Štrba [e1f6c44898b49f24226c3f71fb63b5b921cf2cbd] +2014-01-11 Fridrich Štrba [2e42ba4ec932441adf5877f04259df1a6f5c3c31] - Belts and braces (more elegant solution) + Belts and braces -2014-01-11 Fridrich Štrba [0ee61eb05c8500cf1ff31470d54265427275b441] +2014-01-11 Fridrich Štrba [56cd4ff5f418b31496ad88fd9487c0670dc2144b] - Fix some crash + make the base64 decoding a bit more sane + Ouch, master back to librevenge -2014-01-11 Fridrich Štrba [f5074918f70bbee286863e9b867f9fa6184cf3fc] +2014-01-11 Fridrich Štrba [8d39594681432c632af08d7c77b8c71e9ca40da4] Fixing the libwpd-0.9 logic of lists -2014-01-11 Fridrich Štrba [68bd57982af38ad1beab0f074201c21b7b1cf68b] +2014-01-11 Fridrich Štrba [e5a561c226967ee07ac95ed7706b3716477f8627] Port back to libwpd-0.9 +2014-01-11 Fridrich Štrba [3cf58fd0b328f15006363c2b7e171420d976830e] + + Trying to put master on 0.1.0 + + 2014-01-11 Miklos Vajna [2c081e895cb4b62e8f2c658f2b20d66adc0ed382] Spelling fixes diff -Nru libabw-0.0.2/config.h.in libabw-0.1.0/config.h.in --- libabw-0.0.2/config.h.in 2014-02-10 14:49:42.000000000 +0000 +++ libabw-0.1.0/config.h.in 2014-05-23 14:27:42.000000000 +0000 @@ -3,22 +3,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_BOOST_ALGORITHM_STRING_HPP -/* Define to 1 if you have the - header file. */ -#undef HAVE_BOOST_ARCHIVE_ITERATORS_BINARY_FROM_BASE64_HPP - -/* Define to 1 if you have the - header file. */ -#undef HAVE_BOOST_ARCHIVE_ITERATORS_REMOVE_WHITESPACE_HPP - -/* Define to 1 if you have the - header file. */ -#undef HAVE_BOOST_ARCHIVE_ITERATORS_TRANSFORM_WIDTH_HPP - -/* Define to 1 if you have the header file. - */ -#undef HAVE_BOOST_RANGE_ITERATOR_RANGE_HPP - /* Define to 1 if you have the header file. */ #undef HAVE_BOOST_SPIRIT_INCLUDE_CLASSIC_HPP diff -Nru libabw-0.0.2/configure libabw-0.1.0/configure --- libabw-0.0.2/configure 2014-02-10 14:49:16.000000000 +0000 +++ libabw-0.1.0/configure 2014-05-23 14:27:38.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libabw 0.0.2. +# Generated by GNU Autoconf 2.69 for libabw 0.1.0. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='libabw' PACKAGE_TARNAME='libabw' -PACKAGE_VERSION='0.0.2' -PACKAGE_STRING='libabw 0.0.2' +PACKAGE_VERSION='0.1.0' +PACKAGE_STRING='libabw 0.1.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -634,14 +634,16 @@ LIBOBJS BUILD_TOOLS_FALSE BUILD_TOOLS_TRUE -WPD_STREAM_LIBS -WPD_STREAM_CFLAGS +REVENGE_STREAM_LIBS +REVENGE_STREAM_CFLAGS +REVENGE_GENERATORS_LIBS +REVENGE_GENERATORS_CFLAGS ZLIB_LIBS ZLIB_CFLAGS LIBXML_LIBS LIBXML_CFLAGS -WPD_LIBS -WPD_CFLAGS +REVENGE_LIBS +REVENGE_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG @@ -824,14 +826,16 @@ PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR -WPD_CFLAGS -WPD_LIBS +REVENGE_CFLAGS +REVENGE_LIBS LIBXML_CFLAGS LIBXML_LIBS ZLIB_CFLAGS ZLIB_LIBS -WPD_STREAM_CFLAGS -WPD_STREAM_LIBS' +REVENGE_GENERATORS_CFLAGS +REVENGE_GENERATORS_LIBS +REVENGE_STREAM_CFLAGS +REVENGE_STREAM_LIBS' # Initialize some variables set by options. @@ -1372,7 +1376,7 @@ # 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 libabw 0.0.2 to adapt to many kinds of systems. +\`configure' configures libabw 0.1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1442,7 +1446,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libabw 0.0.2:";; + short | recursive ) echo "Configuration of libabw 0.1.0:";; esac cat <<\_ACEOF @@ -1496,17 +1500,23 @@ directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path - WPD_CFLAGS C compiler flags for WPD, overriding pkg-config - WPD_LIBS linker flags for WPD, overriding pkg-config + REVENGE_CFLAGS + C compiler flags for REVENGE, overriding pkg-config + REVENGE_LIBS + linker flags for REVENGE, overriding pkg-config LIBXML_CFLAGS C compiler flags for LIBXML, overriding pkg-config LIBXML_LIBS linker flags for LIBXML, overriding pkg-config ZLIB_CFLAGS C compiler flags for ZLIB, overriding pkg-config ZLIB_LIBS linker flags for ZLIB, overriding pkg-config - WPD_STREAM_CFLAGS - C compiler flags for WPD_STREAM, overriding pkg-config - WPD_STREAM_LIBS - linker flags for WPD_STREAM, overriding pkg-config + REVENGE_GENERATORS_CFLAGS + C compiler flags for REVENGE_GENERATORS, overriding pkg-config + REVENGE_GENERATORS_LIBS + linker flags for REVENGE_GENERATORS, overriding pkg-config + REVENGE_STREAM_CFLAGS + C compiler flags for REVENGE_STREAM, overriding pkg-config + REVENGE_STREAM_LIBS + linker flags for REVENGE_STREAM, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. @@ -1574,7 +1584,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libabw configure 0.0.2 +libabw configure 0.1.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -2091,7 +2101,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libabw $as_me 0.0.2, which was +It was created by libabw $as_me 0.1.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2957,7 +2967,7 @@ # Define the identity of the package. PACKAGE='libabw' - VERSION='0.0.2' + VERSION='0.1.0' cat >>confdefs.h <<_ACEOF @@ -7559,10 +7569,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - powerpcle-*linux*) + powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; - powerpc-*linux*) + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -16091,19 +16101,19 @@ # ================================= ABW_MAJOR_VERSION=0 -ABW_MINOR_VERSION=0 +ABW_MINOR_VERSION=1 -ABW_MICRO_VERSION=2 +ABW_MICRO_VERSION=0 -ABW_VERSION=0.0.2 +ABW_VERSION=0.1.0 # AC_SUBST(LT_RELEASE, [libabw_version_major.libabw_version_minor]) -LT_CURRENT=`expr 100 '*' 0 + 0` +LT_CURRENT=`expr 100 '*' 0 + 1` # For 1.0.0 comment the first line and uncomment the second LT_AGE=0 # LT_AGE=libabw_version_minor -LT_REVISION=2 +LT_REVISION=0 @@ -16548,7 +16558,7 @@ # =============== -# Find libwpd +# Find librevenge # =============== @@ -16672,24 +16682,24 @@ fi pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WPD" >&5 -$as_echo_n "checking for WPD... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for REVENGE" >&5 +$as_echo_n "checking for REVENGE... " >&6; } -if test -n "$WPD_CFLAGS"; then - pkg_cv_WPD_CFLAGS="$WPD_CFLAGS" +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 \" - libwpd-0.9 + librevenge-0.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " - libwpd-0.9 + librevenge-0.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_WPD_CFLAGS=`$PKG_CONFIG --cflags " - libwpd-0.9 + pkg_cv_REVENGE_CFLAGS=`$PKG_CONFIG --cflags " + librevenge-0.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else @@ -16698,21 +16708,21 @@ else pkg_failed=untried fi -if test -n "$WPD_LIBS"; then - pkg_cv_WPD_LIBS="$WPD_LIBS" +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 \" - libwpd-0.9 + librevenge-0.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " - libwpd-0.9 + librevenge-0.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_WPD_LIBS=`$PKG_CONFIG --libs " - libwpd-0.9 + pkg_cv_REVENGE_LIBS=`$PKG_CONFIG --libs " + librevenge-0.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else @@ -16734,28 +16744,28 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - WPD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " - libwpd-0.9 + REVENGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " + librevenge-0.0 " 2>&1` else - WPD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " - libwpd-0.9 + 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 "$WPD_PKG_ERRORS" >&5 + echo "$REVENGE_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ( - libwpd-0.9 + librevenge-0.0 ) were not met: -$WPD_PKG_ERRORS +$REVENGE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively, you may set the environment variables WPD_CFLAGS -and WPD_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables REVENGE_CFLAGS +and REVENGE_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 @@ -16766,15 +16776,15 @@ is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively, you may set the environment variables WPD_CFLAGS -and WPD_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables REVENGE_CFLAGS +and REVENGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else - WPD_CFLAGS=$pkg_cv_WPD_CFLAGS - WPD_LIBS=$pkg_cv_WPD_LIBS + REVENGE_CFLAGS=$pkg_cv_REVENGE_CFLAGS + REVENGE_LIBS=$pkg_cv_REVENGE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -17081,10 +17091,6 @@ # Find boost headers # ================== for ac_header in boost/algorithm/string.hpp \ - boost/archive/iterators/binary_from_base64.hpp \ - boost/archive/iterators/remove_whitespace.hpp \ - boost/archive/iterators/transform_width.hpp \ - boost/range/iterator_range.hpp \ boost/spirit/include/classic.hpp do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` @@ -17118,24 +17124,133 @@ pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WPD_STREAM" >&5 -$as_echo_n "checking for WPD_STREAM... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for REVENGE_GENERATORS" >&5 +$as_echo_n "checking for REVENGE_GENERATORS... " >&6; } + +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 + 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` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +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 + 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` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi + + + +if test $pkg_failed = yes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + +if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then + _pkg_short_errors_supported=yes +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` + else + 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: + +$REVENGE_GENERATORS_PKG_ERRORS + +Consider adjusting the PKG_CONFIG_PATH environment variable if you +installed software in a non-standard prefix. + +Alternatively, you may set the environment variables REVENGE_GENERATORS_CFLAGS +and REVENGE_GENERATORS_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. + +Alternatively, you may set the environment variables REVENGE_GENERATORS_CFLAGS +and REVENGE_GENERATORS_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + REVENGE_GENERATORS_CFLAGS=$pkg_cv_REVENGE_GENERATORS_CFLAGS + REVENGE_GENERATORS_LIBS=$pkg_cv_REVENGE_GENERATORS_LIBS + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + +fi + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for REVENGE_STREAM" >&5 +$as_echo_n "checking for REVENGE_STREAM... " >&6; } -if test -n "$WPD_STREAM_CFLAGS"; then - pkg_cv_WPD_STREAM_CFLAGS="$WPD_STREAM_CFLAGS" +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 \" - libwpd-stream-0.9 + librevenge-stream-0.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " - libwpd-stream-0.9 + 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_WPD_STREAM_CFLAGS=`$PKG_CONFIG --cflags " - libwpd-stream-0.9 + pkg_cv_REVENGE_STREAM_CFLAGS=`$PKG_CONFIG --cflags " + librevenge-stream-0.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else @@ -17144,21 +17259,21 @@ else pkg_failed=untried fi -if test -n "$WPD_STREAM_LIBS"; then - pkg_cv_WPD_STREAM_LIBS="$WPD_STREAM_LIBS" +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 \" - libwpd-stream-0.9 + librevenge-stream-0.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " - libwpd-stream-0.9 + 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_WPD_STREAM_LIBS=`$PKG_CONFIG --libs " - libwpd-stream-0.9 + pkg_cv_REVENGE_STREAM_LIBS=`$PKG_CONFIG --libs " + librevenge-stream-0.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else @@ -17180,28 +17295,28 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - WPD_STREAM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " - libwpd-stream-0.9 + REVENGE_STREAM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " + librevenge-stream-0.0 " 2>&1` else - WPD_STREAM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " - libwpd-stream-0.9 + 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 "$WPD_STREAM_PKG_ERRORS" >&5 + echo "$REVENGE_STREAM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ( - libwpd-stream-0.9 + librevenge-stream-0.0 ) were not met: -$WPD_STREAM_PKG_ERRORS +$REVENGE_STREAM_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively, you may set the environment variables WPD_STREAM_CFLAGS -and WPD_STREAM_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables REVENGE_STREAM_CFLAGS +and REVENGE_STREAM_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 @@ -17212,15 +17327,15 @@ is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively, you may set the environment variables WPD_STREAM_CFLAGS -and WPD_STREAM_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables REVENGE_STREAM_CFLAGS +and REVENGE_STREAM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else - WPD_STREAM_CFLAGS=$pkg_cv_WPD_STREAM_CFLAGS - WPD_STREAM_LIBS=$pkg_cv_WPD_STREAM_LIBS + REVENGE_STREAM_CFLAGS=$pkg_cv_REVENGE_STREAM_CFLAGS + REVENGE_STREAM_LIBS=$pkg_cv_REVENGE_STREAM_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -17229,6 +17344,8 @@ fi + + if test "x$enable_tools" = "xyes"; then BUILD_TOOLS_TRUE= BUILD_TOOLS_FALSE='#' @@ -17801,7 +17918,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libabw $as_me 0.0.2, which was +This file was extended by libabw $as_me 0.1.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17867,7 +17984,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libabw config.status 0.0.2 +libabw config.status 0.1.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -Nru libabw-0.0.2/configure.ac libabw-0.1.0/configure.ac --- libabw-0.0.2/configure.ac 2014-02-10 14:47:05.000000000 +0000 +++ libabw-0.1.0/configure.ac 2014-05-23 14:26:47.000000000 +0000 @@ -6,8 +6,8 @@ # Version informations # ==================== m4_define([libabw_version_major],[0]) -m4_define([libabw_version_minor],[0]) -m4_define([libabw_version_micro],[2]) +m4_define([libabw_version_minor],[1]) +m4_define([libabw_version_micro],[0]) m4_define([libabw_version],[libabw_version_major.libabw_version_minor.libabw_version_micro]) # ============= @@ -218,13 +218,13 @@ AC_SUBST(GPERF) # =============== -# Find libwpd +# Find librevenge # =============== -PKG_CHECK_MODULES([WPD],[ - libwpd-0.9 +PKG_CHECK_MODULES([REVENGE],[ + librevenge-0.0 ]) -AC_SUBST([WPD_CFLAGS]) -AC_SUBST([WPD_LIBS]) +AC_SUBST([REVENGE_CFLAGS]) +AC_SUBST([REVENGE_LIBS]) # ============ # Find libxml2 @@ -252,10 +252,6 @@ # ================== AC_CHECK_HEADERS( boost/algorithm/string.hpp \ - boost/archive/iterators/binary_from_base64.hpp \ - boost/archive/iterators/remove_whitespace.hpp \ - boost/archive/iterators/transform_width.hpp \ - boost/range/iterator_range.hpp \ boost/spirit/include/classic.hpp, [], [AC_MSG_ERROR([Required boost headers not found.])], @@ -271,12 +267,17 @@ [enable_tools=yes] ) AS_IF([test "x$enable_tools" = "xyes"], [ - PKG_CHECK_MODULES([WPD_STREAM],[ - libwpd-stream-0.9 + PKG_CHECK_MODULES([REVENGE_GENERATORS],[ + librevenge-generators-0.0 + ]) + PKG_CHECK_MODULES([REVENGE_STREAM],[ + librevenge-stream-0.0 ]) ]) -AC_SUBST([WPD_STREAM_CFLAGS]) -AC_SUBST([WPD_STREAM_LIBS]) +AC_SUBST([REVENGE_GENERATORS_CFLAGS]) +AC_SUBST([REVENGE_GENERATORS_LIBS]) +AC_SUBST([REVENGE_STREAM_CFLAGS]) +AC_SUBST([REVENGE_STREAM_LIBS]) AM_CONDITIONAL(BUILD_TOOLS, [test "x$enable_tools" = "xyes"]) # ===================== diff -Nru libabw-0.0.2/debian/changelog libabw-0.1.0/debian/changelog --- libabw-0.0.2/debian/changelog 2014-05-07 21:51:41.000000000 +0000 +++ libabw-0.1.0/debian/changelog 2014-07-25 17:49:21.000000000 +0000 @@ -1,3 +1,18 @@ +libabw (0.1.0-1~precise1) precise; urgency=medium + + * Copied from debian + * Build against boost 1.54 + + -- Rico Tzschichholz Fri, 25 Jul 2014 19:48:32 +0200 + +libabw (0.1.0-1) experimental; urgency=low + + * New upstream release + + * use dh-autoreconf + + -- Rene Engelhard Fri, 23 May 2014 21:40:55 +0200 + libabw (0.0.2-3) unstable; urgency=low * upload to unstale diff -Nru libabw-0.0.2/debian/control libabw-0.1.0/debian/control --- libabw-0.0.2/debian/control 2014-02-04 19:06:02.000000000 +0000 +++ libabw-0.1.0/debian/control 2014-07-25 17:48:57.000000000 +0000 @@ -2,10 +2,11 @@ Priority: optional Maintainer: Rene Engelhard Build-Depends: autotools-dev, + dh-autoreconf, debhelper (>= 9), gperf, - libboost-dev, - libwpd-dev (>= 0.9.0), + libboost1.54-dev, + librevenge-dev, libxml2-dev, pkg-config, zlib1g-dev @@ -16,8 +17,8 @@ Package: libabw-dev Section: libdevel Architecture: any -Depends: libabw-0.0-0 (= ${binary:Version}), - libwpd-dev (>= 0.9.0), +Depends: libabw-0.1-1 (= ${binary:Version}), + librevenge-dev, ${misc:Depends} Description: library for reading and writing AbiWord(tm) documents -- development Libabw is library providing ability to interpret and import AbiWord @@ -25,7 +26,7 @@ . This package contains the development files (headers, ...) -Package: libabw-0.0-0 +Package: libabw-0.1-1 Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: library for reading and writing AbiWord(tm) documents diff -Nru libabw-0.0.2/debian/libabw-0.0-0.install libabw-0.1.0/debian/libabw-0.0-0.install --- libabw-0.0.2/debian/libabw-0.0-0.install 2014-02-04 17:21:18.000000000 +0000 +++ libabw-0.1.0/debian/libabw-0.0-0.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/lib*.so.* diff -Nru libabw-0.0.2/debian/libabw-0.1-1.install libabw-0.1.0/debian/libabw-0.1-1.install --- libabw-0.0.2/debian/libabw-0.1-1.install 1970-01-01 00:00:00.000000000 +0000 +++ libabw-0.1.0/debian/libabw-0.1-1.install 2014-02-04 17:21:18.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/lib*.so.* diff -Nru libabw-0.0.2/debian/rules libabw-0.1.0/debian/rules --- libabw-0.0.2/debian/rules 2014-02-04 17:21:18.000000000 +0000 +++ libabw-0.1.0/debian/rules 2014-05-23 19:42:24.000000000 +0000 @@ -4,7 +4,7 @@ #export DH_VERBOSE=1 %: - dh $@ + dh $@ --with autoreconf override_dh_auto_configure: dh_auto_configure -- --disable-werror --libdir=/usr/lib \ diff -Nru libabw-0.0.2/docs/doxygen/Makefile.in libabw-0.1.0/docs/doxygen/Makefile.in --- libabw-0.0.2/docs/doxygen/Makefile.in 2014-02-10 14:49:17.000000000 +0000 +++ libabw-0.1.0/docs/doxygen/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -192,16 +192,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ Binary files /tmp/WkeYMJDFnT/libabw-0.0.2/docs/libwpd.dia and /tmp/d3AI7K5ZjR/libabw-0.1.0/docs/libwpd.dia differ Binary files /tmp/WkeYMJDFnT/libabw-0.0.2/docs/libwpd.png and /tmp/d3AI7K5ZjR/libabw-0.1.0/docs/libwpd.png differ diff -Nru libabw-0.0.2/docs/Makefile.am libabw-0.1.0/docs/Makefile.am --- libabw-0.0.2/docs/Makefile.am 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/docs/Makefile.am 2014-03-29 10:23:24.000000000 +0000 @@ -1,9 +1 @@ SUBDIRS = doxygen - -EXTRA_DIST = libwpd.dia libwpd.png - -if WITH_LIBABW_DOCS - -doc_DATA = libwpd.dia libwpd.png - -endif diff -Nru libabw-0.0.2/docs/Makefile.in libabw-0.1.0/docs/Makefile.in --- libabw-0.0.2/docs/Makefile.in 2014-02-10 14:49:17.000000000 +0000 +++ libabw-0.1.0/docs/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -13,7 +13,6 @@ # PARTICULAR PURPOSE. @SET_MAKE@ - VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ @@ -118,35 +117,6 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; -am__install_max = 40 -am__nobase_strip_setup = \ - srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` -am__nobase_strip = \ - for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" -am__nobase_list = $(am__nobase_strip_setup); \ - for p in $$list; do echo "$$p $$p"; done | \ - sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ - $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ - if (++n[$$2] == $(am__install_max)) \ - { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ - END { for (dir in files) print dir, files[dir] }' -am__base_list = \ - sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ - sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' -am__uninstall_files_from_dir = { \ - test -z "$$files" \ - || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ - || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ - $(am__cd) "$$dir" && rm -f $$files; }; \ - } -am__installdirs = "$(DESTDIR)$(docdir)" -DATA = $(doc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ @@ -282,16 +252,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -348,8 +320,6 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = doxygen -EXTRA_DIST = libwpd.dia libwpd.png -@WITH_LIBABW_DOCS_TRUE@doc_DATA = libwpd.dia libwpd.png all: all-recursive .SUFFIXES: @@ -389,27 +359,6 @@ clean-libtool: -rm -rf .libs _libs -install-docDATA: $(doc_DATA) - @$(NORMAL_INSTALL) - @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ - if test -n "$$list"; then \ - echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ - $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ - fi; \ - for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - echo "$$d$$p"; \ - done | $(am__base_list) | \ - while read files; do \ - echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ - $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ - done - -uninstall-docDATA: - @$(NORMAL_UNINSTALL) - @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ - files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ - dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. @@ -567,12 +516,9 @@ done check-am: all-am check: check-recursive -all-am: Makefile $(DATA) +all-am: Makefile installdirs: installdirs-recursive installdirs-am: - for dir in "$(DESTDIR)$(docdir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive @@ -623,7 +569,7 @@ info-am: -install-data-am: install-docDATA +install-data-am: install-dvi: install-dvi-recursive @@ -667,7 +613,7 @@ ps-am: -uninstall-am: uninstall-docDATA +uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip @@ -675,15 +621,14 @@ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am \ - install-docDATA install-dvi install-dvi-am install-exec \ - install-exec-am install-html install-html-am install-info \ - install-info-am install-man install-pdf install-pdf-am \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs installdirs-am maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-generic \ - mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ - uninstall-am uninstall-docDATA + install install-am install-data install-data-am install-dvi \ + install-dvi-am install-exec install-exec-am install-html \ + install-html-am install-info install-info-am install-man \ + install-pdf install-pdf-am install-ps install-ps-am \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. diff -Nru libabw-0.0.2/inc/libabw/AbiDocument.h libabw-0.1.0/inc/libabw/AbiDocument.h --- libabw-0.0.2/inc/libabw/AbiDocument.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/inc/libabw/AbiDocument.h 2014-03-29 10:23:24.000000000 +0000 @@ -10,7 +10,7 @@ #ifndef ABIDOCUMENT_H #define ABIDOCUMENT_H -#include +#include #ifdef DLL_EXPORT #ifdef LIBABW_BUILD @@ -33,8 +33,8 @@ class AbiDocument { public: - static ABWAPI bool isFileFormatSupported(WPXInputStream *input); - static ABWAPI bool parse(WPXInputStream *input, WPXDocumentInterface *documentInterface); + static ABWAPI bool isFileFormatSupported(librevenge::RVNGInputStream *input); + static ABWAPI bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *documentInterface); }; } // namespace libabw diff -Nru libabw-0.0.2/inc/libabw/Makefile.in libabw-0.1.0/inc/libabw/Makefile.in --- libabw-0.0.2/inc/libabw/Makefile.in 2014-02-10 14:49:18.000000000 +0000 +++ libabw-0.1.0/inc/libabw/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -192,16 +192,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libabw-0.0.2/inc/Makefile.in libabw-0.1.0/inc/Makefile.in --- libabw-0.0.2/inc/Makefile.in 2014-02-10 14:49:18.000000000 +0000 +++ libabw-0.1.0/inc/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -252,16 +252,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libabw-0.0.2/libabw.pc.in libabw-0.1.0/libabw.pc.in --- libabw-0.0.2/libabw.pc.in 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/libabw.pc.in 2014-04-16 17:04:09.000000000 +0000 @@ -6,6 +6,8 @@ Name: libabw-@ABW_MAJOR_VERSION@.@ABW_MINOR_VERSION@ Description: A library for reading and writing AbiWord(tm) documents Version: @VERSION@ -Requires: libwpd-0.9 +Requires: librevenge-0.0 librevenge-stream-0.0 Libs: -L${libdir} -labw-@ABW_MAJOR_VERSION@.@ABW_MINOR_VERSION@ Cflags: -I${includedir}/libabw-@ABW_MAJOR_VERSION@.@ABW_MINOR_VERSION@ + +Requires.private: libxml-2.0 zlib diff -Nru libabw-0.0.2/m4/libtool.m4 libabw-0.1.0/m4/libtool.m4 --- libabw-0.0.2/m4/libtool.m4 2014-02-10 14:41:46.000000000 +0000 +++ libabw-0.1.0/m4/libtool.m4 2014-03-29 10:28:51.000000000 +0000 @@ -1326,10 +1326,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - powerpcle-*linux*) + powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; - powerpc-*linux*) + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) diff -Nru libabw-0.0.2/Makefile.in libabw-0.1.0/Makefile.in --- libabw-0.0.2/Makefile.in 2014-02-10 14:49:17.000000000 +0000 +++ libabw-0.1.0/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -306,16 +306,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libabw-0.0.2/NEWS libabw-0.1.0/NEWS --- libabw-0.0.2/NEWS 2014-02-10 14:46:47.000000000 +0000 +++ libabw-0.1.0/NEWS 2014-05-23 14:26:34.000000000 +0000 @@ -1,7 +1,8 @@ -0.0.0 - - Initial non-release of the library - * Support tables, lists, headers/footers - * Support embedded images +0.0.1 -> 0.1.0 + - Switch to librevenge + - Do not add extra tab for list indentation + - Avoid possible crash on file format detection + - Ignore cells that are not inside a table 0.0.0 -> 0.0.1 - Support gzip compressed AbiWord files - ZABW @@ -9,7 +10,7 @@ - Fix conversion of embedded images - Fix shapes of lists. -0.0.1 -> 0.0.2 - - Do not add extra tab for list indentation - - Avoid possible crash on file format detection - - Ignore cells that are not inside a table +0.0.0 + - Initial non-release of the library + * Support tables, lists, headers/footers + * Support embedded images diff -Nru libabw-0.0.2/src/conv/html/abw2html.cpp libabw-0.1.0/src/conv/html/abw2html.cpp --- libabw-0.0.2/src/conv/html/abw2html.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/html/abw2html.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -8,10 +8,10 @@ */ #include -#include +#include +#include #include #include -#include "HtmlDocumentGenerator.h" #ifdef HAVE_CONFIG_H #include "config.h" @@ -62,7 +62,7 @@ if (!file) return printUsage(); - WPXFileStream input(file); + librevenge::RVNGFileStream input(file); if (!libabw::AbiDocument::isFileFormatSupported(&input)) { @@ -70,10 +70,13 @@ return 1; } - HtmlDocumentGenerator documentGenerator; + librevenge::RVNGString document; + librevenge::RVNGHTMLTextGenerator documentGenerator(document); if (!libabw::AbiDocument::parse(&input, &documentGenerator)) return 1; + printf("%s", document.cstr()); + return 0; } /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libabw-0.0.2/src/conv/html/HtmlDocumentGenerator.cpp libabw-0.1.0/src/conv/html/HtmlDocumentGenerator.cpp --- libabw-0.0.2/src/conv/html/HtmlDocumentGenerator.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/html/HtmlDocumentGenerator.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,454 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* - * This file is part of the libabw project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include -#include -#include "HtmlDocumentGenerator.h" - -// use the BELL code to represent a TAB for now -#define UCS_TAB 0x0009 - -HtmlDocumentGenerator::HtmlDocumentGenerator() : - m_ignore(false), - m_pOutputStream(&std::cout), - m_footNotesStream(), - m_endNotesStream(), - m_commentsStream(), - m_textBoxesStream(), - m_dummyStream(), - m_footNotesCount(0), - m_endNotesCount(0), - m_commentsCount(0), - m_textBoxesCount(0), - m_commentNumber(1), - m_textBoxNumber(1) -{ -} - -HtmlDocumentGenerator::~HtmlDocumentGenerator() -{ -} - -void HtmlDocumentGenerator::setDocumentMetaData(const WPXPropertyList &propList) -{ - if (propList["meta:initial-creator"]) - *m_pOutputStream << "getStr().cstr() << "\">" << std::endl; - if (propList["dc:creator"]) - *m_pOutputStream << "getStr().cstr() << "\">" << std::endl; - if (propList["dc:subject"]) - *m_pOutputStream << "getStr().cstr() << "\">" << std::endl; - if (propList["dc:publisher"]) - *m_pOutputStream << "getStr().cstr() << "\">" << std::endl; - if (propList["meta:keyword"]) - *m_pOutputStream << "getStr().cstr() << "\">" << std::endl; - if (propList["dc:language"]) - *m_pOutputStream << "getStr().cstr() << "\">" << std::endl; - if (propList["dc:description"]) - *m_pOutputStream << "getStr().cstr() << "\">" << std::endl; - if (propList["libwpd:descriptive-name"]) - { - *m_pOutputStream << "getStr().cstr() << "\">" << std::endl; - *m_pOutputStream << "" << propList["libwpd:descriptive-name"]->getStr().cstr() << "" << std::endl; - } - if (propList["libwpd:descriptive-type"]) - *m_pOutputStream << "getStr().cstr() << "\">" << std::endl; -} - -void HtmlDocumentGenerator::startDocument() -{ - *m_pOutputStream << "" << std::endl; - *m_pOutputStream << "" << std::endl; - *m_pOutputStream << "" << std::endl; - *m_pOutputStream << "" << std::endl; - *m_pOutputStream << "" << std::endl; - *m_pOutputStream << "" << std::endl; -} - -void HtmlDocumentGenerator::endDocument() -{ - if (m_footNotesStream.str().length()) - { - *m_pOutputStream << "

FOOTNOTES

" << std::endl; - *m_pOutputStream << m_footNotesStream.str() << std::endl; - } - if (m_endNotesStream.str().length()) - { - *m_pOutputStream << "

ENDNOTES

" << std::endl; - *m_pOutputStream << m_endNotesStream.str() << std::endl; - } - if (m_commentsStream.str().length()) - { - *m_pOutputStream << "

COMMENTS AND ANNOTATIONS

" << std::endl; - *m_pOutputStream << m_commentsStream.str() << std::endl; - } - if (m_textBoxesStream.str().length()) - { - *m_pOutputStream << "

TEXT BOXES

" << std::endl; - *m_pOutputStream << m_textBoxesStream.str() << std::endl; - } - *m_pOutputStream << "" << std::endl; - *m_pOutputStream << "" << std::endl; -} - -void HtmlDocumentGenerator::openHeader(const WPXPropertyList & /* propList */) -{ - m_ignore = true; -} - -void HtmlDocumentGenerator::closeHeader() -{ - m_ignore = false; -} - - -void HtmlDocumentGenerator::openFooter(const WPXPropertyList & /* propList */) -{ - m_ignore = true; -} - -void HtmlDocumentGenerator::closeFooter() -{ - m_ignore = false; -} - -void HtmlDocumentGenerator::openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector & /* tabStops */) -{ - if (!m_ignore) - { - *m_pOutputStream << "

getStr() == WPXString("end")) // stupid OOo convention.. - *m_pOutputStream << "text-align:right;"; - else - *m_pOutputStream << "text-align:" << propList["fo:text-align"]->getStr().cstr() << ";"; - } - if (propList["fo:text-indent"]) - *m_pOutputStream << "text-indent:" << propList["fo:text-indent"]->getStr().cstr() << ";"; - - if (propList["fo:line-height"] && propList["fo:line-height"]->getDouble() != 1.0) - *m_pOutputStream << "line-height:" << propList["fo:line-height"]->getDouble() << ";"; - *m_pOutputStream << "\">"; - } -} - -void HtmlDocumentGenerator::closeParagraph() -{ - if (!m_ignore) - { - *m_pOutputStream << "

" << std::endl; - } -} - -void HtmlDocumentGenerator::openSpan(const WPXPropertyList &propList) -{ - if (!m_ignore) - { - - *m_pOutputStream << "getStr().cstr() << "\';"; - if (propList["fo:font-size"]) - *m_pOutputStream << "font-size: " << propList["fo:font-size"]->getStr().cstr() << ";"; - if (propList["fo:font-weight"]) - *m_pOutputStream << "font-weight: " << propList["fo:font-weight"]->getStr().cstr() << ";"; - if (propList["fo:font-style"]) - *m_pOutputStream << "font-style: " << propList["fo:font-style"]->getStr().cstr() << ";"; - if (propList["style:text-crossing-out"] && propList["style:text-crossing-out"]->getStr() == WPXString("single-line")) - *m_pOutputStream << "text-decoration:line-through;"; - if (propList["style:text-underline"]) // don't know if double underline is possible - *m_pOutputStream << "text-decoration:underline;"; - if (propList["style:text-blinking"]) - *m_pOutputStream << "text-decoration:blink;"; - if (propList["fo:color"]) - *m_pOutputStream << "color:" << propList["fo:color"]->getStr().cstr() << ";"; - if (propList["style:text-background-color"]) - *m_pOutputStream << "background-color:" << propList["style:text-background-color"]->getStr().cstr() << ";"; - - *m_pOutputStream << "\">"; - } -} - -void HtmlDocumentGenerator::closeSpan() -{ - if (!m_ignore) - { - *m_pOutputStream << "" << std::endl; - } -} - -void HtmlDocumentGenerator::insertTab() -{ - if (!m_ignore) - { - // Does not have a lot of effect since tabs in html are ignorable white-space - *m_pOutputStream << "\t"; - } -} - -void HtmlDocumentGenerator::insertLineBreak() -{ - if (!m_ignore) - { - - *m_pOutputStream << "
" << std::endl; - } -} - -void HtmlDocumentGenerator::insertText(const WPXString &text) -{ - if (!m_ignore) - { - - WPXString tempUTF8(text, true); - *m_pOutputStream << tempUTF8.cstr(); - } -} - -void HtmlDocumentGenerator::insertSpace() -{ - if (!m_ignore) - { - *m_pOutputStream << " "; - } -} - -void HtmlDocumentGenerator::openOrderedListLevel(const WPXPropertyList & /* propList */) -{ - if (!m_ignore) - { - *m_pOutputStream << "
    " << std::endl; - } -} - -void HtmlDocumentGenerator::closeOrderedListLevel() -{ - if (!m_ignore) - { - *m_pOutputStream << "
" << std::endl; - } -} - -void HtmlDocumentGenerator::openUnorderedListLevel(const WPXPropertyList & /* propList */) -{ - if (!m_ignore) - { - *m_pOutputStream << "
    " << std::endl; - } -} - -void HtmlDocumentGenerator::closeUnorderedListLevel() -{ - if (!m_ignore) - { - *m_pOutputStream << "
" << std::endl; - } -} - - -void HtmlDocumentGenerator::openListElement(const WPXPropertyList & /* propList */, const WPXPropertyListVector &/* tabStops */) -{ - if (!m_ignore) - { - *m_pOutputStream << "
  • "; - } -} - -void HtmlDocumentGenerator::closeListElement() -{ - if (!m_ignore) - { - *m_pOutputStream << "
  • " << std::endl; - } -} - -void HtmlDocumentGenerator::openFootnote(const WPXPropertyList &propList) -{ - if (!m_ignore) - { - if (!m_footNotesCount++) - { - if (propList["libwpd:number"]) - *m_pOutputStream << "(footnote: " << propList["libwpd:number"]->getStr().cstr() << ")"; - m_pOutputStream = &m_footNotesStream; - // Cheesey hack.. - if (propList["libwpd:number"]) - *m_pOutputStream << "

    " << propList["libwpd:number"]->getStr().cstr() << ":

    "; - else - *m_pOutputStream << "

    "; - } - else - m_pOutputStream = &m_dummyStream; - } -} - -void HtmlDocumentGenerator::closeFootnote() -{ - if (!m_ignore) - { - if (!(--m_footNotesCount)) - { - *m_pOutputStream << "

    " << std::endl; - m_pOutputStream = &std::cout; - } - } -} - -void HtmlDocumentGenerator::openEndnote(const WPXPropertyList &propList) -{ - if (!m_ignore) - { - if (!m_endNotesCount++) - { - if (propList["libwpd:number"]) - *m_pOutputStream << "(endnote: " << propList["libwpd:number"]->getStr().cstr() << ")"; - m_pOutputStream = &m_footNotesStream; - // Cheesey hack.. - if (propList["libwpd:number"]) - *m_pOutputStream << "

    " << propList["libwpd:number"]->getStr().cstr() << ":

    "; - else - *m_pOutputStream << "

    "; - } - else - m_pOutputStream = &m_dummyStream; - } -} - -void HtmlDocumentGenerator::closeEndnote() -{ - if (!m_ignore) - { - if (!(--m_endNotesCount)) - { - *m_pOutputStream << "

    " << std::endl; - m_pOutputStream = &std::cout; - } - } -} - -void HtmlDocumentGenerator::openComment(const WPXPropertyList & /*propList*/) -{ - if (!m_ignore) - { - if (!m_commentsCount++) - { - *m_pOutputStream << "(comment: " << m_commentNumber << ")"; - m_pOutputStream = &m_commentsStream; - *m_pOutputStream << "

    Comment " << m_commentNumber++ << ":

    " << std::endl; - *m_pOutputStream << "

    "; - } - else - m_pOutputStream = &m_dummyStream; - } -} - -void HtmlDocumentGenerator::closeComment() -{ - if (!m_ignore) - { - if (!(--m_commentsCount)) - { - *m_pOutputStream << "

    " << std::endl; - m_pOutputStream = &std::cout; - } - } -} - -void HtmlDocumentGenerator::openTextBox(const WPXPropertyList & /*propList*/) -{ - if (!m_ignore) - { - if (!m_textBoxesCount++) - { - *m_pOutputStream << "(text box: " << m_textBoxNumber << ")"; - m_pOutputStream = &m_commentsStream; - *m_pOutputStream << "

    Text Box " << m_textBoxNumber++ << ":

    " << std::endl; - m_pOutputStream = &m_textBoxesStream; - *m_pOutputStream << "

    "; - } - else - m_pOutputStream = &m_dummyStream; - } -} - -void HtmlDocumentGenerator::closeTextBox() -{ - if (!m_ignore) - { - if (!(--m_textBoxesCount)) - { - *m_pOutputStream << "

    " << std::endl; - m_pOutputStream = &std::cout; - } - } -} - -void HtmlDocumentGenerator::openTable(const WPXPropertyList & /* propList */, const WPXPropertyListVector & /* columns */) -{ - if (!m_ignore) - { - *m_pOutputStream << "" << std::endl; - *m_pOutputStream << "" << std::endl; - } -} - -void HtmlDocumentGenerator::openTableRow(const WPXPropertyList & /* propList */) -{ - if (!m_ignore) - { - *m_pOutputStream << "" << std::endl; - } -} - -void HtmlDocumentGenerator::closeTableRow() -{ - if (!m_ignore) - { - *m_pOutputStream << "" << std::endl; - } -} - -void HtmlDocumentGenerator::openTableCell(const WPXPropertyList &propList) -{ - if (!m_ignore) - { - *m_pOutputStream << "" << std::endl; - } -} - -void HtmlDocumentGenerator::closeTable() -{ - if (!m_ignore) - { - *m_pOutputStream << "" << std::endl; - *m_pOutputStream << "
    getStr().cstr() << ";"; - - *m_pOutputStream << "\" "; - - if (propList["table:number-columns-spanned"]) - *m_pOutputStream << "colspan=\"" << propList["table:number-columns-spanned"]->getInt() << "\" "; - if (propList["table:number-rows-spanned"]) - *m_pOutputStream << "rowspan=\"" << propList["table:number-rows-spanned"]->getInt() << "\" "; - - *m_pOutputStream << ">" << std::endl; - } -} - -void HtmlDocumentGenerator::closeTableCell() -{ - if (!m_ignore) - { - *m_pOutputStream << "
    " << std::endl; - } -} -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libabw-0.0.2/src/conv/html/HtmlDocumentGenerator.h libabw-0.1.0/src/conv/html/HtmlDocumentGenerator.h --- libabw-0.0.2/src/conv/html/HtmlDocumentGenerator.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/html/HtmlDocumentGenerator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,99 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* - * This file is part of the libabw project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef HTMLDOCUMENTGENERATOR_H -#define HTMLDOCUMENTGENERATOR_H - -#include -#include -#include -#include - -class HtmlDocumentGenerator : public WPXDocumentInterface -{ -public: - HtmlDocumentGenerator(); - virtual ~HtmlDocumentGenerator(); - - virtual void setDocumentMetaData(const WPXPropertyList &propList); - - virtual void startDocument(); - virtual void endDocument(); - - virtual void definePageStyle(const WPXPropertyList &) {} - virtual void openPageSpan(const WPXPropertyList & /* propList */) {} - virtual void closePageSpan() {} - virtual void openHeader(const WPXPropertyList &propList); - virtual void closeHeader(); - virtual void openFooter(const WPXPropertyList &propList); - virtual void closeFooter(); - - virtual void defineSectionStyle(const WPXPropertyList &, const WPXPropertyListVector &) {} - virtual void openSection(const WPXPropertyList & /* propList */, const WPXPropertyListVector & /* columns */) {} - virtual void closeSection() {} - - virtual void defineParagraphStyle(const WPXPropertyList &, const WPXPropertyListVector &) {} - virtual void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); - virtual void closeParagraph(); - - virtual void defineCharacterStyle(const WPXPropertyList &) {} - virtual void openSpan(const WPXPropertyList &propList); - virtual void closeSpan(); - - virtual void insertTab(); - virtual void insertText(const WPXString &text); - virtual void insertSpace(); - virtual void insertLineBreak(); - virtual void insertField(const WPXString & /* type */, const WPXPropertyList & /* propList */) {} - - virtual void defineOrderedListLevel(const WPXPropertyList & /* propList */) {} - virtual void defineUnorderedListLevel(const WPXPropertyList & /* propList */) {} - virtual void openOrderedListLevel(const WPXPropertyList &propList); - virtual void openUnorderedListLevel(const WPXPropertyList &propList); - virtual void closeOrderedListLevel(); - virtual void closeUnorderedListLevel(); - virtual void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); - virtual void closeListElement(); - - virtual void openFootnote(const WPXPropertyList &propList); - virtual void closeFootnote(); - virtual void openEndnote(const WPXPropertyList &propList); - virtual void closeEndnote(); - virtual void openComment(const WPXPropertyList &propList); - virtual void closeComment(); - virtual void openTextBox(const WPXPropertyList &propList); - virtual void closeTextBox(); - - virtual void openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns); - virtual void openTableRow(const WPXPropertyList &propList); - virtual void closeTableRow(); - virtual void openTableCell(const WPXPropertyList &propList); - virtual void closeTableCell(); - virtual void insertCoveredTableCell(const WPXPropertyList & /* propList */) {} - virtual void closeTable(); - - virtual void openFrame(const WPXPropertyList & /* propList */) {} - virtual void closeFrame() {} - - virtual void insertBinaryObject(const WPXPropertyList & /* propList */, const WPXBinaryData & /* data */) {} - virtual void insertEquation(const WPXPropertyList & /* propList */, const WPXString & /* data */) {} - -private: - bool m_ignore; - std::ostream *m_pOutputStream; - std::ostringstream m_footNotesStream, m_endNotesStream, m_commentsStream, m_textBoxesStream, m_dummyStream; - unsigned m_footNotesCount, m_endNotesCount, m_commentsCount, m_textBoxesCount; - unsigned m_commentNumber, m_textBoxNumber; - // Unimplemented to prevent compiler from creating crasher ones - HtmlDocumentGenerator(const HtmlDocumentGenerator &); - HtmlDocumentGenerator &operator=(const HtmlDocumentGenerator &); -}; - -#endif /* HTMLDOCUMENTGENERATOR_H */ -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libabw-0.0.2/src/conv/html/Makefile.am libabw-0.1.0/src/conv/html/Makefile.am --- libabw-0.0.2/src/conv/html/Makefile.am 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/html/Makefile.am 2014-03-29 10:23:24.000000000 +0000 @@ -4,21 +4,21 @@ AM_CXXFLAGS = \ -I$(top_srcdir)/inc \ - $(WPD_CFLAGS) \ - $(WPD_STREAM_CFLAGS) \ + $(REVENGE_CFLAGS) \ + $(REVENGE_GENERATORS_CFLAGS) \ + $(REVENGE_STREAM_CFLAGS) \ $(DEBUG_CXXFLAGS) abw2html_DEPENDENCIES = @ABW2HTML_WIN32_RESOURCE@ abw2html_LDADD = \ ../../lib/libabw-@ABW_MAJOR_VERSION@.@ABW_MINOR_VERSION@.la \ - $(WPD_LIBS) \ - $(WPD_STREAM_LIBS) \ + $(REVENGE_GENERATORS_LIBS) \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ @ABW2HTML_WIN32_RESOURCE@ abw2html_SOURCES = \ - HtmlDocumentGenerator.cpp \ - HtmlDocumentGenerator.h \ abw2html.cpp if OS_WIN32 diff -Nru libabw-0.0.2/src/conv/html/Makefile.in libabw-0.1.0/src/conv/html/Makefile.in --- libabw-0.0.2/src/conv/html/Makefile.in 2014-02-10 14:49:18.000000000 +0000 +++ libabw-0.1.0/src/conv/html/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -95,11 +95,8 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am__abw2html_SOURCES_DIST = HtmlDocumentGenerator.cpp \ - HtmlDocumentGenerator.h abw2html.cpp -@BUILD_TOOLS_TRUE@am_abw2html_OBJECTS = \ -@BUILD_TOOLS_TRUE@ HtmlDocumentGenerator.$(OBJEXT) \ -@BUILD_TOOLS_TRUE@ abw2html.$(OBJEXT) +am__abw2html_SOURCES_DIST = abw2html.cpp +@BUILD_TOOLS_TRUE@am_abw2html_OBJECTS = abw2html.$(OBJEXT) abw2html_OBJECTS = $(am_abw2html_OBJECTS) am__DEPENDENCIES_1 = AM_V_lt = $(am__v_lt_@AM_V@) @@ -140,24 +137,6 @@ am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = SOURCES = $(abw2html_SOURCES) DIST_SOURCES = $(am__abw2html_SOURCES_DIST) am__can_run_installinfo = \ @@ -266,16 +245,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -333,20 +314,20 @@ top_srcdir = @top_srcdir@ @BUILD_TOOLS_TRUE@AM_CXXFLAGS = \ @BUILD_TOOLS_TRUE@ -I$(top_srcdir)/inc \ -@BUILD_TOOLS_TRUE@ $(WPD_CFLAGS) \ -@BUILD_TOOLS_TRUE@ $(WPD_STREAM_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_CFLAGS) \ @BUILD_TOOLS_TRUE@ $(DEBUG_CXXFLAGS) @BUILD_TOOLS_TRUE@abw2html_DEPENDENCIES = @ABW2HTML_WIN32_RESOURCE@ @BUILD_TOOLS_TRUE@abw2html_LDADD = \ @BUILD_TOOLS_TRUE@ ../../lib/libabw-@ABW_MAJOR_VERSION@.@ABW_MINOR_VERSION@.la \ -@BUILD_TOOLS_TRUE@ $(WPD_LIBS) \ -@BUILD_TOOLS_TRUE@ $(WPD_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ @BUILD_TOOLS_TRUE@ @ABW2HTML_WIN32_RESOURCE@ @BUILD_TOOLS_TRUE@abw2html_SOURCES = \ -@BUILD_TOOLS_TRUE@ HtmlDocumentGenerator.cpp \ -@BUILD_TOOLS_TRUE@ HtmlDocumentGenerator.h \ @BUILD_TOOLS_TRUE@ abw2html.cpp @@ -456,7 +437,6 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HtmlDocumentGenerator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abw2html.Po@am__quote@ .cpp.o: diff -Nru libabw-0.0.2/src/conv/Makefile.in libabw-0.1.0/src/conv/Makefile.in --- libabw-0.0.2/src/conv/Makefile.in 2014-02-10 14:49:18.000000000 +0000 +++ libabw-0.1.0/src/conv/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -252,16 +252,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libabw-0.0.2/src/conv/raw/abw2raw.cpp libabw-0.1.0/src/conv/raw/abw2raw.cpp --- libabw-0.0.2/src/conv/raw/abw2raw.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/raw/abw2raw.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -8,10 +8,10 @@ */ #include -#include +#include +#include #include #include -#include "RawDocumentGenerator.h" #ifdef HAVE_CONFIG_H #include "config.h" @@ -66,7 +66,7 @@ if (!file) return printUsage(); - WPXFileStream input(file); + librevenge::RVNGFileStream input(file); if (!libabw::AbiDocument::isFileFormatSupported(&input)) { @@ -74,7 +74,7 @@ return 1; } - RawDocumentGenerator documentGenerator(printIndentLevel); + librevenge::RVNGRawTextGenerator documentGenerator(printIndentLevel); if (libabw::AbiDocument::parse(&input, &documentGenerator)) return 0; return 1; diff -Nru libabw-0.0.2/src/conv/raw/Makefile.am libabw-0.1.0/src/conv/raw/Makefile.am --- libabw-0.0.2/src/conv/raw/Makefile.am 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/raw/Makefile.am 2014-03-29 10:23:24.000000000 +0000 @@ -4,21 +4,21 @@ AM_CXXFLAGS = \ -I$(top_srcdir)/inc \ - $(WPD_CFLAGS) \ - $(WPD_STREAM_CFLAGS) \ + $(REVENGE_CFLAGS) \ + $(REVENGE_GENERATORS_CFLAGS) \ + $(REVENGE_STREAM_CFLAGS) \ $(DEBUG_CXXFLAGS) abw2raw_DEPENDENCIES = @ABW2RAW_WIN32_RESOURCE@ abw2raw_LDADD = \ ../../lib/libabw-@ABW_MAJOR_VERSION@.@ABW_MINOR_VERSION@.la \ - $(WPD_LIBS) \ - $(WPD_STREAM_LIBS) \ + $(REVENGE_GENERATORS_LIBS) \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ @ABW2RAW_WIN32_RESOURCE@ abw2raw_SOURCES = \ - RawDocumentGenerator.cpp \ - RawDocumentGenerator.h \ abw2raw.cpp if OS_WIN32 diff -Nru libabw-0.0.2/src/conv/raw/Makefile.in libabw-0.1.0/src/conv/raw/Makefile.in --- libabw-0.0.2/src/conv/raw/Makefile.in 2014-02-10 14:49:19.000000000 +0000 +++ libabw-0.1.0/src/conv/raw/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -95,10 +95,8 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am__abw2raw_SOURCES_DIST = RawDocumentGenerator.cpp \ - RawDocumentGenerator.h abw2raw.cpp -@BUILD_TOOLS_TRUE@am_abw2raw_OBJECTS = RawDocumentGenerator.$(OBJEXT) \ -@BUILD_TOOLS_TRUE@ abw2raw.$(OBJEXT) +am__abw2raw_SOURCES_DIST = abw2raw.cpp +@BUILD_TOOLS_TRUE@am_abw2raw_OBJECTS = abw2raw.$(OBJEXT) abw2raw_OBJECTS = $(am_abw2raw_OBJECTS) am__DEPENDENCIES_1 = AM_V_lt = $(am__v_lt_@AM_V@) @@ -139,24 +137,6 @@ am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = SOURCES = $(abw2raw_SOURCES) DIST_SOURCES = $(am__abw2raw_SOURCES_DIST) am__can_run_installinfo = \ @@ -265,16 +245,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -332,20 +314,20 @@ top_srcdir = @top_srcdir@ @BUILD_TOOLS_TRUE@AM_CXXFLAGS = \ @BUILD_TOOLS_TRUE@ -I$(top_srcdir)/inc \ -@BUILD_TOOLS_TRUE@ $(WPD_CFLAGS) \ -@BUILD_TOOLS_TRUE@ $(WPD_STREAM_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_CFLAGS) \ @BUILD_TOOLS_TRUE@ $(DEBUG_CXXFLAGS) @BUILD_TOOLS_TRUE@abw2raw_DEPENDENCIES = @ABW2RAW_WIN32_RESOURCE@ @BUILD_TOOLS_TRUE@abw2raw_LDADD = \ @BUILD_TOOLS_TRUE@ ../../lib/libabw-@ABW_MAJOR_VERSION@.@ABW_MINOR_VERSION@.la \ -@BUILD_TOOLS_TRUE@ $(WPD_LIBS) \ -@BUILD_TOOLS_TRUE@ $(WPD_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ @BUILD_TOOLS_TRUE@ @ABW2RAW_WIN32_RESOURCE@ @BUILD_TOOLS_TRUE@abw2raw_SOURCES = \ -@BUILD_TOOLS_TRUE@ RawDocumentGenerator.cpp \ -@BUILD_TOOLS_TRUE@ RawDocumentGenerator.h \ @BUILD_TOOLS_TRUE@ abw2raw.cpp @@ -455,7 +437,6 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RawDocumentGenerator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abw2raw.Po@am__quote@ .cpp.o: diff -Nru libabw-0.0.2/src/conv/raw/RawDocumentGenerator.cpp libabw-0.1.0/src/conv/raw/RawDocumentGenerator.cpp --- libabw-0.0.2/src/conv/raw/RawDocumentGenerator.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/raw/RawDocumentGenerator.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,417 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* - * This file is part of the libabw project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include -#include -#include "RawDocumentGenerator.h" - -#ifdef _U -#undef _U -#endif - -#define _U(M, L) \ - m_atLeastOneCallback = true; \ - if (!m_printCallgraphScore) \ - __iuprintf M; \ - else \ - m_callStack.push(L); - -#ifdef _D -#undef _D -#endif - -#define _D(M, L) \ - m_atLeastOneCallback = true; \ - if (!m_printCallgraphScore) \ - __idprintf M; \ - else \ - { \ - ListenerCallback lc = m_callStack.top(); \ - if (lc != L) \ - m_callbackMisses++; \ - m_callStack.pop(); \ - } - -RawDocumentGenerator::RawDocumentGenerator(bool printCallgraphScore) : - m_indent(0), - m_callbackMisses(0), - m_atLeastOneCallback(false), - m_printCallgraphScore(printCallgraphScore), - m_callStack() -{ -} - -RawDocumentGenerator::~RawDocumentGenerator() -{ - if (m_printCallgraphScore) - printf("%d\n", m_atLeastOneCallback ? (int)(m_callStack.size() + m_callbackMisses) : -1); -} - -void RawDocumentGenerator::__iprintf(const char *format, ...) -{ - m_atLeastOneCallback = true; - if (m_printCallgraphScore) return; - - va_list args; - va_start(args, format); - for (int i=0; igetStr().cstr()); - for (; i.next();) - { - propString.append(", "); - propString.append(i.key()); - propString.append(": "); - propString.append(i()->getStr().cstr()); - } - } - - return propString; -} - -WPXString getPropString(const WPXPropertyListVector &itemList) -{ - WPXString propString; - - propString.append("("); - WPXPropertyListVector::Iter i(itemList); - - if (!i.last()) - { - propString.append("("); - propString.append(getPropString(i())); - propString.append(")"); - - for (; i.next();) - { - propString.append(", ("); - propString.append(getPropString(i())); - propString.append(")"); - } - - } - propString.append(")"); - - return propString; -} - -void RawDocumentGenerator::setDocumentMetaData(const WPXPropertyList &propList) -{ - if (m_printCallgraphScore) - return; - - __iprintf("setDocumentMetaData(%s)\n", getPropString(propList).cstr()); -} - -void RawDocumentGenerator::startDocument() -{ - _U(("startDocument()\n"), LC_START_DOCUMENT); -} - -void RawDocumentGenerator::endDocument() -{ - _D(("endDocument()\n"), LC_START_DOCUMENT); -} - -void RawDocumentGenerator::definePageStyle(const WPXPropertyList &propList) -{ - __iprintf("definePageStyle(%s)\n", getPropString(propList).cstr()); -} - -void RawDocumentGenerator::openPageSpan(const WPXPropertyList &propList) -{ - _U(("openPageSpan(%s)\n", getPropString(propList).cstr()), - LC_OPEN_PAGE_SPAN); -} - -void RawDocumentGenerator::closePageSpan() -{ - _D(("closePageSpan()\n"), - LC_OPEN_PAGE_SPAN); -} - -void RawDocumentGenerator::openHeader(const WPXPropertyList &propList) -{ - _U(("openHeader(%s)\n", - getPropString(propList).cstr()), - LC_OPEN_HEADER_FOOTER); -} - -void RawDocumentGenerator::closeHeader() -{ - _D(("closeHeader()\n"), - LC_OPEN_HEADER_FOOTER); -} - -void RawDocumentGenerator::openFooter(const WPXPropertyList &propList) -{ - _U(("openFooter(%s)\n", - getPropString(propList).cstr()), - LC_OPEN_HEADER_FOOTER); -} - -void RawDocumentGenerator::closeFooter() -{ - _D(("closeFooter()\n"), - LC_OPEN_HEADER_FOOTER); -} - -void RawDocumentGenerator::defineParagraphStyle(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) -{ - __iprintf("defineParagraphStyle(%s, tab-stops: %s)\n", getPropString(propList).cstr(), getPropString(tabStops).cstr()); -} - -void RawDocumentGenerator::openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) -{ - _U(("openParagraph(%s, tab-stops: %s)\n", getPropString(propList).cstr(), getPropString(tabStops).cstr()), - LC_OPEN_PARAGRAPH); -} - -void RawDocumentGenerator::closeParagraph() -{ - _D(("closeParagraph()\n"), LC_OPEN_PARAGRAPH); -} - -void RawDocumentGenerator::defineCharacterStyle(const WPXPropertyList &propList) -{ - __iprintf("defineCharacterStyle(%s)\n", getPropString(propList).cstr()); -} - -void RawDocumentGenerator::openSpan(const WPXPropertyList &propList) -{ - _U(("openSpan(%s)\n", getPropString(propList).cstr()), LC_OPEN_SPAN); -} - -void RawDocumentGenerator::closeSpan() -{ - _D(("closeSpan()\n"), LC_OPEN_SPAN); -} - -void RawDocumentGenerator::defineSectionStyle(const WPXPropertyList &propList, const WPXPropertyListVector &columns) -{ - __iprintf("defineSectionStyle(%s, columns: %s)\n", getPropString(propList).cstr(), getPropString(columns).cstr()); -} - -void RawDocumentGenerator::openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns) -{ - _U(("openSection(%s, columns: %s)\n", getPropString(propList).cstr(), getPropString(columns).cstr()), LC_OPEN_SECTION); -} - -void RawDocumentGenerator::closeSection() -{ - _D(("closeSection()\n"), LC_OPEN_SECTION); -} - -void RawDocumentGenerator::insertTab() -{ - __iprintf("insertTab()\n"); -} - -void RawDocumentGenerator::insertSpace() -{ - __iprintf("insertSpace()\n"); -} - -void RawDocumentGenerator::insertText(const WPXString &text) -{ - __iprintf("insertText(text: %s)\n", text.cstr()); -} - -void RawDocumentGenerator::insertLineBreak() -{ - __iprintf("insertLineBreak()\n"); -} - -void RawDocumentGenerator::insertField(const WPXString &type, const WPXPropertyList &propList) -{ - __iprintf("insertField(type: %s, %s)\n", type.cstr(), getPropString(propList).cstr()); -} - -void RawDocumentGenerator::defineOrderedListLevel(const WPXPropertyList &propList) -{ - __iprintf("defineOrderedListLevel(%s)\n", getPropString(propList).cstr()); -} - -void RawDocumentGenerator::defineUnorderedListLevel(const WPXPropertyList &propList) -{ - __iprintf("defineUnorderedListLevel(%s)\n", getPropString(propList).cstr()); -} - -void RawDocumentGenerator::openOrderedListLevel(const WPXPropertyList &propList) -{ - _U(("openOrderedListLevel(%s)\n", getPropString(propList).cstr()), - LC_OPEN_ORDERED_LIST_LEVEL); -} - -void RawDocumentGenerator::openUnorderedListLevel(const WPXPropertyList &propList) -{ - _U(("openUnorderedListLevel(%s)\n", getPropString(propList).cstr()), - LC_OPEN_UNORDERED_LIST_LEVEL); -} - -void RawDocumentGenerator::closeOrderedListLevel() -{ - _D(("closeOrderedListLevel()\n"), - LC_OPEN_ORDERED_LIST_LEVEL); -} - -void RawDocumentGenerator::closeUnorderedListLevel() -{ - _D(("closeUnorderedListLevel()\n"), LC_OPEN_UNORDERED_LIST_LEVEL); -} - -void RawDocumentGenerator::openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) -{ - _U(("openListElement(%s, tab-stops: %s)\n", getPropString(propList).cstr(), getPropString(tabStops).cstr()), - LC_OPEN_LIST_ELEMENT); -} - -void RawDocumentGenerator::closeListElement() -{ - _D(("closeListElement()\n"), LC_OPEN_LIST_ELEMENT); -} - -void RawDocumentGenerator::openFootnote(const WPXPropertyList &propList) -{ - _U(("openFootnote(%s)\n", getPropString(propList).cstr()), - LC_OPEN_FOOTNOTE); -} - -void RawDocumentGenerator::closeFootnote() -{ - _D(("closeFootnote()\n"), LC_OPEN_FOOTNOTE); -} - -void RawDocumentGenerator::openEndnote(const WPXPropertyList &propList) -{ - _U(("openEndnote(number: %s)\n", getPropString(propList).cstr()), - LC_OPEN_ENDNOTE); -} - -void RawDocumentGenerator::closeEndnote() -{ - _D(("closeEndnote()\n"), LC_OPEN_ENDNOTE); -} - -void RawDocumentGenerator::openComment(const WPXPropertyList &propList) -{ - _U(("openComment(%s)\n", getPropString(propList).cstr()), - LC_OPEN_COMMENT); -} - -void RawDocumentGenerator::closeComment() -{ - _D(("closeComment()\n"), LC_OPEN_COMMENT); -} - -void RawDocumentGenerator::openTextBox(const WPXPropertyList &propList) -{ - _U(("openTextBox(%s)\n", getPropString(propList).cstr()), - LC_OPEN_TEXT_BOX); -} - -void RawDocumentGenerator::closeTextBox() -{ - _D(("closeTextBox()\n"), LC_OPEN_TEXT_BOX); -} - -void RawDocumentGenerator::openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns) -{ - _U(("openTable(%s, columns: %s)\n", getPropString(propList).cstr(), getPropString(columns).cstr()), LC_OPEN_TABLE); -} - -void RawDocumentGenerator::openTableRow(const WPXPropertyList &propList) -{ - _U(("openTableRow(%s)\n", getPropString(propList).cstr()), - LC_OPEN_TABLE_ROW); -} - -void RawDocumentGenerator::closeTableRow() -{ - _D(("closeTableRow()\n"), LC_OPEN_TABLE_ROW); -} - -void RawDocumentGenerator::openTableCell(const WPXPropertyList &propList) -{ - _U(("openTableCell(%s)\n", getPropString(propList).cstr()), - LC_OPEN_TABLE_CELL); -} - -void RawDocumentGenerator::closeTableCell() -{ - _D(("closeTableCell()\n"), LC_OPEN_TABLE_CELL); -} - -void RawDocumentGenerator::insertCoveredTableCell(const WPXPropertyList &propList) -{ - __iprintf("insertCoveredTableCell(%s)\n", getPropString(propList).cstr()); -} - -void RawDocumentGenerator::closeTable() -{ - _D(("closeTable()\n"), LC_OPEN_TABLE); -} - -void RawDocumentGenerator::openFrame(const WPXPropertyList &propList) -{ - _U(("openFrame(%s)\n", getPropString(propList).cstr()), - LC_OPEN_FRAME); -} - -void RawDocumentGenerator::closeFrame() -{ - _D(("closeFrame()\n"), LC_OPEN_FRAME); -} - -void RawDocumentGenerator::insertBinaryObject(const WPXPropertyList &propList, const WPXBinaryData & /* data */) -{ - __iprintf("insertBinaryObject(%s)\n", getPropString(propList).cstr()); -} - -void RawDocumentGenerator::insertEquation(const WPXPropertyList &propList, const WPXString &data) -{ - __iprintf("insertEquation(%s, text: %s)\n", getPropString(propList).cstr(), data.cstr()); -} -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libabw-0.0.2/src/conv/raw/RawDocumentGenerator.h libabw-0.1.0/src/conv/raw/RawDocumentGenerator.h --- libabw-0.0.2/src/conv/raw/RawDocumentGenerator.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/raw/RawDocumentGenerator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,132 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* - * This file is part of the libabw project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef RAWDOCUMENTGENERATOR_H -#define RAWDOCUMENTGENERATOR_H - -#include -#include -#include - -using namespace std; - -enum ListenerCallback -{ - LC_START_DOCUMENT = 0, - LC_OPEN_PAGE_SPAN, - LC_OPEN_HEADER_FOOTER, - LC_OPEN_PARAGRAPH, - LC_OPEN_SPAN, - LC_OPEN_SECTION, - LC_OPEN_ORDERED_LIST_LEVEL, - LC_OPEN_UNORDERED_LIST_LEVEL, - LC_OPEN_LIST_ELEMENT, - LC_OPEN_FOOTNOTE, - LC_OPEN_ENDNOTE, - LC_OPEN_TABLE, - LC_OPEN_TABLE_ROW, - LC_OPEN_TABLE_CELL, - LC_OPEN_COMMENT, - LC_OPEN_TEXT_BOX, - LC_OPEN_FRAME -}; - -class RawDocumentGenerator : public WPXDocumentInterface -{ -public: - RawDocumentGenerator(bool printCallgraphScore); - virtual ~RawDocumentGenerator(); - - virtual void setDocumentMetaData(const WPXPropertyList &propList); - - virtual void startDocument(); - virtual void endDocument(); - - virtual void definePageStyle(const WPXPropertyList &propList); - virtual void openPageSpan(const WPXPropertyList &propList); - virtual void closePageSpan(); - virtual void openHeader(const WPXPropertyList &propList); - virtual void closeHeader(); - virtual void openFooter(const WPXPropertyList &propList); - virtual void closeFooter(); - - virtual void defineParagraphStyle(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); - virtual void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); - virtual void closeParagraph(); - - virtual void defineCharacterStyle(const WPXPropertyList &propList); - virtual void openSpan(const WPXPropertyList &propList); - virtual void closeSpan(); - - virtual void defineSectionStyle(const WPXPropertyList &propList, const WPXPropertyListVector &columns); - virtual void openSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns); - virtual void closeSection(); - - virtual void insertTab(); - virtual void insertSpace(); - virtual void insertText(const WPXString &text); - virtual void insertLineBreak(); - virtual void insertField(const WPXString &type, const WPXPropertyList &propList); - - virtual void defineOrderedListLevel(const WPXPropertyList &propList); - virtual void defineUnorderedListLevel(const WPXPropertyList &propList); - virtual void openOrderedListLevel(const WPXPropertyList &propList); - virtual void openUnorderedListLevel(const WPXPropertyList &propList); - virtual void closeOrderedListLevel(); - virtual void closeUnorderedListLevel(); - virtual void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); - virtual void closeListElement(); - - virtual void openFootnote(const WPXPropertyList &propList); - virtual void closeFootnote(); - virtual void openEndnote(const WPXPropertyList &propList); - virtual void closeEndnote(); - virtual void openComment(const WPXPropertyList &propList); - virtual void closeComment(); - virtual void openTextBox(const WPXPropertyList &propList); - virtual void closeTextBox(); - - virtual void openTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns); - virtual void openTableRow(const WPXPropertyList &propList); - virtual void closeTableRow(); - virtual void openTableCell(const WPXPropertyList &propList); - virtual void closeTableCell(); - virtual void insertCoveredTableCell(const WPXPropertyList &propList); - virtual void closeTable(); - - virtual void openFrame(const WPXPropertyList &propList); - virtual void closeFrame(); - - virtual void insertBinaryObject(const WPXPropertyList &propList, const WPXBinaryData &data); - virtual void insertEquation(const WPXPropertyList &propList, const WPXString &data); - -private: - int m_indent; - int m_callbackMisses; - bool m_atLeastOneCallback; - bool m_printCallgraphScore; - stack m_callStack; - - void __indentUp() - { - m_indent++; - } - void __indentDown() - { - if (m_indent > 0) m_indent--; - } - - void __iprintf(const char *format, ...); - void __iuprintf(const char *format, ...); - void __idprintf(const char *format, ...); - -}; - -#endif /* RAWDOCUMENTGENERATOR_H */ -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libabw-0.0.2/src/conv/text/abw2text.cpp libabw-0.1.0/src/conv/text/abw2text.cpp --- libabw-0.0.2/src/conv/text/abw2text.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/text/abw2text.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -7,11 +7,12 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + #include #include -#include +#include +#include #include -#include "TextDocumentGenerator.h" #ifdef HAVE_CONFIG_H #include "config.h" @@ -66,7 +67,7 @@ if (!szInputFile) return printUsage(); - WPXFileStream input(szInputFile); + librevenge::RVNGFileStream input(szInputFile); if (!libabw::AbiDocument::isFileFormatSupported(&input)) { @@ -74,10 +75,13 @@ return 1; } - TextDocumentGenerator documentGenerator(isInfo); + librevenge::RVNGString document; + librevenge::RVNGTextTextGenerator documentGenerator(document, isInfo); if (!libabw::AbiDocument::parse(&input, &documentGenerator)) return 1; + printf("%s", document.cstr()); + return 0; } /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libabw-0.0.2/src/conv/text/Makefile.am libabw-0.1.0/src/conv/text/Makefile.am --- libabw-0.0.2/src/conv/text/Makefile.am 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/text/Makefile.am 2014-03-29 10:23:24.000000000 +0000 @@ -4,21 +4,21 @@ AM_CXXFLAGS = \ -I$(top_srcdir)/inc \ - $(WPD_CFLAGS) \ - $(WPD_STREAM_CFLAGS) \ + $(REVENGE_CFLAGS) \ + $(REVENGE_GENERATORS_CFLAGS) \ + $(REVENGE_STREAM_CFLAGS) \ $(DEBUG_CXXFLAGS) abw2text_DEPENDENCIES = @ABW2TEXT_WIN32_RESOURCE@ abw2text_LDADD = \ ../../lib/libabw-@ABW_MAJOR_VERSION@.@ABW_MINOR_VERSION@.la \ - $(WPD_LIBS) \ - $(WPD_STREAM_LIBS) \ + $(REVENGE_GENERATORS_LIBS) \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ @ABW2TEXT_WIN32_RESOURCE@ abw2text_SOURCES = \ - TextDocumentGenerator.cpp \ - TextDocumentGenerator.h \ abw2text.cpp if OS_WIN32 diff -Nru libabw-0.0.2/src/conv/text/Makefile.in libabw-0.1.0/src/conv/text/Makefile.in --- libabw-0.0.2/src/conv/text/Makefile.in 2014-02-10 14:49:19.000000000 +0000 +++ libabw-0.1.0/src/conv/text/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -95,11 +95,8 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am__abw2text_SOURCES_DIST = TextDocumentGenerator.cpp \ - TextDocumentGenerator.h abw2text.cpp -@BUILD_TOOLS_TRUE@am_abw2text_OBJECTS = \ -@BUILD_TOOLS_TRUE@ TextDocumentGenerator.$(OBJEXT) \ -@BUILD_TOOLS_TRUE@ abw2text.$(OBJEXT) +am__abw2text_SOURCES_DIST = abw2text.cpp +@BUILD_TOOLS_TRUE@am_abw2text_OBJECTS = abw2text.$(OBJEXT) abw2text_OBJECTS = $(am_abw2text_OBJECTS) am__DEPENDENCIES_1 = AM_V_lt = $(am__v_lt_@AM_V@) @@ -140,24 +137,6 @@ am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ - $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ - $(AM_CFLAGS) $(CFLAGS) -AM_V_CC = $(am__v_CC_@AM_V@) -am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) -am__v_CC_0 = @echo " CC " $@; -am__v_CC_1 = -CCLD = $(CC) -LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(AM_LDFLAGS) $(LDFLAGS) -o $@ -AM_V_CCLD = $(am__v_CCLD_@AM_V@) -am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) -am__v_CCLD_0 = @echo " CCLD " $@; -am__v_CCLD_1 = SOURCES = $(abw2text_SOURCES) DIST_SOURCES = $(am__abw2text_SOURCES_DIST) am__can_run_installinfo = \ @@ -266,16 +245,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -333,20 +314,20 @@ top_srcdir = @top_srcdir@ @BUILD_TOOLS_TRUE@AM_CXXFLAGS = \ @BUILD_TOOLS_TRUE@ -I$(top_srcdir)/inc \ -@BUILD_TOOLS_TRUE@ $(WPD_CFLAGS) \ -@BUILD_TOOLS_TRUE@ $(WPD_STREAM_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_CFLAGS) \ @BUILD_TOOLS_TRUE@ $(DEBUG_CXXFLAGS) @BUILD_TOOLS_TRUE@abw2text_DEPENDENCIES = @ABW2TEXT_WIN32_RESOURCE@ @BUILD_TOOLS_TRUE@abw2text_LDADD = \ @BUILD_TOOLS_TRUE@ ../../lib/libabw-@ABW_MAJOR_VERSION@.@ABW_MINOR_VERSION@.la \ -@BUILD_TOOLS_TRUE@ $(WPD_LIBS) \ -@BUILD_TOOLS_TRUE@ $(WPD_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ @BUILD_TOOLS_TRUE@ @ABW2TEXT_WIN32_RESOURCE@ @BUILD_TOOLS_TRUE@abw2text_SOURCES = \ -@BUILD_TOOLS_TRUE@ TextDocumentGenerator.cpp \ -@BUILD_TOOLS_TRUE@ TextDocumentGenerator.h \ @BUILD_TOOLS_TRUE@ abw2text.cpp @@ -456,7 +437,6 @@ distclean-compile: -rm -f *.tab.c -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TextDocumentGenerator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/abw2text.Po@am__quote@ .cpp.o: diff -Nru libabw-0.0.2/src/conv/text/TextDocumentGenerator.cpp libabw-0.1.0/src/conv/text/TextDocumentGenerator.cpp --- libabw-0.0.2/src/conv/text/TextDocumentGenerator.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/text/TextDocumentGenerator.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,70 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* - * This file is part of the libabw project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#include -#include "TextDocumentGenerator.h" - -// use the BELL code to represent a TAB for now -#define UCS_TAB 0x0009 - -TextDocumentGenerator::TextDocumentGenerator(const bool isInfo) : - m_isInfo(isInfo) -{ -} - -TextDocumentGenerator::~TextDocumentGenerator() -{ -} - -void TextDocumentGenerator::setDocumentMetaData(const WPXPropertyList &propList) -{ - if (!m_isInfo) - return; - WPXPropertyList::Iter propIter(propList); - for (propIter.rewind(); propIter.next();) - { - printf("%s %s\n", propIter.key(), propIter()->getStr().cstr()); - } -} - -void TextDocumentGenerator::closeParagraph() -{ - if (m_isInfo) - return; - printf("\n"); -} - -void TextDocumentGenerator::insertTab() -{ - if (m_isInfo) - return; - printf("%c", UCS_TAB); -} - -void TextDocumentGenerator::insertText(const WPXString &text) -{ - if (m_isInfo) - return; - printf("%s", text.cstr()); -} - -void TextDocumentGenerator::insertSpace() -{ - if (m_isInfo) - return; - printf(" "); -} - -void TextDocumentGenerator::insertLineBreak() -{ - if (m_isInfo) - return; - printf("\n"); -} -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libabw-0.0.2/src/conv/text/TextDocumentGenerator.h libabw-0.1.0/src/conv/text/TextDocumentGenerator.h --- libabw-0.0.2/src/conv/text/TextDocumentGenerator.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/conv/text/TextDocumentGenerator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,90 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* - * This file is part of the libabw project. - * - * This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -#ifndef TEXTDOCUMENTGENERATOR_H -#define TEXTDOCUMENTGENERATOR_H - -#include -#include - -class TextDocumentGenerator : public WPXDocumentInterface -{ -public: - TextDocumentGenerator(const bool isInfo=false); - virtual ~TextDocumentGenerator(); - - virtual void setDocumentMetaData(const WPXPropertyList &propList); - - virtual void startDocument() {} - virtual void endDocument() {} - - virtual void definePageStyle(const WPXPropertyList &) {} - virtual void openPageSpan(const WPXPropertyList & /* propList */) {} - virtual void closePageSpan() {} - virtual void openHeader(const WPXPropertyList & /* propList */) {} - virtual void closeHeader() {} - virtual void openFooter(const WPXPropertyList & /* propList */) {} - virtual void closeFooter() {} - - virtual void defineSectionStyle(const WPXPropertyList &, const WPXPropertyListVector &) {} - virtual void openSection(const WPXPropertyList & /* propList */, const WPXPropertyListVector & /* columns */) {} - virtual void closeSection() {} - - virtual void defineParagraphStyle(const WPXPropertyList &, const WPXPropertyListVector &) {} - virtual void openParagraph(const WPXPropertyList & /* propList */, const WPXPropertyListVector & /* tabStops */) {} - virtual void closeParagraph(); - - virtual void defineCharacterStyle(const WPXPropertyList &) {} - virtual void openSpan(const WPXPropertyList & /* propList */) {} - virtual void closeSpan() {} - - virtual void insertTab(); - virtual void insertText(const WPXString &text); - virtual void insertSpace(); - virtual void insertLineBreak(); - virtual void insertField(const WPXString & /* type */, const WPXPropertyList & /* propList */) {} - - virtual void defineOrderedListLevel(const WPXPropertyList & /* propList */) {} - virtual void defineUnorderedListLevel(const WPXPropertyList & /* propList */) {} - virtual void openOrderedListLevel(const WPXPropertyList & /* propList */) {} - virtual void openUnorderedListLevel(const WPXPropertyList & /* propList */) {} - virtual void closeOrderedListLevel() {} - virtual void closeUnorderedListLevel() {} - virtual void openListElement(const WPXPropertyList & /* propList */, const WPXPropertyListVector & /* tabStops */) {} - virtual void closeListElement() {} - - virtual void openFootnote(const WPXPropertyList & /* propList */) {} - virtual void closeFootnote() {} - virtual void openEndnote(const WPXPropertyList & /* propList */) {} - virtual void closeEndnote() {} - virtual void openComment(const WPXPropertyList & /* propList */) {} - virtual void closeComment() {} - virtual void openTextBox(const WPXPropertyList & /* propList */) {} - virtual void closeTextBox() {} - - virtual void openTable(const WPXPropertyList & /* propList */, const WPXPropertyListVector & /* columns */) {} - virtual void openTableRow(const WPXPropertyList & /* propList */) {} - virtual void closeTableRow() {} - virtual void openTableCell(const WPXPropertyList & /* propList */) {} - virtual void closeTableCell() {} - virtual void insertCoveredTableCell(const WPXPropertyList & /* propList */) {} - virtual void closeTable() {} - - virtual void openFrame(const WPXPropertyList & /* propList */) {} - virtual void closeFrame() {} - - virtual void insertBinaryObject(const WPXPropertyList & /* propList */, const WPXBinaryData & /* object */) {} - virtual void insertEquation(const WPXPropertyList & /* propList */, const WPXString & /* data */) {} - -private: - bool m_isInfo; -}; - -#endif /* TEXTDOCUMENTGENERATOR_H */ -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libabw-0.0.2/src/lib/AbiDocument.cpp libabw-0.1.0/src/lib/AbiDocument.cpp --- libabw-0.0.2/src/lib/AbiDocument.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/AbiDocument.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -19,7 +19,7 @@ documentation. \section api_docs libabw API documentation The external libabw API is provided by the AbiDocument class. This class, combined -with the WPXDocumentInterface class, are the only two classes that will be of interest +with the librevenge::RVNGTextInterface class, are the only two classes that will be of interest for the application programmer using libabw. \section lib_docs libabw documentation If you are interested in the structure of libabw itself, this whole document @@ -34,7 +34,7 @@ \return A confidence value which represents the likelihood that the content from the input stream can be parsed */ -ABWAPI bool libabw::AbiDocument::isFileFormatSupported(WPXInputStream *input) +ABWAPI bool libabw::AbiDocument::isFileFormatSupported(librevenge::RVNGInputStream *input) { ABW_DEBUG_MSG(("AbiDocument::isFileFormatSupported\n")); if (!input) @@ -42,9 +42,9 @@ xmlTextReaderPtr reader = 0; try { - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); libabw::ABWZlibStream stream(input); - stream.seek(0, WPX_SEEK_SET); + stream.seek(0, librevenge::RVNG_SEEK_SET); reader = libabw::xmlReaderForStream(&stream); if (!reader) return false; @@ -101,21 +101,21 @@ /** Parses the input stream content. It will make callbacks to the functions provided by a -WPXDocumentInterface class implementation when needed. This is often commonly called the +librevenge::RVNGTextInterface class implementation when needed. This is often commonly called the 'main parsing routine'. \param input The input stream -\param textInterface A WPXDocumentInterface implementation +\param textInterface A librevenge::RVNGTextInterface implementation \param password The password used to protect the document or NULL if the document is not protected \return A value that indicates whether the conversion was successful and in case it was not, it indicates the reason of the error */ -ABWAPI bool libabw::AbiDocument::parse(WPXInputStream *input, WPXDocumentInterface *textInterface) +ABWAPI bool libabw::AbiDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *textInterface) { ABW_DEBUG_MSG(("AbiDocument::parse\n")); if (!input) return false; - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); libabw::ABWZlibStream stream(input); libabw::ABWParser parser(&stream, textInterface); if (parser.parse()) diff -Nru libabw-0.0.2/src/lib/ABWCollector.cpp libabw-0.1.0/src/lib/ABWCollector.cpp --- libabw-0.0.2/src/lib/ABWCollector.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWCollector.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -112,31 +112,30 @@ return true; } -void libabw::ABWListElement::writeOut(WPXPropertyList &propList) const +void libabw::ABWListElement::writeOut(librevenge::RVNGPropertyList &propList) const { if (m_listLevel > 0) - propList.insert("libwpd:level", m_listLevel); + propList.insert("librevenge:level", m_listLevel); propList.insert("text:min-label-width", m_minLabelWidth); propList.insert("text:space-before", m_spaceBefore); } -void libabw::ABWOrderedListElement::writeOut(WPXPropertyList &propList) const +void libabw::ABWOrderedListElement::writeOut(librevenge::RVNGPropertyList &propList) const { libabw::ABWListElement::writeOut(propList); propList.insert("style:num-format", m_numFormat); - if (m_numPrefix.len()) + if (!m_numPrefix.empty()) propList.insert("style:num-prefix", m_numPrefix); - if (m_numSuffix.len()) + if (!m_numSuffix.empty()) propList.insert("style:num-suffix", m_numSuffix); if (m_startValue >= 0) propList.insert("text:start-value", m_startValue); } -void libabw::ABWUnorderedListElement::writeOut(WPXPropertyList &propList) const +void libabw::ABWUnorderedListElement::writeOut(librevenge::RVNGPropertyList &propList) const { libabw::ABWListElement::writeOut(propList); propList.insert("text:bullet-char", m_bulletChar); } - /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libabw-0.0.2/src/lib/ABWCollector.h libabw-0.1.0/src/lib/ABWCollector.h --- libabw-0.0.2/src/lib/ABWCollector.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWCollector.h 2014-03-29 10:23:24.000000000 +0000 @@ -12,7 +12,7 @@ #include #include -#include +#include namespace libabw { @@ -45,12 +45,12 @@ : m_mimeType(), m_binaryData() {} ABWData(const ABWData &data) : m_mimeType(data.m_mimeType), m_binaryData(data.m_binaryData) {} - ABWData(const WPXString &mimeType, const WPXBinaryData binaryData) + ABWData(const librevenge::RVNGString &mimeType, const librevenge::RVNGBinaryData binaryData) : m_mimeType(mimeType), m_binaryData(binaryData) {} ~ABWData() {} - WPXString m_mimeType; - WPXBinaryData m_binaryData; + librevenge::RVNGString m_mimeType; + librevenge::RVNGBinaryData m_binaryData; }; struct ABWListElement @@ -58,7 +58,7 @@ ABWListElement() : m_listLevel(-1), m_minLabelWidth(0.0), m_spaceBefore(0.0), m_parentId() {} virtual ~ABWListElement() {} - virtual void writeOut(WPXPropertyList &propList) const; + virtual void writeOut(librevenge::RVNGPropertyList &propList) const; virtual ABWListType getType() const = 0; int m_listLevel; @@ -72,15 +72,15 @@ ABWOrderedListElement() : ABWListElement(), m_numFormat(), m_numPrefix(), m_numSuffix(), m_startValue(-1) {} ~ABWOrderedListElement() {} - void writeOut(WPXPropertyList &propList) const; + void writeOut(librevenge::RVNGPropertyList &propList) const; ABWListType getType() const { return ABW_ORDERED; } - WPXString m_numFormat; - WPXString m_numPrefix; - WPXString m_numSuffix; + librevenge::RVNGString m_numFormat; + librevenge::RVNGString m_numPrefix; + librevenge::RVNGString m_numSuffix; int m_startValue; }; @@ -89,13 +89,13 @@ ABWUnorderedListElement() : ABWListElement(), m_bulletChar() {} ~ABWUnorderedListElement() {} - void writeOut(WPXPropertyList &propList) const; + void writeOut(librevenge::RVNGPropertyList &propList) const; ABWListType getType() const { return ABW_UNORDERED; } - WPXString m_bulletChar; + librevenge::RVNGString m_bulletChar; }; class ABWCollector @@ -133,7 +133,7 @@ virtual void collectList(const char *id, const char *listDecimal, const char *listDelim, const char *parentid, const char *startValue, const char *type) = 0; - virtual void collectData(const char *name, const char *mimeType, const WPXBinaryData &data) = 0; + virtual void collectData(const char *name, const char *mimeType, const librevenge::RVNGBinaryData &data) = 0; virtual void collectHeaderFooter(const char *id, const char *type) = 0; virtual void openTable(const char *props) = 0; diff -Nru libabw-0.0.2/src/lib/ABWContentCollector.cpp libabw-0.1.0/src/lib/ABWContentCollector.cpp --- libabw-0.0.2/src/lib/ABWContentCollector.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWContentCollector.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -9,7 +9,7 @@ #include #include -#include +#include #include "ABWContentCollector.h" #include "libabw_internal.h" @@ -41,17 +41,17 @@ return out; } -static void separateTabsAndInsertText(ABWOutputElements &outputElements, const WPXString &text) +static void separateTabsAndInsertText(ABWOutputElements &outputElements, const librevenge::RVNGString &text) { - if (!text.len()) + if (text.empty()) return; - WPXString tmpText; - WPXString::Iter i(text); + librevenge::RVNGString tmpText; + librevenge::RVNGString::Iter i(text); for (i.rewind(); i.next();) { if (*(i()) == '\t') { - if (tmpText.len()) + if (!tmpText.empty()) { outputElements.addInsertText(tmpText); tmpText.clear(); @@ -60,7 +60,7 @@ } else if (*(i()) == '\n'|| *(i()) == (char)0x0a) { - if (tmpText.len()) + if (!tmpText.empty()) { outputElements.addInsertText(tmpText); tmpText.clear(); @@ -72,20 +72,20 @@ tmpText.append(i()); } } - if (tmpText.len()) + if (!tmpText.empty()) outputElements.addInsertText(tmpText); } -static void separateSpacesAndInsertText(ABWOutputElements &outputElements, const WPXString &text) +static void separateSpacesAndInsertText(ABWOutputElements &outputElements, const librevenge::RVNGString &text) { - if (!text.len()) + if (text.empty()) { outputElements.addInsertText(text); return; } - WPXString tmpText; + librevenge::RVNGString tmpText; int numConsecutiveSpaces = 0; - WPXString::Iter i(text); + librevenge::RVNGString::Iter i(text); for (i.rewind(); i.next();) { if (*(i()) == ' ') @@ -95,7 +95,7 @@ if (numConsecutiveSpaces > 1) { - if (tmpText.len()) + if (!tmpText.empty()) { separateTabsAndInsertText(outputElements, tmpText); tmpText.clear(); @@ -108,7 +108,7 @@ separateTabsAndInsertText(outputElements, tmpText); } -void parseTableColumns(const std::string &str, WPXPropertyListVector &columns) +void parseTableColumns(const std::string &str, librevenge::RVNGPropertyListVector &columns) { if (str.empty()) return; @@ -124,14 +124,14 @@ boost::algorithm::trim(strVec[i]); if (findDouble(strVec[i], value, unit) || ABW_IN != unit) { - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; propList.insert("style:column-width", value); columns.append(propList); } } } -bool parseTabStop(const std::string &str, WPXPropertyList &tabStop) +bool parseTabStop(const std::string &str, librevenge::RVNGPropertyList &tabStop) { if (str.empty()) return false; @@ -191,7 +191,7 @@ return true; } -void parseTabStops(const std::string &str, WPXPropertyListVector &tabStops) +void parseTabStops(const std::string &str, librevenge::RVNGPropertyListVector &tabStops) { if (str.empty()) return; @@ -201,7 +201,7 @@ for (std::vector::size_type i = 0; i < strVec.size(); ++i) { boost::trim(strVec[i]); - WPXPropertyList tabStop; + librevenge::RVNGPropertyList tabStop; if (parseTabStop(strVec[i], tabStop)) tabStops.append(tabStop); } @@ -377,7 +377,7 @@ { } -libabw::ABWContentCollector::ABWContentCollector(WPXDocumentInterface *iface, const std::map &tableSizes, +libabw::ABWContentCollector::ABWContentCollector(librevenge::RVNGTextInterface *iface, const std::map &tableSizes, const std::map &data, const std::map &listElements) : m_ps(new ABWContentParsingState), @@ -687,23 +687,8 @@ { if (m_iface && !m_ps->m_isDocumentStarted) - { - m_iface->startDocument(); - for (std::map::const_iterator iter = m_listElements.begin(); - iter != m_listElements.end(); ++iter) - { - if (iter->second) - { - WPXPropertyList propList; - propList.insert("libwpd:list-id", iter->first); - iter->second->writeOut(propList); - if (iter->second->getType() == ABW_UNORDERED) - m_iface->defineUnorderedListLevel(propList); - else - m_iface->defineOrderedListLevel(propList); - } - } - } + m_iface->startDocument(librevenge::RVNGPropertyList()); + m_ps->m_isDocumentStarted = true; } } @@ -768,7 +753,7 @@ else _openListElement(); } - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; if (href) propList.insert("xlink:href", decodeUrl(href).c_str()); m_outputElements.addOpenLink(propList); @@ -834,7 +819,7 @@ if (!m_ps->m_isDocumentStarted) startDocument(); - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; propList.insert("fo:page-width", m_ps->m_pageWidth); propList.insert("fo:page-height", m_ps->m_pageHeight); propList.insert("fo:margin-left", m_ps->m_pageMarginLeft); @@ -872,7 +857,7 @@ if (!m_ps->m_isPageSpanOpened) _openPageSpan(); - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; ABWUnit unit(ABW_NONE); double value(0.0); @@ -883,7 +868,7 @@ propList.insert("fo:margin-left", value - m_ps->m_pageMarginLeft); if (findDouble(_findSectionProperty("section-space-after"), value, unit) && unit == ABW_IN) - propList.insert("libwpd:margin-bottom", value); + propList.insert("librevenge:margin-bottom", value); std::string sValue = _findSectionProperty("dom-dir"); if (sValue == "ltr") @@ -891,22 +876,23 @@ else if (sValue == "rtl") propList.insert("style:writing-mode", "rl-tb"); - WPXPropertyListVector columns; int intValue(0); if (findInt(_findSectionProperty("columns"), intValue) && intValue > 1) { + librevenge::RVNGPropertyListVector columns; for (int i = 0; i < intValue; ++i) { - WPXPropertyList column; - column.insert("style:rel-width", 1.0 / (double)intValue, WPX_PERCENT); + librevenge::RVNGPropertyList column; + column.insert("style:rel-width", 1.0 / (double)intValue, librevenge::RVNG_PERCENT); columns.append(column); } if (columns.count()) { + propList.insert("style:columns", columns); propList.insert("text:dont-balance-text-columns", true); } } - m_outputElements.addOpenSection(propList, columns); + m_outputElements.addOpenSection(propList); } m_ps->m_isSectionOpened = true; } @@ -915,8 +901,8 @@ { if (!m_ps->m_isFooterOpened && !m_ps->m_isNote && m_ps->m_tableStates.empty()) { - WPXPropertyList propList; - propList.insert("libwpd:occurence", m_ps->m_currentHeaderFooterOccurrence); + librevenge::RVNGPropertyList propList; + propList.insert("librevenge:occurrence", m_ps->m_currentHeaderFooterOccurrence); m_outputElements.addOpenFooter(propList, m_ps->m_currentHeaderFooterId); } @@ -927,15 +913,15 @@ { if (!m_ps->m_isHeaderOpened && !m_ps->m_isNote && m_ps->m_tableStates.empty()) { - WPXPropertyList propList; - propList.insert("libwpd:occurence", m_ps->m_currentHeaderFooterOccurrence); + librevenge::RVNGPropertyList propList; + propList.insert("librevenge:occurrence", m_ps->m_currentHeaderFooterOccurrence); m_outputElements.addOpenHeader(propList, m_ps->m_currentHeaderFooterId); } m_ps->m_isHeaderOpened = true; } -void libabw::ABWContentCollector::_fillParagraphProperties(WPXPropertyList &propList, WPXPropertyListVector &tabStops, +void libabw::ABWContentCollector::_fillParagraphProperties(librevenge::RVNGPropertyList &propList, bool isListElement) { ABWUnit unit(ABW_NONE); @@ -986,7 +972,7 @@ if (ABW_IN == unit) propList.insert(propName.c_str(), value); else if (ABW_PERCENT == unit) - propList.insert(propName.c_str(), value, WPX_PERCENT); + propList.insert(propName.c_str(), value, librevenge::RVNG_PERCENT); } } @@ -996,8 +982,12 @@ if (findInt(_findParagraphProperty("widows"), intValue)) propList.insert("fo:widows", intValue); + librevenge::RVNGPropertyListVector tabStops; parseTabStops(_findParagraphProperty("tabstops"), tabStops); + if (tabStops.count()) + propList.insert("style:tab-stops", tabStops); + sValue = _findParagraphProperty("dom-dir"); if (sValue == "ltr") propList.insert("style:writing-mode", "lr-tb"); @@ -1038,14 +1028,13 @@ _changeList(); - WPXPropertyList propList; - WPXPropertyListVector tabStops; - _fillParagraphProperties(propList, tabStops, false); + librevenge::RVNGPropertyList propList; + _fillParagraphProperties(propList, false); m_ps->m_deferredPageBreak = false; m_ps->m_deferredColumnBreak = false; - m_outputElements.addOpenParagraph(propList, tabStops); + m_outputElements.addOpenParagraph(propList); m_ps->m_isParagraphOpened = true; if (!m_ps->m_tableStates.empty()) @@ -1079,11 +1068,10 @@ _changeList(); - WPXPropertyList propList; - WPXPropertyListVector tabStops; - _fillParagraphProperties(propList, tabStops, true); + librevenge::RVNGPropertyList propList; + _fillParagraphProperties(propList, true); - m_outputElements.addOpenListElement(propList, tabStops); + m_outputElements.addOpenListElement(propList); m_ps->m_isListElementOpened = true; if (!m_ps->m_tableStates.empty()) @@ -1104,7 +1092,7 @@ _openListElement(); } - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; ABWUnit unit(ABW_NONE); double value(0.0); @@ -1251,7 +1239,7 @@ break; } - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; if (m_ps->m_deferredPageBreak) propList.insert("fo:break-before", "page"); else if (m_ps->m_deferredColumnBreak) @@ -1259,20 +1247,22 @@ m_ps->m_deferredPageBreak = false; m_ps->m_deferredColumnBreak = false; - WPXPropertyListVector tmpColumns; + librevenge::RVNGPropertyListVector tmpColumns; parseTableColumns(_findTableProperty("table-column-props"), tmpColumns); unsigned numColumns = tmpColumns.count(); std::map::const_iterator iter = m_tableSizes.find(m_ps->m_tableStates.top().m_currentTableId); if (iter != m_tableSizes.end()) numColumns = iter->second; - WPXPropertyListVector columns; + librevenge::RVNGPropertyListVector columns; for (unsigned j = 0; j < numColumns; ++j) { if (j < tmpColumns.count()) columns.append(tmpColumns[j]); else - columns.append(WPXPropertyList()); + columns.append(librevenge::RVNGPropertyList()); } + if (columns.count()) + propList.insert("librevenge:table-columns", columns); ABWUnit unit(ABW_NONE); double value(0.0); @@ -1284,7 +1274,7 @@ else propList.insert("table:align", "left"); - m_outputElements.addOpenTable(propList, columns); + m_outputElements.addOpenTable(propList); m_ps->m_tableStates.top().m_currentTableRow = (-1); m_ps->m_tableStates.top().m_currentTableCol = (-1); @@ -1312,7 +1302,7 @@ m_ps->m_tableStates.top().m_currentTableCol = 0; m_ps->m_tableStates.top().m_currentTableCellNumberInRow = 0; - m_outputElements.addOpenTableRow(WPXPropertyList()); + m_outputElements.addOpenTableRow(librevenge::RVNGPropertyList()); m_ps->m_tableStates.top().m_isTableRowOpened = true; m_ps->m_tableStates.top().m_isRowWithoutCell = true; @@ -1329,7 +1319,7 @@ if (m_ps->m_tableStates.top().m_isRowWithoutCell) { m_ps->m_tableStates.top().m_isRowWithoutCell = false; - m_outputElements.addInsertCoveredTableCell(WPXPropertyList()); + m_outputElements.addInsertCoveredTableCell(librevenge::RVNGPropertyList()); } m_outputElements.addCloseTableRow(); } @@ -1338,9 +1328,9 @@ void libabw::ABWContentCollector::_openTableCell() { - WPXPropertyList propList; - propList.insert("libwpd:column", m_ps->m_tableStates.top().m_currentTableCol); - propList.insert("libwpd:row", m_ps->m_tableStates.top().m_currentTableRow); + librevenge::RVNGPropertyList propList; + propList.insert("librevenge:column", m_ps->m_tableStates.top().m_currentTableCol); + propList.insert("librevenge:row", m_ps->m_tableStates.top().m_currentTableRow); int rightAttach(0); if (findInt(_findCellProperty("right-attach"), rightAttach)) @@ -1384,9 +1374,9 @@ _openSpan(); _closeSpan(); - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; if (id) - propList.insert("libwpd:number", id); + propList.insert("librevenge:number", id); m_outputElements.addOpenFootnote(propList); m_parsingStates.push(m_ps); @@ -1418,9 +1408,9 @@ _openSpan(); _closeSpan(); - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; if (id) - propList.insert("libwpd:number", id); + propList.insert("librevenge:number", id); m_outputElements.addOpenEndnote(propList); m_parsingStates.push(m_ps); @@ -1520,7 +1510,7 @@ } } -void libabw::ABWContentCollector::collectData(const char *, const char *, const WPXBinaryData &) +void libabw::ABWContentCollector::collectData(const char *, const char *, const librevenge::RVNGBinaryData &) { } @@ -1537,7 +1527,7 @@ std::map::const_iterator iter = m_data.find(dataid); if (iter != m_data.end()) { - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; ABWUnit unit(ABW_NONE); double value(0.0); std::map::const_iterator i = properties.find("height"); @@ -1551,9 +1541,9 @@ m_outputElements.addOpenFrame(propList); propList.clear(); - propList.insert("libwpd:mimetype", iter->second.m_mimeType); - - m_outputElements.addInsertBinaryObject(propList, iter->second.m_binaryData); + propList.insert("librevenge:mime-type", iter->second.m_mimeType); + propList.insert("office:binary-data", iter->second.m_binaryData); + m_outputElements.addInsertBinaryObject(propList); m_outputElements.addCloseFrame(); } @@ -1590,15 +1580,16 @@ void libabw::ABWContentCollector::_writeOutDummyListLevels(int oldLevel, int newLevel) { - if (oldLevel >= newLevel) - return; - _writeOutDummyListLevels(oldLevel, newLevel-1); - m_dummyListElements.push_back(new ABWUnorderedListElement()); - m_dummyListElements.back()->m_listLevel = newLevel; - m_ps->m_listLevels.push(std::make_pair(newLevel, m_dummyListElements.back())); - WPXPropertyList propList; - m_dummyListElements.back()->writeOut(propList); - m_outputElements.addOpenUnorderedListLevel(propList); + if (oldLevel < newLevel) + { + _writeOutDummyListLevels(oldLevel, newLevel-1); + m_dummyListElements.push_back(new ABWUnorderedListElement()); + m_dummyListElements.back()->m_listLevel = newLevel; + m_ps->m_listLevels.push(std::make_pair(newLevel, m_dummyListElements.back())); + librevenge::RVNGPropertyList propList; + m_dummyListElements.back()->writeOut(propList); + m_outputElements.addOpenUnorderedListLevel(propList); + } } void libabw::ABWContentCollector::_recurseListLevels(int oldLevel, int newLevel, int newListId) @@ -1613,8 +1604,9 @@ else _writeOutDummyListLevels(oldLevel, newLevel-1); m_ps->m_listLevels.push(std::make_pair(newLevel, iter->second)); - WPXPropertyList propList; - propList.insert("libwpd:list-id", newListId); + librevenge::RVNGPropertyList propList; + iter->second->writeOut(propList); + propList.insert("librevenge:list-id", newListId); if (iter->second->getType() == ABW_UNORDERED) m_outputElements.addOpenUnorderedListLevel(propList); else diff -Nru libabw-0.0.2/src/lib/ABWContentCollector.h libabw-0.1.0/src/lib/ABWContentCollector.h --- libabw-0.0.2/src/lib/ABWContentCollector.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWContentCollector.h 2014-03-29 10:23:24.000000000 +0000 @@ -13,7 +13,7 @@ #include #include #include -#include +#include #include "ABWOutputElements.h" #include "ABWCollector.h" @@ -92,7 +92,7 @@ int m_headerFirstId; int m_headerLastId; int m_currentHeaderFooterId; - WPXString m_currentHeaderFooterOccurrence; + librevenge::RVNGString m_currentHeaderFooterOccurrence; ABWContext m_parsingContext; bool m_deferredPageBreak; @@ -111,7 +111,7 @@ class ABWContentCollector : public ABWCollector { public: - ABWContentCollector(WPXDocumentInterface *iface, const std::map &tableSizes, + ABWContentCollector(librevenge::RVNGTextInterface *iface, const std::map &tableSizes, const std::map &data, const std::map &listElements); virtual ~ABWContentCollector(); @@ -143,7 +143,7 @@ void insertImage(const char *dataid, const char *props); void collectList(const char *, const char *, const char *, const char *, const char *, const char *) {} - void collectData(const char *name, const char *mimeType, const WPXBinaryData &data); + void collectData(const char *name, const char *mimeType, const librevenge::RVNGBinaryData &data); void collectHeaderFooter(const char *id, const char *type); void openTable(const char *props); @@ -195,10 +195,10 @@ std::string _findCellProperty(const char *name); std::string _findSectionProperty(const char *name); - void _fillParagraphProperties(WPXPropertyList &propList, WPXPropertyListVector &tabStops, bool isListElement); + void _fillParagraphProperties(librevenge::RVNGPropertyList &propList, bool isListElement); ABWContentParsingState *m_ps; - WPXDocumentInterface *m_iface; + librevenge::RVNGTextInterface *m_iface; std::stack m_parsingStates; std::set m_dontLoop; std::map m_textStyles; diff -Nru libabw-0.0.2/src/lib/ABWOutputElements.cpp libabw-0.1.0/src/lib/ABWOutputElements.cpp --- libabw-0.0.2/src/lib/ABWOutputElements.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWOutputElements.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -18,7 +18,7 @@ public: ABWOutputElement() {} virtual ~ABWOutputElement() {} - virtual void write(WPXDocumentInterface *iface, + virtual void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const = 0; }; @@ -28,7 +28,7 @@ public: ABWCloseEndnoteElement() {} ~ABWCloseEndnoteElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; }; @@ -38,7 +38,7 @@ public: ABWCloseFooterElement() {} ~ABWCloseFooterElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; }; @@ -48,7 +48,7 @@ public: ABWCloseFootnoteElement() {} ~ABWCloseFootnoteElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; }; @@ -58,7 +58,7 @@ public: ABWCloseFrameElement() {} ~ABWCloseFrameElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; }; @@ -68,7 +68,7 @@ public: ABWCloseHeaderElement() {} ~ABWCloseHeaderElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; }; @@ -78,7 +78,7 @@ public: ABWCloseLinkElement() {} ~ABWCloseLinkElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -92,7 +92,7 @@ public: ABWCloseListElementElement() {} ~ABWCloseListElementElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -106,7 +106,7 @@ public: ABWCloseOrderedListLevelElement() {} ~ABWCloseOrderedListLevelElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -120,7 +120,7 @@ public: ABWClosePageSpanElement() {} ~ABWClosePageSpanElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -134,7 +134,7 @@ public: ABWCloseParagraphElement() {} ~ABWCloseParagraphElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -148,7 +148,7 @@ public: ABWCloseSectionElement() {} ~ABWCloseSectionElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -162,7 +162,7 @@ public: ABWCloseSpanElement() {} ~ABWCloseSpanElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -176,7 +176,7 @@ public: ABWCloseTableElement() {} ~ABWCloseTableElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -190,7 +190,7 @@ public: ABWCloseTableCellElement() {} ~ABWCloseTableCellElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -204,7 +204,7 @@ public: ABWCloseTableRowElement() {} ~ABWCloseTableRowElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -218,7 +218,7 @@ public: ABWCloseUnorderedListLevelElement() {} ~ABWCloseUnorderedListLevelElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -230,28 +230,27 @@ class ABWInsertBinaryObjectElement : public ABWOutputElement { public: - ABWInsertBinaryObjectElement(const WPXPropertyList &propList, const WPXBinaryData &data) : - m_propList(propList), m_data(data) {} + ABWInsertBinaryObjectElement(const librevenge::RVNGPropertyList &propList) : + m_propList(propList) {} ~ABWInsertBinaryObjectElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() { - return new ABWInsertBinaryObjectElement(m_propList, m_data); + return new ABWInsertBinaryObjectElement(m_propList); } private: - WPXPropertyList m_propList; - WPXBinaryData m_data; + librevenge::RVNGPropertyList m_propList; }; class ABWInsertCoveredTableCellElement : public ABWOutputElement { public: - ABWInsertCoveredTableCellElement(const WPXPropertyList &propList) : + ABWInsertCoveredTableCellElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWInsertCoveredTableCellElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -259,7 +258,7 @@ return new ABWInsertCoveredTableCellElement(m_propList); } private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWInsertLineBreakElement : public ABWOutputElement @@ -267,7 +266,7 @@ public: ABWInsertLineBreakElement() {} ~ABWInsertLineBreakElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -281,7 +280,7 @@ public: ABWInsertSpaceElement() {} ~ABWInsertSpaceElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -295,7 +294,7 @@ public: ABWInsertTabElement() {} ~ABWInsertTabElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -307,10 +306,10 @@ class ABWInsertTextElement : public ABWOutputElement { public: - ABWInsertTextElement(const WPXString &text) : + ABWInsertTextElement(const librevenge::RVNGString &text) : m_text(text) {} ~ABWInsertTextElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -318,16 +317,16 @@ return new ABWInsertTextElement(m_text); } private: - WPXString m_text; + librevenge::RVNGString m_text; }; class ABWOpenEndnoteElement : public ABWOutputElement { public: - ABWOpenEndnoteElement(const WPXPropertyList &propList) : + ABWOpenEndnoteElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenEndnoteElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -335,16 +334,16 @@ return new ABWOpenEndnoteElement(m_propList); } private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenFooterElement : public ABWOutputElement { public: - ABWOpenFooterElement(const WPXPropertyList &propList) : + ABWOpenFooterElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenFooterElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -352,16 +351,16 @@ return new ABWOpenFooterElement(m_propList); } private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenFootnoteElement : public ABWOutputElement { public: - ABWOpenFootnoteElement(const WPXPropertyList &propList) : + ABWOpenFootnoteElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenFootnoteElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -369,16 +368,16 @@ return new ABWOpenFootnoteElement(m_propList); } private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenFrameElement : public ABWOutputElement { public: - ABWOpenFrameElement(const WPXPropertyList &propList) : + ABWOpenFrameElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenFrameElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -386,16 +385,16 @@ return new ABWOpenFrameElement(m_propList); } private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenHeaderElement : public ABWOutputElement { public: - ABWOpenHeaderElement(const WPXPropertyList &propList) : + ABWOpenHeaderElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenHeaderElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; ABWOutputElement *clone() @@ -403,53 +402,52 @@ return new ABWOpenHeaderElement(m_propList); } private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenLinkElement : public ABWOutputElement { public: - ABWOpenLinkElement(const WPXPropertyList &propList) : + ABWOpenLinkElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenLinkElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenListElementElement : public ABWOutputElement { public: - ABWOpenListElementElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) : - m_propList(propList), m_tabStops(tabStops) {} + ABWOpenListElementElement(const librevenge::RVNGPropertyList &propList) : + m_propList(propList) {} ~ABWOpenListElementElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - WPXPropertyList m_propList; - WPXPropertyListVector m_tabStops; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenOrderedListLevelElement : public ABWOutputElement { public: - ABWOpenOrderedListLevelElement(const WPXPropertyList &propList) : + ABWOpenOrderedListLevelElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenOrderedListLevelElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenPageSpanElement : public ABWOutputElement { public: - ABWOpenPageSpanElement(const WPXPropertyList &propList, + ABWOpenPageSpanElement(const librevenge::RVNGPropertyList &propList, int footer, int footerLeft, int footerFirst, int footerLast, int header, int headerLeft, int headerFirst, int headerLast) : m_propList(propList), @@ -462,13 +460,13 @@ m_headerFirst(headerFirst), m_headerLast(headerLast) {} ~ABWOpenPageSpanElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - void _writeElements(WPXDocumentInterface *iface, int id, + void _writeElements(librevenge::RVNGTextInterface *iface, int id, const std::map > *elements) const; - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; int m_footer; int m_footerLeft; int m_footerFirst; @@ -482,100 +480,97 @@ class ABWOpenParagraphElement : public ABWOutputElement { public: - ABWOpenParagraphElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) : - m_propList(propList), m_tabStops(tabStops) {} + ABWOpenParagraphElement(const librevenge::RVNGPropertyList &propList) : + m_propList(propList) {} ~ABWOpenParagraphElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - WPXPropertyList m_propList; - WPXPropertyListVector m_tabStops; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenSectionElement : public ABWOutputElement { public: - ABWOpenSectionElement(const WPXPropertyList &propList, const WPXPropertyListVector &columns) : - m_propList(propList), m_columns(columns) {} + ABWOpenSectionElement(const librevenge::RVNGPropertyList &propList) : + m_propList(propList) {} ~ABWOpenSectionElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - WPXPropertyList m_propList; - WPXPropertyListVector m_columns; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenSpanElement : public ABWOutputElement { public: - ABWOpenSpanElement(const WPXPropertyList &propList) : + ABWOpenSpanElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenSpanElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenTableElement : public ABWOutputElement { public: - ABWOpenTableElement(const WPXPropertyList &propList, const WPXPropertyListVector &columns) : - m_propList(propList), m_columns(columns) {} + ABWOpenTableElement(const librevenge::RVNGPropertyList &propList) : + m_propList(propList) {} ~ABWOpenTableElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - WPXPropertyList m_propList; - WPXPropertyListVector m_columns; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenTableCellElement : public ABWOutputElement { public: - ABWOpenTableCellElement(const WPXPropertyList &propList) : + ABWOpenTableCellElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenTableCellElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenTableRowElement : public ABWOutputElement { public: - ABWOpenTableRowElement(const WPXPropertyList &propList) : + ABWOpenTableRowElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenTableRowElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class ABWOpenUnorderedListLevelElement : public ABWOutputElement { public: - ABWOpenUnorderedListLevelElement(const WPXPropertyList &propList) : + ABWOpenUnorderedListLevelElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} ~ABWOpenUnorderedListLevelElement() {} - void write(WPXDocumentInterface *iface, + void write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const; private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; } // namespace libabw -void libabw::ABWCloseEndnoteElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseEndnoteElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -583,7 +578,7 @@ iface->closeEndnote(); } -void libabw::ABWCloseFooterElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseFooterElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -591,7 +586,7 @@ iface->closeFooter(); } -void libabw::ABWCloseFootnoteElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseFootnoteElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -599,7 +594,7 @@ iface->closeFootnote(); } -void libabw::ABWCloseFrameElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseFrameElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -607,7 +602,7 @@ iface->closeFrame(); } -void libabw::ABWCloseHeaderElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseHeaderElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -615,13 +610,15 @@ iface->closeHeader(); } -void libabw::ABWCloseLinkElement::write(WPXDocumentInterface *, +void libabw::ABWCloseLinkElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { + if (iface) + iface->closeLink(); } -void libabw::ABWCloseListElementElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseListElementElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -629,7 +626,7 @@ iface->closeListElement(); } -void libabw::ABWCloseOrderedListLevelElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseOrderedListLevelElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -637,7 +634,7 @@ iface->closeOrderedListLevel(); } -void libabw::ABWClosePageSpanElement::write(WPXDocumentInterface *iface, +void libabw::ABWClosePageSpanElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -645,7 +642,7 @@ iface->closePageSpan(); } -void libabw::ABWCloseParagraphElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseParagraphElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -653,7 +650,7 @@ iface->closeParagraph(); } -void libabw::ABWCloseSectionElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseSectionElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -661,7 +658,7 @@ iface->closeSection(); } -void libabw::ABWCloseSpanElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseSpanElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -669,7 +666,7 @@ iface->closeSpan(); } -void libabw::ABWCloseTableElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseTableElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -677,7 +674,7 @@ iface->closeTable(); } -void libabw::ABWCloseTableCellElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseTableCellElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -685,7 +682,7 @@ iface->closeTableCell(); } -void libabw::ABWCloseTableRowElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseTableRowElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -693,7 +690,7 @@ iface->closeTableRow(); } -void libabw::ABWCloseUnorderedListLevelElement::write(WPXDocumentInterface *iface, +void libabw::ABWCloseUnorderedListLevelElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -701,15 +698,15 @@ iface->closeUnorderedListLevel(); } -void libabw::ABWInsertBinaryObjectElement::write(WPXDocumentInterface *iface, +void libabw::ABWInsertBinaryObjectElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { if (iface) - iface->insertBinaryObject(m_propList, m_data); + iface->insertBinaryObject(m_propList); } -void libabw::ABWInsertCoveredTableCellElement::write(WPXDocumentInterface *iface, +void libabw::ABWInsertCoveredTableCellElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -717,7 +714,7 @@ iface->insertCoveredTableCell(m_propList); } -void libabw::ABWInsertLineBreakElement::write(WPXDocumentInterface *iface, +void libabw::ABWInsertLineBreakElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -725,7 +722,7 @@ iface->insertLineBreak(); } -void libabw::ABWInsertSpaceElement::write(WPXDocumentInterface *iface, +void libabw::ABWInsertSpaceElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -733,7 +730,7 @@ iface->insertSpace(); } -void libabw::ABWInsertTabElement::write(WPXDocumentInterface *iface, +void libabw::ABWInsertTabElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -741,7 +738,7 @@ iface->insertTab(); } -void libabw::ABWInsertTextElement::write(WPXDocumentInterface *iface, +void libabw::ABWInsertTextElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -749,7 +746,7 @@ iface->insertText(m_text); } -void libabw::ABWOpenEndnoteElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenEndnoteElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -757,7 +754,7 @@ iface->openEndnote(m_propList); } -void libabw::ABWOpenFooterElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenFooterElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -765,7 +762,7 @@ iface->openFooter(m_propList); } -void libabw::ABWOpenFootnoteElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenFootnoteElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -773,7 +770,7 @@ iface->openFootnote(m_propList); } -void libabw::ABWOpenFrameElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenFrameElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -781,7 +778,7 @@ iface->openFrame(m_propList); } -void libabw::ABWOpenHeaderElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenHeaderElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -789,21 +786,23 @@ iface->openHeader(m_propList); } -void libabw::ABWOpenListElementElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenListElementElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { if (iface) - iface->openListElement(m_propList, m_tabStops); + iface->openListElement(m_propList); } -void libabw::ABWOpenLinkElement::write(WPXDocumentInterface *, +void libabw::ABWOpenLinkElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { + if (iface) + iface->openLink(m_propList); } -void libabw::ABWOpenOrderedListLevelElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenOrderedListLevelElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -811,7 +810,7 @@ iface->openOrderedListLevel(m_propList); } -void libabw::ABWOpenPageSpanElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenPageSpanElement::write(librevenge::RVNGTextInterface *iface, const std::map > *footers, const std::map > *headers) const { @@ -834,7 +833,7 @@ } -void libabw::ABWOpenPageSpanElement::_writeElements(WPXDocumentInterface *iface, int id, +void libabw::ABWOpenPageSpanElement::_writeElements(librevenge::RVNGTextInterface *iface, int id, const std::map > *elements) const { if (!elements || id < 0 || !iface) @@ -849,23 +848,23 @@ (*iterVec)->write(iface, 0, 0); } -void libabw::ABWOpenParagraphElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenParagraphElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { if (iface) - iface->openParagraph(m_propList, m_tabStops); + iface->openParagraph(m_propList); } -void libabw::ABWOpenSectionElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenSectionElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { if (iface) - iface->openSection(m_propList, m_columns); + iface->openSection(m_propList); } -void libabw::ABWOpenSpanElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenSpanElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -873,15 +872,15 @@ iface->openSpan(m_propList); } -void libabw::ABWOpenTableElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenTableElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { if (iface) - iface->openTable(m_propList, m_columns); + iface->openTable(m_propList); } -void libabw::ABWOpenTableCellElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenTableCellElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -889,7 +888,7 @@ iface->openTableCell(m_propList); } -void libabw::ABWOpenTableRowElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenTableRowElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -897,7 +896,7 @@ iface->openTableRow(m_propList); } -void libabw::ABWOpenUnorderedListLevelElement::write(WPXDocumentInterface *iface, +void libabw::ABWOpenUnorderedListLevelElement::write(librevenge::RVNGTextInterface *iface, const std::map > *, const std::map > *) const { @@ -932,7 +931,7 @@ } } -void libabw::ABWOutputElements::write(WPXDocumentInterface *iface) const +void libabw::ABWOutputElements::write(librevenge::RVNGTextInterface *iface) const { std::list::const_iterator iter; for (iter = m_bodyElements.begin(); iter != m_bodyElements.end(); ++iter) @@ -1037,13 +1036,13 @@ m_elements->push_back(new ABWCloseUnorderedListLevelElement()); } -void libabw::ABWOutputElements::addInsertBinaryObject(const WPXPropertyList &propList, const WPXBinaryData &data) +void libabw::ABWOutputElements::addInsertBinaryObject(const librevenge::RVNGPropertyList &propList) { if (m_elements) - m_elements->push_back(new ABWInsertBinaryObjectElement(propList, data)); + m_elements->push_back(new ABWInsertBinaryObjectElement(propList)); } -void libabw::ABWOutputElements::addInsertCoveredTableCell(const WPXPropertyList &propList) +void libabw::ABWOutputElements::addInsertCoveredTableCell(const librevenge::RVNGPropertyList &propList) { if (m_elements) m_elements->push_back(new ABWInsertCoveredTableCellElement(propList)); @@ -1067,19 +1066,19 @@ m_elements->push_back(new ABWInsertTabElement()); } -void libabw::ABWOutputElements::addInsertText(const WPXString &text) +void libabw::ABWOutputElements::addInsertText(const librevenge::RVNGString &text) { if (m_elements) m_elements->push_back(new ABWInsertTextElement(text)); } -void libabw::ABWOutputElements::addOpenEndnote(const WPXPropertyList &propList) +void libabw::ABWOutputElements::addOpenEndnote(const librevenge::RVNGPropertyList &propList) { if (m_elements) m_elements->push_back(new ABWOpenEndnoteElement(propList)); } -void libabw::ABWOutputElements::addOpenFooter(const WPXPropertyList &propList, int id) +void libabw::ABWOutputElements::addOpenFooter(const librevenge::RVNGPropertyList &propList, int id) { // if the corresponding element of the map does not exist, this will default-construct it. // In that case we will get an empty list to fill with the footer content. If the element @@ -1090,19 +1089,19 @@ m_elements->push_back(new ABWOpenFooterElement(propList)); } -void libabw::ABWOutputElements::addOpenFootnote(const WPXPropertyList &propList) +void libabw::ABWOutputElements::addOpenFootnote(const librevenge::RVNGPropertyList &propList) { if (m_elements) m_elements->push_back(new ABWOpenFootnoteElement(propList)); } -void libabw::ABWOutputElements::addOpenFrame(const WPXPropertyList &propList) +void libabw::ABWOutputElements::addOpenFrame(const librevenge::RVNGPropertyList &propList) { if (m_elements) m_elements->push_back(new ABWOpenFrameElement(propList)); } -void libabw::ABWOutputElements::addOpenHeader(const WPXPropertyList &propList, int id) +void libabw::ABWOutputElements::addOpenHeader(const librevenge::RVNGPropertyList &propList, int id) { // Check the comment in addOpenFooter to see what happens here m_elements = &m_headerElements[id]; @@ -1110,25 +1109,25 @@ m_elements->push_back(new ABWOpenHeaderElement(propList)); } -void libabw::ABWOutputElements::addOpenListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) +void libabw::ABWOutputElements::addOpenListElement(const librevenge::RVNGPropertyList &propList) { if (m_elements) - m_elements->push_back(new ABWOpenListElementElement(propList, tabStops)); + m_elements->push_back(new ABWOpenListElementElement(propList)); } -void libabw::ABWOutputElements::addOpenLink(const WPXPropertyList &propList) +void libabw::ABWOutputElements::addOpenLink(const librevenge::RVNGPropertyList &propList) { if (m_elements) m_elements->push_back(new ABWOpenLinkElement(propList)); } -void libabw::ABWOutputElements::addOpenOrderedListLevel(const WPXPropertyList &propList) +void libabw::ABWOutputElements::addOpenOrderedListLevel(const librevenge::RVNGPropertyList &propList) { if (m_elements) m_elements->push_back(new ABWOpenOrderedListLevelElement(propList)); } -void libabw::ABWOutputElements::addOpenPageSpan(const WPXPropertyList &propList, +void libabw::ABWOutputElements::addOpenPageSpan(const librevenge::RVNGPropertyList &propList, int footer, int footerLeft, int footerFirst, int footerLast, int header, int headerLeft, int headerFirst, int headerLast) { @@ -1137,43 +1136,43 @@ header, headerLeft, headerFirst, headerLast)); } -void libabw::ABWOutputElements::addOpenParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops) +void libabw::ABWOutputElements::addOpenParagraph(const librevenge::RVNGPropertyList &propList) { if (m_elements) - m_elements->push_back(new ABWOpenParagraphElement(propList, tabStops)); + m_elements->push_back(new ABWOpenParagraphElement(propList)); } -void libabw::ABWOutputElements::addOpenSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns) +void libabw::ABWOutputElements::addOpenSection(const librevenge::RVNGPropertyList &propList) { if (m_elements) - m_elements->push_back(new ABWOpenSectionElement(propList, columns)); + m_elements->push_back(new ABWOpenSectionElement(propList)); } -void libabw::ABWOutputElements::addOpenSpan(const WPXPropertyList &propList) +void libabw::ABWOutputElements::addOpenSpan(const librevenge::RVNGPropertyList &propList) { if (m_elements) m_elements->push_back(new ABWOpenSpanElement(propList)); } -void libabw::ABWOutputElements::addOpenTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns) +void libabw::ABWOutputElements::addOpenTable(const librevenge::RVNGPropertyList &propList) { if (m_elements) - m_elements->push_back(new ABWOpenTableElement(propList, columns)); + m_elements->push_back(new ABWOpenTableElement(propList)); } -void libabw::ABWOutputElements::addOpenTableCell(const WPXPropertyList &propList) +void libabw::ABWOutputElements::addOpenTableCell(const librevenge::RVNGPropertyList &propList) { if (m_elements) m_elements->push_back(new ABWOpenTableCellElement(propList)); } -void libabw::ABWOutputElements::addOpenTableRow(const WPXPropertyList &propList) +void libabw::ABWOutputElements::addOpenTableRow(const librevenge::RVNGPropertyList &propList) { if (m_elements) m_elements->push_back(new ABWOpenTableRowElement(propList)); } -void libabw::ABWOutputElements::addOpenUnorderedListLevel(const WPXPropertyList &propList) +void libabw::ABWOutputElements::addOpenUnorderedListLevel(const librevenge::RVNGPropertyList &propList) { if (m_elements) m_elements->push_back(new ABWOpenUnorderedListLevelElement(propList)); diff -Nru libabw-0.0.2/src/lib/ABWOutputElements.h libabw-0.1.0/src/lib/ABWOutputElements.h --- libabw-0.0.2/src/lib/ABWOutputElements.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWOutputElements.h 2014-03-29 10:23:24.000000000 +0000 @@ -12,7 +12,7 @@ #include #include -#include +#include namespace libabw { @@ -25,7 +25,7 @@ ABWOutputElements(); virtual ~ABWOutputElements(); void append(const ABWOutputElements &elements); - void write(WPXDocumentInterface *iface) const; + void write(librevenge::RVNGTextInterface *iface) const; void addCloseEndnote(); void addCloseFooter(); void addCloseFootnote(); @@ -42,31 +42,31 @@ void addCloseTableCell(); void addCloseTableRow(); void addCloseUnorderedListLevel(); - void addInsertBinaryObject(const WPXPropertyList &propList, const WPXBinaryData &data); - void addInsertCoveredTableCell(const WPXPropertyList &propList); + void addInsertBinaryObject(const librevenge::RVNGPropertyList &propList); + void addInsertCoveredTableCell(const librevenge::RVNGPropertyList &propList); void addInsertLineBreak(); void addInsertSpace(); void addInsertTab(); - void addInsertText(const WPXString &text); - void addOpenEndnote(const WPXPropertyList &propList); - void addOpenFooter(const WPXPropertyList &propList, int id); - void addOpenFootnote(const WPXPropertyList &propList); - void addOpenFrame(const WPXPropertyList &propList); - void addOpenHeader(const WPXPropertyList &propList, int id); - void addOpenLink(const WPXPropertyList &propList); - void addOpenListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); - void addOpenOrderedListLevel(const WPXPropertyList &propList); - void addOpenPageSpan(const WPXPropertyList &propList, + void addInsertText(const librevenge::RVNGString &text); + void addOpenEndnote(const librevenge::RVNGPropertyList &propList); + void addOpenFooter(const librevenge::RVNGPropertyList &propList, int id); + void addOpenFootnote(const librevenge::RVNGPropertyList &propList); + void addOpenFrame(const librevenge::RVNGPropertyList &propList); + void addOpenHeader(const librevenge::RVNGPropertyList &propList, int id); + void addOpenLink(const librevenge::RVNGPropertyList &propList); + void addOpenListElement(const librevenge::RVNGPropertyList &propList); + void addOpenOrderedListLevel(const librevenge::RVNGPropertyList &propList); + void addOpenPageSpan(const librevenge::RVNGPropertyList &propList, int footer, int footerLeft, int footerFirst, int footerLast, int header, int headerLeft, int headerFirst, int headerLast); - void addOpenParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); - void addOpenSection(const WPXPropertyList &propList, const WPXPropertyListVector &columns); - void addOpenSpan(const WPXPropertyList &propList); - void addOpenTable(const WPXPropertyList &propList, const WPXPropertyListVector &columns); - void addOpenTableCell(const WPXPropertyList &propList); - void addOpenTableRow(const WPXPropertyList &propList); - void addOpenUnorderedListLevel(const WPXPropertyList &propList); - void addStartDocument(const WPXPropertyList &propList); + void addOpenParagraph(const librevenge::RVNGPropertyList &propList); + void addOpenSection(const librevenge::RVNGPropertyList &propList); + void addOpenSpan(const librevenge::RVNGPropertyList &propList); + void addOpenTable(const librevenge::RVNGPropertyList &propList); + void addOpenTableCell(const librevenge::RVNGPropertyList &propList); + void addOpenTableRow(const librevenge::RVNGPropertyList &propList); + void addOpenUnorderedListLevel(const librevenge::RVNGPropertyList &propList); + void addStartDocument(const librevenge::RVNGPropertyList &propList); bool empty() const { return m_bodyElements.empty(); diff -Nru libabw-0.0.2/src/lib/ABWParser.cpp libabw-0.1.0/src/lib/ABWParser.cpp --- libabw-0.0.2/src/lib/ABWParser.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWParser.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -7,16 +7,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include -#include #include #include #include -#include -#include -#include -#include -#include +#include #include #include #include "ABWParser.h" @@ -70,28 +64,11 @@ space_p).full; } -void appendFromBase64(WPXBinaryData &data, const char *base64Data) -{ - std::string base64String(base64Data); - boost::trim(base64String); - - std::string::const_iterator paddingIter = std::find(base64String.begin(), base64String.end(), '='); - typedef boost::archive::iterators::transform_width< - boost::archive::iterators::binary_from_base64< - boost::archive::iterators::remove_whitespace< std::string::const_iterator > >, 8, 6 > base64_decoder; - - std::vector buffer; - std::copy(base64_decoder(base64String.begin()), base64_decoder(paddingIter), std::back_inserter(buffer)); - - if (!buffer.empty()) - data.append(&buffer[0], buffer.size()); -} - } // anonymous namespace } // namespace libabw -libabw::ABWParser::ABWParser(WPXInputStream *input, WPXDocumentInterface *iface) +libabw::ABWParser::ABWParser(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *iface) : m_input(input), m_iface(iface), m_collector(0) { } @@ -112,7 +89,7 @@ std::map data; ABWStylesCollector stylesCollector(tableSizes, data, listElements); m_collector = &stylesCollector; - m_input->seek(0, WPX_SEEK_SET); + m_input->seek(0, librevenge::RVNG_SEEK_SET); if (!processXmlDocument(m_input)) { clearListElements(listElements); @@ -121,7 +98,7 @@ ABWContentCollector contentCollector(m_iface, tableSizes, data, listElements); m_collector = &contentCollector; - m_input->seek(0, WPX_SEEK_SET); + m_input->seek(0, librevenge::RVNG_SEEK_SET); if (!processXmlDocument(m_input)) { clearListElements(listElements); @@ -138,7 +115,7 @@ } } -bool libabw::ABWParser::processXmlDocument(WPXInputStream *input) +bool libabw::ABWParser::processXmlDocument(librevenge::RVNGInputStream *input) { if (!input) return false; @@ -508,9 +485,9 @@ const xmlChar *data = xmlTextReaderConstValue(reader); if (data) { - WPXBinaryData binaryData; + librevenge::RVNGBinaryData binaryData; if (base64) - appendFromBase64(binaryData, (const char *)data); + binaryData.appendBase64Data((const char *)data); else binaryData.append(data, xmlStrlen(data)); if (m_collector) diff -Nru libabw-0.0.2/src/lib/ABWParser.h libabw-0.1.0/src/lib/ABWParser.h --- libabw-0.0.2/src/lib/ABWParser.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWParser.h 2014-03-29 10:23:24.000000000 +0000 @@ -10,7 +10,7 @@ #ifndef __ABWPARSER_H__ #define __ABWPARSER_H__ -#include +#include #include "ABWXMLHelper.h" namespace libabw @@ -21,7 +21,7 @@ class ABWParser { public: - explicit ABWParser(WPXInputStream *input, WPXDocumentInterface *iface); + explicit ABWParser(librevenge::RVNGInputStream *input, librevenge::RVNGTextInterface *iface); virtual ~ABWParser(); bool parse(); @@ -36,7 +36,7 @@ // Functions to read the AWML document structure - bool processXmlDocument(WPXInputStream *input); + bool processXmlDocument(librevenge::RVNGInputStream *input); void processXmlNode(xmlTextReaderPtr reader); void readMetadata(xmlTextReaderPtr reader); @@ -58,8 +58,8 @@ void readTable(xmlTextReaderPtr reader); void readCell(xmlTextReaderPtr reader); - WPXInputStream *m_input; - WPXDocumentInterface *m_iface; + librevenge::RVNGInputStream *m_input; + librevenge::RVNGTextInterface *m_iface; ABWCollector *m_collector; }; diff -Nru libabw-0.0.2/src/lib/ABWStylesCollector.cpp libabw-0.1.0/src/lib/ABWStylesCollector.cpp --- libabw-0.0.2/src/lib/ABWStylesCollector.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWStylesCollector.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -9,7 +9,7 @@ #include #include -#include +#include #include "ABWStylesCollector.h" #include "libabw_internal.h" @@ -98,7 +98,7 @@ return len; } -static void appendUCS4(WPXString &str, unsigned ucs4) +static void appendUCS4(librevenge::RVNGString &str, unsigned ucs4) { int charLength = abw_unichar_to_utf8(ucs4, 0); char *utf8 = new char[charLength+1]; @@ -203,7 +203,7 @@ return std::string(); } -void libabw::ABWStylesCollector::collectData(const char *name, const char *mimeType, const WPXBinaryData &data) +void libabw::ABWStylesCollector::collectData(const char *name, const char *mimeType, const librevenge::RVNGBinaryData &data) { if (!name) return; @@ -292,7 +292,7 @@ if (listDelim) { std::string delim(listDelim); - std::vector strVec; + std::vector strVec; for (split_iterator It = make_split_iterator(delim, first_finder("%L", is_iequal())); diff -Nru libabw-0.0.2/src/lib/ABWStylesCollector.h libabw-0.1.0/src/lib/ABWStylesCollector.h --- libabw-0.0.2/src/lib/ABWStylesCollector.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWStylesCollector.h 2014-03-29 10:23:24.000000000 +0000 @@ -11,7 +11,7 @@ #define __ABWSTYLESCOLLECTOR_H__ #include -#include +#include #include "ABWCollector.h" namespace libabw @@ -74,7 +74,7 @@ void insertText(const char *) {} void insertImage(const char *, const char *) {} - void collectData(const char *name, const char *mimeType, const WPXBinaryData &data); + void collectData(const char *name, const char *mimeType, const librevenge::RVNGBinaryData &data); void collectHeaderFooter(const char *, const char *) {} void collectList(const char *id, const char *listDecimal, const char *listDelim, const char *parentid, const char *startValue, const char *type); diff -Nru libabw-0.0.2/src/lib/ABWXMLHelper.cpp libabw-0.1.0/src/lib/ABWXMLHelper.cpp --- libabw-0.0.2/src/lib/ABWXMLHelper.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWXMLHelper.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -10,7 +10,7 @@ #include #include #include -#include +#include #include "ABWXMLHelper.h" #include "libabw_internal.h" @@ -26,12 +26,12 @@ static int abwxmlInputReadFunc(void *context, char *buffer, int len) { - WPXInputStream *input = (WPXInputStream *)context; + librevenge::RVNGInputStream *input = (librevenge::RVNGInputStream *)context; if ((!input) || (!buffer) || (len < 0)) return -1; - if (input->atEOS()) + if (input->isEnd()) return 0; unsigned long tmpNumBytesRead = 0; @@ -73,7 +73,7 @@ // xmlTextReader helper function -xmlTextReaderPtr libabw::xmlReaderForStream(WPXInputStream *input) +xmlTextReaderPtr libabw::xmlReaderForStream(librevenge::RVNGInputStream *input) { xmlTextReaderPtr reader = xmlReaderForIO(abwxmlInputReadFunc, abwxmlInputCloseFunc, (void *)input, 0, 0, XML_PARSE_NOBLANKS|XML_PARSE_NOENT|XML_PARSE_NONET|XML_PARSE_RECOVER); diff -Nru libabw-0.0.2/src/lib/ABWXMLHelper.h libabw-0.1.0/src/lib/ABWXMLHelper.h --- libabw-0.0.2/src/lib/ABWXMLHelper.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWXMLHelper.h 2014-03-29 10:23:24.000000000 +0000 @@ -10,16 +10,16 @@ #ifndef __ABWXMLHELPER_H__ #define __ABWXMLHELPER_H__ -#include +#include #include namespace libabw { -// create an xmlTextReader pointer from a WPXInputStream pointer +// create an xmlTextReader pointer from a librevenge::RVNGInputStream pointer // needs to be freed using xmlTextReaderFree function. -xmlTextReaderPtr xmlReaderForStream(WPXInputStream *input); +xmlTextReaderPtr xmlReaderForStream(librevenge::RVNGInputStream *input); } // namespace libabw diff -Nru libabw-0.0.2/src/lib/ABWZlibStream.cpp libabw-0.1.0/src/lib/ABWZlibStream.cpp --- libabw-0.0.2/src/lib/ABWZlibStream.cpp 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWZlibStream.cpp 2014-03-29 10:23:24.000000000 +0000 @@ -20,7 +20,7 @@ namespace { -static bool getInflatedBuffer(WPXInputStream *input, std::vector &buffer) +static bool getInflatedBuffer(librevenge::RVNGInputStream *input, std::vector &buffer) { int ret; z_stream strm; @@ -68,7 +68,7 @@ while (Z_STREAM_END != ret); (void)inflateEnd(&strm); - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); if (Z_STREAM_END == ret) return true; return false; @@ -76,8 +76,8 @@ } -ABWZlibStream::ABWZlibStream(WPXInputStream *input) : - WPXInputStream(), +ABWZlibStream::ABWZlibStream(librevenge::RVNGInputStream *input) : + librevenge::RVNGInputStream(), m_input(0), m_offset(0), m_buffer() @@ -86,7 +86,7 @@ { if (input) { - input->seek(0, WPX_SEEK_CUR); + input->seek(0, librevenge::RVNG_SEEK_CUR); m_input = input; } else @@ -122,14 +122,14 @@ return &m_buffer[oldOffset]; } -int ABWZlibStream::seek(long offset, WPX_SEEK_TYPE seekType) +int ABWZlibStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) { if (m_input) return m_input->seek(offset, seekType); - if (seekType == WPX_SEEK_CUR) + if (seekType == librevenge::RVNG_SEEK_CUR) m_offset += offset; - else if (seekType == WPX_SEEK_SET) + else if (seekType == librevenge::RVNG_SEEK_SET) m_offset = offset; if (m_offset < 0) @@ -154,10 +154,10 @@ return m_offset; } -bool ABWZlibStream::atEOS() +bool ABWZlibStream::isEnd() { if (m_input) - return m_input->atEOS(); + return m_input->isEnd(); if ((long)m_offset >= (long)m_buffer.size()) return true; diff -Nru libabw-0.0.2/src/lib/ABWZlibStream.h libabw-0.1.0/src/lib/ABWZlibStream.h --- libabw-0.0.2/src/lib/ABWZlibStream.h 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/ABWZlibStream.h 2014-03-29 10:23:24.000000000 +0000 @@ -11,33 +11,51 @@ #define __ABWZLIBSTREAM_H__ #include -#include +#include namespace libabw { -class ABWZlibStream : public WPXInputStream +class ABWZlibStream : public librevenge::RVNGInputStream { public: - ABWZlibStream(WPXInputStream *input); + ABWZlibStream(librevenge::RVNGInputStream *input); ~ABWZlibStream() {} - bool isOLEStream() + bool isStructured() { return false; } - WPXInputStream *getDocumentOLEStream(const char *) + unsigned subStreamCount() + { + return 0; + } + const char *subStreamName(unsigned) + { + return 0; + } + bool existsSubStream(const char *) + { + return false; + } + librevenge::RVNGInputStream *getSubStreamByName(const char *) + { + return 0; + } + librevenge::RVNGInputStream *getSubStreamById(unsigned) { return 0; } - const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); - int seek(long offset, WPX_SEEK_TYPE seekType); + int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType); long tell(); - bool atEOS(); - + bool isEnd(); + unsigned long getSize() const + { + return m_buffer.size(); + } private: - WPXInputStream *m_input; + librevenge::RVNGInputStream *m_input; volatile long m_offset; std::vector m_buffer; ABWZlibStream(const ABWZlibStream &); diff -Nru libabw-0.0.2/src/lib/Makefile.am libabw-0.1.0/src/lib/Makefile.am --- libabw-0.0.2/src/lib/Makefile.am 2014-02-10 14:41:38.000000000 +0000 +++ libabw-0.1.0/src/lib/Makefile.am 2014-03-29 10:23:24.000000000 +0000 @@ -20,13 +20,13 @@ $(top_srcdir)/inc/libabw/libabw.h \ $(top_srcdir)/inc/libabw/AbiDocument.h -AM_CXXFLAGS = -I$(top_srcdir)/inc $(WPD_CFLAGS) $(LIBXML_CFLAGS) $(ZLIB_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBABW_BUILD=1 +AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(LIBXML_CFLAGS) $(ZLIB_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBABW_BUILD=1 generated_files = \ $(top_builddir)/src/lib/tokens.h \ $(top_builddir)/src/lib/tokenhash.h -libabw_@ABW_MAJOR_VERSION@_@ABW_MINOR_VERSION@_la_LIBADD = $(WPD_LIBS) $(LIBXML_LIBS) $(ZLIB_LIBS) @LIBABW_WIN32_RESOURCE@ +libabw_@ABW_MAJOR_VERSION@_@ABW_MINOR_VERSION@_la_LIBADD = $(REVENGE_LIBS) $(LIBXML_LIBS) $(ZLIB_LIBS) @LIBABW_WIN32_RESOURCE@ libabw_@ABW_MAJOR_VERSION@_@ABW_MINOR_VERSION@_la_DEPENDENCIES = @LIBABW_WIN32_RESOURCE@ libabw_@ABW_MAJOR_VERSION@_@ABW_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic $(no_undefined) libabw_@ABW_MAJOR_VERSION@_@ABW_MINOR_VERSION@_la_SOURCES = \ diff -Nru libabw-0.0.2/src/lib/Makefile.in libabw-0.1.0/src/lib/Makefile.in --- libabw-0.0.2/src/lib/Makefile.in 2014-02-10 14:49:19.000000000 +0000 +++ libabw-0.1.0/src/lib/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -286,16 +286,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -362,12 +364,12 @@ $(top_srcdir)/inc/libabw/libabw.h \ $(top_srcdir)/inc/libabw/AbiDocument.h -AM_CXXFLAGS = -I$(top_srcdir)/inc $(WPD_CFLAGS) $(LIBXML_CFLAGS) $(ZLIB_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBABW_BUILD=1 +AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(LIBXML_CFLAGS) $(ZLIB_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBABW_BUILD=1 generated_files = \ $(top_builddir)/src/lib/tokens.h \ $(top_builddir)/src/lib/tokenhash.h -libabw_@ABW_MAJOR_VERSION@_@ABW_MINOR_VERSION@_la_LIBADD = $(WPD_LIBS) $(LIBXML_LIBS) $(ZLIB_LIBS) @LIBABW_WIN32_RESOURCE@ +libabw_@ABW_MAJOR_VERSION@_@ABW_MINOR_VERSION@_la_LIBADD = $(REVENGE_LIBS) $(LIBXML_LIBS) $(ZLIB_LIBS) @LIBABW_WIN32_RESOURCE@ libabw_@ABW_MAJOR_VERSION@_@ABW_MINOR_VERSION@_la_DEPENDENCIES = @LIBABW_WIN32_RESOURCE@ libabw_@ABW_MAJOR_VERSION@_@ABW_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic $(no_undefined) libabw_@ABW_MAJOR_VERSION@_@ABW_MINOR_VERSION@_la_SOURCES = \ diff -Nru libabw-0.0.2/src/Makefile.in libabw-0.1.0/src/Makefile.in --- libabw-0.0.2/src/Makefile.in 2014-02-10 14:49:18.000000000 +0000 +++ libabw-0.1.0/src/Makefile.in 2014-05-23 14:27:38.000000000 +0000 @@ -253,16 +253,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPD_STREAM_CFLAGS = @WPD_STREAM_CFLAGS@ -WPD_STREAM_LIBS = @WPD_STREAM_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@