diff -Nru libwpg-0.2.2/aclocal.m4 libwpg-0.3.0-rjvb/aclocal.m4 --- libwpg-0.2.2/aclocal.m4 2013-04-18 13:16:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/aclocal.m4 2014-03-29 10:28:43.000000000 +0000 @@ -1,6 +1,6 @@ -# generated automatically by aclocal 1.13.1 -*- Autoconf -*- +# generated automatically by aclocal 1.13.4 -*- Autoconf -*- -# Copyright (C) 1996-2012 Free Software Foundation, Inc. +# Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -220,6 +220,21 @@ m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR + +# PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, +# [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) +# ------------------------------------------- +# Retrieves the value of the pkg-config variable for the given module. +AC_DEFUN([PKG_CHECK_VAR], +[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl +AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl + +_PKG_CONFIG([$1], [variable="][$3]["], [$2]) +AS_VAR_COPY([$1], [pkg_cv_][$1]) + +AS_VAR_IF([$1], [""], [$5], [$4])dnl +])# PKG_CHECK_VAR + # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation @@ -235,7 +250,7 @@ [am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.13.1], [], +m4_if([$1], [1.13.4], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -251,7 +266,7 @@ # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.13.1])dnl +[AM_AUTOMAKE_VERSION([1.13.4])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) @@ -632,7 +647,7 @@ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the @@ -1184,76 +1199,114 @@ # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar +# AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) -m4_if([$1], [v7], - [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. + +# We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of '-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break +m4_if([$1], [v7], + [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + [m4_case([$1], + [ustar], + [# The POSIX 1988 'ustar' format is defined with fixed-size fields. + # There is notably a 21 bits limit for the UID and the GID. In fact, + # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 + # and bug#13588). + am_max_uid=2097151 # 2^21 - 1 + am_max_gid=$am_max_uid + # The $UID and $GID variables are not portable, so we need to resort + # to the POSIX-mandated id(1) utility. Errors in the 'id' calls + # below are definitely unexpected, so allow the users to see them + # (that is, avoid stderr redirection). + am_uid=`id -u || echo unknown` + am_gid=`id -g || echo unknown` + AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) + if test $am_uid -le $am_max_uid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi + AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) + if test $am_gid -le $am_max_gid; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + _am_tools=none + fi], + + [pax], + [], + + [m4_fatal([Unknown tar format])]) + + AC_MSG_CHECKING([how to create a $1 tar archive]) + + # Go ahead even if we have the value already cached. We do so because we + # need to set the values for the 'am__tar' and 'am__untar' variables. + _am_tools=${am_cv_prog_tar_$1-$_am_tools} + + for _am_tool in $_am_tools; do + case $_am_tool in + gnutar) + for _am_tar in tar gnutar gtar; do + AM_RUN_LOG([$_am_tar --version]) && break + done + am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' + am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' + am__untar="$_am_tar -xf -" + ;; + plaintar) + # Must skip GNU tar: if it does not support --format= it doesn't create + # ustar tarball either. + (tar --version) >/dev/null 2>&1 && continue + am__tar='tar chf - "$$tardir"' + am__tar_='tar chf - "$tardir"' + am__untar='tar xf -' + ;; + pax) + am__tar='pax -L -x $1 -w "$$tardir"' + am__tar_='pax -L -x $1 -w "$tardir"' + am__untar='pax -r' + ;; + cpio) + am__tar='find "$$tardir" -print | cpio -o -H $1 -L' + am__tar_='find "$tardir" -print | cpio -o -H $1 -L' + am__untar='cpio -i -H $1 -d' + ;; + none) + am__tar=false + am__tar_=false + am__untar=false + ;; + esac + + # If the value was cached, stop now. We just wanted to have am__tar + # and am__untar set. + test -n "${am_cv_prog_tar_$1}" && break + + # tar/untar a dummy directory, and stop if the command works. + rm -rf conftest.dir + mkdir conftest.dir + echo GrepMe > conftest.dir/file + AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) + rm -rf conftest.dir + if test -s conftest.tar; then + AM_RUN_LOG([$am__untar /dev/null 2>&1 && break + fi + done rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) + AC_MSG_RESULT([$am_cv_prog_tar_$1])]) + AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR diff -Nru libwpg-0.2.2/AUTHORS libwpg-0.3.0-rjvb/AUTHORS --- libwpg-0.2.2/AUTHORS 2011-10-04 14:14:14.000000000 +0000 +++ libwpg-0.3.0-rjvb/AUTHORS 2014-03-29 10:19:42.000000000 +0000 @@ -11,6 +11,7 @@ ------------ Francis J Franklin Excellent build system Tomas 'scarabeus' Chvatal Build system rewrite +David Tardon Thanks ------ diff -Nru libwpg-0.2.2/build/Makefile.in libwpg-0.3.0-rjvb/build/Makefile.in --- libwpg-0.2.2/build/Makefile.in 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/build/Makefile.in 2014-03-29 10:28:43.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ esac; \ - test $$am__dry = yes; \ - } + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -214,6 +242,12 @@ 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@ @@ -329,13 +363,12 @@ # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ diff -Nru libwpg-0.2.2/build/win32/libwpg.dsp libwpg-0.3.0-rjvb/build/win32/libwpg.dsp --- libwpg-0.2.2/build/win32/libwpg.dsp 2012-09-11 15:09:20.000000000 +0000 +++ libwpg-0.3.0-rjvb/build/win32/libwpg.dsp 2014-03-29 10:19:42.000000000 +0000 @@ -40,8 +40,8 @@ # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /D "NDEBUG" /D "WIN32" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /FD /c +# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\inc" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\inc" /D "NDEBUG" /D "WIN32" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /FD /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" @@ -64,8 +64,8 @@ # PROP Output_Dir "Debug" # PROP Intermediate_Dir "Debug" # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /GR /GX /ZI /Od /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /I "..\..\inc" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /GR /GX /ZI /Od /I "..\..\inc" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /FD /GZ /c # SUBTRACT CPP /YX # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" @@ -119,6 +119,10 @@ # End Source File # Begin Source File +SOURCE=..\..\src\lib\WPGStringVector.cpp +# End Source File +# Begin Source File + SOURCE=..\..\src\lib\WPGSVGGenerator.cpp # End Source File # Begin Source File @@ -175,6 +179,10 @@ # End Source File # Begin Source File +SOURCE=..\..\src\lib\WPGStringVector.h +# End Source File +# Begin Source File + SOURCE=..\..\src\lib\WPGSVGGenerator.h # End Source File # Begin Source File diff -Nru libwpg-0.2.2/build/win32/libwpg.vcproj libwpg-0.3.0-rjvb/build/win32/libwpg.vcproj --- libwpg-0.2.2/build/win32/libwpg.vcproj 2013-01-18 07:38:41.000000000 +0000 +++ libwpg-0.3.0-rjvb/build/win32/libwpg.vcproj 2014-03-29 10:19:42.000000000 +0000 @@ -41,7 +41,7 @@ Name="VCCLCompilerTool" Optimization="2" InlineFunctionExpansion="1" - AdditionalIncludeDirectories="$(LIBWPD_INCLUDES)" + AdditionalIncludeDirectories="..\..\inc,$(LIBREVENGE_INCLUDES)" PreprocessorDefinitions="NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS" StringPooling="true" RuntimeLibrary="2" @@ -115,7 +115,7 @@ + + + + + + + + + + + + - - MaxSpeed OnlyExplicitInline - $(LIBWPD_INCLUDES);%(AdditionalIncludeDirectories) + ..\..\inc;$(LIBREVENGE_INCLUDES);%(AdditionalIncludeDirectories) NDEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) true MultiThreadedDLL @@ -73,7 +73,7 @@ Disabled - $(LIBWPD_INCLUDES);%(AdditionalIncludeDirectories) + ..\..\inc;$(LIBREVENGE_INCLUDES);%(AdditionalIncludeDirectories) _DEBUG;DEBUG;WIN32;_LIB;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebug @@ -133,6 +133,10 @@ %(PreprocessorDefinitions) %(PreprocessorDefinitions) + + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) + %(PreprocessorDefinitions) %(PreprocessorDefinitions) @@ -143,7 +147,9 @@ - + + + @@ -152,8 +158,7 @@ - - + diff -Nru libwpg-0.2.2/build/win32/Makefile.in libwpg-0.3.0-rjvb/build/win32/Makefile.in --- libwpg-0.2.2/build/win32/Makefile.in 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/build/win32/Makefile.in 2014-03-29 10:28:43.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ esac; \ - test $$am__dry = yes; \ - } + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -154,6 +182,12 @@ 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@ diff -Nru libwpg-0.2.2/build/win32/wpg2raw.dsp libwpg-0.3.0-rjvb/build/win32/wpg2raw.dsp --- libwpg-0.2.2/build/win32/wpg2raw.dsp 2012-10-06 15:48:27.000000000 +0000 +++ libwpg-0.3.0-rjvb/build/win32/wpg2raw.dsp 2014-03-29 10:19:42.000000000 +0000 @@ -44,8 +44,8 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\src\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c -# ADD CPP /nologo /MT /W3 /GX /I "..\..\src\lib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c +# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\inc" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c +# ADD CPP /nologo /MT /W3 /GX /I "..\..\inc" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -72,8 +72,8 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\..\..\src\lib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\src\lib" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\..\..\inc" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\inc" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe diff -Nru libwpg-0.2.2/build/win32/wpg2raw.vcproj libwpg-0.3.0-rjvb/build/win32/wpg2raw.vcproj --- libwpg-0.2.2/build/win32/wpg2raw.vcproj 2013-01-18 07:38:41.000000000 +0000 +++ libwpg-0.3.0-rjvb/build/win32/wpg2raw.vcproj 2014-03-29 10:19:42.000000000 +0000 @@ -44,7 +44,7 @@ Disabled - ..\..\src\lib;$(LIBWPG_INCLUDES);%(AdditionalIncludeDirectories) + ..\..\inc;$(LIBWPG_INCLUDES);%(AdditionalIncludeDirectories) _DEBUG;DEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -72,7 +72,7 @@ libwpg-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) Debug\bin\wpg2raw.exe true - Debug\lib;$(LIBWPD_LIBDIR);%(AdditionalLibraryDirectories) + Debug\lib;$(LIBREVENGE_LIBDIR);%(AdditionalLibraryDirectories) true .\Debug/wpg2raw.pdb Console @@ -95,7 +95,7 @@ Disabled - ..\..\src\lib;$(LIBWPG_INCLUDES);%(AdditionalIncludeDirectories) + ..\..\inc;$(LIBWPG_INCLUDES);%(AdditionalIncludeDirectories) NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) MultiThreadedDLL .\Release/wpg2raw.pch @@ -114,7 +114,7 @@ libwpg-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) Release\bin\wpg2raw.exe true - Release\lib;$(LIBWPD_LIBDIR);%(AdditionalLibraryDirectories) + Release\lib;$(LIBREVENGE_LIBDIR);%(AdditionalLibraryDirectories) .\Release/wpg2raw.pdb Console false diff -Nru libwpg-0.2.2/build/win32/wpg2svg.dsp libwpg-0.3.0-rjvb/build/win32/wpg2svg.dsp --- libwpg-0.2.2/build/win32/wpg2svg.dsp 2012-10-06 15:48:27.000000000 +0000 +++ libwpg-0.3.0-rjvb/build/win32/wpg2svg.dsp 2014-03-29 10:19:42.000000000 +0000 @@ -44,8 +44,8 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\src\lib" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c -# ADD CPP /nologo /MT /W3 /GX /I "..\..\src\lib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c +# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\inc" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c +# ADD CPP /nologo /MT /W3 /GX /I "..\..\inc" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe @@ -72,8 +72,8 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\src\lib" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\src\lib" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\inc" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\inc" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe diff -Nru libwpg-0.2.2/build/win32/wpg2svg.vcproj libwpg-0.3.0-rjvb/build/win32/wpg2svg.vcproj --- libwpg-0.2.2/build/win32/wpg2svg.vcproj 2013-01-18 07:38:41.000000000 +0000 +++ libwpg-0.3.0-rjvb/build/win32/wpg2svg.vcproj 2014-03-29 10:19:42.000000000 +0000 @@ -45,7 +45,7 @@ Disabled - ..\..\src\lib;$(LIBWPG_INCLUDES);%(AdditionalIncludeDirectories) + ..\..\inc;$(LIBWPG_INCLUDES);%(AdditionalIncludeDirectories) _DEBUG;DEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) EnableFastChecks MultiThreadedDebugDLL @@ -72,7 +72,7 @@ libwpg-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) Debug\bin\wpg2svg.exe true - Debug\lib;$(LIBWPD_LIBDIR);%(AdditionalLibraryDirectories) + Debug\lib;$(LIBREVENGE_LIBDIR);%(AdditionalLibraryDirectories) true .\Debug/wpg2svg.pdb Console @@ -95,7 +95,7 @@ Disabled - ..\..\src\lib;$(LIBWPG_INCLUDES);%(AdditionalIncludeDirectories) + ..\..\inc;$(LIBWPG_INCLUDES);%(AdditionalIncludeDirectories) NDEBUG;WIN32;_CONSOLE;%(PreprocessorDefinitions) MultiThreadedDLL .\Release/wpg2svg.pch @@ -114,7 +114,7 @@ libwpg-0.2.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) Release\bin\wpg2svg.exe true - Release\lib;$(LIBWPD_LIBDIR);%(AdditionalLibraryDirectories) + Release\lib;$(LIBREVENGE_LIBDIR);%(AdditionalLibraryDirectories) .\Release/wpg2svg.pdb Console false diff -Nru libwpg-0.2.2/ChangeLog libwpg-0.3.0-rjvb/ChangeLog --- libwpg-0.2.2/ChangeLog 2013-04-18 13:16:27.000000000 +0000 +++ libwpg-0.3.0-rjvb/ChangeLog 2014-05-23 16:46:31.000000000 +0000 @@ -1,91 +1,454 @@ -2013-04-18 Fridrich Štrba [b70286800b809c2756e3f5b7e1d07bfef36a77a7] +2014-05-23 David Tardon [b278f7694ba1fa4bf5755c99c4890b95a3c23837] + + prepare for a release + + +2014-05-23 David Tardon [8ae0c619b7ff6d422ad2a854141199393c4dc4f9] + + adapt to librevenge changes + + +2014-05-16 Fridrich Štrba [134ca5090dd1096f9af5122e4cf8917015c44401] + + drawConnector missing + + +2014-04-16 David Tardon [e6255edf494e9acd1702ffe822c46166673989ce] + + libwpd is impl. detail -> hide it + + +2014-04-16 David Tardon [26b00bf4571fe9f9836a188f9d794791688d0429] + + require librevenge-stream too + + +2014-01-01 David Tardon [4a1a37e779753c145445ce8c6410444969b930e3] + + simplify this + + +2014-01-01 David Tardon [f5dfdaeec1ee2c023f7de2609162af97540b6486] + + cppcheck: expression is always false + + (thanks to David Binderman for pointing this out) + +2013-12-19 Fridrich Štrba [6baa1ec26a1a9de470cdbb563446c1a22ed4f7e2] + + Adapt to changes to RVNGTextInterface + + +2013-12-18 Fridrich Štrba [540ddb2bf26bf5aa6d60a05a767de528b90adcfa] + + Export only needed stuff on Windows + + +2013-12-17 Fridrich Štrba [8fdf5e37c5dcdda711190809b19b5c13f1e87a21] + + Adapt to librevenge changes + + +2013-12-12 Fridrich Štrba [e6b29174504cf14324dc790c6d7f1125b30e4865] + + Adapt to changes in librevenge + + +2013-12-12 Fridrich Štrba [6c5e99c4dbeebe7cba1e428f4fe7845f9a1c763e] + + Revert "WPG2Parser: remove unused <>" + + Not so "unused" after all :) + + This reverts commit 8d31338ef4fc54168f50b1d3be57ac9a0e100ae4. + +2013-12-11 Fridrich Štrba [52e127431f6564ac017632590a3926d7e774f6d8] + + Allow equal identing of functions + + +2013-12-11 osnola [8d31338ef4fc54168f50b1d3be57ac9a0e100ae4] + + WPG2Parser: remove unused <> + + +2013-12-09 David Tardon [a5c11756e6dae9477ed3d7221833d8c63d44d37c] + + reorganize to only need cleanup at one place + + +2013-12-09 David Tardon [f9e2ab427575aba23a5a2036e07499286a4718c9] + + there is no need to check ptr for 0 before delete + + ... and doing it throws coverity off. + +2013-12-05 Fridrich Štrba [db5d749752c975f9bf593541b7bbf3578a8e3672] + + Adapt to changes of librevenge + + +2013-12-03 Fridrich Štrba [df655d46fa155cd46f015a0187978a10a19d2e92] + + Be sure the right thing is spit out as text + + +2013-12-03 Fridrich Štrba [a482e916a40699ef004a0b14d9184c305a977f5c] + + Don't dupplicate those properties + + +2013-12-01 Fridrich Štrba [e41d9c612e40df6aacea62bbe155391c9215db15] + + Adapt to libwpd namespacing + + +2013-11-30 Fridrich Štrba [83896353f441051cc6d53b5788b1ed937111c35c] + + Allow wpg2raw output callgraph + + +2013-11-28 David Tardon [2a2e13557cd651a9fdede6f8a647177a80793ffe] + + add myself to AUTHORS file + + +2013-11-28 David Tardon [113584d73aa6e20d1f925217b3a9346047d10269] + + add options file for astyle + + +2013-11-25 Fridrich Štrba [a92902038c3589834a7d5f08711ebbcbaccbda03] + + astyle -HU -A1 -k3 -y -n -t -r \*.cpp \*.h + + +2013-11-23 Fridrich Štrba [856d4729c39a798fb4143208627d597078498df2] + + drawPoly*: vertices -> "svg:points" + + +2013-11-23 Fridrich Štrba [32ab8b23703dc3ac5dacb7511cbb7f1d300d8915] + + Fold in the gradient + + +2013-11-22 Fridrich Štrba [7e08c6626a1b58a15fee1129140691597d0c78b8] + + openTable: columns -> librevenge:table-columns + fold data in insertEquation + + +2013-11-22 Fridrich Štrba [dccc3cc4f285f9119fb13edc38c9e3a8f65a5e73] + + insertField: type -> librevenge:field-type + + +2013-11-22 Fridrich Štrba [78dc47cc6792ebc62453f46f4bf55d9c69d424c7] + + Folding in the section columns + + +2013-11-21 Fridrich Štrba [d9a91d8510dd714ad997594578c97983e8565730] + + Fold tabStops into the propList + + +2013-11-20 Fridrich Štrba [2afcdb02e081e04ca1f8b024494fb6aeac8c7384] + + Folding paths into propLists + + +2013-11-14 Fridrich Štrba [66234afc9c2b6f788622828c5625387fd839beca] + + Adapt to API change in librevenge + + +2013-11-07 Fridrich Štrba [eb8998dbdc87a247e0598ea9a481003e3fbf4ef4] + + Small fix + + +2013-11-06 Fridrich Štrba [cd5dd09709891a4b125a50a65ef02538cdd4cd13] + + Simplify public interface + callcatcher action + + +2013-11-05 Fridrich Štrba [078167d04a66b70e35ba9af78ebbebd60e0431be] + + SVG is librevenge's core + + +2013-11-05 Fridrich Štrba [c577dc0128934872eda291e9cfb5033e03b30ca9] + + Port to the librevenge-generators + + +2013-11-05 Fridrich Štrba [f9757c9d888bb18ec3fbd4dacfc3e85af339b87c] + + librevenge namespace + + +2013-11-04 Fridrich Štrba [4045f41f1f0d39f73c47ab4cb1ced13d9562ffa8] + + The library does not depend on the steam implementations + + +2013-11-04 Fridrich Štrba [bbaaaacac41f59a178968b726e29985385fea437] + + Depend on right libraries + + +2013-11-04 Fridrich Štrba [33888bf408c81f41e7b1edea466db3a89ad6c0e1] + + Properties are now in librevenge: namespace + some fixes + + +2013-11-03 Fridrich Štrba [b165cca501e5f9e84bc565cf95b310fccb6000eb] + + Don't forward-declare those ones + + +2013-11-02 Fridrich Štrba [28647e216df8e0dac28a5d1394ece1b4443a8a8c] + + Adapt to the new RVNGInputStream API + + +2013-11-02 Fridrich Štrba [2043e8b8cd8bc318fe70eb9a6938bb8387ec6283] + + Use librevenge + + +2013-09-02 Fridrich Štrba [ad3c43ffdf657043cd010c4928bc327a31cceedf] + + Historically, gradient is linear if not specified the draw:style + + (cherry picked from commit e51d9ed2b5a62bb15aa3cdd34035c619cb249265) + +2013-08-27 osnola [c31734a918f88a8b6b707082fc3e70c9199ebc14] + + Silent more warnings: mainly cppcheck warnings... (cherry picked from commit 471f80bb6fbfbd126b0ecdf2491e3e341c348622) + + Signed-off-by: osnola + +2013-08-26 Laurent Alonso [ad8a5973c2dfdbf7ece07e3a0e211bdcf6889670] + + Silence some warnings + + (cherry picked from commit 403f438066336a95a2f0ebcca452f09cf3b5add0) + Signed-off-by: Fridrich Štrba + +2013-08-26 osnola [025a60fec95b4deb8aca1658e8da7062d2454bc0] + + Correction in dash-array: when the dimensions are given with WPX_PERCENT, use the line width to compute the final dimensions. + + (cherry picked from commit 085ed5000a823f4c68953c1616f0fdb9c183a7a7) + Signed-off-by: Fridrich Štrba + +2013-08-25 Laurent Alonso [926a77c1e4dfdc9d44a14e4921614bcf0f311394] + + Changes to dash-array + + (cherry picked from commit cd463673755d96241cf408dfb5863f22dc5d22ac) + Signed-off-by: Fridrich Štrba + +2013-08-25 Laurent Alonso [98533ab0c6552606fe45aaaa1590636fee93b5d2] + + Port useful stuff from libcdr + + (cherry picked from commit 2a949eb54004956ba425c162c345e8376a55051f) + Signed-off-by: Fridrich Štrba + +2013-08-25 Laurent Alonso [0e46c9861c704021a9d2ae463acaeb8b1f135cc8] + + Port useful stuff from libmspub + + (cherry picked from commit bf104da1eaea6403b7e64cb55e9e9602fb7211d2) + Signed-off-by: Fridrich Štrba + +2013-08-23 Laurent Alonso [ce6ef0ffdfaecea47c20208041ccc14066f3dd0a] + + Extract some logic into its own function + + (cherry picked from commit 2f96abbdc0a68d8c0ebc43a51223487c3a8b6b96) + Signed-off-by: Fridrich Štrba + +2013-08-23 Fridrich Štrba [46b1aac9cb66d25551a565973a9fd1273602e1b2] + + Conditionalize the xml header for future change + + (cherry picked from commit 0f82c4ed5e177de4a478a943708f912c5acf7736) + Signed-off-by: Fridrich Štrba + +2013-08-23 Fridrich Štrba [8c4a2098c4ae43d0a271e1e6a4c5347e82308187] + + conditionalize xml namespace + + (cherry picked from commit fb07929e7b89ac5cde5c18086f244eb310a849fc) + Signed-off-by: Fridrich Štrba + +2013-08-23 Laurent Alonso [84276a5b3fc4659aef66c799dd8969263da7105d] + + Port changes from MSPUBSVGGenerator to WPGSVGGenerator + + (cherry picked from commit c18735c027da1d1147319877ecc82625fcff3182) + Signed-off-by: Fridrich Štrba + + Conflicts: + src/lib/WPGSVGGenerator.cpp + +2013-08-23 Laurent Alonso [815ab91f92541d3ad0773e3224d8d3ad2aacd0e1] + + Even more fixes for the WPGSVGGenerator + + (cherry picked from commit 96b3a4ee5fd9f5fb27fa8b88326772d12880ae27) + Signed-off-by: Fridrich Štrba + +2013-08-23 Fridrich Štrba [de6a7eb26c0e44b32e8afb1d1e15c2e9f4608894] + + Make WPGSVGGenerator able to produce an SVG per page + + (cherry picked from commit 8c690a481ce97faee5421b672a06734ae4e6c869) + Signed-off-by: Fridrich Štrba + + Conflicts: + src/lib/WPGSVGGenerator.cpp + +2013-08-22 Fridrich Štrba [553090043accb8b465ad9e915c39cf9900336615] + + astyle -b -k3 -y -n -r -t \*.cpp \*.h + + +2013-08-22 Laurent Alonso [4e95dcc06c1ce02120e70789d99678acad40e230] + + More stuff for the svg-generator class + + (cherry picked from commit 36d26ed222939c25c37f12b3711cd02c02ac42f5) + Signed-off-by: Fridrich Štrba + +2013-08-21 Fridrich Štrba [402e024b8b1ab8d6c54706941baa0e7b1a45c8e9] + + Mismatched tags + + (cherry picked from commit 9e6c8e05b6453db3a573bc0ff9d510a12060e24b) + Signed-off-by: Fridrich Štrba + +2013-08-21 Laurent Alonso [ced9cb46f3f0a655853c240f4c4473b7c226da4a] + + Miscellaneous fixes of the svg-generator class + + (cherry picked from commit f32fdbd19a47f07d6b76b2a8546ea75535625b49) + Signed-off-by: Fridrich Štrba + +2013-05-10 Fridrich Štrba [8cd6388345d0ee21c98e180035641e1e2dc5846d] + + Update/delete alternative build systems + + +2013-05-10 Fridrich Štrba [b04880bded34e6e4db6d7229a1f41b4fb2a87f68] + + libwpd already does this conversion, so don't dupplicate (cherry picked from commit c57f196ea537a9898d83806e17eb05690d892cd7) + + +2013-05-10 Fridrich Štrba [deb9f845d442066c1dda9a66e1a5ceebe8817802] + + Make Michael Stahl happy (libwpg part) (cherry picked from commit 540e6a4cf65bcbe341630dcef4bb8020888f9b31) + + Conflicts: + configure.ac + libwpg-0.2.pc.in + libwpg-0.3.pc.in + libwpg.pc.in + +2013-04-25 Fridrich Štrba [8ea1270029a79958ceeb76f01fc9bbc6702a2f3e] + + Some sane defaults for the build + + +2013-04-18 Fridrich Štrba [6f55ce4666f504b0ae3d666c98ee00e471c1161a] Fix distcheck and LO build -2013-04-18 Fridrich Štrba [78d42a7c4f45db8c14d5de78d2ca997746952643] +2013-04-18 Fridrich Štrba [f89f4adb4c996f29dbf3f6b90a39888d7189c1b8] Small fixup -2013-04-18 Fridrich Štrba [0779ca85cce5d1eebcb23935a4312496e4b41bc1] +2013-04-18 Fridrich Štrba [9cc9228cd46e1c01d3f0289724beae9e17939782] By agreement of all contributors, dual-licensing under MPL2+ and LGPL2.1+ -2013-01-18 Fridrich Štrba [6fad6ebba6fa1b3765cb0f97b4df334c4e7ac0f4] +2013-01-18 Fridrich Štrba [fdec4fe48bf96841604971374b2e0bb68f025750] Fix build with newer autotools -2012-12-16 Fridrich Štrba [307e5a89cce596a8f23b35df50e51b11fc0782bd] +2012-12-16 Fridrich Štrba [e6bcf9d0eafef7335ec17fabae54ae835a8c442f] Change some changes to project files -2012-12-16 Fridrich Štrba [1250f63bbffdef7fc14efc8fd2ac27405b45dc31] +2012-12-16 Fridrich Štrba [e9b636b6dceedc166c8ab37f080902cfa0b45b8b] These ones don't need to be executable -2012-12-16 David Tardon [33a2a90d334a747d5fbd19d18a1ec06e1075afb6] +2012-12-16 David Tardon [3e346285869ef7202b0e0c0908cf9afcbe2200d3] coverity: drop useless check for NULL before using delete Signed-off-by: Fridrich Štrba -2012-12-16 David Tardon [bec3473b25deff39f6d910c48673984170d7d275] +2012-12-16 David Tardon [ec66ff0af5bbe808f534107528aee9c4e76277d2] coverity: depth is always 1, 2, 4 or 8 here Signed-off-by: Fridrich Štrba -2012-10-06 Fridrich Štrba [bf50696797e68e844bef73611e37bb81e2ad0616] - - Small changes to the visual studio projects - - -2012-10-06 Fridrich Štrba [043e338985ec92bca52aa0f6eef3b32f050b07b5] +2012-10-06 Fridrich Štrba [770e100e61af015f793d0613269ea9d1985a369a] Some more configurability about warnings + Conflicts: + configure.ac -2012-09-14 Fridrich Štrba [f564be29f4824ad1899441b132644bbd56a9c50b] +2012-10-06 Fridrich Štrba [ca40405a9cd7a69e441b6cad4160fff8ee2ae7e8] - Specify LIBWPD_LIBDIR and LIBWPD_INCLUDES as env. variables + Small changes to the visual studio projects -2012-09-14 Fridrich Štrba [2f6f7890947f36c144df9c99338dc5a45dfb5c39] +2012-09-16 Fridrich Štrba [eaa1f776cee04ef9f40341f28f82b1314df0d295] - Bump version + Specify LIBWPD_LIBDIR and LIBWPD_INCLUDES as env. variables -2012-09-14 Fridrich Štrba [7fb0e7c6e933592c6d4d0eb4bf0e340e50b090da] +2012-09-14 Fridrich Štrba [433236e506ed2cd812ec225c40f6d59199c24ade] Dist the VS2010 files -2012-09-14 Voreppe LibreOffice Builder [5f7801e3b1e842f9ffcbeee81134f2f67a7f81ed] +2012-09-14 Voreppe LibreOffice Builder [a0a89555aeba0f60abd9ecc075e49e245f629034] Adding VS2010 project files -2012-09-14 Fridrich Štrba [64be18a905561ba9a9cea015f2f651fa13e61e60] +2012-09-14 Fridrich Štrba [a2896704d2333440d9f402074e72dd54069596b5] Dist the VS2008 files -2012-09-14 Voreppe LibreOffice Builder [43fc4f40e482d5101d23b9a91d839e4e1f19407d] +2012-09-14 Voreppe LibreOffice Builder [2dfa962fe42d1f6417cf780726ed6db7e65be532] Add VS2008 project files -2012-09-11 Fridrich Štrba [1fabf39da889c930883343796cc76ef4badcc497] +2012-09-11 Fridrich Štrba [35018ca4b63b8a882b8dfc7dc62481a58e808040] Little modification of the VS6 build -2012-09-10 Stephan Bergmann [1918d136cd063bda4b39453917ac0e3940fbbe98] +2012-09-10 Stephan Bergmann [f98c1f4308b75ccbb2b98ed8b4011b4f84e841d3] -Werror,-Wunused-private-field @@ -95,49 +458,60 @@ part is already covered by 5cf190eb365df00a1446738b3ab0d3e55291def3 "Fix clang build"). -2012-08-31 Fridrich Štrba [b99c7b7a39f7bbf64718693afb271b2321254c58] +2012-08-31 Fridrich Štrba [499768a10562aa546f5192594e572ce0dbba8453] Avoid warnings of autotools -2012-07-23 Fridrich Štrba [71de4ed1fc61714ea454d4db08dac6a1fbbb2e50] +2012-07-23 Fridrich Štrba [630ecb98adea61df3baed7b19aa8a3c7a87c8f2c] Appease automake 1.12 -2012-07-01 David Tardon [00292458bc10c680265444a6651bc280f71307ec] +2012-07-01 David Tardon [5679ab2b21ba0dadb134d5a077048b20c33674f9] coverity: avoid implicit sign extension in cast -2012-07-01 David Tardon [214670b6476fde7ae33350d5ee544af0a37e1eef] +2012-07-01 David Tardon [798dcc6e0637651c77ae5e528dcb0b4914c26b4d] coverity: protect against self-assignment -2012-07-01 David Tardon [96c80c8d560aa5be193de44352ff9bcdc5d6b30a] +2012-07-01 David Tardon [92166ae376c1901170a36fe6478c97a319f3fec1] coverity: the condition is always false -2012-04-24 Fridrich Štrba [df4eaec7c54fc2a465acfb9ed3cb23f2fe108799] +2012-06-06 Fridrich Štrba [a8aadaceefd7ceeb92f1f80303b516bf4c9f8eb3] + + fix some clang warnings + + +2012-06-06 Fridrich Štrba [8a733fb26d44626afce0aadecf8d369fd77e188e] + + Warn a bit more and have it easier in LO + + +2012-04-24 Fridrich Štrba [5cf190eb365df00a1446738b3ab0d3e55291def3] Fix clang build -2012-01-27 Fridrich Štrba [b286cf9ba51ccf40a68abfca9ad468ed346ef2bb] +2012-01-27 Fridrich Štrba [9b73338358e166d8b8011319750bcc73450f441a] Fix the buildnumber.sh script -2012-01-17 Fridrich Štrba [a88ddb88f32a180fc478197e8d33657801b9de61] +2012-01-17 Fridrich Štrba [a05f5f9fb934ab0f8497a2cba709df41c8a5fd63] Backport changes from libvisio - Conflicts: - src/lib/WPGPaintInterface.h - src/lib/WPGXParser.cpp +2011-11-29 Fridrich Štrba [0cf2508dab181614f0739353e6105d5ff710a54e] + + Some ABI/API breakage for more rich text in 0.3.x + 2011-11-24 Fridrich Štrba [fe3785782a3254ae21af8c3d698edaf34ab1cb35] diff -Nru libwpg-0.2.2/config.guess libwpg-0.3.0-rjvb/config.guess --- libwpg-0.2.2/config.guess 2013-04-18 12:55:58.000000000 +0000 +++ libwpg-0.3.0-rjvb/config.guess 2014-03-29 10:28:43.000000000 +0000 @@ -136,16 +136,6 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_MACHINE}" in - i?86) - test -z "$VENDOR" && VENDOR=pc - ;; - *) - test -z "$VENDOR" && VENDOR=unknown - ;; -esac -test -f /etc/SuSE-release -o -f /.buildenv && VENDOR=suse - # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in @@ -210,23 +200,23 @@ exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` - echo ${UNAME_MACHINE_ARCH}-${VENDOR}-bitrig${UNAME_RELEASE} + echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-${VENDOR}-openbsd${UNAME_RELEASE} + echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-ekkobsd${UNAME_RELEASE} + echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-solidbsd${UNAME_RELEASE} + echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) - echo powerpc-${VENDOR}-mirbsd${UNAME_RELEASE} + echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-mirbsd${UNAME_RELEASE} + echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in @@ -294,13 +284,13 @@ echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) - echo m68k-${VENDOR}-sysv4 + echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-amigaos + echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-morphos + echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition @@ -315,7 +305,7 @@ echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) - echo arm-${VENDOR}-riscos + echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp @@ -423,7 +413,7 @@ echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-${VENDOR}-mint${UNAME_RELEASE} + echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} @@ -734,9 +724,9 @@ exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-${VENDOR}-osf1mk + echo ${UNAME_MACHINE}-unknown-osf1mk else - echo ${UNAME_MACHINE}-${VENDOR}-osf1 + echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) @@ -796,18 +786,18 @@ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) - echo sparc-${VENDOR}-bsdi${UNAME_RELEASE} + echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-bsdi${UNAME_RELEASE} + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) - echo x86_64-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) - echo ${UNAME_PROCESSOR}-${VENDOR}-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; + echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) @@ -835,10 +825,10 @@ echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) - echo x86_64-${VENDOR}-interix${UNAME_RELEASE} + echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) - echo ia64-${VENDOR}-interix${UNAME_RELEASE} + echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) @@ -857,31 +847,31 @@ echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-${VENDOR}-cygwin + echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) - echo powerpcle-${VENDOR}-cygwin + echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) - echo powerpcle-${VENDOR}-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-${VENDOR}-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland - echo ${UNAME_MACHINE}-${VENDOR}-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -895,26 +885,26 @@ esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabi + echo ${UNAME_MACHINE}-unknown-linux-gnueabi else - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnueabihf + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-gnu @@ -923,10 +913,10 @@ echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) LIBC=gnu @@ -940,13 +930,13 @@ echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -965,54 +955,54 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-gnu"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) - echo sparc-${VENDOR}-linux-gnu + echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-${VENDOR}-linux-gnu + echo hppa64-unknown-linux-gnu exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in - PA7*) echo hppa1.1-${VENDOR}-linux-gnu ;; - PA8*) echo hppa2.0-${VENDOR}-linux-gnu ;; - *) echo hppa-${VENDOR}-linux-gnu ;; + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; esac exit ;; ppc64:Linux:*:*) - echo powerpc64-${VENDOR}-linux-gnu + echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) - echo powerpc-${VENDOR}-linux-gnu + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-gnu + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1034,16 +1024,16 @@ echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-${VENDOR}-stop + echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-atheos + echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) - echo i386-${VENODR}-lynxos${UNAME_RELEASE} + echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp @@ -1063,7 +1053,7 @@ *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac - echo ${UNAME_MACHINE}-${VENDOR}-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then @@ -1102,7 +1092,7 @@ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. - echo i860-${VENODR}-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) @@ -1139,19 +1129,19 @@ /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-${VENDOR}-lynxos${UNAME_RELEASE} + echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) - echo sparc-${VENDOR}-lynxos${UNAME_RELEASE} + echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) - echo rs6000-${VENDOR}-lynxos${UNAME_RELEASE} + echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) - echo powerpc-${VENDOR}-lynxos${UNAME_RELEASE} + echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} @@ -1201,7 +1191,7 @@ if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else - echo mips-${VENDOR}-sysv${UNAME_RELEASE} + echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. @@ -1217,7 +1207,7 @@ echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) - echo x86_64-${VENDOR}-haiku + echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} @@ -1298,13 +1288,13 @@ else UNAME_MACHINE="$cputype" fi - echo ${UNAME_MACHINE}-${VENDOR}-plan9 + echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) - echo pdp10-${VENDOR}-tops10 + echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) - echo pdp10-${VENDOR}-tenex + echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 @@ -1313,16 +1303,16 @@ echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) - echo pdp10-${VENDOR}-tops20 + echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) - echo pdp10-${VENDOR}-its + echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` @@ -1344,7 +1334,7 @@ echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-esx + echo ${UNAME_MACHINE}-unknown-esx exit ;; esac diff -Nru libwpg-0.2.2/config.sub libwpg-0.3.0-rjvb/config.sub --- libwpg-0.2.2/config.sub 2013-04-18 12:55:58.000000000 +0000 +++ libwpg-0.3.0-rjvb/config.sub 2014-03-29 10:28:43.000000000 +0000 @@ -1008,7 +1008,7 @@ ;; ppc64) basic_machine=powerpc64-unknown ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown diff -Nru libwpg-0.2.2/configure libwpg-0.3.0-rjvb/configure --- libwpg-0.2.2/configure 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/configure 2014-03-29 10:28:44.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libwpg 0.2.2. +# Generated by GNU Autoconf 2.69 for libwpg 0.3.0. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='libwpg' PACKAGE_TARNAME='libwpg' -PACKAGE_VERSION='0.2.2' -PACKAGE_STRING='libwpg 0.2.2' +PACKAGE_VERSION='0.3.0' +PACKAGE_STRING='libwpg 0.3.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -637,8 +637,6 @@ DOXYGEN OUTPUT_DUMMY_BITMAPS_FALSE OUTPUT_DUMMY_BITMAPS_TRUE -STATIC_TOOLS_FALSE -STATIC_TOOLS_TRUE DEBUG_CXXFLAGS WINDRES PLATFORM_WIN32_FALSE @@ -657,10 +655,17 @@ WPG_MAJOR_VERSION WPD_LIBS WPD_CFLAGS +BUILD_TOOLS_FALSE +BUILD_TOOLS_TRUE +REVENGE_STREAM_LIBS +REVENGE_STREAM_CFLAGS +REVENGE_GENERATORS_LIBS +REVENGE_GENERATORS_CFLAGS +REVENGE_LIBS +REVENGE_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG -AS CXXCPP OTOOL64 OTOOL @@ -669,8 +674,6 @@ DSYMUTIL MANIFEST_TOOL RANLIB -DLLTOOL -OBJDUMP NM ac_ct_DUMPBIN DUMPBIN @@ -688,6 +691,9 @@ build_cpu build LIBTOOL +OBJDUMP +DLLTOOL +AS LN_S CPP am__fastdepCC_FALSE @@ -785,18 +791,18 @@ enable_option_checking enable_silent_rules enable_dependency_tracking -enable_shared enable_static with_pic +enable_shared enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock +enable_tools enable_werror enable_weffc enable_wparanoic enable_debug -enable_static_tools with_dummy_bitmaps with_docs ' @@ -816,6 +822,12 @@ PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR +REVENGE_CFLAGS +REVENGE_LIBS +REVENGE_GENERATORS_CFLAGS +REVENGE_GENERATORS_LIBS +REVENGE_STREAM_CFLAGS +REVENGE_STREAM_LIBS WPD_CFLAGS WPD_LIBS' @@ -1358,7 +1370,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 libwpg 0.2.2 to adapt to many kinds of systems. +\`configure' configures libwpg 0.3.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1428,7 +1440,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libwpg 0.2.2:";; + short | recursive ) echo "Configuration of libwpg 0.3.0:";; esac cat <<\_ACEOF @@ -1442,18 +1454,18 @@ do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build + --enable-static[=PKGS] build static libraries [default=no] --enable-shared[=PKGS] build shared libraries [default=yes] - --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) + --disable-tools Build conversion tools --disable-werror Treat all warnings as errors, usefull for development --disable-weffc Disable -Weffc++ warnings, usefull when using an old version of gcc or of boost --enable-wparanoic Enable a lot of warnings... --enable-debug Turn on debugging - --enable-static-tools Link tools (binaries) statically Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1484,6 +1496,18 @@ directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path + REVENGE_CFLAGS + C compiler flags for REVENGE, overriding pkg-config + REVENGE_LIBS + linker flags for REVENGE, 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 WPD_CFLAGS C compiler flags for WPD, overriding pkg-config WPD_LIBS linker flags for WPD, overriding pkg-config @@ -1553,7 +1577,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libwpg configure 0.2.2 +libwpg configure 0.3.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1952,7 +1976,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libwpg $as_me 0.2.2, which was +It was created by libwpg $as_me 0.3.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2818,7 +2842,7 @@ # Define the identity of the package. PACKAGE='libwpg' - VERSION='0.2.2' + VERSION='0.3.0' cat >>confdefs.h <<_ACEOF @@ -2858,12 +2882,17 @@ # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' + +# We'll loop over all known methods to create a tar archive until one works. +_am_tools='gnutar pax cpio none' + am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' + # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; @@ -6195,9 +6224,6 @@ - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : @@ -6542,9 +6568,6 @@ - - - { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : @@ -7403,7 +7426,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -7421,7 +7444,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -7440,7 +7466,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -8445,133 +8474,445 @@ # Set options +enable_win32_dll=yes +case $host in +*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - - enable_dlopen=no - - - enable_win32_dll=no - - - # Check whether --enable-shared was given. -if test "${enable_shared+set}" = set; then : - enableval=$enable_shared; p=${PACKAGE-default} - case $enableval in - yes) enable_shared=yes ;; - no) enable_shared=no ;; - *) - enable_shared=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_shared=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 +$as_echo "$AS" >&6; } else - enable_shared=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_AS+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS - - - - - - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 +$as_echo "$ac_ct_AS" >&6; } else - enable_static=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi - - - - - - - - - -# Check whether --with-pic was given. -if test "${with_pic+set}" = set; then : - withval=$with_pic; lt_p=${PACKAGE-default} - case $withval in - yes|no) pic_mode=$withval ;; - *) - pic_mode=default - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for lt_pkg in $withval; do - IFS="$lt_save_ifs" - if test "X$lt_pkg" = "X$lt_p"; then - pic_mode=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac + if test "x$ac_ct_AS" = x; then + AS="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + AS=$ac_ct_AS + fi else - pic_mode=default + AS="$ac_cv_prog_AS" fi + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS -test -z "$pic_mode" && pic_mode=default - - - - - - - - # Check whether --enable-fast-install was given. -if test "${enable_fast_install+set}" = set; then : - enableval=$enable_fast_install; p=${PACKAGE-default} - case $enableval in - yes) enable_fast_install=yes ;; - no) enable_fast_install=no ;; - *) - enable_fast_install=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_fast_install=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 +$as_echo "$DLLTOOL" >&6; } else - enable_fast_install=yes + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } fi +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 +$as_echo "$ac_ct_DLLTOOL" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_DLLTOOL" = x; then + DLLTOOL="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + DLLTOOL=$ac_ct_DLLTOOL + fi +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 +$as_echo "$OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 +$as_echo "$ac_ct_OBJDUMP" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + if test "x$ac_ct_OBJDUMP" = x; then + OBJDUMP="false" + else + case $cross_compiling:$ac_tool_warned in +yes:) +{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 +$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} +ac_tool_warned=yes ;; +esac + OBJDUMP=$ac_ct_OBJDUMP + fi +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; +esac + +test -z "$AS" && AS=as + + + + + +test -z "$DLLTOOL" && DLLTOOL=dlltool + + + + + +test -z "$OBJDUMP" && OBJDUMP=objdump + + + + +# Check whether --enable-static was given. +if test "${enable_static+set}" = set; then : + enableval=$enable_static; p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=no +fi + + + + + + + + +# Check whether --with-pic was given. +if test "${with_pic+set}" = set; then : + withval=$with_pic; lt_p=${PACKAGE-default} + case $withval in + yes|no) pic_mode=$withval ;; + *) + pic_mode=default + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for lt_pkg in $withval; do + IFS="$lt_save_ifs" + if test "X$lt_pkg" = "X$lt_p"; then + pic_mode=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + pic_mode=default +fi + + +test -z "$pic_mode" && pic_mode=yes + + + + + + + + + enable_dlopen=no + + + + # Check whether --enable-shared was given. +if test "${enable_shared+set}" = set; then : + enableval=$enable_shared; p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi + + + + + + + + + + + + # Check whether --enable-fast-install was given. +if test "${enable_fast_install+set}" = set; then : + enableval=$enable_fast_install; p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi + + + + + + + + + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ltmain" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + + @@ -8579,22 +8920,6 @@ - - -# This can be used to rebuild libtool when needed -LIBTOOL_DEPS="$ltmain" - -# Always use our own libtool. -LIBTOOL='$(SHELL) $(top_builddir)/libtool' - - - - - - - - - @@ -11463,10 +11788,14 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15294,10 +15623,14 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi # We used to test for /lib/ld.so.1 and disable shared libraries on @@ -15636,213 +15969,37 @@ # Only expand once: -enable_win32_dll=yes - -case $host in -*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. -set dummy ${ac_tool_prefix}as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$AS"; then - ac_cv_prog_AS="$AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_AS="${ac_tool_prefix}as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -AS=$ac_cv_prog_AS -if test -n "$AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 -$as_echo "$AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_AS"; then - ac_ct_AS=$AS - # Extract the first word of "as", so it can be a program name with args. -set dummy as; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_AS+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_AS"; then - ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_AS="as" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_AS=$ac_cv_prog_ac_ct_AS -if test -n "$ac_ct_AS"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 -$as_echo "$ac_ct_AS" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_AS" = x; then - AS="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - AS=$ac_ct_AS - fi -else - AS="$ac_cv_prog_AS" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. -set dummy ${ac_tool_prefix}dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$DLLTOOL"; then - ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -DLLTOOL=$ac_cv_prog_DLLTOOL -if test -n "$DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 -$as_echo "$DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$ac_cv_prog_DLLTOOL"; then - ac_ct_DLLTOOL=$DLLTOOL - # Extract the first word of "dlltool", so it can be a program name with args. -set dummy dlltool; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_DLLTOOL"; then - ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_DLLTOOL="dlltool" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL -if test -n "$ac_ct_DLLTOOL"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 -$as_echo "$ac_ct_DLLTOOL" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - if test "x$ac_ct_DLLTOOL" = x; then - DLLTOOL="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - DLLTOOL=$ac_ct_DLLTOOL - fi -else - DLLTOOL="$ac_cv_prog_DLLTOOL" -fi - - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. -set dummy ${ac_tool_prefix}objdump; ac_word=$2 + + + + + + + + + +if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. +set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_OBJDUMP+:} false; then : +if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$OBJDUMP"; then - ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -15850,12 +16007,13 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -OBJDUMP=$ac_cv_prog_OBJDUMP -if test -n "$OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 -$as_echo "$OBJDUMP" >&6; } +PKG_CONFIG=$ac_cv_path_PKG_CONFIG +if test -n "$PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 +$as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } @@ -15863,26 +16021,28 @@ fi -if test -z "$ac_cv_prog_OBJDUMP"; then - ac_ct_OBJDUMP=$OBJDUMP - # Extract the first word of "objdump", so it can be a program name with args. -set dummy objdump; ac_word=$2 +if test -z "$ac_cv_path_PKG_CONFIG"; then + ac_pt_PKG_CONFIG=$PKG_CONFIG + # Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : +if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_OBJDUMP"; then - ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR + case $ac_pt_PKG_CONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_ac_ct_OBJDUMP="objdump" + ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -15890,19 +16050,20 @@ done IFS=$as_save_IFS + ;; +esac fi -fi -ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP -if test -n "$ac_ct_OBJDUMP"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 -$as_echo "$ac_ct_OBJDUMP" >&6; } +ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG +if test -n "$ac_pt_PKG_CONFIG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 +$as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_OBJDUMP" = x; then - OBJDUMP="false" + if test "x$ac_pt_PKG_CONFIG" = x; then + PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) @@ -15910,153 +16071,391 @@ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - OBJDUMP=$ac_ct_OBJDUMP + PKG_CONFIG=$ac_pt_PKG_CONFIG fi else - OBJDUMP="$ac_cv_prog_OBJDUMP" + PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi - ;; -esac +fi +if test -n "$PKG_CONFIG"; then + _pkg_min_version=0.20 + { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 +$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } + if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 +$as_echo "yes" >&6; } + else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } + PKG_CONFIG="" + fi +fi -test -z "$AS" && AS=as +# =============== +# Find librevenge +# =============== + +pkg_failed=no +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for REVENGE" >&5 +$as_echo_n "checking for REVENGE... " >&6; } + +if test -n "$REVENGE_CFLAGS"; then + pkg_cv_REVENGE_CFLAGS="$REVENGE_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" + librevenge-0.0 +\""; } >&5 + ($PKG_CONFIG --exists --print-errors " + librevenge-0.0 +") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_REVENGE_CFLAGS=`$PKG_CONFIG --cflags " + librevenge-0.0 +" 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$REVENGE_LIBS"; then + pkg_cv_REVENGE_LIBS="$REVENGE_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" + librevenge-0.0 +\""; } >&5 + ($PKG_CONFIG --exists --print-errors " + librevenge-0.0 +") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_REVENGE_LIBS=`$PKG_CONFIG --libs " + librevenge-0.0 +" 2>/dev/null` + 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_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " + librevenge-0.0 +" 2>&1` + else + REVENGE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " + librevenge-0.0 +" 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$REVENGE_PKG_ERRORS" >&5 + + as_fn_error $? "Package requirements ( + librevenge-0.0 +) were not met: + +$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 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 +$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_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 + 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; } + +fi + + + +# ===== +# Tools +# ===== +# Check whether --enable-tools was given. +if test "${enable_tools+set}" = set; then : + enableval=$enable_tools; enable_tools="$enableval" +else + enable_tools=yes + +fi + +if test "x$enable_tools" = "xyes"; then : + + +pkg_failed=no +{ $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. -test -z "$DLLTOOL" && DLLTOOL=dlltool +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 -test -z "$OBJDUMP" && OBJDUMP=objdump +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 "$REVENGE_STREAM_CFLAGS"; then + pkg_cv_REVENGE_STREAM_CFLAGS="$REVENGE_STREAM_CFLAGS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" + librevenge-stream-0.0 + \""; } >&5 + ($PKG_CONFIG --exists --print-errors " + librevenge-stream-0.0 + ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_REVENGE_STREAM_CFLAGS=`$PKG_CONFIG --cflags " + librevenge-stream-0.0 + " 2>/dev/null` + test "x$?" != "x0" && pkg_failed=yes +else + pkg_failed=yes +fi + else + pkg_failed=untried +fi +if test -n "$REVENGE_STREAM_LIBS"; then + pkg_cv_REVENGE_STREAM_LIBS="$REVENGE_STREAM_LIBS" + elif test -n "$PKG_CONFIG"; then + if test -n "$PKG_CONFIG" && \ + { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" + librevenge-stream-0.0 + \""; } >&5 + ($PKG_CONFIG --exists --print-errors " + librevenge-stream-0.0 + ") 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; then + pkg_cv_REVENGE_STREAM_LIBS=`$PKG_CONFIG --libs " + librevenge-stream-0.0 + " 2>/dev/null` + 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_STREAM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " + librevenge-stream-0.0 + " 2>&1` + else + REVENGE_STREAM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " + librevenge-stream-0.0 + " 2>&1` + fi + # Put the nasty error message in config.log where it belongs + echo "$REVENGE_STREAM_PKG_ERRORS" >&5 + as_fn_error $? "Package requirements ( + librevenge-stream-0.0 + ) were not met: +$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 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 +$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_STREAM_CFLAGS +and REVENGE_STREAM_LIBS to avoid the need to call pkg-config. +See the pkg-config man page for more details. -if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. -set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS + 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; } - ;; -esac fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG -if test -n "$PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 -$as_echo "$PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } + fi -fi -if test -z "$ac_cv_path_PKG_CONFIG"; then - ac_pt_PKG_CONFIG=$PKG_CONFIG - # Extract the first word of "pkg-config", so it can be a program name with args. -set dummy pkg-config; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : - $as_echo_n "(cached) " >&6 -else - case $ac_pt_PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - ;; -esac -fi -ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG -if test -n "$ac_pt_PKG_CONFIG"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 -$as_echo "$ac_pt_PKG_CONFIG" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - if test "x$ac_pt_PKG_CONFIG" = x; then - PKG_CONFIG="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 -$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} -ac_tool_warned=yes ;; -esac - PKG_CONFIG=$ac_pt_PKG_CONFIG - fi + if test "x$enable_tools" = "xyes"; then + BUILD_TOOLS_TRUE= + BUILD_TOOLS_FALSE='#' else - PKG_CONFIG="$ac_cv_path_PKG_CONFIG" + BUILD_TOOLS_TRUE='#' + BUILD_TOOLS_FALSE= fi -fi -if test -n "$PKG_CONFIG"; then - _pkg_min_version=0.20 - { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 -$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } - if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 -$as_echo "yes" >&6; } - else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } - PKG_CONFIG="" - fi -fi -# ==================== -# Find additional apps -# ==================== +# =========== +# Find libwpd +# =========== pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WPD" >&5 @@ -16067,19 +16466,16 @@ 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 - libwpd-stream-0.9 + libwpd-0.10 \""; } >&5 ($PKG_CONFIG --exists --print-errors " - libwpd-0.9 - libwpd-stream-0.9 + libwpd-0.10 ") 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 - libwpd-stream-0.9 + libwpd-0.10 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else @@ -16093,19 +16489,16 @@ 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 - libwpd-stream-0.9 + libwpd-0.10 \""; } >&5 ($PKG_CONFIG --exists --print-errors " - libwpd-0.9 - libwpd-stream-0.9 + libwpd-0.10 ") 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 - libwpd-stream-0.9 + libwpd-0.10 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else @@ -16128,21 +16521,18 @@ fi if test $_pkg_short_errors_supported = yes; then WPD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " - libwpd-0.9 - libwpd-stream-0.9 + libwpd-0.10 " 2>&1` else WPD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " - libwpd-0.9 - libwpd-stream-0.9 + libwpd-0.10 " 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$WPD_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ( - libwpd-0.9 - libwpd-stream-0.9 + libwpd-0.10 ) were not met: $WPD_PKG_ERRORS @@ -16183,19 +16573,19 @@ # ================================= WPG_MAJOR_VERSION=0 -WPG_MINOR_VERSION=2 +WPG_MINOR_VERSION=3 -WPG_MICRO_VERSION=2 +WPG_MICRO_VERSION=0 -WPG_VERSION=0.2.2 +WPG_VERSION=0.3.0 # AC_SUBST(LT_RELEASE, [libwpg_version_major.libwpg_version_minor]) -LT_CURRENT=`expr 100 '*' 0 + 2` +LT_CURRENT=`expr 100 '*' 0 + 3` # For 1.0.0 comment the first line and uncomment the second LT_AGE=0 # LT_AGE=libwpg_version_minor -LT_REVISION=2 +LT_REVISION=0 @@ -16415,15 +16805,15 @@ fi fi - CFLAGS="$CFLAGS -Wall -pedantic" - CXXFLAGS="$CXXFLAGS -Wall -pedantic" + CFLAGS="$CFLAGS -Wall -Wextra -pedantic" + CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wshadow -pedantic" else if test x"$GCC" = xyes; then : # Be tough with warnings and produce less careless code - CFLAGS="$CFLAGS -Wall -pedantic" + CFLAGS="$CFLAGS -Wall -Wextra -pedantic" CXXFLAGS="$CXXFLAGS -Wall -Wextra -pedantic -Wshadow -Wunused-variable" if test x"$enable_weffc" != "xno"; then : @@ -16477,62 +16867,6 @@ fi -# ============ -# Static tools -# ============ -# Check whether --enable-static-tools was given. -if test "${enable_static_tools+set}" = set; then : - enableval=$enable_static_tools; enable_static_tools="$enableval" -else - enable_static_tools=no - -fi - -if test "x$enable_static_tools" = "xyes"; then : - - enable_static="yes" - -else - - # Check whether --enable-static was given. -if test "${enable_static+set}" = set; then : - enableval=$enable_static; p=${PACKAGE-default} - case $enableval in - yes) enable_static=yes ;; - no) enable_static=no ;; - *) - enable_static=no - # Look at the argument we got. We use all the common list separators. - lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," - for pkg in $enableval; do - IFS="$lt_save_ifs" - if test "X$pkg" = "X$p"; then - enable_static=yes - fi - done - IFS="$lt_save_ifs" - ;; - esac -else - enable_static=no -fi - - - - - - - -fi - if test "x$enable_static_tools" = "xyes"; then - STATIC_TOOLS_TRUE= - STATIC_TOOLS_FALSE='#' -else - STATIC_TOOLS_TRUE='#' - STATIC_TOOLS_FALSE= -fi - - # ============= # Dummy bitmaps # ============= @@ -16639,7 +16973,7 @@ # ===================== # Prepare all .in files # ===================== -ac_config_files="$ac_config_files Makefile src/Makefile src/conv/Makefile src/conv/raw/Makefile src/conv/raw/wpg2raw.rc src/conv/svg/Makefile src/conv/svg/wpg2svg.rc src/lib/Makefile src/lib/libwpg.h src/lib/libwpg.rc build/Makefile build/win32/Makefile docs/Makefile docs/doxygen/Makefile libwpg-0.2.pc libwpg.spec libwpg-zip" +ac_config_files="$ac_config_files Makefile src/Makefile src/conv/Makefile src/conv/raw/Makefile src/conv/raw/wpg2raw.rc src/conv/svg/Makefile src/conv/svg/wpg2svg.rc src/lib/Makefile src/lib/libwpg.rc inc/Makefile inc/libwpg/Makefile build/Makefile build/win32/Makefile docs/Makefile docs/doxygen/Makefile libwpg-$WPG_MAJOR_VERSION.$WPG_MINOR_VERSION.pc:libwpg.pc.in libwpg.spec libwpg-zip" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -16782,6 +17116,10 @@ as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi +if test -z "${BUILD_TOOLS_TRUE}" && test -z "${BUILD_TOOLS_FALSE}"; then + as_fn_error $? "conditional \"BUILD_TOOLS\" was never defined. +Usually this means the macro was only invoked conditionally." "$LINENO" 5 +fi if test -z "${OS_WIN32_TRUE}" && test -z "${OS_WIN32_FALSE}"; then as_fn_error $? "conditional \"OS_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -16790,10 +17128,6 @@ as_fn_error $? "conditional \"PLATFORM_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${STATIC_TOOLS_TRUE}" && test -z "${STATIC_TOOLS_FALSE}"; then - as_fn_error $? "conditional \"STATIC_TOOLS\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${OUTPUT_DUMMY_BITMAPS_TRUE}" && test -z "${OUTPUT_DUMMY_BITMAPS_FALSE}"; then as_fn_error $? "conditional \"OUTPUT_DUMMY_BITMAPS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -17199,7 +17533,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libwpg $as_me 0.2.2, which was +This file was extended by libwpg $as_me 0.3.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -17265,7 +17599,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libwpg config.status 0.2.2 +libwpg config.status 0.3.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -17396,9 +17730,12 @@ delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' -enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' +AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' +DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' +OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' +enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' @@ -17427,12 +17764,10 @@ lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' -OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' -DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' @@ -17530,7 +17865,6 @@ predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' -AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' @@ -17593,7 +17927,10 @@ } # Quote evaled strings. -for var in SHELL \ +for var in AS \ +DLLTOOL \ +OBJDUMP \ +SHELL \ ECHO \ PATH_SEPARATOR \ SED \ @@ -17606,12 +17943,10 @@ lt_SP2NL \ lt_NL2SP \ reload_flag \ -OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ -DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ @@ -17664,7 +17999,6 @@ predeps \ postdeps \ compiler_lib_search_path \ -AS \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ @@ -17782,13 +18116,14 @@ "src/conv/svg/Makefile") CONFIG_FILES="$CONFIG_FILES src/conv/svg/Makefile" ;; "src/conv/svg/wpg2svg.rc") CONFIG_FILES="$CONFIG_FILES src/conv/svg/wpg2svg.rc" ;; "src/lib/Makefile") CONFIG_FILES="$CONFIG_FILES src/lib/Makefile" ;; - "src/lib/libwpg.h") CONFIG_FILES="$CONFIG_FILES src/lib/libwpg.h" ;; "src/lib/libwpg.rc") CONFIG_FILES="$CONFIG_FILES src/lib/libwpg.rc" ;; + "inc/Makefile") CONFIG_FILES="$CONFIG_FILES inc/Makefile" ;; + "inc/libwpg/Makefile") CONFIG_FILES="$CONFIG_FILES inc/libwpg/Makefile" ;; "build/Makefile") CONFIG_FILES="$CONFIG_FILES build/Makefile" ;; "build/win32/Makefile") CONFIG_FILES="$CONFIG_FILES build/win32/Makefile" ;; "docs/Makefile") CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; "docs/doxygen/Makefile") CONFIG_FILES="$CONFIG_FILES docs/doxygen/Makefile" ;; - "libwpg-0.2.pc") CONFIG_FILES="$CONFIG_FILES libwpg-0.2.pc" ;; + "libwpg-$WPG_MAJOR_VERSION.$WPG_MINOR_VERSION.pc") CONFIG_FILES="$CONFIG_FILES libwpg-$WPG_MAJOR_VERSION.$WPG_MINOR_VERSION.pc:libwpg.pc.in" ;; "libwpg.spec") CONFIG_FILES="$CONFIG_FILES libwpg.spec" ;; "libwpg-zip") CONFIG_FILES="$CONFIG_FILES libwpg-zip" ;; @@ -18438,7 +18773,7 @@ DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue + test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the @@ -18537,8 +18872,14 @@ macro_version=$macro_version macro_revision=$macro_revision -# Whether or not to build shared libraries. -build_libtool_libs=$enable_shared +# Assembler program. +AS=$lt_AS + +# DLL creation program. +DLLTOOL=$lt_DLLTOOL + +# Object dumper program. +OBJDUMP=$lt_OBJDUMP # Whether or not to build static libraries. build_old_libs=$enable_static @@ -18546,6 +18887,9 @@ # What type of objects to build. pic_mode=$pic_mode +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + # Whether or not to optimize for fast installation. fast_install=$enable_fast_install @@ -18613,9 +18957,6 @@ # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd -# An object symbol dumper. -OBJDUMP=$lt_OBJDUMP - # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method @@ -18628,9 +18969,6 @@ # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob -# DLL creation program. -DLLTOOL=$lt_DLLTOOL - # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd @@ -18784,9 +19122,6 @@ old_striplib=$lt_old_striplib striplib=$lt_striplib -# Assembler program. -AS=$lt_AS - # The linker used to build libraries. LD=$lt_LD @@ -19327,7 +19662,7 @@ debug: ${enable_debug} docs: ${build_docs} dummy-bitmaps: ${with_dummy_bitmaps} - static-tools: ${enable_static_tools} + tools: ${enable_tools} werror: ${enable_werror} ============================================================================== " >&5 @@ -19337,7 +19672,7 @@ debug: ${enable_debug} docs: ${build_docs} dummy-bitmaps: ${with_dummy_bitmaps} - static-tools: ${enable_static_tools} + tools: ${enable_tools} werror: ${enable_werror} ============================================================================== " >&6;} diff -Nru libwpg-0.2.2/configure.ac libwpg-0.3.0-rjvb/configure.ac --- libwpg-0.2.2/configure.ac 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/configure.ac 2014-03-29 10:19:42.000000000 +0000 @@ -6,8 +6,8 @@ # Version informations # ==================== m4_define([libwpg_version_major],[0]) -m4_define([libwpg_version_minor],[2]) -m4_define([libwpg_version_micro],[2]) +m4_define([libwpg_version_minor],[3]) +m4_define([libwpg_version_micro],[0]) m4_define([libwpg_version],[libwpg_version_major.libwpg_version_minor.libwpg_version_micro]) # ============= @@ -30,16 +30,47 @@ AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET -AC_PROG_LIBTOOL -AC_LIBTOOL_WIN32_DLL +LT_INIT([win32-dll disable-static pic-only]) +AC_CANONICAL_HOST + PKG_PROG_PKG_CONFIG([0.20]) -# ==================== -# Find additional apps -# ==================== +# =============== +# Find librevenge +# =============== +PKG_CHECK_MODULES([REVENGE],[ + librevenge-0.0 +]) +AC_SUBST([REVENGE_CFLAGS]) +AC_SUBST([REVENGE_LIBS]) + +# ===== +# Tools +# ===== +AC_ARG_ENABLE([tools], + [AS_HELP_STRING([--disable-tools], [Build conversion tools])], + [enable_tools="$enableval"], + [enable_tools=yes] +) +AS_IF([test "x$enable_tools" = "xyes"], [ + PKG_CHECK_MODULES([REVENGE_GENERATORS],[ + librevenge-generators-0.0 + ]) + PKG_CHECK_MODULES([REVENGE_STREAM],[ + librevenge-stream-0.0 + ]) +]) +AC_SUBST([REVENGE_GENERATORS_CFLAGS]) +AC_SUBST([REVENGE_GENERATORS_LIBS]) +AC_SUBST([REVENGE_STREAM_CFLAGS]) +AC_SUBST([REVENGE_STREAM_LIBS]) +AM_CONDITIONAL(BUILD_TOOLS, [test "x$enable_tools" = "xyes"]) + +# =========== +# Find libwpd +# =========== PKG_CHECK_MODULES([WPD],[ - libwpd-0.9 - libwpd-stream-0.9 + libwpd-0.10 ]) AC_SUBST(WPD_LIBS) AC_SUBST(WPD_CFLAGS) @@ -134,12 +165,12 @@ AC_MSG_WARN([produced libraries might be incompatible with MSVC-compiled code]) ]) ]) - CFLAGS="$CFLAGS -Wall -pedantic" - CXXFLAGS="$CXXFLAGS -Wall -pedantic" + CFLAGS="$CFLAGS -Wall -Wextra -pedantic" + CXXFLAGS="$CXXFLAGS -Wall -Wextra -Wshadow -pedantic" ], [ AS_IF([test x"$GCC" = xyes], [ # Be tough with warnings and produce less careless code - CFLAGS="$CFLAGS -Wall -pedantic" + CFLAGS="$CFLAGS -Wall -Wextra -pedantic" CXXFLAGS="$CXXFLAGS -Wall -Wextra -pedantic -Wshadow -Wunused-variable" AS_IF([test x"$enable_weffc" != "xno"], [ CXXFLAGS="$CXXFLAGS -Weffc++" @@ -180,21 +211,6 @@ ]) AC_SUBST(DEBUG_CXXFLAGS) -# ============ -# Static tools -# ============ -AC_ARG_ENABLE([static-tools], - [AS_HELP_STRING([--enable-static-tools], [Link tools (binaries) statically])], - [enable_static_tools="$enableval"], - [enable_static_tools=no] -) -AS_IF([test "x$enable_static_tools" = "xyes"], [ - enable_static="yes" -], [ - AC_DISABLE_STATIC -]) -AM_CONDITIONAL(STATIC_TOOLS, [test "x$enable_static_tools" = "xyes"]) - # ============= # Dummy bitmaps # ============= @@ -236,13 +252,14 @@ src/conv/svg/Makefile src/conv/svg/wpg2svg.rc src/lib/Makefile -src/lib/libwpg.h src/lib/libwpg.rc +inc/Makefile +inc/libwpg/Makefile build/Makefile build/win32/Makefile docs/Makefile docs/doxygen/Makefile -libwpg-0.2.pc +libwpg-$WPG_MAJOR_VERSION.$WPG_MINOR_VERSION.pc:libwpg.pc.in libwpg.spec libwpg-zip ]) @@ -257,7 +274,7 @@ debug: ${enable_debug} docs: ${build_docs} dummy-bitmaps: ${with_dummy_bitmaps} - static-tools: ${enable_static_tools} + tools: ${enable_tools} werror: ${enable_werror} ============================================================================== ]) diff -Nru libwpg-0.2.2/debian/changelog libwpg-0.3.0-rjvb/debian/changelog --- libwpg-0.2.2/debian/changelog 2013-12-22 11:26:05.000000000 +0000 +++ libwpg-0.3.0-rjvb/debian/changelog 2014-06-29 23:11:32.000000000 +0000 @@ -1,3 +1,9 @@ +libwpg (0.3.0-rjvb-ppa2) trusty; urgency=medium + + * new upstream release + + -- RJVB Mon, 30 Jun 2014 00:52:14 +0200 + libwpg (0.2.2-1ubuntu1) trusty; urgency=medium * Build using dh-autoreconf. diff -Nru libwpg-0.2.2/debian/control libwpg-0.3.0-rjvb/debian/control --- libwpg-0.2.2/debian/control 2013-12-22 11:26:17.000000000 +0000 +++ libwpg-0.3.0-rjvb/debian/control 2014-06-29 23:11:21.000000000 +0000 @@ -1,14 +1,14 @@ Source: libwpg Priority: optional Maintainer: Rene Engelhard -Build-Depends: debhelper (>= 5), libwpd-dev (>= 0.9.0), doxygen, pkg-config, dh-autoreconf +Build-Depends: debhelper (>= 5), libwpd-0.10-dev (>= 0.9.0), doxygen, pkg-config, dh-autoreconf, librevenge-dev, clang Standards-Version: 3.7.2 Section: libs -Package: libwpg-dev +Package: libwpg-0.3-dev Section: libdevel Architecture: any -Depends: libwpg-0.2-2 (= ${binary:Version}), libwpd-dev, ${misc:Depends} +Depends: libwpg-0.3-0 (= ${binary:Version}), libwpd-dev, ${misc:Depends} Description: WordPerfect graphics import/convert library (development) Libwpg is a collection of library and tools to work with graphics in WPG (WordPerfect Graphics) format. WPG is the format used among others in Corel @@ -17,7 +17,7 @@ This package contains the files needed for developing applications using libwpg. -Package: libwpg-0.2-2 +Package: libwpg-0.3-0 Section: libs Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} diff -Nru libwpg-0.2.2/debian/libwpg-0.2-2.install libwpg-0.3.0-rjvb/debian/libwpg-0.2-2.install --- libwpg-0.2.2/debian/libwpg-0.2-2.install 2010-11-16 18:04:58.000000000 +0000 +++ libwpg-0.3.0-rjvb/debian/libwpg-0.2-2.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/libwpg*.so.* diff -Nru libwpg-0.2.2/debian/libwpg-0.3-0.install libwpg-0.3.0-rjvb/debian/libwpg-0.3-0.install --- libwpg-0.2.2/debian/libwpg-0.3-0.install 1970-01-01 00:00:00.000000000 +0000 +++ libwpg-0.3.0-rjvb/debian/libwpg-0.3-0.install 2010-11-16 18:04:58.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/libwpg*.so.* diff -Nru libwpg-0.2.2/debian/libwpg-0.3-dev.dirs libwpg-0.3.0-rjvb/debian/libwpg-0.3-dev.dirs --- libwpg-0.2.2/debian/libwpg-0.3-dev.dirs 1970-01-01 00:00:00.000000000 +0000 +++ libwpg-0.3.0-rjvb/debian/libwpg-0.3-dev.dirs 2010-11-16 18:04:58.000000000 +0000 @@ -0,0 +1,2 @@ +usr/lib +usr/include diff -Nru libwpg-0.2.2/debian/libwpg-0.3-dev.install libwpg-0.3.0-rjvb/debian/libwpg-0.3-dev.install --- libwpg-0.2.2/debian/libwpg-0.3-dev.install 1970-01-01 00:00:00.000000000 +0000 +++ libwpg-0.3.0-rjvb/debian/libwpg-0.3-dev.install 2010-11-16 18:28:53.000000000 +0000 @@ -0,0 +1,4 @@ +usr/include/* +usr/lib/lib*.a +usr/lib/lib*.so +usr/lib/pkgconfig/* diff -Nru libwpg-0.2.2/debian/libwpg-dev.dirs libwpg-0.3.0-rjvb/debian/libwpg-dev.dirs --- libwpg-0.2.2/debian/libwpg-dev.dirs 2010-11-16 18:04:58.000000000 +0000 +++ libwpg-0.3.0-rjvb/debian/libwpg-dev.dirs 1970-01-01 00:00:00.000000000 +0000 @@ -1,2 +0,0 @@ -usr/lib -usr/include diff -Nru libwpg-0.2.2/debian/libwpg-dev.install libwpg-0.3.0-rjvb/debian/libwpg-dev.install --- libwpg-0.2.2/debian/libwpg-dev.install 2010-11-16 18:28:53.000000000 +0000 +++ libwpg-0.3.0-rjvb/debian/libwpg-dev.install 1970-01-01 00:00:00.000000000 +0000 @@ -1,4 +0,0 @@ -usr/include/* -usr/lib/lib*.a -usr/lib/lib*.so -usr/lib/pkgconfig/* diff -Nru libwpg-0.2.2/debian/rules libwpg-0.3.0-rjvb/debian/rules --- libwpg-0.2.2/debian/rules 2013-12-22 11:25:38.000000000 +0000 +++ libwpg-0.3.0-rjvb/debian/rules 2014-06-29 22:55:26.000000000 +0000 @@ -7,15 +7,17 @@ # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. -#export DH_VERBOSE=1 +export DH_VERBOSE=1 CFLAGS = -Wall -g ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) CFLAGS += -O0 else - CFLAGS += -O2 + CFLAGS += -O3 -march=amdfam10 -fvectorize endif +export CC=clang +export CXX=clang++ # shared library versions, option 1 #version=2.0.5 diff -Nru libwpg-0.2.2/depcomp libwpg-0.3.0-rjvb/depcomp --- libwpg-0.2.2/depcomp 2013-04-18 12:55:58.000000000 +0000 +++ libwpg-0.3.0-rjvb/depcomp 2014-03-29 10:28:44.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # depcomp - compile a program generating dependencies as side-effects -scriptversion=2012-10-18.11; # UTC +scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. @@ -552,6 +552,7 @@ G p }' >> "$depfile" + echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; diff -Nru libwpg-0.2.2/docs/doxygen/Makefile.in libwpg-0.3.0-rjvb/docs/doxygen/Makefile.in --- libwpg-0.2.2/docs/doxygen/Makefile.in 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/docs/doxygen/Makefile.in 2014-03-29 10:28:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ esac; \ - test $$am__dry = yes; \ - } + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -154,6 +182,12 @@ 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@ diff -Nru libwpg-0.2.2/docs/Makefile.in libwpg-0.3.0-rjvb/docs/Makefile.in --- libwpg-0.2.2/docs/Makefile.in 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/docs/Makefile.in 2014-03-29 10:28:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ esac; \ - test $$am__dry = yes; \ - } + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -214,6 +242,12 @@ 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@ @@ -329,13 +363,12 @@ # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ diff -Nru libwpg-0.2.2/inc/libwpg/libwpg.h libwpg-0.3.0-rjvb/inc/libwpg/libwpg.h --- libwpg-0.2.2/inc/libwpg/libwpg.h 1970-01-01 00:00:00.000000000 +0000 +++ libwpg-0.3.0-rjvb/inc/libwpg/libwpg.h 2014-03-29 10:19:42.000000000 +0000 @@ -0,0 +1,33 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* libwpg + * Version: MPL 2.0 / LGPLv2.1+ + * + * 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/. + * + * Major Contributor(s): + * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) + * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl) + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms + * of the GNU Lesser General Public License Version 2.1 or later + * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are + * applicable instead of those above. + * + * For further information visit http://libwpg.sourceforge.net + */ + +/* "This product is not manufactured, approved, or supported by + * Corel Corporation or Corel Corporation Limited." + */ + +#ifndef __LIBWPG_H__ +#define __LIBWPG_H__ + +#include "WPGraphics.h" + +#endif +/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/inc/libwpg/Makefile.am libwpg-0.3.0-rjvb/inc/libwpg/Makefile.am --- libwpg-0.2.2/inc/libwpg/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libwpg-0.3.0-rjvb/inc/libwpg/Makefile.am 2014-03-29 10:19:42.000000000 +0000 @@ -0,0 +1,3 @@ +EXTRA_DIST = \ + libwpg.h \ + WPGraphics.h diff -Nru libwpg-0.2.2/inc/libwpg/Makefile.in libwpg-0.3.0-rjvb/inc/libwpg/Makefile.in --- libwpg-0.2.2/inc/libwpg/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ libwpg-0.3.0-rjvb/inc/libwpg/Makefile.in 2014-03-29 10:28:44.000000000 +0000 @@ -0,0 +1,455 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = inc/libwpg +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUG_CXXFLAGS = @DEBUG_CXXFLAGS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBWPG_WIN32_RESOURCE = @LIBWPG_WIN32_RESOURCE@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_REVISION = @LT_REVISION@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +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@ +WPG2RAW_WIN32_RESOURCE = @WPG2RAW_WIN32_RESOURCE@ +WPG2SVG_WIN32_RESOURCE = @WPG2SVG_WIN32_RESOURCE@ +WPG_MAJOR_VERSION = @WPG_MAJOR_VERSION@ +WPG_MICRO_VERSION = @WPG_MICRO_VERSION@ +WPG_MINOR_VERSION = @WPG_MINOR_VERSION@ +WPG_VERSION = @WPG_VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +EXTRA_DIST = \ + libwpg.h \ + WPGraphics.h + +all: all-am + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign inc/libwpg/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign inc/libwpg/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs +tags TAGS: + +ctags CTAGS: + +cscope cscopelist: + + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile +installdirs: +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + -rm -f Makefile +distclean-am: clean-am distclean-generic + +dvi: dvi-am + +dvi-am: + +html: html-am + +html-am: + +info: info-am + +info-am: + +install-data-am: + +install-dvi: install-dvi-am + +install-dvi-am: + +install-exec-am: + +install-html: install-html-am + +install-html-am: + +install-info: install-info-am + +install-info-am: + +install-man: + +install-pdf: install-pdf-am + +install-pdf-am: + +install-ps: install-ps-am + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-am + +pdf-am: + +ps: ps-am + +ps-am: + +uninstall-am: + +.MAKE: install-am install-strip + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + cscopelist-am ctags-am distclean distclean-generic \ + distclean-libtool distdir dvi dvi-am html html-am info info-am \ + 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 \ + maintainer-clean maintainer-clean-generic mostlyclean \ + mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ + tags-am uninstall uninstall-am + + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru libwpg-0.2.2/inc/libwpg/WPGraphics.h libwpg-0.3.0-rjvb/inc/libwpg/WPGraphics.h --- libwpg-0.2.2/inc/libwpg/WPGraphics.h 1970-01-01 00:00:00.000000000 +0000 +++ libwpg-0.3.0-rjvb/inc/libwpg/WPGraphics.h 2014-03-29 10:19:42.000000000 +0000 @@ -0,0 +1,55 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ +/* libwpg + * Version: MPL 2.0 / LGPLv2.1+ + * + * 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/. + * + * Major Contributor(s): + * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) + * + * For minor contributions see the git repository. + * + * Alternatively, the contents of this file may be used under the terms + * of the GNU Lesser General Public License Version 2.1 or later + * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are + * applicable instead of those above. + * + * For further information visit http://libwpg.sourceforge.net + */ + +/* "This product is not manufactured, approved, or supported by + * Corel Corporation or Corel Corporation Limited." + */ + +#ifndef __WPGRAPHICS_H__ +#define __WPGRAPHICS_H__ + +#include + +#ifdef DLL_EXPORT +#ifdef LIBWPG_BUILD +#define WPGAPI __declspec(dllexport) +#else +#define WPGAPI __declspec(dllimport) +#endif +#else +#define WPGAPI +#endif + +namespace libwpg +{ +enum WPGFileFormat { WPG_AUTODETECT = 0, WPG_WPG1, WPG_WPG2 }; + +class WPGraphics +{ +public: + static WPGAPI bool isSupported(librevenge::RVNGInputStream *input); + static WPGAPI bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *drawingInterface, WPGFileFormat fileFormat = WPG_AUTODETECT); +}; + +} // namespace libwpg + +#endif // __WPGRAPHICS_H__ +/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/inc/Makefile.am libwpg-0.3.0-rjvb/inc/Makefile.am --- libwpg-0.2.2/inc/Makefile.am 1970-01-01 00:00:00.000000000 +0000 +++ libwpg-0.3.0-rjvb/inc/Makefile.am 2014-03-29 10:19:42.000000000 +0000 @@ -0,0 +1 @@ +SUBDIRS = libwpg diff -Nru libwpg-0.2.2/inc/Makefile.in libwpg-0.3.0-rjvb/inc/Makefile.in --- libwpg-0.2.2/inc/Makefile.in 1970-01-01 00:00:00.000000000 +0000 +++ libwpg-0.3.0-rjvb/inc/Makefile.in 2014-03-29 10:28:44.000000000 +0000 @@ -0,0 +1,632 @@ +# Makefile.in generated by automake 1.13.4 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994-2013 Free Software Foundation, Inc. + +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ +VPATH = @srcdir@ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ + case $$MAKEFLAGS in \ + *\\[\ \ ]*) \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) +pkgdatadir = $(datadir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkglibexecdir = $(libexecdir)/@PACKAGE@ +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_triplet = @build@ +host_triplet = @host@ +subdir = inc +DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ + $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ + $(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(install_sh) -d +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +CONFIG_CLEAN_VPATH_FILES = +AM_V_P = $(am__v_P_@AM_V@) +am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) +am__v_P_0 = false +am__v_P_1 = : +AM_V_GEN = $(am__v_GEN_@AM_V@) +am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) +am__v_GEN_0 = @echo " GEN " $@; +am__v_GEN_1 = +AM_V_at = $(am__v_at_@AM_V@) +am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) +am__v_at_0 = @ +am__v_at_1 = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ + ctags-recursive dvi-recursive html-recursive info-recursive \ + install-data-recursive install-dvi-recursive \ + install-exec-recursive install-html-recursive \ + install-info-recursive install-pdf-recursive \ + install-ps-recursive install-recursive installcheck-recursive \ + installdirs-recursive pdf-recursive ps-recursive \ + tags-recursive uninstall-recursive +am__can_run_installinfo = \ + case $$AM_UPDATE_INFO_DIR in \ + n|no|NO) false;; \ + *) (install-info --version) >/dev/null 2>&1;; \ + esac +RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ + distclean-recursive maintainer-clean-recursive +am__recursive_targets = \ + $(RECURSIVE_TARGETS) \ + $(RECURSIVE_CLEAN_TARGETS) \ + $(am__extra_recursive_targets) +AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ + distdir +am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) +# Read a list of newline-separated strings from the standard input, +# and print each of them once, without duplicates. Input order is +# *not* preserved. +am__uniquify_input = $(AWK) '\ + BEGIN { nonempty = 0; } \ + { items[$$0] = 1; nonempty = 1; } \ + END { if (nonempty) { for (i in items) print i; }; } \ +' +# Make sure the list of sources is unique. This is necessary because, +# e.g., the same source file might be shared among _SOURCES variables +# for different programs/libraries. +am__define_uniq_tagged_files = \ + list='$(am__tagged_files)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | $(am__uniquify_input)` +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +am__relativize = \ + dir0=`pwd`; \ + sed_first='s,^\([^/]*\)/.*$$,\1,'; \ + sed_rest='s,^[^/]*/*,,'; \ + sed_last='s,^.*/\([^/]*\)$$,\1,'; \ + sed_butlast='s,/*[^/]*$$,,'; \ + while test -n "$$dir1"; do \ + first=`echo "$$dir1" | sed -e "$$sed_first"`; \ + if test "$$first" != "."; then \ + if test "$$first" = ".."; then \ + dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ + dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ + else \ + first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ + if test "$$first2" = "$$first"; then \ + dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ + else \ + dir2="../$$dir2"; \ + fi; \ + dir0="$$dir0"/"$$first"; \ + fi; \ + fi; \ + dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ + done; \ + reldir="$$dir2" +ACLOCAL = @ACLOCAL@ +AMTAR = @AMTAR@ +AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEBUG_CXXFLAGS = @DEBUG_CXXFLAGS@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DOXYGEN = @DOXYGEN@ +DSYMUTIL = @DSYMUTIL@ +DUMPBIN = @DUMPBIN@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +FGREP = @FGREP@ +GREP = @GREP@ +INSTALL = @INSTALL@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +LD = @LD@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LIBWPG_WIN32_RESOURCE = @LIBWPG_WIN32_RESOURCE@ +LIPO = @LIPO@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +LT_AGE = @LT_AGE@ +LT_CURRENT = @LT_CURRENT@ +LT_REVISION = @LT_REVISION@ +MAKEINFO = @MAKEINFO@ +MANIFEST_TOOL = @MANIFEST_TOOL@ +MKDIR_P = @MKDIR_P@ +NM = @NM@ +NMEDIT = @NMEDIT@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OTOOL = @OTOOL@ +OTOOL64 = @OTOOL64@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_URL = @PACKAGE_URL@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PKG_CONFIG = @PKG_CONFIG@ +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@ +WPG2RAW_WIN32_RESOURCE = @WPG2RAW_WIN32_RESOURCE@ +WPG2SVG_WIN32_RESOURCE = @WPG2SVG_WIN32_RESOURCE@ +WPG_MAJOR_VERSION = @WPG_MAJOR_VERSION@ +WPG_MICRO_VERSION = @WPG_MICRO_VERSION@ +WPG_MINOR_VERSION = @WPG_MINOR_VERSION@ +WPG_VERSION = @WPG_VERSION@ +abs_builddir = @abs_builddir@ +abs_srcdir = @abs_srcdir@ +abs_top_builddir = @abs_top_builddir@ +abs_top_srcdir = @abs_top_srcdir@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +am__tar = @am__tar@ +am__untar = @am__untar@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +builddir = @builddir@ +datadir = @datadir@ +datarootdir = @datarootdir@ +docdir = @docdir@ +dvidir = @dvidir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +htmldir = @htmldir@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localedir = @localedir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +pdfdir = @pdfdir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +psdir = @psdir@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +srcdir = @srcdir@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +top_build_prefix = @top_build_prefix@ +top_builddir = @top_builddir@ +top_srcdir = @top_srcdir@ +SUBDIRS = libwpg +all: all-recursive + +.SUFFIXES: +$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ + && { if test -f $@; then exit 0; else break; fi; }; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign inc/Makefile'; \ + $(am__cd) $(top_srcdir) && \ + $(AUTOMAKE) --foreign inc/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(am__aclocal_m4_deps): + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +# This directory's subdirectories are mostly independent; you can cd +# into them and run 'make' without going through this Makefile. +# To change the values of 'make' variables: instead of editing Makefiles, +# (1) if the variable is set in 'config.status', edit 'config.status' +# (which will cause the Makefiles to be regenerated when you run 'make'); +# (2) otherwise, pass the desired values on the 'make' command line. +$(am__recursive_targets): + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || eval $$failcom; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +ID: $(am__tagged_files) + $(am__define_uniq_tagged_files); mkid -fID $$unique +tags: tags-recursive +TAGS: tags + +tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + set x; \ + here=`pwd`; \ + if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + empty_fix=.; \ + else \ + include_option=--include; \ + empty_fix=; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test ! -f $$subdir/TAGS || \ + set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + $(am__define_uniq_tagged_files); \ + shift; \ + if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ + test -n "$$unique" || unique=$$empty_fix; \ + if test $$# -gt 0; then \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + "$$@" $$unique; \ + else \ + $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$unique; \ + fi; \ + fi +ctags: ctags-recursive + +CTAGS: ctags +ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) + $(am__define_uniq_tagged_files); \ + test -z "$(CTAGS_ARGS)$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && $(am__cd) $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) "$$here" +cscopelist: cscopelist-recursive + +cscopelist-am: $(am__tagged_files) + list='$(am__tagged_files)'; \ + case "$(srcdir)" in \ + [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ + *) sdir=$(subdir)/$(srcdir) ;; \ + esac; \ + for i in $$list; do \ + if test -f "$$i"; then \ + echo "$(subdir)/$$i"; \ + else \ + echo "$$sdir/$$i"; \ + fi; \ + done >> $(top_builddir)/cscope.files + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ + list='$(DISTFILES)'; \ + dist_files=`for file in $$list; do echo $$file; done | \ + sed -e "s|^$$srcdirstrip/||;t" \ + -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ + case $$dist_files in \ + */*) $(MKDIR_P) `echo "$$dist_files" | \ + sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ + sort -u` ;; \ + esac; \ + for file in $$dist_files; do \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + if test -d $$d/$$file; then \ + dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test -d "$(distdir)/$$file"; then \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ + find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ + fi; \ + cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ + else \ + test -f "$(distdir)/$$file" \ + || cp -p $$d/$$file "$(distdir)/$$file" \ + || exit 1; \ + fi; \ + done + @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + $(am__make_dryrun) \ + || test -d "$(distdir)/$$subdir" \ + || $(MKDIR_P) "$(distdir)/$$subdir" \ + || exit 1; \ + dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ + $(am__relativize); \ + new_distdir=$$reldir; \ + dir1=$$subdir; dir2="$(top_distdir)"; \ + $(am__relativize); \ + new_top_distdir=$$reldir; \ + echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ + echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ + ($(am__cd) $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$$new_top_distdir" \ + distdir="$$new_distdir" \ + am__remove_distdir=: \ + am__skip_length_check=: \ + am__skip_mode_fix=: \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile +installdirs: installdirs-recursive +installdirs-am: +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + if test -z '$(STRIP)'; then \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + install; \ + else \ + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ + fi +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) + -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-tags + +dvi: dvi-recursive + +dvi-am: + +html: html-recursive + +html-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-dvi: install-dvi-recursive + +install-dvi-am: + +install-exec-am: + +install-html: install-html-recursive + +install-html-am: + +install-info: install-info-recursive + +install-info-am: + +install-man: + +install-pdf: install-pdf-recursive + +install-pdf-am: + +install-ps: install-ps-recursive + +install-ps-am: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: + +.MAKE: $(am__recursive_targets) install-am install-strip + +.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ + 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-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. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff -Nru libwpg-0.2.2/libwpg-0.2.pc.in libwpg-0.3.0-rjvb/libwpg-0.2.pc.in --- libwpg-0.2.2/libwpg-0.2.pc.in 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/libwpg-0.2.pc.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@ -Description: Library for importing and converting Corel WordPerfect(tm) Graphics images -Version: @VERSION@ -Requires: libwpd-0.9 libwpd-stream-0.9 -Libs: -L${libdir} -lwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@ -Cflags: -I${includedir}/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@ diff -Nru libwpg-0.2.2/libwpg.pc.in libwpg-0.3.0-rjvb/libwpg.pc.in --- libwpg-0.2.2/libwpg.pc.in 1970-01-01 00:00:00.000000000 +0000 +++ libwpg-0.3.0-rjvb/libwpg.pc.in 2014-04-16 17:30:54.000000000 +0000 @@ -0,0 +1,13 @@ +prefix=@prefix@ +exec_prefix=@exec_prefix@ +libdir=@libdir@ +includedir=@includedir@ + +Name: libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@ +Description: Library for importing and converting Corel WordPerfect(tm) Graphics images +Version: @VERSION@ +Requires: librevenge-0.0 librevenge-stream-0.0 +Libs: -L${libdir} -lwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@ +Cflags: -I${includedir}/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@ + +Requires.private: libwpd-0.10 diff -Nru libwpg-0.2.2/libwpg.spec libwpg-0.3.0-rjvb/libwpg.spec --- libwpg-0.2.2/libwpg.spec 2013-04-18 13:16:26.000000000 +0000 +++ libwpg-0.3.0-rjvb/libwpg.spec 2014-05-23 16:43:51.000000000 +0000 @@ -1,5 +1,5 @@ %define name libwpg -%define version 0.2.2 +%define version 0.3.0 %define RELEASE 1 %define release %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} @@ -80,7 +80,7 @@ %defattr(644,root,root,755) %{_libdir}/libwpg*.so %{_libdir}/pkgconfig/libwpg*.pc -%{_includedir}/libwpg-0.2/libwpg +%{_includedir}/libwpg-0.3/libwpg %if %{!?_without_docs:1}%{?_without_docs:0} %files docs diff -Nru libwpg-0.2.2/m4/libtool.m4 libwpg-0.3.0-rjvb/m4/libtool.m4 --- libwpg-0.2.2/m4/libtool.m4 2013-04-18 12:55:53.000000000 +0000 +++ libwpg-0.3.0-rjvb/m4/libtool.m4 2014-03-29 10:28:42.000000000 +0000 @@ -1312,7 +1312,7 @@ rm -rf conftest* ;; -x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ +x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext @@ -1326,7 +1326,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; - ppc64-*linux*|powerpc64-*linux*) + powerpc64le-*linux*) + LD="${LD-ld} -m elf32lppclinux" + ;; + powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) @@ -1345,7 +1348,10 @@ x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; - ppc*-*linux*|powerpc*-*linux*) + powerpcle-*linux*) + LD="${LD-ld} -m elf64lppc" + ;; + powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) @@ -2669,10 +2675,14 @@ # before this can be enabled. hardcode_into_libs=yes + # Add ABI-specific directories to the system library path. + sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" + # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" + sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" + fi # We used to test for /lib/ld.so.1 and disable shared libraries on diff -Nru libwpg-0.2.2/Makefile.am libwpg-0.3.0-rjvb/Makefile.am --- libwpg-0.2.2/Makefile.am 2013-04-18 13:12:19.000000000 +0000 +++ libwpg-0.3.0-rjvb/Makefile.am 2014-03-29 10:19:42.000000000 +0000 @@ -4,7 +4,7 @@ pkgconf_DATA = libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.pc -SUBDIRS = src build docs +SUBDIRS = src inc build docs EXTRA_DIST = \ AUTHORS \ @@ -13,13 +13,13 @@ NEWS \ README \ autogen.sh \ - libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.pc.in \ + libwpg.pc.in \ libwpg-zip.in \ libwpg.spec \ libwpg.spec.in distclean-local: - rm -rf *.cache *~ + rm -rf *.cache *~ *.pc rpm: dist rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz diff -Nru libwpg-0.2.2/Makefile.in libwpg-0.3.0-rjvb/Makefile.in --- libwpg-0.2.2/Makefile.in 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/Makefile.in 2014-03-29 10:28:43.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,10 +81,10 @@ subdir = . DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ - $(srcdir)/config.h.in $(srcdir)/libwpg-0.2.pc.in \ + $(srcdir)/config.h.in $(srcdir)/libwpg.pc.in \ $(srcdir)/libwpg.spec.in $(srcdir)/libwpg-zip.in AUTHORS NEWS \ - README ar-lib config.guess config.sub depcomp install-sh \ - missing ltmain.sh + README ar-lib config.guess config.sub install-sh missing \ + ltmain.sh ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ $(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \ @@ -68,7 +96,7 @@ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = libwpg-0.2.pc libwpg.spec libwpg-zip +CONFIG_CLEAN_FILES = libwpg.spec libwpg-zip CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -269,6 +297,12 @@ 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@ @@ -339,7 +373,7 @@ ACLOCAL_AMFLAGS = -I m4 pkgconfdir = $(libdir)/pkgconfig pkgconf_DATA = libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.pc -SUBDIRS = src build docs +SUBDIRS = src inc build docs EXTRA_DIST = \ AUTHORS \ COPYING.LGPL \ @@ -347,7 +381,7 @@ NEWS \ README \ autogen.sh \ - libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.pc.in \ + libwpg.pc.in \ libwpg-zip.in \ libwpg.spec \ libwpg.spec.in @@ -405,8 +439,6 @@ distclean-hdr: -rm -f config.h stamp-h1 -libwpg-0.2.pc: $(top_builddir)/config.status $(srcdir)/libwpg-0.2.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ libwpg.spec: $(top_builddir)/config.status $(srcdir)/libwpg.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ libwpg-zip: $(top_builddir)/config.status $(srcdir)/libwpg-zip.in @@ -449,13 +481,12 @@ # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ @@ -861,7 +892,7 @@ distclean-local: - rm -rf *.cache *~ + rm -rf *.cache *~ *.pc rpm: dist rpmbuild -ta $(PACKAGE)-$(VERSION).tar.gz diff -Nru libwpg-0.2.2/NEWS libwpg-0.3.0-rjvb/NEWS --- libwpg-0.2.2/NEWS 2010-11-16 09:44:47.000000000 +0000 +++ libwpg-0.3.0-rjvb/NEWS 2014-05-23 16:42:24.000000000 +0000 @@ -1,3 +1,8 @@ +0.2.2 - 0.3.0 + +- Switch to librevenge +- Miscellaneous fixes and cleanups + 0.1.x - 0.2.0 - Rewrite the library to reuse wherever possible the libwpd types and APIs. diff -Nru libwpg-0.2.2/src/conv/Makefile.in libwpg-0.3.0-rjvb/src/conv/Makefile.in --- libwpg-0.2.2/src/conv/Makefile.in 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/conv/Makefile.in 2014-03-29 10:28:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ esac; \ - test $$am__dry = yes; \ - } + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -214,6 +242,12 @@ 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@ @@ -329,13 +363,12 @@ # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ diff -Nru libwpg-0.2.2/src/conv/raw/Makefile.am libwpg-0.3.0-rjvb/src/conv/raw/Makefile.am --- libwpg-0.2.2/src/conv/raw/Makefile.am 2013-04-18 13:12:19.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/conv/raw/Makefile.am 2014-03-29 10:19:42.000000000 +0000 @@ -1,15 +1,22 @@ +if BUILD_TOOLS + bin_PROGRAMS = wpg2raw -AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(WPD_CFLAGS) $(DEBUG_CXXFLAGS) +AM_CXXFLAGS = \ + -I$(top_srcdir)/inc \ + $(REVENGE_CFLAGS) \ + $(REVENGE_GENERATORS_CFLAGS) \ + $(REVENGE_STREAM_CFLAGS) \ + $(DEBUG_CXXFLAGS) wpg2raw_DEPENDENCIES = @WPG2RAW_WIN32_RESOURCE@ -if STATIC_TOOLS -wpg2raw_LDADD = ../../lib/@WPG_OBJDIR@/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.a $(WPD_LIBS) @WPG2RAW_WIN32_RESOURCE@ -wpg2raw_LDFLAGS = -all-static -else -wpg2raw_LDADD = ../../lib/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la $(WPD_LIBS) @WPG2RAW_WIN32_RESOURCE@ -endif +wpg2raw_LDADD = \ + ../../lib/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la \ + $(REVENGE_GENERATORS_LIBS) \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ + @WPG2RAW_WIN32_RESOURCE@ wpg2raw_SOURCES = \ wpg2raw.cpp @@ -28,3 +35,5 @@ # These may be in the builddir too BUILD_EXTRA_DIST = \ wpg2raw.rc + +endif diff -Nru libwpg-0.2.2/src/conv/raw/Makefile.in libwpg-0.3.0-rjvb/src/conv/raw/Makefile.in --- libwpg-0.2.2/src/conv/raw/Makefile.in 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/conv/raw/Makefile.in 2014-03-29 10:28:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -15,23 +15,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ esac; \ - test $$am__dry = yes; \ - } + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -50,7 +78,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = wpg2raw$(EXEEXT) +@BUILD_TOOLS_TRUE@bin_PROGRAMS = wpg2raw$(EXEEXT) subdir = src/conv/raw DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/wpg2raw.rc.in $(top_srcdir)/depcomp @@ -67,16 +95,14 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am_wpg2raw_OBJECTS = wpg2raw.$(OBJEXT) +am__wpg2raw_SOURCES_DIST = wpg2raw.cpp +@BUILD_TOOLS_TRUE@am_wpg2raw_OBJECTS = wpg2raw.$(OBJEXT) wpg2raw_OBJECTS = $(am_wpg2raw_OBJECTS) am__DEPENDENCIES_1 = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = -wpg2raw_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(wpg2raw_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false @@ -112,7 +138,7 @@ am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(wpg2raw_SOURCES) -DIST_SOURCES = $(wpg2raw_SOURCES) +DIST_SOURCES = $(am__wpg2raw_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -209,6 +235,12 @@ 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@ @@ -276,22 +308,32 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(WPD_CFLAGS) $(DEBUG_CXXFLAGS) -wpg2raw_DEPENDENCIES = @WPG2RAW_WIN32_RESOURCE@ -@STATIC_TOOLS_FALSE@wpg2raw_LDADD = ../../lib/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la $(WPD_LIBS) @WPG2RAW_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@wpg2raw_LDADD = ../../lib/@WPG_OBJDIR@/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.a $(WPD_LIBS) @WPG2RAW_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@wpg2raw_LDFLAGS = -all-static -wpg2raw_SOURCES = \ - wpg2raw.cpp - -EXTRA_DIST = \ - $(wpg2raw_SOURCES) \ - wpg2raw.rc.in +@BUILD_TOOLS_TRUE@AM_CXXFLAGS = \ +@BUILD_TOOLS_TRUE@ -I$(top_srcdir)/inc \ +@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@wpg2raw_DEPENDENCIES = @WPG2RAW_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@wpg2raw_LDADD = \ +@BUILD_TOOLS_TRUE@ ../../lib/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ @WPG2RAW_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@wpg2raw_SOURCES = \ +@BUILD_TOOLS_TRUE@ wpg2raw.cpp + +@BUILD_TOOLS_TRUE@EXTRA_DIST = \ +@BUILD_TOOLS_TRUE@ $(wpg2raw_SOURCES) \ +@BUILD_TOOLS_TRUE@ wpg2raw.rc.in # These may be in the builddir too -BUILD_EXTRA_DIST = \ - wpg2raw.rc +@BUILD_TOOLS_TRUE@BUILD_EXTRA_DIST = \ +@BUILD_TOOLS_TRUE@ wpg2raw.rc all: all-am @@ -378,9 +420,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + wpg2raw$(EXEEXT): $(wpg2raw_OBJECTS) $(wpg2raw_DEPENDENCIES) $(EXTRA_wpg2raw_DEPENDENCIES) @rm -f wpg2raw$(EXEEXT) - $(AM_V_CXXLD)$(wpg2raw_LINK) $(wpg2raw_OBJECTS) $(wpg2raw_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(wpg2raw_OBJECTS) $(wpg2raw_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -623,9 +666,9 @@ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS -@OS_WIN32_TRUE@@WPG2RAW_WIN32_RESOURCE@ : wpg2raw.rc $(wpg2raw_OBJECTS) -@OS_WIN32_TRUE@ chmod +x $(top_srcdir)/build/win32/*compile-resource -@OS_WIN32_TRUE@ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource wpg2raw.rc @WPG2RAW_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@@WPG2RAW_WIN32_RESOURCE@ : wpg2raw.rc $(wpg2raw_OBJECTS) +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@ chmod +x $(top_srcdir)/build/win32/*compile-resource +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource wpg2raw.rc @WPG2RAW_WIN32_RESOURCE@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru libwpg-0.2.2/src/conv/raw/wpg2raw.cpp libwpg-0.3.0-rjvb/src/conv/raw/wpg2raw.cpp --- libwpg-0.2.2/src/conv/raw/wpg2raw.cpp 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/conv/raw/wpg2raw.cpp 2014-03-29 10:19:42.000000000 +0000 @@ -28,190 +28,10 @@ #include #include -#include "libwpg.h" -#include -#include - -class RawPainter : public libwpg::WPGPaintInterface -{ -public: - RawPainter(); - - void startGraphics(const ::WPXPropertyList &propList); - void endGraphics(); - void startLayer(const ::WPXPropertyList &propList); - void endLayer(); - void startEmbeddedGraphics(const ::WPXPropertyList &propList); - void endEmbeddedGraphics(); - - void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient); - - void drawRectangle(const ::WPXPropertyList &propList); - void drawEllipse(const ::WPXPropertyList &propList); - void drawPolyline(const ::WPXPropertyListVector &vertices); - void drawPolygon(const ::WPXPropertyListVector &vertices); - void drawPath(const ::WPXPropertyListVector &path); - void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData); - void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path); - void endTextObject(); - void startTextLine(const ::WPXPropertyList &propList); - void endTextLine(); - void startTextSpan(const ::WPXPropertyList &propList); - void endTextSpan(); - void insertText(const ::WPXString &str); -}; - -WPXString getPropString(const WPXPropertyList &propList) -{ - WPXString propString; - WPXPropertyList::Iter i(propList); - if (!i.last()) - { - propString.append(i.key()); - propString.append(": "); - propString.append(i()->getStr().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; -} - -RawPainter::RawPainter(): libwpg::WPGPaintInterface() -{ -} - -void RawPainter::startGraphics(const ::WPXPropertyList &propList) -{ - printf("RawPainter::startGraphics(%s)\n", getPropString(propList).cstr()); -} - -void RawPainter::endGraphics() -{ - printf("RawPainter::endGraphics\n"); -} - -void RawPainter::startLayer(const ::WPXPropertyList &propList) -{ - printf("RawPainter::startLayer (%s)\n", getPropString(propList).cstr()); -} - -void RawPainter::endLayer() -{ - printf("RawPainter::endLayer\n"); -} - -void RawPainter::startEmbeddedGraphics(const ::WPXPropertyList &propList) -{ - printf("RawPainter::startEmbeddedGraphics (%s)\n", getPropString(propList).cstr()); -} - -void RawPainter::endEmbeddedGraphics() -{ - printf("RawPainter::endEmbeddedGraphics \n"); -} - -void RawPainter::setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient) -{ - printf("RawPainter::setStyle(%s, gradient: (%s))\n", getPropString(propList).cstr(), getPropString(gradient).cstr()); -} - -void RawPainter::drawRectangle(const ::WPXPropertyList &propList) -{ - printf("RawPainter::drawRectangle (%s)\n", getPropString(propList).cstr()); -} - -void RawPainter::drawEllipse(const ::WPXPropertyList &propList) -{ - printf("RawPainter::drawEllipse (%s)\n", getPropString(propList).cstr()); -} - -void RawPainter::drawPolyline(const ::WPXPropertyListVector &vertices) -{ - printf("RawPainter::drawPolyline (%s)\n", getPropString(vertices).cstr()); -} - -void RawPainter::drawPolygon(const ::WPXPropertyListVector &vertices) -{ - printf("RawPainter::drawPolygon (%s)\n", getPropString(vertices).cstr()); -} - -void RawPainter::drawPath(const ::WPXPropertyListVector &path) -{ - printf("RawPainter::drawPath (%s)\n", getPropString(path).cstr()); -} - -void RawPainter::drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData & /*binaryData*/) -{ - printf("RawPainter::drawGraphicObject (%s)\n", getPropString(propList).cstr()); -} - -void RawPainter::startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path) -{ - printf("RawPainter::startTextObject (%s, path: (%s))\n", getPropString(propList).cstr(), getPropString(path).cstr()); -} - -void RawPainter::endTextObject() -{ - printf("RawPainter::endTextObject\n"); -} - -void RawPainter::startTextLine(const ::WPXPropertyList &propList) -{ - printf("RawPainter::startTextLine (%s)\n", getPropString(propList).cstr()); -} - -void RawPainter::endTextLine() -{ - printf("RawPainter::endTextLine\n"); -} - -void RawPainter::startTextSpan(const ::WPXPropertyList &propList) -{ - printf("RawPainter::startTextSpan (%s)\n", getPropString(propList).cstr()); -} - -void RawPainter::endTextSpan() -{ - printf("RawPainter::endTextSpan\n"); -} - -void RawPainter::insertText(const ::WPXString &str) -{ - printf("RawPainter::insertText (%s)\n", str.cstr()); -} - +#include +#include +#include +#include namespace { @@ -221,30 +41,25 @@ printf("Usage: wpg2raw [OPTION] \n"); printf("\n"); printf("Options:\n"); + printf("--callgraph Display the call graph nesting level\n"); printf("--help Shows this help message\n"); - printf("--version Output wpg2raw version \n"); return -1; } -int printVersion() -{ - printf("wpg2raw %s\n", LIBWPG_VERSION_STRING); - return 0; -} - } // anonymous namespace int main(int argc, char *argv[]) { + bool printIndentLevel = false; + char *file = 0; + if (argc < 2) return printUsage(); - char *file = 0; - for (int i = 1; i < argc; i++) { - if (!strcmp(argv[i], "--version")) - return printVersion(); + if (!strcmp(argv[i], "--callgraph")) + printIndentLevel = true; else if (!file && strncmp(argv[i], "--", 2)) file = argv[i]; else @@ -254,7 +69,7 @@ if (!file) return printUsage(); - WPXFileStream input(file); + librevenge::RVNGFileStream input(file); if (!libwpg::WPGraphics::isSupported(&input)) { @@ -262,7 +77,7 @@ return 1; } - RawPainter painter; + librevenge::RVNGRawDrawingGenerator painter(printIndentLevel); libwpg::WPGraphics::parse(&input, &painter); return 0; diff -Nru libwpg-0.2.2/src/conv/svg/Makefile.am libwpg-0.3.0-rjvb/src/conv/svg/Makefile.am --- libwpg-0.2.2/src/conv/svg/Makefile.am 2013-04-18 13:12:19.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/conv/svg/Makefile.am 2014-03-29 10:19:42.000000000 +0000 @@ -1,15 +1,20 @@ +if BUILD_TOOLS + bin_PROGRAMS = wpg2svg -AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(WPD_CFLAGS) $(DEBUG_CXXFLAGS) +AM_CXXFLAGS = \ + -I$(top_srcdir)/inc \ + $(REVENGE_CFLAGS) \ + $(REVENGE_STREAM_CFLAGS) \ + $(DEBUG_CXXFLAGS) wpg2svg_DEPENDENCIES = @WPG2SVG_WIN32_RESOURCE@ -if STATIC_TOOLS -wpg2svg_LDADD = ../../lib/@WPG_OBJDIR@/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.a $(WPD_LIBS) @WPG2SVG_WIN32_RESOURCE@ -wpg2svg_LDFLAGS = -all-static -else -wpg2svg_LDADD = ../../lib/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la $(WPD_LIBS) @WPG2SVG_WIN32_RESOURCE@ -endif +wpg2svg_LDADD = \ + ../../lib/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ + @WPG2SVG_WIN32_RESOURCE@ wpg2svg_SOURCES = \ wpg2svg.cpp @@ -31,3 +36,5 @@ wpg2svg.rc bin_SCRIPTS = wpg2svgbatch.pl + +endif diff -Nru libwpg-0.2.2/src/conv/svg/Makefile.in libwpg-0.3.0-rjvb/src/conv/svg/Makefile.in --- libwpg-0.2.2/src/conv/svg/Makefile.in 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/conv/svg/Makefile.in 2014-03-29 10:28:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,23 +16,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -51,7 +79,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = wpg2svg$(EXEEXT) +@BUILD_TOOLS_TRUE@bin_PROGRAMS = wpg2svg$(EXEEXT) subdir = src/conv/svg DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/wpg2svg.rc.in $(top_srcdir)/depcomp @@ -68,16 +96,14 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am_wpg2svg_OBJECTS = wpg2svg.$(OBJEXT) +am__wpg2svg_SOURCES_DIST = wpg2svg.cpp +@BUILD_TOOLS_TRUE@am_wpg2svg_OBJECTS = wpg2svg.$(OBJEXT) wpg2svg_OBJECTS = $(am_wpg2svg_OBJECTS) am__DEPENDENCIES_1 = AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = -wpg2svg_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(wpg2svg_LDFLAGS) $(LDFLAGS) -o $@ am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ @@ -141,7 +167,7 @@ am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(wpg2svg_SOURCES) -DIST_SOURCES = $(wpg2svg_SOURCES) +DIST_SOURCES = $(am__wpg2svg_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -238,6 +264,12 @@ 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@ @@ -305,25 +337,33 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CXXFLAGS = -I$(top_srcdir)/src/lib -I$(top_builddir)/src/lib $(WPD_CFLAGS) $(DEBUG_CXXFLAGS) -wpg2svg_DEPENDENCIES = @WPG2SVG_WIN32_RESOURCE@ -@STATIC_TOOLS_FALSE@wpg2svg_LDADD = ../../lib/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la $(WPD_LIBS) @WPG2SVG_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@wpg2svg_LDADD = ../../lib/@WPG_OBJDIR@/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.a $(WPD_LIBS) @WPG2SVG_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@wpg2svg_LDFLAGS = -all-static -wpg2svg_SOURCES = \ - wpg2svg.cpp - -EXTRA_DIST = \ - $(wpg2svg_SOURCES) \ - wpg2svg.rc.in \ - wpg2svgbatch.pl +@BUILD_TOOLS_TRUE@AM_CXXFLAGS = \ +@BUILD_TOOLS_TRUE@ -I$(top_srcdir)/inc \ +@BUILD_TOOLS_TRUE@ $(REVENGE_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_CFLAGS) \ +@BUILD_TOOLS_TRUE@ $(DEBUG_CXXFLAGS) + +@BUILD_TOOLS_TRUE@wpg2svg_DEPENDENCIES = @WPG2SVG_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@wpg2svg_LDADD = \ +@BUILD_TOOLS_TRUE@ ../../lib/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ @WPG2SVG_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@wpg2svg_SOURCES = \ +@BUILD_TOOLS_TRUE@ wpg2svg.cpp + +@BUILD_TOOLS_TRUE@EXTRA_DIST = \ +@BUILD_TOOLS_TRUE@ $(wpg2svg_SOURCES) \ +@BUILD_TOOLS_TRUE@ wpg2svg.rc.in \ +@BUILD_TOOLS_TRUE@ wpg2svgbatch.pl # These may be in the builddir too -BUILD_EXTRA_DIST = \ - wpg2svg.rc +@BUILD_TOOLS_TRUE@BUILD_EXTRA_DIST = \ +@BUILD_TOOLS_TRUE@ wpg2svg.rc -bin_SCRIPTS = wpg2svgbatch.pl +@BUILD_TOOLS_TRUE@bin_SCRIPTS = wpg2svgbatch.pl all: all-am .SUFFIXES: @@ -409,9 +449,10 @@ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list + wpg2svg$(EXEEXT): $(wpg2svg_OBJECTS) $(wpg2svg_DEPENDENCIES) $(EXTRA_wpg2svg_DEPENDENCIES) @rm -f wpg2svg$(EXEEXT) - $(AM_V_CXXLD)$(wpg2svg_LINK) $(wpg2svg_OBJECTS) $(wpg2svg_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(wpg2svg_OBJECTS) $(wpg2svg_LDADD) $(LIBS) install-binSCRIPTS: $(bin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \ @@ -690,9 +731,9 @@ uninstall-binPROGRAMS uninstall-binSCRIPTS -@OS_WIN32_TRUE@@WPG2SVG_WIN32_RESOURCE@ : wpg2svg.rc $(wpg2svg_OBJECTS) -@OS_WIN32_TRUE@ chmod +x $(top_srcdir)/build/win32/*compile-resource -@OS_WIN32_TRUE@ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource wpg2svg.rc @WPG2SVG_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@@WPG2SVG_WIN32_RESOURCE@ : wpg2svg.rc $(wpg2svg_OBJECTS) +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@ chmod +x $(top_srcdir)/build/win32/*compile-resource +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource wpg2svg.rc @WPG2SVG_WIN32_RESOURCE@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. diff -Nru libwpg-0.2.2/src/conv/svg/wpg2svg.cpp libwpg-0.3.0-rjvb/src/conv/svg/wpg2svg.cpp --- libwpg-0.2.2/src/conv/svg/wpg2svg.cpp 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/conv/svg/wpg2svg.cpp 2014-03-29 10:19:42.000000000 +0000 @@ -28,9 +28,9 @@ #include #include #include -#include "libwpg.h" -#include -#include +#include +#include +#include namespace { @@ -41,16 +41,9 @@ printf("\n"); printf("Options:\n"); printf("--help Shows this help message\n"); - printf("--version Output wpg2svg version \n"); return -1; } -int printVersion() -{ - printf("wpg2svg %s\n", LIBWPG_VERSION_STRING); - return 0; -} - } // anonymous namespace int main(int argc, char *argv[]) @@ -62,9 +55,7 @@ for (int i = 1; i < argc; i++) { - if (!strcmp(argv[i], "--version")) - return printVersion(); - else if (!file && strncmp(argv[i], "--", 2)) + if (!file && strncmp(argv[i], "--", 2)) file = argv[i]; else return printUsage(); @@ -73,7 +64,7 @@ if (!file) return printUsage(); - WPXFileStream input(file); + librevenge::RVNGFileStream input(file); if (!libwpg::WPGraphics::isSupported(&input)) { @@ -81,14 +72,21 @@ return 1; } - ::WPXString output; - if (!libwpg::WPGraphics::generateSVG(&input, output)) + librevenge::RVNGStringVector vec; + librevenge::RVNGSVGDrawingGenerator generator(vec, ""); + bool result = libwpg::WPGraphics::parse(&input, &generator); + if (!result || vec.empty() || vec[0].empty()) { std::cerr << "ERROR: SVG Generation failed!" << std::endl; return 1; } - std::cout << output.cstr() << std::endl; +#if 1 + std::cout << "\n"; + std::cout << "\n"; +#endif + std::cout << vec[0].cstr() << std::endl; return 0; } /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/libwpg.h libwpg-0.3.0-rjvb/src/lib/libwpg.h --- libwpg-0.2.2/src/lib/libwpg.h 2013-04-18 13:16:26.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/libwpg.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* libwpg - * Version: MPL 2.0 / LGPLv2.1+ - * - * 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/. - * - * Major Contributor(s): - * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) - * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl) - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms - * of the GNU Lesser General Public License Version 2.1 or later - * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are - * applicable instead of those above. - * - * For further information visit http://libwpg.sourceforge.net - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ - -#ifndef __LIBWPG_H__ -#define __LIBWPG_H__ - -#define LIBWPG_VERSION_MAJOR 0 -#define LIBWPG_VERSION_MINOR 2 -#define LIBWPG_VERSION_REVISION 2 -#define LIBWPG_VERSION_STRING "0.2.2" - -#include "WPGraphics.h" -#include "WPGPaintInterface.h" - -#endif -/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/libwpg.h.in libwpg-0.3.0-rjvb/src/lib/libwpg.h.in --- libwpg-0.2.2/src/lib/libwpg.h.in 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/libwpg.h.in 1970-01-01 00:00:00.000000000 +0000 @@ -1,39 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* libwpg - * Version: MPL 2.0 / LGPLv2.1+ - * - * 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/. - * - * Major Contributor(s): - * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) - * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl) - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms - * of the GNU Lesser General Public License Version 2.1 or later - * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are - * applicable instead of those above. - * - * For further information visit http://libwpg.sourceforge.net - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ - -#ifndef __LIBWPG_H__ -#define __LIBWPG_H__ - -#define LIBWPG_VERSION_MAJOR @WPG_MAJOR_VERSION@ -#define LIBWPG_VERSION_MINOR @WPG_MINOR_VERSION@ -#define LIBWPG_VERSION_REVISION @WPG_MICRO_VERSION@ -#define LIBWPG_VERSION_STRING "@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.@WPG_MICRO_VERSION@" - -#include "WPGraphics.h" -#include "WPGPaintInterface.h" - -#endif -/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/Makefile.am libwpg-0.3.0-rjvb/src/lib/Makefile.am --- libwpg-0.2.2/src/lib/Makefile.am 2013-04-18 13:12:19.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/Makefile.am 2014-03-29 10:19:42.000000000 +0000 @@ -1,46 +1,37 @@ if PLATFORM_WIN32 -no_undefined = -no-undefined version_info = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -avoid-version else -no_undefined = version_info = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) endif lib_LTLIBRARIES = libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_includedir = $(includedir)/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@/libwpg libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_include_HEADERS = \ - libwpg.h \ - WPGraphics.h \ - WPGPaintInterface.h + $(top_srcdir)/inc/libwpg/libwpg.h \ + $(top_srcdir)/inc/libwpg/WPGraphics.h -AM_CXXFLAGS = $(WPD_CFLAGS) $(DEBUG_CXXFLAGS) +AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(WPD_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBWPG_BUILD=1 -libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_LIBADD = $(WPD_LIBS) @LIBWPG_WIN32_RESOURCE@ +libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_LIBADD = $(WPD_LIBS) $(REVENGE_LIBS) @LIBWPG_WIN32_RESOURCE@ libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_DEPENDENCIES = @LIBWPG_WIN32_RESOURCE@ -libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic $(no_undefined) +libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_SOURCES = \ WPGraphics.cpp \ WPGDashArray.cpp \ WPGColor.cpp \ WPGHeader.cpp \ - WPGSVGGenerator.cpp \ WPGXParser.cpp \ WPG1Parser.cpp \ WPG2Parser.cpp \ WPGBitmap.cpp \ - WPGInternalStream.cpp \ - libwpg.h \ libwpg_utils.h \ WPGColor.h \ WPGDashArray.h \ WPGHeader.h \ - WPGSVGGenerator.h \ WPGXParser.h \ WPG1Parser.h \ WPG2Parser.h \ - WPGBitmap.h \ - WPGInternalStream.h\ - WPGPaintInterface.h + WPGBitmap.h if OS_WIN32 @@ -52,9 +43,7 @@ EXTRA_DIST = \ - libwpg.h.in \ - libwpg.rc.in \ - makefile.mk + libwpg.rc.in # These may be in the builddir too BUILD_EXTRA_DIST = \ diff -Nru libwpg-0.2.2/src/lib/Makefile.in libwpg-0.3.0-rjvb/src/lib/Makefile.in --- libwpg-0.2.2/src/lib/Makefile.in 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/Makefile.in 2014-03-29 10:28:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -16,23 +16,51 @@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ - test $$am__dry = yes; \ - } + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ + esac; \ + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -53,8 +81,7 @@ host_triplet = @host@ subdir = src/lib DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ - $(srcdir)/libwpg.h.in $(srcdir)/libwpg.rc.in \ - $(top_srcdir)/depcomp \ + $(srcdir)/libwpg.rc.in $(top_srcdir)/depcomp \ $(libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/libtool.m4 \ @@ -65,7 +92,7 @@ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = libwpg.h libwpg.rc +CONFIG_CLEAN_FILES = libwpg.rc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ @@ -100,8 +127,7 @@ am__DEPENDENCIES_1 = am_libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_OBJECTS = \ WPGraphics.lo WPGDashArray.lo WPGColor.lo WPGHeader.lo \ - WPGSVGGenerator.lo WPGXParser.lo WPG1Parser.lo WPG2Parser.lo \ - WPGBitmap.lo WPGInternalStream.lo + WPGXParser.lo WPG1Parser.lo WPG2Parser.lo WPGBitmap.lo libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_OBJECTS = $(am_libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -247,6 +273,12 @@ 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@ @@ -314,49 +346,38 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -@PLATFORM_WIN32_FALSE@no_undefined = -@PLATFORM_WIN32_TRUE@no_undefined = -no-undefined @PLATFORM_WIN32_FALSE@version_info = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) @PLATFORM_WIN32_TRUE@version_info = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -avoid-version lib_LTLIBRARIES = libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_includedir = $(includedir)/libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@/libwpg libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_include_HEADERS = \ - libwpg.h \ - WPGraphics.h \ - WPGPaintInterface.h + $(top_srcdir)/inc/libwpg/libwpg.h \ + $(top_srcdir)/inc/libwpg/WPGraphics.h -AM_CXXFLAGS = $(WPD_CFLAGS) $(DEBUG_CXXFLAGS) -libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_LIBADD = $(WPD_LIBS) @LIBWPG_WIN32_RESOURCE@ +AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(WPD_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBWPG_BUILD=1 +libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_LIBADD = $(WPD_LIBS) $(REVENGE_LIBS) @LIBWPG_WIN32_RESOURCE@ libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_DEPENDENCIES = @LIBWPG_WIN32_RESOURCE@ -libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic $(no_undefined) +libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_SOURCES = \ WPGraphics.cpp \ WPGDashArray.cpp \ WPGColor.cpp \ WPGHeader.cpp \ - WPGSVGGenerator.cpp \ WPGXParser.cpp \ WPG1Parser.cpp \ WPG2Parser.cpp \ WPGBitmap.cpp \ - WPGInternalStream.cpp \ - libwpg.h \ libwpg_utils.h \ WPGColor.h \ WPGDashArray.h \ WPGHeader.h \ - WPGSVGGenerator.h \ WPGXParser.h \ WPG1Parser.h \ WPG2Parser.h \ - WPGBitmap.h \ - WPGInternalStream.h\ - WPGPaintInterface.h + WPGBitmap.h EXTRA_DIST = \ - libwpg.h.in \ - libwpg.rc.in \ - makefile.mk + libwpg.rc.in # These may be in the builddir too @@ -397,8 +418,6 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -libwpg.h: $(top_builddir)/config.status $(srcdir)/libwpg.h.in - cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libwpg.rc: $(top_builddir)/config.status $(srcdir)/libwpg.rc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ @@ -436,6 +455,7 @@ echo rm -f $${locs}; \ rm -f $${locs}; \ } + libwpg-@WPG_MAJOR_VERSION@.@WPG_MINOR_VERSION@.la: $(libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_OBJECTS) $(libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_DEPENDENCIES) $(EXTRA_libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_DEPENDENCIES) $(AM_V_CXXLD)$(libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_LINK) -rpath $(libdir) $(libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_OBJECTS) $(libwpg_@WPG_MAJOR_VERSION@_@WPG_MINOR_VERSION@_la_LIBADD) $(LIBS) @@ -451,8 +471,6 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WPGColor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WPGDashArray.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WPGHeader.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WPGInternalStream.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WPGSVGGenerator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WPGXParser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/WPGraphics.Plo@am__quote@ diff -Nru libwpg-0.2.2/src/lib/makefile.mk libwpg-0.3.0-rjvb/src/lib/makefile.mk --- libwpg-0.2.2/src/lib/makefile.mk 2011-11-29 15:25:31.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/makefile.mk 1970-01-01 00:00:00.000000000 +0000 @@ -1,41 +0,0 @@ -EXTERNAL_WARNINGS_NOT_ERRORS := TRUE - -PRJ=..$/..$/..$/..$/..$/.. - -PRJNAME=libwpg -TARGET=wpglib -ENABLE_EXCEPTIONS=TRUE -LIBTARGET=NO - -.INCLUDE : settings.mk - -.IF "$(GUI)$(COM)"=="WNTMSC" -CFLAGS+=-GR -.ENDIF -.IF "$(COM)"=="GCC" -CFLAGSCXX+=-frtti -.ENDIF - -.IF "$(SYSTEM_LIBWPD)" == "YES" -INCPRE+=$(WPD_CFLAGS) -I.. -.ELSE -INCPRE+=$(SOLARVER)$/$(UPD)$/$(INPATH)$/inc$/libwpd -.ENDIF - -SLOFILES= \ - $(SLO)$/WPG1Parser.obj \ - $(SLO)$/WPG2Parser.obj \ - $(SLO)$/WPGBitmap.obj \ - $(SLO)$/WPGColor.obj \ - $(SLO)$/WPGDashArray.obj \ - $(SLO)$/WPGHeader.obj \ - $(SLO)$/WPGInternalStream.obj \ - $(SLO)$/WPGraphics.obj \ - $(SLO)$/WPGSVGGenerator.obj \ - $(SLO)$/WPGXParser.obj - -LIB1ARCHIV=$(LB)$/libwpglib.a -LIB1TARGET=$(SLB)$/$(TARGET).lib -LIB1OBJFILES= $(SLOFILES) - -.INCLUDE : target.mk diff -Nru libwpg-0.2.2/src/lib/WPG1Parser.cpp libwpg-0.3.0-rjvb/src/lib/WPG1Parser.cpp --- libwpg-0.2.2/src/lib/WPG1Parser.cpp 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPG1Parser.cpp 2014-03-29 10:19:42.000000000 +0000 @@ -25,11 +25,10 @@ * Corel Corporation or Corel Corporation Limited." */ +#include +#include #include "WPG1Parser.h" -#include "WPGPaintInterface.h" #include "libwpg_utils.h" -#include -#include static const unsigned char defaultWPG1PaletteRed[] = { @@ -140,7 +139,7 @@ }; -WPG1Parser::WPG1Parser(WPXInputStream *input, libwpg::WPGPaintInterface *painter): +WPG1Parser::WPG1Parser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter): WPGXParser(input, painter), m_recordLength(0), m_recordEnd(0), m_success(true), m_exit(false), m_graphicsStarted(false), @@ -153,9 +152,9 @@ { m_style.insert("draw:fill", "solid"); m_style.insert("svg:stroke-color", m_penForeColor.getColorString()); - m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), librevenge::RVNG_PERCENT); m_style.insert("draw:fill-color", m_brushForeColor.getColorString()); - m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), librevenge::RVNG_PERCENT); } bool WPG1Parser::parse() @@ -217,12 +216,12 @@ m_brushForeColor = libwpg::WPGColor(0,0,0); m_brushBackColor = libwpg::WPGColor(0,0,0); m_style.insert("svg:stroke-color", m_penForeColor.getColorString()); - m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), librevenge::RVNG_PERCENT); m_style.insert("draw:fill-color", m_brushForeColor.getColorString()); - m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), librevenge::RVNG_PERCENT); resetPalette(); - while(!m_input->atEOS()) + while (!m_input->isEnd()) { #ifdef DEBUG long recordPos = m_input->tell(); @@ -230,23 +229,23 @@ int recordType = readU8(); if (recordType == 0) break; - m_recordLength = readVariableLengthInteger(); + m_recordLength = (int) readVariableLengthInteger(); m_recordEnd = m_input->tell() + m_recordLength - 1; // search function to handler this record int index = -1; - for(int i = 0; (index < 0) && handlers[i].name; i++) - if(handlers[i].type == recordType) + for (int i = 0; (index < 0) && handlers[i].name; i++) + if (handlers[i].type == recordType) index = i; WPG_DEBUG_MSG(("\n")); - if(index < 0) + if (index < 0) WPG_DEBUG_MSG(("Unknown record type 0x%02x at %li size %d\n", recordType, recordPos, m_recordLength)); else { Method recordHandler = handlers[index].handler; - if(!recordHandler) + if (!recordHandler) WPG_DEBUG_MSG(("Record '%s' (ignored) type 0x%02x at %li size %d\n", handlers[index].name, recordType, recordPos, m_recordLength)); else @@ -261,9 +260,9 @@ WPG_DEBUG_MSG(("Current stream position: %li\n", m_input->tell())); - if(m_exit) break; + if (m_exit) break; - m_input->seek(m_recordEnd+1, WPX_SEEK_SET); + m_input->seek(m_recordEnd+1, librevenge::RVNG_SEEK_SET); } if (!m_exit) @@ -279,14 +278,15 @@ handleEndWPG(); return; } - m_input->seek(2, WPX_SEEK_CUR); + m_input->seek(2, librevenge::RVNG_SEEK_CUR); m_width = readU16(); m_height = readU16(); - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:width", (double)m_width/1200.0); propList.insert("svg:height", (double)m_height/1200.0); - m_painter->startGraphics(propList); + m_painter->startDocument(::librevenge::RVNGPropertyList()); + m_painter->startPage(propList); m_graphicsStarted = true; WPG_DEBUG_MSG(("StartWPG\n")); @@ -296,7 +296,8 @@ { if (!m_graphicsStarted) return; - m_painter->endGraphics(); + m_painter->endPage(); + m_painter->endDocument(); m_exit = true; WPG_DEBUG_MSG(("EndWPG\n")); @@ -312,13 +313,13 @@ return; WPG_DEBUG_MSG(("Colormap\n")); - for(unsigned int i = 0; i < numEntries; i++) + for (unsigned int i = 0; i < numEntries; i++) { unsigned char red = readU8(); unsigned char green = readU8(); unsigned char blue = readU8(); libwpg::WPGColor color(red, green, blue); - m_colorPalette[startIndex+i] = color; + m_colorPalette[int(startIndex+i)] = color; WPG_DEBUG_MSG(("Index#%d: RGB %s\n", startIndex+i, color.getColorString().cstr())); } } @@ -330,14 +331,14 @@ unsigned char style = readU8(); unsigned char color = readU8(); - if(style == 0) + if (style == 0) m_style.insert("draw:fill", "none"); - if(style == 1) + if (style == 1) m_style.insert("draw:fill", "solid"); m_brushForeColor = m_colorPalette[color]; m_style.insert("draw:fill-color", m_brushForeColor.getColorString()); - m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), librevenge::RVNG_PERCENT); WPG_DEBUG_MSG(("Fill Attributes\n")); WPG_DEBUG_MSG((" Fill style: %d\n", style)); @@ -352,15 +353,15 @@ unsigned char color = readU8(); unsigned int width = readU16(); - if (!style) + if (!style || !width) m_style.insert("draw:stroke", "none"); else m_style.insert("draw:stroke", "solid"); m_penForeColor = m_colorPalette[color]; m_style.insert("svg:stroke-color", m_penForeColor.getColorString()); - m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), librevenge::RVNG_PERCENT); - if (!width && style) + if (!width && style) // CHECKME: !width or !style m_style.insert("svg:stroke-width", 0.0); else m_style.insert("svg:stroke-width", (double)width / 1200.0); @@ -368,7 +369,7 @@ WPG_DEBUG_MSG(("Line Attributes\n")); WPG_DEBUG_MSG((" Line style: %d\n", style)); WPG_DEBUG_MSG((" Line color index: %d\n", color)); - WPG_DEBUG_MSG((" Line width: %d\n", width)); + WPG_DEBUG_MSG((" Line width: %d\n", (int) width)); } void WPG1Parser::handleLine() @@ -380,8 +381,8 @@ int ex = readS16(); int ey = readS16(); - ::WPXPropertyListVector points; - ::WPXPropertyList point; + ::librevenge::RVNGPropertyListVector points; + ::librevenge::RVNGPropertyList point; point.insert("svg:x", (double)sx/1200.0); point.insert("svg:y", (double)(m_height-sy)/1200.0); points.append(point); @@ -390,9 +391,14 @@ point.insert("svg:y", (double)(m_height-ey)/1200.0); points.append(point); - m_painter->setStyle(m_style, m_gradient); - - m_painter->drawPolyline(points); + librevenge::RVNGPropertyList tmpStyle(m_style); + if (m_gradient.count()) + tmpStyle.insert("svg:linearGradient", m_gradient); + m_painter->setStyle(tmpStyle); + + librevenge::RVNGPropertyList tmpPoints; + tmpPoints.insert("svg:points", points); + m_painter->drawPolyline(tmpPoints); WPG_DEBUG_MSG(("Line\n")); WPG_DEBUG_MSG((" Starting point: %d,%d\n", sx, sy)); @@ -405,9 +411,9 @@ return; unsigned int count = readU16(); - ::WPXPropertyListVector points; - ::WPXPropertyList point; - for(unsigned int i = 0; i < count; i++ ) + ::librevenge::RVNGPropertyListVector points; + ::librevenge::RVNGPropertyList point; + for (unsigned int i = 0; i < count; i++) { point.clear(); long x = readS16(); @@ -417,9 +423,11 @@ points.append(point); } - m_painter->setStyle(m_style, ::WPXPropertyListVector()); + m_painter->setStyle(m_style); - m_painter->drawPolyline(points); + librevenge::RVNGPropertyList tmpPoints; + tmpPoints.insert("svg:points", points); + m_painter->drawPolyline(tmpPoints); WPG_DEBUG_MSG(("Polyline\n")); } @@ -433,14 +441,17 @@ int w = readS16(); int h = readS16(); - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", (double)x/1200.0); // in WPG, we have the coordinate of lower left point, in SVG-ish coordinates we have to get upper left propList.insert("svg:y", (double)(m_height - h - y)/1200.0); propList.insert("svg:width", (double)w/1200.0); propList.insert("svg:height",(double)h/1200.0); - m_painter->setStyle(m_style, m_gradient); + librevenge::RVNGPropertyList tmpStyle(m_style); + if (m_gradient.count()) + tmpStyle.insert("svg:linearGradient", m_gradient); + m_painter->setStyle(tmpStyle); m_painter->drawRectangle(propList); @@ -456,9 +467,9 @@ return; unsigned int count = readU16(); - ::WPXPropertyListVector points; - ::WPXPropertyList point; - for(unsigned int i = 0; i < count; i++ ) + ::librevenge::RVNGPropertyListVector points; + ::librevenge::RVNGPropertyList point; + for (unsigned int i = 0; i < count; i++) { point.clear(); long x = readS16(); @@ -468,9 +479,14 @@ points.append(point); } - m_painter->setStyle(m_style, m_gradient); - - m_painter->drawPolygon(points); + librevenge::RVNGPropertyList tmpStyle(m_style); + if (m_gradient.count()) + tmpStyle.insert("svg:linearGradient", m_gradient); + m_painter->setStyle(tmpStyle); + + librevenge::RVNGPropertyList tmpPoints; + tmpPoints.insert("svg:points", points); + m_painter->drawPolygon(tmpPoints); WPG_DEBUG_MSG(("Polygon\n")); } @@ -480,19 +496,22 @@ if (!m_graphicsStarted) return; - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:cx", (double)readS16()/1200.0); propList.insert("svg:cy", (double)(m_height-readS16())/1200.0); propList.insert("svg:rx", (double)readS16()/1200.0); propList.insert("svg:ry", (double)readS16()/1200.0); - propList.insert("libwpg:rotate", (double)readS16()); + propList.insert("librevenge:rotate", (double)readS16()); #if 0 int beginAngle = readS16(); int endAngle = readS16(); unsigned flags = readU16(); #endif - m_painter->setStyle(m_style, m_gradient); + librevenge::RVNGPropertyList tmpStyle(m_style); + if (m_gradient.count()) + tmpStyle.insert("svg:linearGradient", m_gradient); + m_painter->setStyle(tmpStyle); m_painter->drawEllipse(propList); @@ -510,12 +529,12 @@ unsigned int count = readU16(); if (!count) return; - ::WPXPropertyListVector path; - ::WPXPropertyList element; + ::librevenge::RVNGPropertyListVector path; + ::librevenge::RVNGPropertyList element; long xInitial = readS16(); long yInitial = readS16(); - element.insert("libwpg:path-action", "M"); + element.insert("librevenge:path-action", "M"); element.insert("svg:x", (double)xInitial/1200.0); element.insert("svg:y", (double)(m_height-yInitial)/1200.0); path.append(element); @@ -529,7 +548,7 @@ long yCoordinate = readS16(); element.clear(); - element.insert("libwpg:path-action", "C"); + element.insert("librevenge:path-action", "C"); element.insert("svg:x1", (double)xControl1/1200.0); element.insert("svg:y1", (double)(m_height-yControl1)/1200.0); element.insert("svg:x2", (double)xControl2/1200.0); @@ -540,9 +559,13 @@ } - m_painter->setStyle(m_style, m_gradient); - - m_painter->drawPath(path); + librevenge::RVNGPropertyList tmpStyle(m_style); + if (m_gradient.count()) + tmpStyle.insert("svg:linearGradient", m_gradient); + m_painter->setStyle(tmpStyle); + librevenge::RVNGPropertyList propList; + propList.insert("svg:d", path); + m_painter->drawPath(propList); WPG_DEBUG_MSG(("Curved Polyline\n")); } @@ -558,50 +581,50 @@ // round to the next byte unsigned scanline_width = (width * depth + 7)/8; unsigned tmpBufferSize = scanline_width * height; - WPG_DEBUG_MSG(("Scanline width: %d\n", scanline_width)); + WPG_DEBUG_MSG(("Scanline width: %d\n", (int) scanline_width)); WPG_DEBUG_MSG(("Output size: %d\n", scanline_width * height)); WPG_DEBUG_MSG(("Decoding RLE data\n")); buffer.reserve(tmpBufferSize); - while (m_input->tell() < m_recordEnd && !m_input->atEOS() && buffer.size() < tmpBufferSize) + while (m_input->tell() < m_recordEnd && !m_input->isEnd() && buffer.size() < tmpBufferSize) { unsigned char opcode = readU8(); - if(opcode & 0x80) + if (opcode & 0x80) { // run of byte int count = (int)(opcode & 0x7f); unsigned char pixel = (count > 0) ? readU8() : 0xff; - if(count == 0) + if (count == 0) count = (int)readU8(); - for( ; count ; --count) - buffer.push_back( pixel ); + for (; count ; --count) + buffer.push_back(pixel); } else { int count = (int)(opcode & 0x7f); - if(count > 0) + if (count > 0) { // literal byte copy - for( ; count ; --count) - buffer.push_back( readU8() ); + for (; count ; --count) + buffer.push_back(readU8()); } else { // copy entire scan line count = (int)readU8(); - if (buffer.size() < scanline_width ) + if (buffer.size() < scanline_width) { WPG_DEBUG_MSG(("Cannot copy the scanline, not enough data %li\n", (long)buffer.size())); break; } - unsigned raster_source = buffer.size() - scanline_width; - for( ; count; --count) - for(unsigned r = 0; r < scanline_width ; r++) + unsigned raster_source = unsigned(buffer.size() - scanline_width); + for (; count; --count) + for (unsigned r = 0; r < scanline_width ; r++) { unsigned char pixel = buffer[raster_source + r]; - buffer.push_back( pixel ); + buffer.push_back(pixel); } } } @@ -616,7 +639,7 @@ void WPG1Parser::fillPixels(libwpg::WPGBitmap &bitmap, const unsigned char *buffer, unsigned width, unsigned height, unsigned depth) { // sanity - if(!buffer) + if (!buffer) return; if (depth != 8 && depth != 4 && depth != 2 && depth != 1) @@ -626,22 +649,22 @@ unsigned scanline_width = (width * depth + 7)/8; // 1-bit image: black and white - if(depth == 1) + if (depth == 1) { libwpg::WPGColor black(0, 0, 0); libwpg::WPGColor white(255, 255, 255); - for(unsigned y = 0; y < height; y++) + for (unsigned y = 0; y < height; y++) { const unsigned char *buf = buffer + y * scanline_width; - for(unsigned x = 0; x < width; x++) - if(buf[x/8] & (0x80 >> (x & 7))) - bitmap.setPixel(x, y, white); + for (unsigned x = 0; x < width; x++) + if (buf[x/8] & (0x80 >> (x & 7))) + bitmap.setPixel((int)x, (int)y, white); else - bitmap.setPixel(x, y, black); + bitmap.setPixel((int)x, (int)y, black); } } // 2-bit image: 4-color bitmap (indexed) - else if(depth == 2) + else if (depth == 2) { unsigned i = 0; for (unsigned y = 0; y < height; y++) @@ -650,12 +673,12 @@ if ((x==0) && (i % 4 != 0)) i = (i/4 + 1) * 4; unsigned index = ((buffer[i/4] & (0x03 << 2*(3 - (i % 4)))) >> 2*(3 - (i % 4))); - const libwpg::WPGColor &color = m_colorPalette[index]; - bitmap.setPixel(x, y, color); + const libwpg::WPGColor &color = m_colorPalette[(int)index]; + bitmap.setPixel((int)x, (int)y, color); } } // 4 -bit image: 16-colour bitmap (indexed) - else if(depth == 4) + else if (depth == 4) { unsigned i = 0; for (unsigned y = 0; y < height; y++) @@ -664,20 +687,20 @@ if ((x==0) && (i % 2 != 0)) i = (i/2 + 1) * 2; unsigned index = ((buffer[i/2] & (0x0f << 4*(1 - (i % 2)))) >> 4*(1 - (i % 2))); - const libwpg::WPGColor &color = m_colorPalette[index]; - bitmap.setPixel(x, y, color); + const libwpg::WPGColor &color = m_colorPalette[(int) index]; + bitmap.setPixel((int) x, (int) y, color); } } // 8-bit image: 256-colour image (indexed) - else if(depth == 8) + else if (depth == 8) { - for(unsigned y = 0; y < height; y++) + for (unsigned y = 0; y < height; y++) { const unsigned char *buf = buffer + y * scanline_width; - for(unsigned x = 0; x < width; x++) + for (unsigned x = 0; x < width; x++) { const libwpg::WPGColor &color = m_colorPalette[buf[x]]; - bitmap.setPixel(x, y, color); + bitmap.setPixel((int) x, (int) y, color); } } @@ -706,9 +729,9 @@ return; // Sanity checks - if(hres <= 0) + if (hres <= 0) hres = 72; - if(vres <= 0) + if (vres <= 0) vres = 72; if (width < 0) width = 0; @@ -719,19 +742,20 @@ // Assume on the corner (0,0) libwpg::WPGBitmap bitmap(width, height, vres, hres); - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", 0.0); propList.insert("svg:y", 0.0); propList.insert("svg:width", (double)width/(double)hres); propList.insert("svg:height", (double)height/(double)vres); - propList.insert("libwpg:mime-type", "image/bmp"); + propList.insert("librevenge:mime-type", "image/bmp"); std::vector buffer; - decodeRLE(buffer, width, height, depth); + decodeRLE(buffer, (unsigned int)width, (unsigned int)height, (unsigned int) depth); if (buffer.size() && buffer.size() == (unsigned long)((width*depth + 7)/8)*height) { - fillPixels(bitmap, &buffer[0], width, height, depth); - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + fillPixels(bitmap, &buffer[0], (unsigned int)width, (unsigned int)height, (unsigned int)depth); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } } @@ -767,9 +791,9 @@ return; // Sanity checks - if(hres <= 0) + if (hres <= 0) hres = 72; - if(vres <= 0) + if (vres <= 0) vres = 72; if (width < 0) width = 0; @@ -786,19 +810,20 @@ WPG_DEBUG_MSG(("%li %li %li %li\n", xs1, ys1, xs2, ys2)); libwpg::WPGBitmap bitmap(width, height, vres, hres); - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", (double)xs1/(double)hres); propList.insert("svg:y", (double)(ys1)/(double)vres); propList.insert("svg:width", (double)(xs2-xs1)/(double)hres); propList.insert("svg:height", (double)(ys2-ys1)/(double)vres); - propList.insert("libwpg:mime-type", "image/bmp"); + propList.insert("librevenge:mime-type", "image/bmp"); std::vector buffer; - decodeRLE(buffer, width, height, depth); + decodeRLE(buffer, (unsigned int)width, (unsigned int)height, (unsigned int)depth); if (buffer.size() && buffer.size() == (unsigned long)((width*depth + 7)/8)*height) { - fillPixels(bitmap, &buffer[0], width, height, depth); - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + fillPixels(bitmap, &buffer[0], (unsigned int)width, (unsigned int)height, (unsigned int)depth); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } } @@ -811,20 +836,23 @@ long x2 = readS16(); long y2 = readS16(); - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", (double)x1/72.0); propList.insert("svg:y", (double)m_height/1200.0 - (double)y1/72.0); propList.insert("svg:width", ((double)x2 - (double)x1)/72.0); propList.insert("svg:height", ((double)y1 - (double)y2)/72.0); - propList.insert("libwpg:mime-type", "application/x-postscript"); + propList.insert("librevenge:mime-type", "application/x-postscript"); - ::WPXBinaryData data; + ::librevenge::RVNGBinaryData data; data.clear(); - while (!m_input->atEOS() && m_input->tell() <= m_recordEnd) - data.append((char)readU8()); + while (!m_input->isEnd() && m_input->tell() <= m_recordEnd) + data.append((unsigned char)readU8()); if (data.size()) - m_painter->drawGraphicObject(propList, data); + { + propList.insert("office:binary-data", data); + m_painter->drawGraphicObject(propList); + } } void WPG1Parser::handlePostscriptTypeTwo() @@ -844,7 +872,7 @@ int y2 = readS16(); WPG_DEBUG_MSG(("Postscript (Type 2)\n")); - WPG_DEBUG_MSG((" Length of Data: %d\n", lengthOfData)); + WPG_DEBUG_MSG((" Length of Data: %d\n", (int) lengthOfData)); WPG_DEBUG_MSG((" Rotation Angle: %d\n", rotation)); WPG_DEBUG_MSG((" Bottom left corner: %d,%d\n", x1, y1)); WPG_DEBUG_MSG((" Top right corner: %d,%d\n", x2, y2)); @@ -858,7 +886,7 @@ long ys2 = (y1 <= y2) ? y2 : y1; WPG_DEBUG_MSG(("%li %li %li %li\n", xs1, ys1, xs2, ys2)); - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", (double)xs1/1200.0); propList.insert("svg:y", (double)(ys1)/1200.0); @@ -866,16 +894,19 @@ propList.insert("svg:width", ((double)xs2 - (double)xs1)/1200.0); propList.insert("svg:height", ((double)ys2 -(double)ys1)/1200.0); - propList.insert("libwpg:mime-type", "image/x-eps"); + propList.insert("librevenge:mime-type", "image/x-eps"); - m_input->seek(48, WPX_SEEK_CUR); + m_input->seek(48, librevenge::RVNG_SEEK_CUR); - ::WPXBinaryData data; + ::librevenge::RVNGBinaryData data; data.clear(); - while (!m_input->atEOS() && m_input->tell() <= m_recordEnd) - data.append((char)readU8()); + while (!m_input->isEnd() && m_input->tell() <= m_recordEnd) + data.append((unsigned char)readU8()); if (data.size()) - m_painter->drawGraphicObject(propList, data); + { + propList.insert("office:binary-data", data); + m_painter->drawGraphicObject(propList); + } } void WPG1Parser::handleGraphicsTextAttributes() @@ -891,23 +922,23 @@ unsigned short textLength = readU16(); int x = readS16(); int y = readS16(); - WPXString textString; + librevenge::RVNGString textString; for (unsigned short i=0; i < textLength; i++) - textString.append(readU8()); + textString.append((char)readU8()); WPG_DEBUG_MSG(("Graphics Text (Type 1)\n")); - WPG_DEBUG_MSG((" Length of String: %d\n", textLength)); + WPG_DEBUG_MSG((" Length of String: %d\n", (int) textLength)); WPG_DEBUG_MSG((" String position: %d,%d\n", x, y)); WPG_DEBUG_MSG((" String: %s\n", textString.cstr())); y = m_height - y; - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", (double)x/1200.0); propList.insert("svg:y", (double)(y)/1200.0); - m_painter->startTextObject(propList, ::WPXPropertyListVector()); + m_painter->startTextObject(propList); m_painter->insertText(textString); @@ -919,7 +950,7 @@ if (!m_graphicsStarted) return; #ifdef DEBUG - int sizeEquivalentData = readU32(); + int sizeEquivalentData = (int) readU32(); short rotationAngle = readS16(); #endif unsigned short textLength = readU16(); @@ -932,21 +963,21 @@ int sy = readS16(); unsigned char type = readU8(); #endif - WPXBinaryData textString; + librevenge::RVNGBinaryData textString; for (unsigned short i=0; i < textLength; i++) textString.append(readU8()); WPG_DEBUG_MSG(("Graphics Text (Type 1)\n")); WPG_DEBUG_MSG((" Size of Equivalent data: %d\n", sizeEquivalentData)); WPG_DEBUG_MSG((" Rotation Angle: %d\n", rotationAngle)); - WPG_DEBUG_MSG((" Length of String: %d\n", textLength)); + WPG_DEBUG_MSG((" Length of String: %d\n", (int) textLength)); WPG_DEBUG_MSG((" Start position: %d,%d\n", x1, y1)); WPG_DEBUG_MSG((" End position: %d,%d\n", x2, y2)); WPG_DEBUG_MSG((" Scale factor: %d,%d\n", sx, sy)); WPG_DEBUG_MSG((" Type: %d\n", type)); // WPGTextDataHandler handler(m_painter); -// WPDocument::parseSubDocument(const_cast(textString.getDataStream()), &handler, WPD_FILE_FORMAT_WP5); +// WPDocument::parseSubDocument(const_cast(textString.getDataStream()), &handler, librevenge::RVNG_FILE_FORMAT_WP5); } void WPG1Parser::resetPalette() diff -Nru libwpg-0.2.2/src/lib/WPG1Parser.h libwpg-0.3.0-rjvb/src/lib/WPG1Parser.h --- libwpg-0.2.2/src/lib/WPG1Parser.h 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPG1Parser.h 2014-03-29 10:19:42.000000000 +0000 @@ -31,13 +31,13 @@ #include "WPGXParser.h" #include "WPGDashArray.h" #include "WPGBitmap.h" -#include +#include #include class WPG1Parser : public WPGXParser { public: - WPG1Parser(WPXInputStream *input, libwpg::WPGPaintInterface *painter); + WPG1Parser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter); bool parse(); private: @@ -78,13 +78,13 @@ bool m_graphicsStarted; int m_width; int m_height; - ::WPXPropertyList m_style; + ::librevenge::RVNGPropertyList m_style; libwpg::WPGColor m_penForeColor; libwpg::WPGColor m_penBackColor; libwpg::WPGColor m_brushForeColor; libwpg::WPGColor m_brushBackColor; libwpg::WPGDashArray m_dashArray; - ::WPXPropertyListVector m_gradient; + ::librevenge::RVNGPropertyListVector m_gradient; }; #endif // __WPG1PARSER_H__ diff -Nru libwpg-0.2.2/src/lib/WPG2Parser.cpp libwpg-0.3.0-rjvb/src/lib/WPG2Parser.cpp --- libwpg-0.2.2/src/lib/WPG2Parser.cpp 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPG2Parser.cpp 2014-03-29 10:19:42.000000000 +0000 @@ -27,8 +27,9 @@ #define DUMP_BINARY_DATA 0 +#include +#include #include "WPG2Parser.h" -#include "WPGPaintInterface.h" #include "libwpg_utils.h" #include @@ -43,6 +44,8 @@ #include #endif +using namespace libwpd; + namespace { @@ -224,7 +227,7 @@ {} }; -WPG2Parser::WPG2Parser(WPXInputStream *input, libwpg::WPGPaintInterface *painter, bool isEmbedded): +WPG2Parser::WPG2Parser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter, bool isEmbedded): WPGXParser(input, painter), m_recordLength(0), m_recordEnd(0), @@ -275,9 +278,9 @@ m_brushBackColor = ::libwpg::WPGColor(0xff,0xff,0xff); m_style.insert("svg:stroke-color", m_penForeColor.getColorString()); - m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), librevenge::RVNG_PERCENT); m_style.insert("draw:fill-color", m_brushForeColor.getColorString()); - m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), librevenge::RVNG_PERCENT); resetPalette(); m_style.insert("draw:fill", "solid"); @@ -357,7 +360,7 @@ { 0x00, 0, 0 } // end marker }; - while(!m_input->atEOS()) + while (!m_input->isEnd()) { #ifdef DEBUG long recordPos = m_input->tell(); @@ -366,22 +369,22 @@ int recordType = readU8(); if (recordType == 0 || recordType > (int)0x3f) break; - int extension = readVariableLengthInteger(); - m_recordLength = readVariableLengthInteger(); + int extension = (int) readVariableLengthInteger(); + m_recordLength = (int) readVariableLengthInteger(); m_recordEnd = m_input->tell() + m_recordLength - 1; // inside a subgroup, one less sub record - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) m_groupStack.top().subIndex--; // search function to handler this record int index = -1; - for(int i = 0; (index < 0) && handlers[i].name; i++) - if(handlers[i].type == recordType) + for (int i = 0; (index < 0) && handlers[i].name; i++) + if (handlers[i].type == recordType) index = i; WPG_DEBUG_MSG(("\n")); - if(index < 0) + if (index < 0) { WPG_DEBUG_MSG(("Unknown record type 0x%02x at %li size %d extension %d\n", recordType, recordPos, m_recordLength, extension)); @@ -390,7 +393,7 @@ { Method recordHandler = handlers[index].handler; - if(!recordHandler) + if (!recordHandler) WPG_DEBUG_MSG(("Record '%s' (ignored) type 0x%02x at %li size %d extension %d\n", handlers[index].name, recordType, recordPos, m_recordLength, extension)); else @@ -404,24 +407,24 @@ } // the last subgroup - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { WPGGroupContext &context = m_groupStack.top(); - if(context.subIndex == 0) + if (context.subIndex == 0) { - if(context.isCompoundPolygon()) + if (context.isCompoundPolygon()) flushCompoundPolygon(); m_groupStack.pop(); } } // we enter another subgroup, save the context to stack - if(extension > 0) + if (extension > 0) { WPGGroupContext context; context.parentType = recordType; - context.subIndex = extension; - if(context.isCompoundPolygon()) + context.subIndex = (unsigned int) extension; + if (context.isCompoundPolygon()) { context.compoundMatrix = m_compoundMatrix; context.compoundFilled = m_compoundFilled; @@ -437,9 +440,9 @@ WPG_DEBUG_MSG(("Current stream position: %li\n", m_input->tell())); } - if(m_exit) break; + if (m_exit) break; - m_input->seek(m_recordEnd+1, WPX_SEEK_SET); + m_input->seek(m_recordEnd+1, librevenge::RVNG_SEEK_SET); } if (!m_exit) @@ -452,7 +455,7 @@ static const char *describePrecision(unsigned char precision) { const char *result = "Unknown"; - switch(precision) + switch (precision) { case 0: result = "single"; @@ -469,7 +472,7 @@ static const char *describeGradient(unsigned char gradientType) { const char *result = "Unknown"; - switch(gradientType) + switch (gradientType) { case 0: result = "None"; @@ -529,14 +532,14 @@ // sanity check m_xres = horizontalUnit; m_yres = verticalUnit; - if((horizontalUnit==0) || (verticalUnit==0)) + if ((horizontalUnit==0) || (verticalUnit==0)) { m_xres = m_yres = 1200; WPG_DEBUG_MSG(("Warning ! Insane unit of measure")); } // danger if we do not recognize the precision code - if(precision != 0 && precision != 1) + if (precision != 0 && precision != 1) { m_success = false; m_exit = true; @@ -550,7 +553,7 @@ long viewportX2 = (m_doublePrecision) ? readS32() : readS16(); long viewportY2 = (m_doublePrecision) ? readS32() : readS16(); #else - m_input->seek(((m_doublePrecision) ? 16 : 8), WPX_SEEK_CUR); + m_input->seek(((m_doublePrecision) ? 16 : 8), librevenge::RVNG_SEEK_CUR); #endif long imageX1 = (m_doublePrecision) ? readS32() : readS16(); long imageY1 = (m_doublePrecision) ? readS32() : readS16(); @@ -560,12 +563,12 @@ // used to adjust coordinates m_xofs = (imageX1 < imageX2) ? imageX1 : imageX2; m_yofs = (imageY1 < imageY2) ? imageY1 : imageX2; - m_width = (imageX2 > imageX1 ) ? imageX2-imageX1 : imageX1-imageX2; + m_width = (imageX2 > imageX1) ? imageX2-imageX1 : imageX1-imageX2; m_height = (imageY2 > imageY1) ? imageY2-imageY1 : imageY1-imageY2; WPG_DEBUG_MSG(("StartWPG 2\n")); - WPG_DEBUG_MSG((" Horizontal unit of measure : %d pixels/inch\n", horizontalUnit)); - WPG_DEBUG_MSG((" Vertical unit of measure : %d pixels/inch\n", verticalUnit)); + WPG_DEBUG_MSG((" Horizontal unit of measure : %d pixels/inch\n", (int) horizontalUnit)); + WPG_DEBUG_MSG((" Vertical unit of measure : %d pixels/inch\n", (int) verticalUnit)); WPG_DEBUG_MSG((" Data precision : %d (%s)\n", precision, describePrecision(precision))); WPG_DEBUG_MSG((" Viewport X1 : %li\n", viewportX1)); WPG_DEBUG_MSG((" Viewport Y1 : %li\n", viewportY1)); @@ -580,11 +583,12 @@ WPG_DEBUG_MSG((" width : %li\n", m_width)); WPG_DEBUG_MSG((" height : %li\n", m_height)); - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:width", ((TO_DOUBLE(m_width)) / m_xres)); propList.insert("svg:height", ((TO_DOUBLE(m_height)) / m_yres)); - m_painter->startGraphics(propList); + m_painter->startDocument(::librevenge::RVNGPropertyList()); + m_painter->startPage(propList); static const int WPG2_defaultPenDashes[] = { @@ -609,14 +613,14 @@ // create default pen styles int styleNo = 0; - for(int i = 0; (long)i < (long)(sizeof(WPG2_defaultPenDashes)/sizeof(WPG2_defaultPenDashes[0]));) + for (int i = 0; (long)i < (long)(sizeof(WPG2_defaultPenDashes)/sizeof(WPG2_defaultPenDashes[0]));) { int segments = 2 * WPG2_defaultPenDashes[i++]; - if(segments == 0) break; + if (segments == 0) break; libwpg::WPGDashArray dashArray; - for(int j = 0; j < segments; j++, i++) + for (int j = 0; j < segments; j++, i++) dashArray.add(WPG2_defaultPenDashes[i]*3.6/218.0); - m_dashArrayStyles[styleNo] = dashArray; + m_dashArrayStyles[(unsigned int)styleNo] = dashArray; styleNo++; } m_graphicsStarted = true; @@ -627,10 +631,11 @@ if (!m_graphicsStarted) return; // sentinel - if(m_layerOpened) + if (m_layerOpened) m_painter->endLayer(); - m_painter->endGraphics(); + m_painter->endPage(); + m_painter->endDocument(); m_exit = true; } @@ -641,7 +646,7 @@ unsigned int h = (m_doublePrecision) ? readU32() : readU16(); double width = (TO_DOUBLE(w)) / m_xres; double height = (TO_DOUBLE(h)) / m_yres; - m_input->seek(((m_doublePrecision) ? 4 : 2), WPX_SEEK_CUR); + m_input->seek(((m_doublePrecision) ? 4 : 2), librevenge::RVNG_SEEK_CUR); unsigned int ml = (m_doublePrecision) ? readU32() : readU16(); unsigned int mr = (m_doublePrecision) ? readU32() : readU16(); unsigned int mt = (m_doublePrecision) ? readU32() : readU16(); @@ -660,17 +665,17 @@ { if (!m_graphicsStarted) return; - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; propList.insert("svg:id", (int)readU16()); // close previous one - if(m_layerOpened) + if (m_layerOpened) m_painter->endLayer(); m_painter->startLayer(propList); m_layerOpened = true; - WPG_DEBUG_MSG((" Layer Id: %d\n", m_layerId)); + WPG_DEBUG_MSG((" Layer Id: %d\n", (int) m_layerId)); } void WPG2Parser::handleCompoundPolygon() @@ -693,27 +698,31 @@ return; WPGGroupContext &context = m_groupStack.top(); - WPXPropertyList tmpStyle = m_style; + librevenge::RVNGPropertyList tmpStyle = m_style; if (!context.compoundFilled) tmpStyle.insert("draw:fill", "none"); if (!context.compoundFramed) tmpStyle.insert("draw:stroke", "none"); - if(context.compoundWindingRule) + if (context.compoundWindingRule) tmpStyle.insert("svg:fill-rule", "nonzero"); else tmpStyle.insert("svg:fill-rule", "evenodd"); - m_painter->setStyle( tmpStyle, context.compoundFilled ? m_gradient : ::WPXPropertyListVector() ); + if (context.compoundFilled || m_gradient.count()) + tmpStyle.insert("svg:linearGradient", m_gradient); + m_painter->setStyle(tmpStyle); if (context.compoundClosed) { - WPXPropertyList element; - element.insert("libwpg:path-action", "Z"); + librevenge::RVNGPropertyList element; + element.insert("librevenge:path-action", "Z"); context.compoundPath.append(element); } - m_painter->drawPath(context.compoundPath); + librevenge::RVNGPropertyList propList; + propList.insert("svg:d", context.compoundPath); + m_painter->drawPath(propList); } void WPG2Parser::handlePenStyleDefinition() @@ -724,7 +733,7 @@ unsigned int segments = readU16(); libwpg::WPGDashArray dashArray; - for(unsigned i = 0; i < segments; i++) + for (unsigned i = 0; i < segments; i++) { unsigned int p = (m_doublePrecision) ? readU32() : readU16(); unsigned int q = (m_doublePrecision) ? readU32() : readU16(); @@ -733,8 +742,8 @@ } m_dashArrayStyles[style] = dashArray; - WPG_DEBUG_MSG((" Style : %d\n", style)); - WPG_DEBUG_MSG((" Segment pairs : %d\n", segments)); + WPG_DEBUG_MSG((" Style : %d\n", (int) style)); + WPG_DEBUG_MSG((" Segment pairs : %d\n", (int) segments)); } #if 0 @@ -754,14 +763,14 @@ unsigned startIndex = readU16(); unsigned numEntries = readU16(); - for(unsigned i = 0; i < numEntries; i++) + for (unsigned i = 0; i < numEntries; i++) { unsigned char red = readU8(); unsigned char green = readU8(); unsigned char blue = readU8(); unsigned char alpha = 0xff - readU8(); libwpg::WPGColor color(red, green, blue, alpha); - m_colorPalette[startIndex+i] = color; + m_colorPalette[int(startIndex+i)] = color; WPG_DEBUG_MSG(("Index#%d: RGB %s\n", startIndex+i, color.getColorString().cstr())); } } @@ -773,14 +782,14 @@ unsigned startIndex = readU16(); unsigned numEntries = readU16(); - for(unsigned int i = 0; i < numEntries; i++) + for (unsigned int i = 0; i < numEntries; i++) { unsigned char red = readU16() >> 8 ; unsigned char green = readU16() >> 8 ; unsigned char blue = readU16() >> 8 ; unsigned char alpha = 0xff - (readU16() >> 8) ; libwpg::WPGColor color(red, green, blue, alpha); - m_colorPalette[startIndex+i] = color; + m_colorPalette[int(startIndex+i)] = color; WPG_DEBUG_MSG(("Index#%d: RGB %s\n", startIndex+i, color.getColorString().cstr())); } } @@ -789,7 +798,7 @@ { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -810,7 +819,7 @@ { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -824,7 +833,7 @@ unsigned char alpha = 0xff - ((m_doublePrecision) ? readU16()>>8 : readU8()); m_style.insert("svg:stroke-color", libwpg::WPGColor(red, green, blue, alpha).getColorString()); - m_style.insert("svg:stroke-opacity", libwpg::WPGColor(red, green, blue, alpha).getOpacity(), WPX_PERCENT); + m_style.insert("svg:stroke-opacity", libwpg::WPGColor(red, green, blue, alpha).getOpacity(), librevenge::RVNG_PERCENT); m_penForeColor = libwpg::WPGColor(red, green, blue, alpha); WPG_DEBUG_MSG((" Foreground color (RGBA): %d %d %d %d\n", red, green, blue, alpha)); @@ -845,7 +854,7 @@ m_penBackColor = libwpg::WPGColor(red, green, blue, alpha); m_style.insert("svg:stroke-color", m_penForeColor.getColorString()); - m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), librevenge::RVNG_PERCENT); WPG_DEBUG_MSG((" Background color (RGBA): %d %d %d %d\n", red, green, blue, alpha)); } @@ -863,12 +872,12 @@ unsigned int blue = (m_doublePrecision) ? readU16()>>8 : readU8(); unsigned int alpha = 0xff - ((m_doublePrecision) ? readU16()>>8 : readU8()); - m_penBackColor = libwpg::WPGColor(red, green, blue, alpha); + m_penBackColor = libwpg::WPGColor((int) red, (int) green, (int) blue, (int) alpha); m_style.insert("svg:stroke-color", m_penForeColor.getColorString()); - m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("svg:stroke-opacity", m_penForeColor.getOpacity(), librevenge::RVNG_PERCENT); - WPG_DEBUG_MSG((" Background color (RGBA): %d %d %d %d\n", red, green, blue, alpha)); + WPG_DEBUG_MSG((" Background color (RGBA): %d %d %d %d\n", (int) red, (int) green, (int) blue, (int) alpha)); } void WPG2Parser::setPenStyle() @@ -878,10 +887,10 @@ { double strokeWidth = m_style["svg:stroke-width"] ? m_style["svg:stroke-width"]->getDouble() : 0.0; m_style.insert("draw:dots1", m_dashArray.getDots1()); - m_style.insert("draw:dots1-length", 72.0*72.0*strokeWidth*(m_dashArray.getDots1Length()), WPX_POINT); + m_style.insert("draw:dots1-length", 72.0*72.0*strokeWidth*(m_dashArray.getDots1Length()), librevenge::RVNG_POINT); m_style.insert("draw:dots2", m_dashArray.getDots2()); - m_style.insert("draw:dots2-length", 72.0*72.0*strokeWidth*(m_dashArray.getDots2Length()), WPX_POINT); - m_style.insert("draw:distance", 72.0*72.0*strokeWidth*(m_dashArray.getDistance()), WPX_POINT); + m_style.insert("draw:dots2-length", 72.0*72.0*strokeWidth*(m_dashArray.getDots2Length()), librevenge::RVNG_POINT); + m_style.insert("draw:distance", 72.0*72.0*strokeWidth*(m_dashArray.getDistance()), librevenge::RVNG_POINT); } } @@ -889,7 +898,7 @@ { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -907,14 +916,14 @@ setPenStyle(); - WPG_DEBUG_MSG((" Pen style : %d\n", style)); + WPG_DEBUG_MSG((" Pen style : %d\n", (int) style)); } void WPG2Parser::handlePenSize() { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -925,14 +934,14 @@ m_style.insert("svg:stroke-width", (TO_DOUBLE(width) / m_xres)); - WPG_DEBUG_MSG((" Width: %d\n", width)); + WPG_DEBUG_MSG((" Width: %d\n", (int) width)); } void WPG2Parser::handleDPPenSize() { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -944,14 +953,14 @@ m_style.insert("svg:stroke-width", TO_DOUBLE(width) / m_xres / 256); // m_pen.height = TO_DOUBLE(height) / m_yres / 256; - WPG_DEBUG_MSG((" Width: %li\n", width)); + WPG_DEBUG_MSG((" Width: %li\n", (long) width)); } void WPG2Parser::handleLineCap() { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -965,7 +974,7 @@ { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -979,7 +988,7 @@ { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -992,8 +1001,8 @@ unsigned yref = readU16(); #ifdef DEBUG unsigned flag = readU16(); - bool granular = ((flag & (1<<6))>>6) == 1; - bool anchor = ((flag & (1<<7))>>7) == 1; + bool granular = flag & (1<<6); + bool anchor = flag & (1<<7); #else readU16(); #endif @@ -1004,8 +1013,8 @@ m_gradientRef.insert("svg:cx", (double)xref); m_gradientRef.insert("svg:cy", (double)yref); - WPG_DEBUG_MSG((" Gradient angle : %d.%d\n", angleInteger, angleFraction)); - WPG_DEBUG_MSG((" Gradient reference : %d.%d\n", xref, yref)); + WPG_DEBUG_MSG((" Gradient angle : %d.%d\n", (int) angleInteger, (int) angleFraction)); + WPG_DEBUG_MSG((" Gradient reference : %d.%d\n", (int) xref, (int) yref)); WPG_DEBUG_MSG((" Granular : %s\n", (granular ? "yes" : "no"))); WPG_DEBUG_MSG((" Anchored : %s\n", (anchor ? "yes" : "no"))); } @@ -1014,7 +1023,7 @@ { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -1027,8 +1036,8 @@ unsigned yref = readU16(); #ifdef DEBUG unsigned flag = readU16(); - bool granular = (flag & (1<<6)) == 1; - bool anchor = (flag & (1<<7)) == 1; + bool granular = flag & (1<<6); + bool anchor = flag & (1<<7); #else readU16(); #endif @@ -1039,8 +1048,8 @@ m_gradientRef.insert("svg:cx", (double)xref); m_gradientRef.insert("svg:cy", (double)yref); - WPG_DEBUG_MSG((" Gradient angle : %d.%d\n", angleInteger, angleFraction)); - WPG_DEBUG_MSG((" Gradient reference : %d.%d\n", xref, yref)); + WPG_DEBUG_MSG((" Gradient angle : %d.%d\n", (int) angleInteger, (int) angleFraction)); + WPG_DEBUG_MSG((" Gradient reference : %d.%d\n", (int) xref, (int) yref)); WPG_DEBUG_MSG((" Granular : %s\n", (granular ? "yes" : "no"))); WPG_DEBUG_MSG((" Anchored : %s\n", (anchor ? "yes" : "no"))); } @@ -1049,7 +1058,7 @@ { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -1059,7 +1068,7 @@ unsigned char gradientType = readU8(); WPG_DEBUG_MSG((" Gradient type : %d (%s)\n", gradientType, describeGradient(gradientType))); - if(gradientType == 0) + if (gradientType == 0) { unsigned char red = readU8(); unsigned char green = readU8(); @@ -1070,9 +1079,9 @@ m_brushForeColor = libwpg::WPGColor(red, green, blue, alpha); m_style.insert("draw:fill-color", m_brushForeColor.getColorString()); - m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), librevenge::RVNG_PERCENT); - if(!m_style["draw:fill"] || m_style["draw:fill"]->getStr() != "gradient") + if (!m_style["draw:fill"] || m_style["draw:fill"]->getStr() != "gradient") m_style.insert("draw:fill", "solid"); } else @@ -1080,11 +1089,11 @@ unsigned count = readU16(); std::vector colors; std::vector positions; - WPG_DEBUG_MSG((" Gradient colors : %d\n", count)); + WPG_DEBUG_MSG((" Gradient colors : %d\n", (int) count)); if (count > 0) { - for(unsigned i = 0; i < count; i++) + for (unsigned i = 0; i < count; i++) { unsigned char red = readU8(); unsigned char green = readU8(); @@ -1095,41 +1104,41 @@ WPG_DEBUG_MSG((" Color #%d (RGBA): %d %d %d %d\n", i+1, red, green, blue, alpha)); } - for(unsigned j = 0; j < count-1; j++) + for (unsigned j = 0; j < count-1; j++) { unsigned pos = readU16(); positions.push_back(TO_DOUBLE(pos)); - WPG_DEBUG_MSG((" Position #%d : %d\n", j+1, pos)); + WPG_DEBUG_MSG((" Position #%d : %d\n", j+1, (int) pos)); } } // looks like Corel Presentations only create 2 colors gradient // and they are actually in reverse order - if(count == 2) + if (count == 2) { double xref = m_gradientRef["svg:cx"]->getDouble()/65536.0; double yref = m_gradientRef["svg:cy"]->getDouble()/65536.0; double angle = m_gradientAngle*M_PI/180.0; double tanangle = tan(angle); double ref = (tanangle < 1e2 && tanangle > -1e2) ? (yref+xref*tanangle)/(1+tanangle) : xref; - ::WPXPropertyListVector gradient; + ::librevenge::RVNGPropertyListVector gradient; m_style.insert("draw:angle", (int)(-m_gradientAngle)); // upside down - WPXPropertyList propList; - propList.insert("svg:offset", 0.0, WPX_PERCENT); + librevenge::RVNGPropertyList propList; + propList.insert("svg:offset", 0.0, librevenge::RVNG_PERCENT); propList.insert("svg:stop-color", colors[1].getColorString()); - propList.insert("svg:stop-opacity", colors[1].getOpacity(), WPX_PERCENT); + propList.insert("svg:stop-opacity", colors[1].getOpacity(), librevenge::RVNG_PERCENT); gradient.append(propList); propList.clear(); - propList.insert("svg:offset", ref, WPX_PERCENT); + propList.insert("svg:offset", ref, librevenge::RVNG_PERCENT); propList.insert("svg:stop-color", colors[0].getColorString()); - propList.insert("svg:stop-opacity", colors[0].getOpacity(), WPX_PERCENT); + propList.insert("svg:stop-opacity", colors[0].getOpacity(), librevenge::RVNG_PERCENT); gradient.append(propList); propList.clear(); - if((m_gradientRef["svg:cx"]->getInt() != 65535) && (m_gradientRef["svg:cy"]->getInt() != 65535)) + if ((m_gradientRef["svg:cx"]->getInt() != 65535) && (m_gradientRef["svg:cy"]->getInt() != 65535)) { - propList.insert("svg:offset", 1.0, WPX_PERCENT); + propList.insert("svg:offset", 1.0, librevenge::RVNG_PERCENT); propList.insert("svg:stop-color", colors[1].getColorString()); - propList.insert("svg:stop-opacity", colors[1].getOpacity(), WPX_PERCENT); + propList.insert("svg:stop-opacity", colors[1].getOpacity(), librevenge::RVNG_PERCENT); gradient.append(propList); } m_gradient = gradient; @@ -1142,7 +1151,7 @@ { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -1152,7 +1161,7 @@ unsigned char gradientType = readU8(); WPG_DEBUG_MSG((" Gradient type : %d (%s)\n", gradientType, describeGradient(gradientType))); - if(gradientType == 0) + if (gradientType == 0) { unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8(); unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8(); @@ -1163,9 +1172,9 @@ m_brushForeColor = libwpg::WPGColor(red, green, blue, alpha); m_style.insert("draw:fill-color", m_brushForeColor.getColorString()); - m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), librevenge::RVNG_PERCENT); - if(!m_style["draw:fill"] || m_style["draw:fill"]->getStr() != "none") + if (!m_style["draw:fill"] || m_style["draw:fill"]->getStr() != "none") m_style.insert("draw:fill", "solid"); } else @@ -1173,11 +1182,11 @@ unsigned count = readU16(); std::vector colors; std::vector positions; - WPG_DEBUG_MSG((" Gradient colors : %d\n", count)); + WPG_DEBUG_MSG((" Gradient colors : %d\n", (int) count)); if (count > 0) { - for(unsigned i = 0; i < count; i++) + for (unsigned i = 0; i < count; i++) { unsigned char red = (m_doublePrecision) ? readU16()>>8 : readU8(); unsigned char green = (m_doublePrecision) ? readU16()>>8 : readU8(); @@ -1188,42 +1197,42 @@ WPG_DEBUG_MSG((" Color #%d (RGBA): %d %d %d %d\n", i+1, red, green, blue, alpha)); } - for(unsigned j = 0; j < count-1; j++) + for (unsigned j = 0; j < count-1; j++) { unsigned pos = readU16(); positions.push_back(TO_DOUBLE(pos)); - WPG_DEBUG_MSG((" Position #%d : %d\n", j+1, pos)); + WPG_DEBUG_MSG((" Position #%d : %d\n", j+1, (int) pos)); } } // looks like Corel Presentations only create 2 colors gradient // and they are actually in reverse order - if(count == 2) + if (count == 2) { double xref = m_gradientRef["svg:cx"]->getDouble()/65536.0; double yref = m_gradientRef["svg:cy"]->getDouble()/65536.0; double angle = m_gradientAngle*M_PI/180.0; double tanangle = tan(angle); double ref = (tanangle<1e2) ? (yref+xref*tanangle)/(1+tanangle) : xref; - ::WPXPropertyListVector gradient; + ::librevenge::RVNGPropertyListVector gradient; m_style.insert("draw:angle", (int)(-m_gradientAngle)); - WPXPropertyList propList; - propList.insert("svg:offset", 0.0, WPX_PERCENT); + librevenge::RVNGPropertyList propList; + propList.insert("svg:offset", 0.0, librevenge::RVNG_PERCENT); propList.insert("svg:stop-color", colors[1].getColorString()); - propList.insert("svg:stop-opacity", colors[1].getOpacity(), WPX_PERCENT); + propList.insert("svg:stop-opacity", colors[1].getOpacity(), librevenge::RVNG_PERCENT); gradient.append(propList); propList.clear(); - propList.insert("svg:offset", ref, WPX_PERCENT); + propList.insert("svg:offset", ref, librevenge::RVNG_PERCENT); propList.insert("svg:stop-color", colors[0].getColorString()); - propList.insert("svg:stop-opacity", colors[0].getOpacity(), WPX_PERCENT); + propList.insert("svg:stop-opacity", colors[0].getOpacity(), librevenge::RVNG_PERCENT); gradient.append(propList); propList.clear(); - if((m_gradientRef["svg:cx"]->getInt() != 65535) && (m_gradientRef["svg:cy"]->getInt() != 65535)) + if ((m_gradientRef["svg:cx"]->getInt() != 65535) && (m_gradientRef["svg:cy"]->getInt() != 65535)) { - propList.insert("svg:offset", 1.0, WPX_PERCENT); + propList.insert("svg:offset", 1.0, librevenge::RVNG_PERCENT); propList.insert("svg:stop-color", colors[1].getColorString()); - propList.insert("svg:stop-opacity", colors[1].getOpacity(), WPX_PERCENT); + propList.insert("svg:stop-opacity", colors[1].getOpacity(), librevenge::RVNG_PERCENT); gradient.append(propList); } m_gradient = gradient; @@ -1247,7 +1256,7 @@ m_brushBackColor = libwpg::WPGColor(red, green, blue, alpha); m_gradient.backColor = libwpg::WPGColor(red, green, blue, alpha); - if(m_gradient.style == libwpg::WPGGradient::NoBrush) + if (m_gradient.style == libwpg::WPGGradient::NoBrush) m_gradient.style = libwpg::WPGGradient::Solid; WPG_DEBUG_MSG((" Backround color (RGBA): %d %d %d %d\n", red, green, blue, alpha)); @@ -1270,9 +1279,9 @@ m_brushBackColor = libwpg::WPGColor(red, green, blue, alpha); m_style.insert("draw:fill-color", m_brushForeColor.getColorString()); - m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), WPX_PERCENT); + m_style.insert("draw:opacity", m_brushForeColor.getOpacity(), librevenge::RVNG_PERCENT); - if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "none") + if (m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "none") m_style.insert("draw:fill", "solid"); WPG_DEBUG_MSG((" Background color (RGBA): %d %d %d %d\n", red, green, blue, alpha)); @@ -1283,7 +1292,7 @@ { if (!m_graphicsStarted) return; - if(!m_groupStack.empty()) + if (!m_groupStack.empty()) { if (m_groupStack.top().isCompoundPolygon()) return; @@ -1296,13 +1305,13 @@ // TODO - WPG_DEBUG_MSG((" Pattern : %d\n", pattern)); + WPG_DEBUG_MSG((" Pattern : %d\n", (int) pattern)); } void WPG2Parser::parseCharacterization(ObjectCharacterization *ch) { // sanity check - if(!ch) return; + if (!ch) return; // identity ch->matrix = WPG2TransformMatrix(); @@ -1320,15 +1329,15 @@ ch->closed = (flags & (1<<14)) != 0; ch->framed = (flags & (1<<15)) != 0; - if(ch->editLock) ch->lockFlags = readU32(); + if (ch->editLock) ch->lockFlags = readU32(); // object ID can be 2 or 4 bytes - if(ch->hasObjectId) ch->objectId = readU16(); - if(ch->objectId >> 15) ch->objectId = ((ch->objectId & 0x7fff) << 16) | readU16(); + if (ch->hasObjectId) ch->objectId = readU16(); + if (ch->objectId >> 15) ch->objectId = ((ch->objectId & 0x7fff) << 16) | readU16(); - if(ch->rotate) ch->rotationAngle = fixedPointToDouble(readU32()); + if (ch->rotate) ch->rotationAngle = fixedPointToDouble(readU32()); - if(ch->rotate || ch->scale) + if (ch->rotate || ch->scale) { ch->sxcos = readS32(); ch->sycos = readS32(); @@ -1336,7 +1345,7 @@ ch->matrix.element[1][1] = (double)(ch->sxcos)/65536; } - if(ch->rotate || ch->skew) + if (ch->rotate || ch->skew) { ch->kxsin = readS32(); ch->kysin = readS32(); @@ -1344,7 +1353,7 @@ ch->matrix.element[0][1] = (double)(ch->kysin)/65536; } - if(ch->translate) + if (ch->translate) { ch->txfraction = readU16(); ch->txinteger = readS32(); @@ -1354,7 +1363,7 @@ ch->matrix.element[2][1] = (double)(ch->tyinteger); } - if(ch->taper) + if (ch->taper) { ch->px = readS32(); ch->py = readS32(); @@ -1374,10 +1383,10 @@ WPG_DEBUG_MSG((" framed : %s\n", (ch->framed ? "yes" : "no"))); WPG_DEBUG_MSG((" filled : %s\n", (ch->filled ? "yes" : "no"))); #ifdef DEBUG - if(ch->editLock) WPG_DEBUG_MSG((" lock flags : 0x%x\n", (unsigned)ch->lockFlags)); - if(ch->hasObjectId) WPG_DEBUG_MSG((" object ID : 0x%x\n", (unsigned)ch->objectId)); - if(ch->translate) WPG_DEBUG_MSG((" tx : %li %d\n", ch->txinteger, ch->txfraction)); - if(ch->translate) WPG_DEBUG_MSG((" ty : %li %d\n", ch->tyinteger, ch->tyfraction)); + if (ch->editLock) WPG_DEBUG_MSG((" lock flags : 0x%x\n", (unsigned)ch->lockFlags)); + if (ch->hasObjectId) WPG_DEBUG_MSG((" object ID : 0x%x\n", (unsigned)ch->objectId)); + if (ch->translate) WPG_DEBUG_MSG((" tx : %li %d\n", ch->txinteger, ch->txfraction)); + if (ch->translate) WPG_DEBUG_MSG((" ty : %li %d\n", ch->tyinteger, ch->tyfraction)); #endif WPG_DEBUG_MSG(("transform matrix:\n")); WPG_DEBUG_MSG(("%f %f %f\n", ch->matrix.element[0][0], ch->matrix.element[0][1],ch->matrix.element[0][2])); @@ -1393,7 +1402,7 @@ parseCharacterization(&objCh); m_matrix = objCh.matrix; - WPXPropertyList tmpStyle = m_style; + librevenge::RVNGPropertyList tmpStyle = m_style; if (!objCh.filled) tmpStyle.insert("draw:fill", "none"); @@ -1404,16 +1413,15 @@ m_groupStack.top().isCompoundPolygon(); // inside a compound, so take the parent transformation into account - if(insideCompound) + if (insideCompound) m_matrix.transformBy(m_groupStack.top().compoundMatrix); unsigned long count = readU16(); - ::WPXPropertyListVector points; - ::WPXPropertyList point; - for(unsigned long i = 0; i < count; i++ ) + ::librevenge::RVNGPropertyListVector points; + for (unsigned long i = 0; i < count; i++) { - point.clear(); + ::librevenge::RVNGPropertyList point; long x = (m_doublePrecision) ? readS32() : readS16(); long y = (m_doublePrecision) ? readS32() : readS16(); TRANSFORM_XY(x,y); @@ -1422,22 +1430,25 @@ points.append(point); } - if(insideCompound) + ::librevenge::RVNGPropertyList tmpPoints; + tmpPoints.insert("svg:points", points); + + if (insideCompound) { - if(count > 0) + if (count > 0) { // inside a compound ? convert it into path because for compound // we will only use paths - ::WPXPropertyListVector &path = m_groupStack.top().compoundPath; - ::WPXPropertyList element; + ::librevenge::RVNGPropertyListVector &path = m_groupStack.top().compoundPath; + ::librevenge::RVNGPropertyList element; element = points[0]; - element.insert("libwpg:path-action", "M"); + element.insert("librevenge:path-action", "M"); path.append(element); - for(unsigned long ii = 1; ii < count; ii++) + for (unsigned long ii = 1; ii < count; ii++) { element.clear(); element = points[ii]; - element.insert("libwpg:path-action", "L"); + element.insert("librevenge:path-action", "L"); path.append(element); } } @@ -1447,28 +1458,30 @@ // otherwise draw directly if (count > 2) { - if(objCh.windingRule) + if (objCh.windingRule) tmpStyle.insert("svg:fill-rule", "nonzero"); else tmpStyle.insert("svg:fill-rule", "evenodd"); - m_painter->setStyle( tmpStyle, objCh.filled ? m_gradient : ::WPXPropertyListVector() ); + if (objCh.filled || m_gradient.count()) + tmpStyle.insert("svg:linearGradient", m_gradient); + m_painter->setStyle(tmpStyle); if (objCh.filled || objCh.closed) - m_painter->drawPolygon(points); + m_painter->drawPolygon(tmpPoints); else - m_painter->drawPolyline(points); + m_painter->drawPolyline(tmpPoints); } else { - m_painter->setStyle( tmpStyle, ::WPXPropertyListVector() ); - m_painter->drawPolyline(points); + m_painter->setStyle(tmpStyle); + m_painter->drawPolyline(tmpPoints); } } - WPG_DEBUG_MSG((" Vertices count : %li\n", count)); - for(unsigned int j = 0; j < count; j++ ) + WPG_DEBUG_MSG((" Vertices count : %li\n", (long) count)); + for (unsigned int j = 0; j < count; j++) WPG_DEBUG_MSG((" Point #%d : %g,%g\n", j+1, points[j]["svg:x"]->getDouble(), points[j]["svg:x"]->getDouble())); } @@ -1493,7 +1506,7 @@ parseCharacterization(&objCh); m_matrix = objCh.matrix; - WPXPropertyList tmpStyle = m_style; + librevenge::RVNGPropertyList tmpStyle = m_style; if (!objCh.filled) tmpStyle.insert("draw:fill", "none"); @@ -1504,16 +1517,16 @@ m_groupStack.top().isCompoundPolygon(); // inside a compound, so take the parent transformation into account - if(insideCompound) + if (insideCompound) m_matrix.transformBy(m_groupStack.top().compoundMatrix); unsigned int count = readU16(); - ::WPXPropertyListVector path; - ::WPXPropertyList element; - ::WPXPropertyListVector vertices; - ::WPXPropertyListVector controlPoints; - for(unsigned int i = 0; i < count; i++ ) + ::librevenge::RVNGPropertyListVector path; + ::librevenge::RVNGPropertyList element; + ::librevenge::RVNGPropertyListVector vertices; + ::librevenge::RVNGPropertyListVector controlPoints; + for (unsigned int i = 0; i < count; i++) { long ix = (m_doublePrecision) ? readS32() : readS16(); long iy = (m_doublePrecision) ? readS32() : readS16(); @@ -1530,12 +1543,12 @@ element.insert("svg:x", (TO_DOUBLE(ax)/m_xres)); element.insert("svg:y", (TO_DOUBLE(ay)/m_yres)); if (i == 0) - element.insert("libwpg:path-action", "M"); + element.insert("librevenge:path-action", "M"); else { element.insert("svg:x2", (TO_DOUBLE(ix)/m_xres)); element.insert("svg:y2", (TO_DOUBLE(iy)/m_yres)); - element.insert("libwpg:path-action", "C"); + element.insert("librevenge:path-action", "C"); } path.append(element); element.insert("svg:x1", (TO_DOUBLE(tx)/m_xres)); @@ -1545,22 +1558,26 @@ element.clear(); if (objCh.closed) { - element.insert("libwpg:path-action", "Z"); + element.insert("librevenge:path-action", "Z"); path.append(element); } - if(insideCompound) + if (insideCompound) // inside a compound ? just collect the path together m_groupStack.top().compoundPath.append(path); else { // otherwise draw directly - if(objCh.windingRule) + if (objCh.windingRule) tmpStyle.insert("svg:fill-rule", "nonzero"); else tmpStyle.insert("svg:fill-rule", "evenodd"); - m_painter->setStyle( tmpStyle, objCh.filled ? m_gradient : ::WPXPropertyListVector() ); - m_painter->drawPath(path); + if (objCh.filled || m_gradient.count()) + tmpStyle.insert("svg:linearGradient", m_gradient); + m_painter->setStyle(tmpStyle); + librevenge::RVNGPropertyList propList; + propList.insert("svg:d", path); + m_painter->drawPath(propList); } } @@ -1572,7 +1589,7 @@ parseCharacterization(&objCh); m_matrix = objCh.matrix; - WPXPropertyList tmpStyle = m_style; + librevenge::RVNGPropertyList tmpStyle = m_style; if (!objCh.filled) tmpStyle.insert("draw:fill", "none"); @@ -1595,7 +1612,7 @@ long rx = (m_doublePrecision) ? readS32() : readS16(); long ry = (m_doublePrecision) ? readS32() : readS16(); - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", (TO_DOUBLE(xs1) / m_xres)); propList.insert("svg:width", (TO_DOUBLE(xs2-xs1) / m_xres)); propList.insert("svg:y", (TO_DOUBLE(ys1) / m_yres)); @@ -1604,7 +1621,9 @@ propList.insert("svg:rx", (TO_DOUBLE(rx)/m_xres)); propList.insert("svg:ry", (TO_DOUBLE(ry)/m_yres)); - m_painter->setStyle( tmpStyle, objCh.filled ? m_gradient : ::WPXPropertyListVector() ); + if (objCh.filled || m_gradient.count()) + tmpStyle.insert("svg:linearGradient", m_gradient); + m_painter->setStyle(tmpStyle); m_painter->drawRectangle(propList); WPG_DEBUG_MSG((" X1 : %li\n", x1)); @@ -1623,7 +1642,7 @@ parseCharacterization(&objCh); m_matrix = objCh.matrix; - WPXPropertyList tmpStyle = m_style; + librevenge::RVNGPropertyList tmpStyle = m_style; if (!objCh.filled) tmpStyle.insert("draw:fill", "none"); @@ -1650,41 +1669,45 @@ TRANSFORM_XY(ix,iy); TRANSFORM_XY(ex,ey); - m_painter->setStyle( tmpStyle, objCh.filled ? m_gradient : ::WPXPropertyListVector() ); + if (objCh.filled || m_gradient.count()) + tmpStyle.insert("svg:linearGradient", m_gradient); + m_painter->setStyle(tmpStyle); if (ix == ex && iy == ey) { - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:cx", (TO_DOUBLE(cx) / m_xres)); propList.insert("svg:cy", (TO_DOUBLE(cy) / m_xres)); propList.insert("svg:rx", (TO_DOUBLE(radx) / m_xres)); propList.insert("svg:ry", (TO_DOUBLE(rady) / m_xres)); if (objCh.rotate) - propList.insert("libwpg:rotate", objCh.rotationAngle, WPX_GENERIC); + propList.insert("librevenge:rotate", objCh.rotationAngle, librevenge::RVNG_GENERIC); m_painter->drawEllipse(propList); } else { - ::WPXPropertyList element; - ::WPXPropertyListVector path; + ::librevenge::RVNGPropertyList element; + ::librevenge::RVNGPropertyListVector path; - element.insert("libwpg:path-action", "M"); + element.insert("librevenge:path-action", "M"); element.insert("svg:x", (TO_DOUBLE(ix)/m_xres)); element.insert("svg:y", (TO_DOUBLE(iy)/m_yres)); path.append(element); element.clear(); - element.insert("libwpg:path-action", "A"); + element.insert("librevenge:path-action", "A"); element.insert("svg:rx", (TO_DOUBLE(radx)/m_xres)); element.insert("svg:ry", (TO_DOUBLE(rady)/m_yres)); element.insert("svg:x", (TO_DOUBLE(ex)/m_xres)); element.insert("svg:y", (TO_DOUBLE(ey)/m_yres)); if (objCh.rotate) - element.insert("libwpg:rotate", objCh.rotationAngle, WPX_GENERIC); + element.insert("librevenge:rotate", objCh.rotationAngle, librevenge::RVNG_GENERIC); path.append(element); - m_painter->drawPath(path); + librevenge::RVNGPropertyList propList; + propList.insert("svg:d", path); + m_painter->drawPath(propList); } WPG_DEBUG_MSG((" Center point x : %li\n", cx)); @@ -1757,10 +1780,10 @@ unsigned compression_format = readU8(); WPG_DEBUG_MSG((" dimension : %g, %g %g, %g\n", m_bitmap.x1, m_bitmap.y1, m_bitmap.x2, m_bitmap.y2)); - WPG_DEBUG_MSG((" width : %i pixels\n", width)); - WPG_DEBUG_MSG((" height : %i pixels\n", height)); - WPG_DEBUG_MSG((" color format : %d\n", color_format)); - WPG_DEBUG_MSG((" compression : %d (%s)\n", compression_format, + WPG_DEBUG_MSG((" width : %i pixels\n", (int) width)); + WPG_DEBUG_MSG((" height : %i pixels\n", (int) height)); + WPG_DEBUG_MSG((" color format : %d\n", (int) color_format)); + WPG_DEBUG_MSG((" compression : %d (%s)\n", (int) compression_format, (compression_format==0) ? "uncompressed": (compression_format==1) ? "run-length encoding" : "unknown")); @@ -1801,11 +1824,11 @@ buffer.reserve(tmpBufferSize); // plain data, uncompression - if(compression_format==0) - for(unsigned ii=0; ii < tmpBufferSize && !m_input->atEOS() && m_input->tell() <= m_recordEnd; ii++) - buffer.push_back( readU8() ); + if (compression_format==0) + for (unsigned ii=0; ii < tmpBufferSize && !m_input->isEnd() && m_input->tell() <= m_recordEnd; ii++) + buffer.push_back(readU8()); // run-length encoding - else if(compression_format==1) + else if (compression_format==1) { unsigned char data[256]; bool xor_raster = false; @@ -1815,14 +1838,14 @@ WPG_DEBUG_MSG(("Decoding RLE data\n")); // FIXME check for ptr, it should not go out of bound!! - while (m_input->tell() <= m_recordEnd && !m_input->atEOS() && buffer.size() < tmpBufferSize) + while (m_input->tell() <= m_recordEnd && !m_input->isEnd() && buffer.size() < tmpBufferSize) { unsigned char opcode = readU8(); // specify data size - if(opcode == 0x7d) + if (opcode == 0x7d) { unsigned new_data_size = readU8(); - if(new_data_size != data_size) + if (new_data_size != data_size) { data_size = new_data_size; if (tmpBufferSize < data_size*width*height) @@ -1835,51 +1858,51 @@ } // a run of black (index #0) - else if(opcode == 0x7f) + else if (opcode == 0x7f) { unsigned count = 1 + readU8(); - for( ; count ; --count ) - for(unsigned j = 0; j < data_size && !m_input->atEOS(); j++) - buffer.push_back( 0 ); + for (; count ; --count) + for (unsigned j = 0; j < data_size && !m_input->isEnd(); j++) + buffer.push_back(0); } // a run of white (index #255) - else if(opcode == 0xff) + else if (opcode == 0xff) { unsigned count = 1 + readU8(); - for( ; count ; --count ) - for(unsigned j = 0; j < data_size && !m_input->atEOS(); j++) - buffer.push_back( 255 ); + for (; count ; --count) + for (unsigned j = 0; j < data_size && !m_input->isEnd(); j++) + buffer.push_back(255); } // extend previous run - else if(opcode == 0xfd) + else if (opcode == 0xfd) { unsigned count = 1 + readU8(); - for( ; count; --count) - for(unsigned j = 0; j < data_size && !m_input->atEOS(); j++) - buffer.push_back( data[j] ); + for (; count; --count) + for (unsigned j = 0; j < data_size && !m_input->isEnd(); j++) + buffer.push_back(data[j]); } // repeat raster - else if(opcode == 0xfe) + else if (opcode == 0xfe) { unsigned count = 1 + readU8(); - if ( buffer.size() < raster_len ) + if (buffer.size() < raster_len) break; unsigned raster_source = buffer.size() - raster_len; - for( ; count; --count) - for(unsigned long r = 0; r < raster_len; r++) + for (; count; --count) + for (unsigned long r = 0; r < raster_len; r++) { unsigned char pixel = buffer[raster_source + r]; - buffer.push_back( pixel ); + buffer.push_back(pixel); } } // XOR - else if(opcode == 0x7e) + else if (opcode == 0x7e) { // Xor-ing will happen when about to enter next raster // see after the last if down below @@ -1890,23 +1913,23 @@ // NOTE: the following two IFs here must be the last ones // a run of data - else if(opcode >= 0x80) + else if (opcode >= 0x80) { unsigned count = 1 + (opcode & 0x7f); - for(unsigned i = 0; i < data_size && !m_input->atEOS(); i++) + for (unsigned i = 0; i < data_size && !m_input->isEnd(); i++) data[i] = readU8(); - for( ; count; --count) - for(unsigned j = 0; j < data_size; j++) - buffer.push_back( data[j] ); + for (; count; --count) + for (unsigned j = 0; j < data_size; j++) + buffer.push_back(data[j]); } // simple copy - else if(opcode <= 0x7f) + else if (opcode <= 0x7f) { unsigned count = opcode + 1; - for( ; count; --count) - for(unsigned j = 0; j < data_size && !m_input->atEOS(); j++) - buffer.push_back( readU8() ); + for (; count; --count) + for (unsigned j = 0; j < data_size && !m_input->isEnd(); j++) + buffer.push_back(readU8()); } // unreachable: only sentinel @@ -1917,7 +1940,7 @@ } // new raster/scanline? if necessary do the XOR now - if(xor_raster && buffer.size() >= next_scanline) + if (xor_raster && buffer.size() >= next_scanline) { // reset, because XOR in one raster at a time xor_raster = false; @@ -1927,7 +1950,7 @@ unsigned previous = current - raster_len; if (current >= buffer.size() || previous >= buffer.size()) return; - for( unsigned r = 0; r < raster_len; r++) + for (unsigned r = 0; r < raster_len; r++) buffer[current++] ^= buffer[previous++]; } @@ -1938,52 +1961,54 @@ } // no buffer? format is unknown - if(!buffer.size()) return; + if (!buffer.size()) return; while (buffer.size() < tmpBufferSize) buffer.push_back(0); // prepare the bitmap structure for the listener - libwpg::WPGBitmap bitmap(width, height, m_vFlipped, m_hFlipped); - ::WPXPropertyList propList; + libwpg::WPGBitmap bitmap((int) width, (int) height, m_vFlipped, m_hFlipped); + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", (double)m_bitmap.x1); propList.insert("svg:y", (double)m_bitmap.y1); propList.insert("svg:width", (m_bitmap.x2 - m_bitmap.x1)); propList.insert("svg:height", (m_bitmap.y2 - m_bitmap.y1)); - propList.insert("libwpg:mime-type", "image/bmp"); + propList.insert("librevenge:mime-type", "image/bmp"); // format 1: each byte represents 8 pixels, the color fetched from the palette - if(color_format == 1) + if (color_format == 1) { - int i = 0; + size_t i = 0; for (unsigned long y = 0; y < height; y++) for (unsigned long x = 0; x < width; x++, i++) { if ((x==0) && (i % 8 != 0)) i = (i/8 + 1) * 8; unsigned index = ((buffer[i/8] & (0x01 << (7 - (i % 8)))) >> (7 - (i % 8))); - const libwpg::WPGColor &color = m_colorPalette[index]; - bitmap.setPixel(x, y, color); + const libwpg::WPGColor &color = m_colorPalette[(int) index]; + bitmap.setPixel((int) x, (int) y, color); } - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } // format 2: each byte represents 4 pixels, the color fetched from the palette - else if(color_format == 2) + else if (color_format == 2) { - int i = 0; + size_t i = 0; for (unsigned long y = 0; y < height; y++) for (unsigned long x = 0; x < width; x++, i++) { if ((x==0) && (i % 4 != 0)) i = (i/4 + 1) * 4; unsigned index = ((buffer[i/4] & (0x03 << 2*(3 - (i % 4)))) >> 2*(3 - (i % 4))); - const libwpg::WPGColor &color = m_colorPalette[index]; - bitmap.setPixel(x, y, color); + const libwpg::WPGColor &color = m_colorPalette[(int) index]; + bitmap.setPixel((int) x, (int) y, color); } - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } // format 3: each byte represents 2 pixels, the color fetched from the palette - else if(color_format == 3) + else if (color_format == 3) { int i = 0; for (unsigned long y = 0; y < height; y++) @@ -1991,103 +2016,111 @@ { if ((x==0) && (i % 2 != 0)) i = (i/2 + 1) * 2; - unsigned index = ((buffer[i/2] & (0x0f << 4*(1 - (i % 2)))) >> 4*(1 - (i % 2))); - const libwpg::WPGColor &color = m_colorPalette[index]; - bitmap.setPixel(x, y, color); + unsigned index = ((buffer[size_t(i/2)] & (0x0f << 4*(1 - (i % 2)))) >> 4*(1 - (i % 2))); + const libwpg::WPGColor &color = m_colorPalette[(int) index]; + bitmap.setPixel((int) x, (int) y, color); } - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } // format 4: each byte represents a pixel, the color fetched from the palette - else if(color_format == 4) + else if (color_format == 4) { - int i = 0; - for(unsigned long y = 0; y < height; y++) - for(unsigned long x = 0; x < width; x++, i++) + size_t i = 0; + for (unsigned long y = 0; y < height; y++) + for (unsigned long x = 0; x < width; x++, i++) { const libwpg::WPGColor &color = m_colorPalette[buffer[i]]; - bitmap.setPixel(x, y, color); + bitmap.setPixel((int) x, (int) y, color); } - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } // format 5: greyscale of 16 bits else if (color_format == 5) { - int i = 0; + size_t i = 0; for (unsigned long y = 0; y < height; y++) for (unsigned long x = 0; x < width; x++, i++) { const libwpg::WPGColor color(buffer[2*i+1], buffer[2*i+1], buffer[2*i+1]); - bitmap.setPixel(x, y, color); + bitmap.setPixel((int) x, (int) y, color); } - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } // format 6: RGB, with 5 bits per colour else if (color_format == 6) { - int i = 0; + size_t i = 0; for (unsigned long y = 0; y < height; y++) for (unsigned long x = 0; x < width; x++, i++) { unsigned short tmpColor = (unsigned short)(buffer[2*i] | (buffer[2*i+1] << 8)); const libwpg::WPGColor color((tmpColor >> 10) & 0x1f, (tmpColor >> 5) & 0x1f, tmpColor & 0x1f); - bitmap.setPixel(x, y, color); + bitmap.setPixel((int) x, (int) y, color); } - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } // format 7: else if (color_format == 7) { - int i = 0; + size_t i = 0; for (unsigned long y = 0; y < height; y++) for (unsigned long x = 0; x < width; x++, i++) { unsigned short tmpColor = (unsigned short)(buffer[2*i] | (buffer[2*i+1] << 8)); const libwpg::WPGColor color(tmpColor & 0x0f, (tmpColor >> 4) & 0x0f, (tmpColor >> 8) & 0x0f, (tmpColor >> 12) & 0x0f); - bitmap.setPixel(x, y, color); + bitmap.setPixel((int) x, (int) y, color); } - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } else if (color_format == 8) { - int i = 0; + size_t i = 0; for (unsigned long y = 0; y < height; y++) for (unsigned long x = 0; x < width; x++, i++) { const libwpg::WPGColor color(buffer[3*i+2] & 0xff, buffer[3*i+1] & 0xff, buffer[3*i] & 0xff); - bitmap.setPixel(x, y, color); + bitmap.setPixel((int) x, (int) y, color); } - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } else if (color_format == 9) { - int i = 0; + size_t i = 0; for (unsigned long y = 0; y < height; y++) for (unsigned long x = 0; x < width; x++, i++) { const libwpg::WPGColor color(buffer[4*i+3], buffer[4*i+2] & 0xff, buffer[4*i+1] & 0xff, buffer[4*i] & 0xff); - bitmap.setPixel(x, y, color); + bitmap.setPixel((int) x, (int) y, color); } - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } else if (color_format == 12) { - int i = 0; + size_t i = 0; for (unsigned long y = 0; y < height; y++) for (unsigned long x = 0; x < width; x++, i++) { const libwpg::WPGColor color(buffer[i], buffer[i], buffer[i]); - bitmap.setPixel(x, y, color); + bitmap.setPixel((int) x, (int) y, color); } - m_painter->drawGraphicObject(propList, bitmap.getDIB()); + propList.insert("office:binary-data", bitmap.getDIB()); + m_painter->drawGraphicObject(propList); } } @@ -2165,12 +2198,12 @@ "image/gif" // 0x26 }; - for (unsigned long i = 0; m_input->tell() <= m_recordEnd && !m_input->atEOS() && i < numDescriptions; i++) + for (unsigned long i = 0; m_input->tell() <= m_recordEnd && !m_input->isEnd() && i < numDescriptions; i++) { unsigned char description = readU8(); if (description < 0x27) - m_binaryData.mimeTypes.push_back(WPXString(mimeTypesMap[description])); - m_input->seek(7, WPX_SEEK_CUR); + m_binaryData.mimeTypes.push_back(librevenge::RVNGString(mimeTypesMap[description])); + m_input->seek(7, librevenge::RVNG_SEEK_CUR); } m_binaryData.objectIndex = 0; @@ -2179,7 +2212,7 @@ WPG_DEBUG_MSG((" y1 : %li\n", y1)); WPG_DEBUG_MSG((" x2 : %li\n", x2)); WPG_DEBUG_MSG((" y2 : %li\n", y2)); - WPG_DEBUG_MSG(("numDescriptions : %li\n", numDescriptions)); + WPG_DEBUG_MSG(("numDescriptions : %li\n", (long) numDescriptions)); } void WPG2Parser::handleObjectImage() @@ -2189,20 +2222,20 @@ if ((unsigned long)m_binaryData.objectIndex >= m_binaryData.mimeTypes.size()) return; unsigned accessoryDataLength = readU16(); - m_input->seek(accessoryDataLength, WPX_SEEK_CUR); + m_input->seek((long) accessoryDataLength, librevenge::RVNG_SEEK_CUR); - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", (double)m_binaryData.x1); propList.insert("svg:y", (double)m_binaryData.y1); propList.insert("svg:width", (m_binaryData.x2 - m_binaryData.x1)); propList.insert("svg:height", (m_binaryData.y2 - m_binaryData.y1)); - propList.insert("libwpg:mime-type", m_binaryData.mimeTypes[m_binaryData.objectIndex]); + propList.insert("librevenge:mime-type", m_binaryData.mimeTypes[(size_t) m_binaryData.objectIndex]); - WPG_DEBUG_MSG(("Image Object Mime Type : %s\n", propList["libwpg:mime-type"]->getStr().cstr())); + WPG_DEBUG_MSG(("Image Object Mime Type : %s\n", propList["librevenge:mime-type"]->getStr().cstr())); - ::WPXBinaryData binaryData; - while (!m_input->atEOS() && m_input->tell() <= m_recordEnd) - binaryData.append((char)readU8()); + ::librevenge::RVNGBinaryData binaryData; + while (!m_input->isEnd() && m_input->tell() <= m_recordEnd) + binaryData.append((unsigned char)readU8()); WPG_DEBUG_MSG((" Image Object Size : %li\n", (unsigned long)binaryData.size())); // temporary for debug - dump the binary data (need to have write access in the current directory @@ -2221,7 +2254,8 @@ #endif - m_painter->drawGraphicObject(propList, binaryData); + propList.insert("office:binary-data", binaryData); + m_painter->drawGraphicObject(propList); m_binaryData.objectIndex++; } @@ -2314,23 +2348,24 @@ if (!m_drawTextData) return; - ::WPXBinaryData textData; - while (!m_input->atEOS() && m_input->tell() <= m_recordEnd) - textData.append((char)readU8()); + ::librevenge::RVNGBinaryData textData; + while (!m_input->isEnd() && m_input->tell() <= m_recordEnd) + textData.append((unsigned char)readU8()); WPGTextDataHandler handler(m_painter); - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", (double)m_textData.x1); propList.insert("svg:y", (double)m_textData.y1); - if (m_textData.x1 != m_textData.x2 && m_textData.y1 != m_textData.y2) + if ((m_textData.x1 < m_textData.x2 || m_textData.x1 > m_textData.x2) && + (m_textData.y1 < m_textData.y2 || m_textData.y1 > m_textData.y2)) { propList.insert("svg:width", (m_textData.x2 - m_textData.x1)); propList.insert("svg:height", (m_textData.y2 - m_textData.y1)); } - m_painter->startTextObject(propList, ::WPXPropertyListVector()); + m_painter->startTextObject(propList); - WPDocument::parseSubDocument(const_cast(textData.getDataStream()), &handler, WPD_FILE_FORMAT_WP6); + WPDocument::parseSubDocument(const_cast(textData.getDataStream()), &handler, WPD_FILE_FORMAT_WP6); m_painter->endTextObject(); diff -Nru libwpg-0.2.2/src/lib/WPG2Parser.h libwpg-0.3.0-rjvb/src/lib/WPG2Parser.h --- libwpg-0.2.2/src/lib/WPG2Parser.h 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPG2Parser.h 2014-03-29 10:19:42.000000000 +0000 @@ -31,7 +31,7 @@ #include "WPGXParser.h" #include "WPGDashArray.h" #include "WPGBitmap.h" -#include +#include #include #include @@ -60,17 +60,17 @@ y = ry; } - ::WPXPropertyList transformPoint(const ::WPXPropertyList &p) const + ::librevenge::RVNGPropertyList transformPoint(const ::librevenge::RVNGPropertyList &p) const { - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; propList.insert("svg:x", (element[0][0]*p["svg:x"]->getDouble() + element[1][0]*p["svg:y"]->getDouble() + element[2][0])); propList.insert("svg:y", (element[0][1]*p["svg:x"]->getDouble() + element[1][1]*p["svg:y"]->getDouble() + element[2][1])); return propList; } - ::WPXPropertyList transformRect(const ::WPXPropertyList &r) const + ::librevenge::RVNGPropertyList transformRect(const ::librevenge::RVNGPropertyList &r) const { - ::WPXPropertyList propList; + ::librevenge::RVNGPropertyList propList; double oldx1 = r["svg:x"]->getDouble(); double oldy1 = r["svg:y"]->getDouble(); double oldx2 = r["svg:x"]->getDouble() + r["svg:width"]->getDouble(); @@ -92,16 +92,16 @@ { double result[3][3]; - for(int i = 0; i < 3; i++) - for(int j = 0; j < 3; j++) + for (int i = 0; i < 3; i++) + for (int j = 0; j < 3; j++) { result[i][j] = 0; - for(int k = 0; k < 3; k++) + for (int k = 0; k < 3; k++) result[i][j] += m.element[i][k]*element[k][j]; } - for(int x = 0; x < 3; x++) - for(int y = 0; y < 3; y++) + for (int x = 0; x < 3; x++) + for (int y = 0; y < 3; y++) element[x][y] = result[x][y]; return *this; @@ -124,7 +124,7 @@ public: unsigned subIndex; int parentType; - ::WPXPropertyListVector compoundPath; + ::librevenge::RVNGPropertyListVector compoundPath; WPG2TransformMatrix compoundMatrix; bool compoundWindingRule; bool compoundFilled; @@ -154,7 +154,7 @@ public: double x1, y1, x2, y2; int numObjects, objectIndex; - std::vector mimeTypes; + std::vector mimeTypes; WPGBinaryDataContext(): x1(0), y1(0), x2(0), y2(0), numObjects(0), objectIndex(0), mimeTypes() {} }; @@ -172,7 +172,7 @@ class WPG2Parser : public WPGXParser { public: - WPG2Parser(WPXInputStream *input, libwpg::WPGPaintInterface *painter, bool isEmbedded = false); + WPG2Parser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter, bool isEmbedded = false); bool parse(); private: @@ -237,13 +237,13 @@ long m_width; long m_height; bool m_doublePrecision; - ::WPXPropertyList m_style; + ::librevenge::RVNGPropertyList m_style; libwpg::WPGColor m_penForeColor; libwpg::WPGColor m_penBackColor; libwpg::WPGColor m_brushForeColor; libwpg::WPGColor m_brushBackColor; libwpg::WPGDashArray m_dashArray; - ::WPXPropertyListVector m_gradient; + ::librevenge::RVNGPropertyListVector m_gradient; std::map m_dashArrayStyles; bool m_layerOpened; #ifdef DEBUG @@ -251,7 +251,7 @@ #endif WPG2TransformMatrix m_matrix; double m_gradientAngle; - ::WPXPropertyList m_gradientRef; + ::librevenge::RVNGPropertyList m_gradientRef; std::stack m_groupStack; WPG2TransformMatrix m_compoundMatrix; bool m_compoundWindingRule; diff -Nru libwpg-0.2.2/src/lib/WPGBitmap.cpp libwpg-0.3.0-rjvb/src/lib/WPGBitmap.cpp --- libwpg-0.2.2/src/lib/WPGBitmap.cpp 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGBitmap.cpp 2014-03-29 10:19:42.000000000 +0000 @@ -71,7 +71,7 @@ bool vFlip; bool hFlip; WPGColor *pixels; - ::WPXBinaryData dib; + ::librevenge::RVNGBinaryData dib; Private(int w, int h): width(w), height(h), vRes(72), hRes(72), vFlip(false), hFlip(false), pixels(0), dib() {} private: @@ -117,7 +117,7 @@ d->height = bitmap.d->height; delete [] d->pixels; d->pixels = new WPGColor[d->width*d->height]; - for(int i=0; i < d->width*d->height; i++) + for (int i=0; i < d->width*d->height; i++) d->pixels[i] = bitmap.d->pixels[i]; } @@ -143,13 +143,13 @@ void libwpg::WPGBitmap::setPixel(int x, int y, const libwpg::WPGColor &color) { - if((x < 0) || (y <0) || (x >= d->width) || (y >= d->height)) + if ((x < 0) || (y <0) || (x >= d->width) || (y >= d->height)) return; d->pixels[y *d->width + x] = color; } -const ::WPXBinaryData &libwpg::WPGBitmap::getDIB() const +const ::librevenge::RVNGBinaryData &libwpg::WPGBitmap::getDIB() const { if (d->dib.size() || d->height <= 0 || d->width <= 0) return d->dib; @@ -177,10 +177,10 @@ // Create DIB file header writeU16(tmpDIBBuffer, tmpBufferPosition, 0x4D42); // Type - writeU32(tmpDIBBuffer, tmpBufferPosition, tmpDIBFileSize); // Size + writeU32(tmpDIBBuffer, tmpBufferPosition, (int) tmpDIBFileSize); // Size writeU16(tmpDIBBuffer, tmpBufferPosition, 0); // Reserved1 writeU16(tmpDIBBuffer, tmpBufferPosition, 0); // Reserved2 - writeU32(tmpDIBBuffer, tmpBufferPosition, tmpDIBOffsetBits); // OffsetBits + writeU32(tmpDIBBuffer, tmpBufferPosition, (int) tmpDIBOffsetBits); // OffsetBits WPG_DEBUG_MSG(("WPGBitmap: DIB file header end = %i\n", tmpBufferPosition - 1)); @@ -196,7 +196,7 @@ writeU16(tmpDIBBuffer, tmpBufferPosition, 1); // Planes writeU16(tmpDIBBuffer, tmpBufferPosition, 32); // BitCount writeU32(tmpDIBBuffer, tmpBufferPosition, 0); // Compression - writeU32(tmpDIBBuffer, tmpBufferPosition, tmpDIBImageSize); // SizeImage + writeU32(tmpDIBBuffer, tmpBufferPosition, (int)tmpDIBImageSize); // SizeImage writeU32(tmpDIBBuffer, tmpBufferPosition, (int)(hres()*100.0/2.54)); // XPelsPerMeter writeU32(tmpDIBBuffer, tmpBufferPosition, (int)(vres()*100.0/2.54)); // YPelsPerMeter writeU32(tmpDIBBuffer, tmpBufferPosition, 0); // ColorsUsed diff -Nru libwpg-0.2.2/src/lib/WPGBitmap.h libwpg-0.3.0-rjvb/src/lib/WPGBitmap.h --- libwpg-0.2.2/src/lib/WPGBitmap.h 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGBitmap.h 2014-03-29 10:19:42.000000000 +0000 @@ -28,7 +28,7 @@ #define __WPGBITMAP_H__ #include "WPGColor.h" -#include +#include namespace libwpg { @@ -60,7 +60,7 @@ void setPixel(int x, int y, const WPGColor &color); - const ::WPXBinaryData &getDIB() const; + const ::librevenge::RVNGBinaryData &getDIB() const; private: class Private; diff -Nru libwpg-0.2.2/src/lib/WPGColor.cpp libwpg-0.3.0-rjvb/src/lib/WPGColor.cpp --- libwpg-0.2.2/src/lib/WPGColor.cpp 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGColor.cpp 2014-03-29 10:19:42.000000000 +0000 @@ -65,9 +65,9 @@ return *this; } -const ::WPXString libwpg::WPGColor::getColorString() const +const ::librevenge::RVNGString libwpg::WPGColor::getColorString() const { - ::WPXString sColor; + ::librevenge::RVNGString sColor; sColor.sprintf("#%.2x%.2x%.2x", red, green, blue); return sColor; } diff -Nru libwpg-0.2.2/src/lib/WPGColor.h libwpg-0.3.0-rjvb/src/lib/WPGColor.h --- libwpg-0.2.2/src/lib/WPGColor.h 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGColor.h 2014-03-29 10:19:42.000000000 +0000 @@ -26,7 +26,7 @@ #ifndef __WPGCOLOR_H__ #define __WPGCOLOR_H__ -#include +#include namespace libwpg { @@ -46,7 +46,7 @@ WPGColor &operator=(const WPGColor &color); - const ::WPXString getColorString() const; + const ::librevenge::RVNGString getColorString() const; double getOpacity() const; }; diff -Nru libwpg-0.2.2/src/lib/WPGDashArray.cpp libwpg-0.3.0-rjvb/src/lib/WPGDashArray.cpp --- libwpg-0.2.2/src/lib/WPGDashArray.cpp 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGDashArray.cpp 2014-03-29 10:19:42.000000000 +0000 @@ -33,7 +33,7 @@ { public: WPGDashArrayPrivate() : dashes(), dots1(0), dots2(0), - dots1len(0.0), dots2len(0.0), gap(0.0) {}; + dots1len(0.0), dots2len(0.0), gap(0.0) {} void _recalculateDots(); std::vector dashes; int dots1; @@ -55,11 +55,11 @@ gap = dashes[1]; } - unsigned count = dashes.size() / 2; + unsigned count = unsigned(dashes.size() / 2); unsigned i = 0; for (; i < count;) { - if (dots1len == dashes[2*i]) + if (dots1len <= dashes[2*i] && dots1len >= dashes[2*i]) dots1++; else break; @@ -73,7 +73,7 @@ } for (; i < count;) { - if (dots2len == dashes[2*i]) + if (dots2len <= dashes[2*i] && dots2len >= dashes[2*i]) dots2++; else break; diff -Nru libwpg-0.2.2/src/lib/WPGHeader.cpp libwpg-0.3.0-rjvb/src/lib/WPGHeader.cpp --- libwpg-0.2.2/src/lib/WPGHeader.cpp 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGHeader.cpp 2014-03-29 10:19:42.000000000 +0000 @@ -29,13 +29,13 @@ namespace { -static inline unsigned short readU16( const void *p ) +static inline unsigned short readU16(const void *p) { const unsigned char *ptr = (const unsigned char *) p; return (unsigned short)(ptr[0]+(ptr[1]<<8)); } -static inline unsigned long readU32( const void *p ) +static inline unsigned long readU32(const void *p) { const unsigned char *ptr = (const unsigned char *) p; return (unsigned long)(unsigned)(ptr[0]+(ptr[1]<<8)+(ptr[2]<<16)+(ptr[3]<<24)); @@ -58,13 +58,13 @@ m_identifier[3] = 'C'; } -bool WPGHeader::load(WPXInputStream *input) +bool WPGHeader::load(librevenge::RVNGInputStream *input) { -// input->seek(0, WPX_SEEK_SET); +// input->seek(0, librevenge::RVNG_SEEK_SET); unsigned long n = 0; - unsigned char *prefix = (unsigned char *) input->read(26, n); - if(n < 26) + unsigned char const *prefix = input->read(26, n); + if (n < 26) return false; m_identifier[0] = prefix[0]; diff -Nru libwpg-0.2.2/src/lib/WPGHeader.h libwpg-0.3.0-rjvb/src/lib/WPGHeader.h --- libwpg-0.2.2/src/lib/WPGHeader.h 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGHeader.h 2014-03-29 10:19:42.000000000 +0000 @@ -27,14 +27,14 @@ #ifndef __WPGHEADER_H__ #define __WPGHEADER_H__ -#include +#include class WPGHeader { public: WPGHeader(); - bool load(WPXInputStream *input); + bool load(librevenge::RVNGInputStream *input); bool isSupported() const; diff -Nru libwpg-0.2.2/src/lib/WPGInternalStream.cpp libwpg-0.3.0-rjvb/src/lib/WPGInternalStream.cpp --- libwpg-0.2.2/src/lib/WPGInternalStream.cpp 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGInternalStream.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,110 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* libwpg - * Version: MPL 2.0 / LGPLv2.1+ - * - * 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/. - * - * Major Contributor(s): - * Copyright (C) 2004-2005 William Lachance (wrlach@gmail.com) - * Copyright (C) 2006 Fridrich Strba (fridrich.strba@bluewin.ch) - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms - * of the GNU Lesser General Public License Version 2.1 or later - * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are - * applicable instead of those above. - * - * For further information visit http://libwpg.sourceforge.net - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ - -#include "WPGInternalStream.h" - -WPGInternalInputStream::WPGInternalInputStream(const unsigned char *data, unsigned long size) : - WPXInputStream(), - m_offset(0), - m_size(size), - m_data(data), - m_tmpBuf(0) -{ -} - -WPGInternalInputStream::~WPGInternalInputStream() -{ - if (m_tmpBuf) - delete [] m_tmpBuf; -} - -const unsigned char *WPGInternalInputStream::read(unsigned long numBytes, unsigned long &numBytesRead) -{ - numBytesRead = 0; - - if (0 == numBytes) - return 0; - - if (m_tmpBuf) - delete [] m_tmpBuf; - m_tmpBuf = 0; - - int numBytesToRead; - - if ((m_offset+numBytes) < m_size) - numBytesToRead = numBytes; - else - numBytesToRead = m_size - m_offset; - - numBytesRead = numBytesToRead; // about as paranoid as we can be.. - - if (numBytesToRead == 0) - return 0; - - m_tmpBuf = new unsigned char[numBytesToRead]; - for (unsigned long i=0; (long)i<(long)numBytesToRead; i++) - { - m_tmpBuf[i] = m_data[m_offset]; - m_offset++; - } - - return m_tmpBuf; -} - -int WPGInternalInputStream::seek(long offset, WPX_SEEK_TYPE seekType) -{ - if (seekType == WPX_SEEK_CUR) - m_offset += offset; - else if (seekType == WPX_SEEK_SET) - m_offset = offset; - - if (m_offset < 0) - { - m_offset = 0; - return 1; - } - if ((long)m_offset > (long)m_size) - { - m_offset = m_size; - return 1; - } - - return 0; -} - -long WPGInternalInputStream::tell() -{ - return m_offset; -} - -bool WPGInternalInputStream::atEOS() -{ - if ((long)m_offset == (long)m_size) - return true; - - return false; -} -/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/WPGInternalStream.h libwpg-0.3.0-rjvb/src/lib/WPGInternalStream.h --- libwpg-0.2.2/src/lib/WPGInternalStream.h 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGInternalStream.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* libwpg - * Version: MPL 2.0 / LGPLv2.1+ - * - * 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/. - * - * Major Contributor(s): - * Copyright (C) 2004-2005 William Lachance (wrlach@gmail.com) - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms - * of the GNU Lesser General Public License Version 2.1 or later - * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are - * applicable instead of those above. - * - * For further information visit http://libwpg.sourceforge.net - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ - -#ifndef WPGINTERNALSTREAM_H -#define WPGINTERNALSTREAM_H -#include - -class WPGInternalInputStream : public WPXInputStream -{ -public: - WPGInternalInputStream(const unsigned char *data, unsigned long size); - virtual ~WPGInternalInputStream(); - - virtual bool isOLEStream() - { - return false; - } - virtual WPXInputStream *getDocumentOLEStream(const char * /*name*/) - { - return 0; - } - - const virtual unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); - virtual int seek(long offset, WPX_SEEK_TYPE seekType); - virtual long tell(); - virtual bool atEOS(); - -private: - long m_offset; - unsigned long m_size; - const unsigned char *m_data; - unsigned char *m_tmpBuf; - WPGInternalInputStream(const WPGInternalInputStream &); - WPGInternalInputStream &operator=(const WPGInternalInputStream &); -}; - -#endif -/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/WPGPaintInterface.h libwpg-0.3.0-rjvb/src/lib/WPGPaintInterface.h --- libwpg-0.2.2/src/lib/WPGPaintInterface.h 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGPaintInterface.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,87 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* libwpg - * Version: MPL 2.0 / LGPLv2.1+ - * - * 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/. - * - * Major Contributor(s): - * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) - * Copyright (C) 2004 Marc Oude Kotte (marc@solcon.nl) - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms - * of the GNU Lesser General Public License Version 2.1 or later - * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are - * applicable instead of those above. - * - * For further information visit http://libwpg.sourceforge.net - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ - -#ifndef __WPGPAINTINTERFACE_H__ -#define __WPGPAINTINTERFACE_H__ - -#include - -namespace libwpg -{ - -class WPGPaintInterface -{ -public: - virtual ~WPGPaintInterface() {} - - // none of the other callback functions will be called before this function is called - virtual void startGraphics(const ::WPXPropertyList &propList) = 0; - - // none of the other callback functions will be called after this function is called - virtual void endGraphics() = 0; - - virtual void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient) = 0; - - virtual void startLayer(const ::WPXPropertyList &propList) = 0; - - virtual void endLayer() = 0; - - virtual void startEmbeddedGraphics(const ::WPXPropertyList &propList) = 0; - - virtual void endEmbeddedGraphics() = 0; - - // Different primitive shapes - virtual void drawRectangle(const ::WPXPropertyList &propList) = 0; - - virtual void drawEllipse(const ::WPXPropertyList &propList) = 0; - - virtual void drawPolygon(const ::WPXPropertyListVector &vertices) = 0; - - virtual void drawPolyline(const ::WPXPropertyListVector &vertices) = 0; - - virtual void drawPath(const ::WPXPropertyListVector &path) = 0; - - // Embedded binary/raster data - virtual void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData) = 0; - - // Embedded text object - virtual void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path) = 0; - virtual void endTextObject() = 0; - - virtual void startTextLine(const ::WPXPropertyList &propList) = 0; - virtual void endTextLine() = 0; - - virtual void startTextSpan(const ::WPXPropertyList &propList) = 0; - virtual void endTextSpan() = 0; - - virtual void insertText(const ::WPXString &str) = 0; -}; - -} // namespace libwpg - -#endif // __WPGPAINTINTERFACE_H__ - -/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/WPGraphics.cpp libwpg-0.3.0-rjvb/src/lib/WPGraphics.cpp --- libwpg-0.2.2/src/lib/WPGraphics.cpp 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGraphics.cpp 2014-03-29 10:19:42.000000000 +0000 @@ -24,16 +24,13 @@ * Corel Corporation or Corel Corporation Limited." */ -#include "WPGraphics.h" +#include +#include #include "WPGHeader.h" #include "WPGXParser.h" #include "WPG1Parser.h" #include "WPG2Parser.h" #include "libwpg_utils.h" -#include "WPGSVGGenerator.h" -#include "WPGInternalStream.h" -#include "WPGPaintInterface.h" -#include /** Analyzes the content of an input stream to see if it can be parsed @@ -41,14 +38,14 @@ \return A value that indicates whether the content from the input stream is a WordPerfect Graphics that libwpg is able to parse */ -bool libwpg::WPGraphics::isSupported(WPXInputStream *input) +WPGAPI bool libwpg::WPGraphics::isSupported(librevenge::RVNGInputStream *input) { - WPXInputStream *graphics = 0; + librevenge::RVNGInputStream *graphics = 0; bool isDocumentOLE = false; - if (input->isOLEStream()) + if (input->isStructured()) { - graphics = input->getDocumentOLEStream("PerfectOffice_MAIN"); + graphics = input->getSubStreamByName("PerfectOffice_MAIN"); if (graphics) isDocumentOLE = true; else @@ -57,41 +54,37 @@ else graphics = input; - graphics->seek(0, WPX_SEEK_SET); + graphics->seek(0, librevenge::RVNG_SEEK_SET); - WPGHeader header; - if(!header.load(graphics)) - { - if (graphics && isDocumentOLE) - delete graphics; - return false; - } + bool retVal = false; - bool retVal = header.isSupported(); + WPGHeader header; + if (header.load(graphics)) + retVal = header.isSupported(); - if (graphics && isDocumentOLE) + if (isDocumentOLE) delete graphics; return retVal; } /** Parses the input stream content. It will make callbacks to the functions provided by a -WPGPaintInterface class implementation when needed. This is often commonly called the +librevenge::RVNGDrawingInterface class implementation when needed. This is often commonly called the 'main parsing routine'. \param input The input stream -\param painter A WPGPainterInterface implementation +\param drawingInterface A WPGPainterInterface implementation \return A value that indicates whether the parsing was successful */ -bool libwpg::WPGraphics::parse(::WPXInputStream *input, libwpg::WPGPaintInterface *painter, libwpg::WPGFileFormat fileFormat) +WPGAPI bool libwpg::WPGraphics::parse(::librevenge::RVNGInputStream *input, ::librevenge::RVNGDrawingInterface *drawingInterface, libwpg::WPGFileFormat fileFormat) { WPGXParser *parser = 0; - WPXInputStream *graphics = 0; + librevenge::RVNGInputStream *graphics = 0; bool isDocumentOLE = false; - if (input->isOLEStream()) + if (input->isStructured()) { - graphics = input->getDocumentOLEStream("PerfectOffice_MAIN"); + graphics = input->getSubStreamByName("PerfectOffice_MAIN"); if (graphics) isDocumentOLE = true; else @@ -100,7 +93,7 @@ else graphics = input; - graphics->seek(0, WPX_SEEK_SET); + graphics->seek(0, librevenge::RVNG_SEEK_SET); WPG_DEBUG_MSG(("Loading header...\n")); unsigned char tmpMajorVersion = 0x00; @@ -109,14 +102,14 @@ else if (fileFormat == WPG_WPG2) tmpMajorVersion = 0x02; WPGHeader header; - if(!header.load(graphics)) + if (!header.load(graphics)) { if (isDocumentOLE) delete graphics; return false; } - if(!header.isSupported() && (fileFormat == WPG_AUTODETECT)) + if (!header.isSupported() && (fileFormat == WPG_AUTODETECT)) { WPG_DEBUG_MSG(("Unsupported file format!\n")); if (isDocumentOLE) @@ -126,7 +119,7 @@ else if (header.isSupported()) { // seek to the start of document - graphics->seek(header.startOfDocument(), WPX_SEEK_SET); + graphics->seek((long)header.startOfDocument(), librevenge::RVNG_SEEK_SET); tmpMajorVersion = (unsigned char)(header.majorVersion()); if (tmpMajorVersion == 0x01) { @@ -138,29 +131,29 @@ if (header.load(graphics) && header.isSupported()) { WPG_DEBUG_MSG(("An invalid graphics we produced :(\n")); - graphics->seek(header.startOfDocument() + 16, WPX_SEEK_SET); + graphics->seek((long) header.startOfDocument() + 16, librevenge::RVNG_SEEK_SET); tmpMajorVersion = (unsigned char)(header.majorVersion()); } else - graphics->seek(returnPosition, WPX_SEEK_SET); + graphics->seek((long) returnPosition, librevenge::RVNG_SEEK_SET); } } else // here we force parsing of headerless pictures - graphics->seek(0, WPX_SEEK_SET); + graphics->seek(0, librevenge::RVNG_SEEK_SET); bool retval; switch (tmpMajorVersion) { case 0x01: // WPG1 WPG_DEBUG_MSG(("Parsing WPG1\n")); - parser = new WPG1Parser(graphics, painter); + parser = new WPG1Parser(graphics, drawingInterface); retval = parser->parse(); break; case 0x02: // WPG2 WPG_DEBUG_MSG(("Parsing WPG2\n")); - parser = new WPG2Parser(graphics, painter); + parser = new WPG2Parser(graphics, drawingInterface); retval = parser->parse(); break; default: // other :-) @@ -177,33 +170,4 @@ return retval; } -bool libwpg::WPGraphics::parse(const unsigned char *data, unsigned long size, libwpg::WPGPaintInterface *painter, libwpg::WPGFileFormat fileFormat) -{ - WPGInternalInputStream tmpStream(data, size); - return libwpg::WPGraphics::parse(&tmpStream, painter, fileFormat); -} -/** -Parses the input stream content and generates a valid Scalable Vector Graphics -Provided as a convenience function for applications that support SVG internally. -\param input The input stream -\param output The output string whose content is the resulting SVG -\return A value that indicates whether the SVG generation was successful. -*/ -bool libwpg::WPGraphics::generateSVG(::WPXInputStream *input, WPXString &output, libwpg::WPGFileFormat fileFormat) -{ - std::ostringstream tmpOutputStream; - libwpg::WPGSVGGenerator generator(tmpOutputStream); - bool result = libwpg::WPGraphics::parse(input, &generator, fileFormat); - if (result) - output = WPXString(tmpOutputStream.str().c_str()); - else - output = WPXString(""); - return result; -} - -bool libwpg::WPGraphics::generateSVG(const unsigned char *data, unsigned long size, WPXString &output, libwpg::WPGFileFormat fileFormat) -{ - WPGInternalInputStream tmpStream(data, size); - return libwpg::WPGraphics::generateSVG(&tmpStream, output, fileFormat); -} /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/WPGraphics.h libwpg-0.3.0-rjvb/src/lib/WPGraphics.h --- libwpg-0.2.2/src/lib/WPGraphics.h 2013-04-18 10:13:21.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGraphics.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,55 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* libwpg - * Version: MPL 2.0 / LGPLv2.1+ - * - * 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/. - * - * Major Contributor(s): - * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms - * of the GNU Lesser General Public License Version 2.1 or later - * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are - * applicable instead of those above. - * - * For further information visit http://libwpg.sourceforge.net - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ - -#ifndef __WPGRAPHICS_H__ -#define __WPGRAPHICS_H__ - -#include - -class WPXInputStream; - -namespace libwpg -{ -enum WPGFileFormat { WPG_AUTODETECT = 0, WPG_WPG1, WPG_WPG2 }; - -class WPGPaintInterface; - -class WPGraphics -{ -public: - - static bool isSupported(WPXInputStream *input); - - static bool parse(WPXInputStream *input, WPGPaintInterface *painter, WPGFileFormat fileFormat = WPG_AUTODETECT); - static bool parse(const unsigned char *data, unsigned long size, WPGPaintInterface *painter, WPGFileFormat fileFormat = WPG_AUTODETECT); - - static bool generateSVG(WPXInputStream *input, WPXString &output, WPGFileFormat fileFormat = WPG_AUTODETECT); - static bool generateSVG(const unsigned char *data, unsigned long size, WPXString &output, WPGFileFormat fileFormat = WPG_AUTODETECT); -}; - -} // namespace libwpg - -#endif // __WPGRAPHICS_H__ -/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/WPGSVGGenerator.cpp libwpg-0.3.0-rjvb/src/lib/WPGSVGGenerator.cpp --- libwpg-0.2.2/src/lib/WPGSVGGenerator.cpp 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGSVGGenerator.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,630 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* libwpg - * Version: MPL 2.0 / LGPLv2.1+ - * - * 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/. - * - * Major Contributor(s): - * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) - * Copyright (C) 2005 Fridrich Strba (fridrich.strba@bluewin.ch) - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms - * of the GNU Lesser General Public License Version 2.1 or later - * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are - * applicable instead of those above. - * - * For further information visit http://libwpg.sourceforge.net - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ - -#include "WPGSVGGenerator.h" -#include -#include -#include - -static std::string doubleToString(const double value) -{ - std::ostringstream tempStream; - tempStream << value; -#ifndef __ANDROID__ - std::string decimalPoint(localeconv()->decimal_point); -#else - std::string decimalPoint("."); -#endif - if ((decimalPoint.size() == 0) || (decimalPoint == ".")) - return tempStream.str(); - std::string stringValue(tempStream.str()); - if (!stringValue.empty()) - { - std::string::size_type pos; - while ((pos = stringValue.find(decimalPoint)) != std::string::npos) - stringValue.replace(pos,decimalPoint.size(),"."); - } - return stringValue; -} - -static unsigned stringToColour(const ::WPXString &s) -{ - std::string str(s.cstr()); - if (str[0] == '#') - { - if (str.length() != 7) - return 0; - else - str.erase(str.begin()); - } - else - return 0; - - std::istringstream istr(str); - unsigned val = 0; - istr >> std::hex >> val; - return val; -} - -libwpg::WPGSVGGenerator::WPGSVGGenerator(std::ostream &output_sink): m_gradient(), m_style(), m_gradientIndex(1), m_shadowIndex(1), m_outputSink(output_sink) -{ -} - -libwpg::WPGSVGGenerator::~WPGSVGGenerator() -{ -} - -void libwpg::WPGSVGGenerator::startGraphics(const WPXPropertyList &propList) -{ - m_outputSink << "\n"; - m_outputSink << "\n"; - - m_outputSink << "\n"; - - m_outputSink << "getDouble())) << "\" "; - if (propList["svg:height"]) - m_outputSink << "height=\"" << doubleToString(72*(propList["svg:height"]->getDouble())) << "\""; - m_outputSink << " >\n"; -} - -void libwpg::WPGSVGGenerator::endGraphics() -{ - m_outputSink << "\n"; -} - -void libwpg::WPGSVGGenerator::setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient) -{ - m_style.clear(); - m_style = propList; - - m_gradient = gradient; - if(m_style["draw:shadow"] && m_style["draw:shadow"]->getStr() == "visible") - { - double shadowRed = 0.0; - double shadowGreen = 0.0; - double shadowBlue = 0.0; - if (m_style["draw:shadow-color"]) - { - unsigned shadowColour = stringToColour(m_style["draw:shadow-color"]->getStr()); - shadowRed = (double)((shadowColour & 0x00ff0000) >> 16)/255.0; - shadowGreen = (double)((shadowColour & 0x0000ff00) >> 8)/255.0; - shadowBlue = (double)(shadowColour & 0x000000ff)/255.0; - } - m_outputSink << "\n"; - m_outputSink << ""; - m_outputSink << "getDouble()) << "\" "; - m_outputSink << "dy=\"" << doubleToString(72*m_style["draw:shadow-offset-y"]->getDouble()) << "\"/>"; - m_outputSink << "getDouble() < 1) - m_outputSink << " 0 0 0 " << doubleToString(m_style["draw:shadow-opacity"]->getDouble()/m_style["draw:opacity"]->getDouble()) << " 0\"/>"; - else - m_outputSink << " 0 0 0 " << doubleToString(m_style["draw:shadow-opacity"]->getDouble()) << " 0\"/>"; - m_outputSink << ""; - } - - if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "gradient") - { - double angle = (m_style["draw:angle"] ? m_style["draw:angle"]->getDouble() : 0.0); - angle *= -1.0; - while(angle < 0) - angle += 360; - while(angle > 360) - angle -= 360; - - if (!m_gradient.count()) - { - if (m_style["draw:style"] && - (m_style["draw:style"]->getStr() == "radial" || - m_style["draw:style"]->getStr() == "rectangular" || - m_style["draw:style"]->getStr() == "square" || - m_style["draw:style"]->getStr() == "ellipsoid")) - { - m_outputSink << "\n"; - m_outputSink << " getStr().cstr() << "\""; - else if (m_style["draw:cx"]) - m_outputSink << " cx=\"" << m_style["draw:cx"]->getStr().cstr() << "\""; - - if (m_style["svg:cy"]) - m_outputSink << " cy=\"" << m_style["svg:cy"]->getStr().cstr() << "\""; - else if (m_style["draw:cy"]) - m_outputSink << " cy=\"" << m_style["draw:cy"]->getStr().cstr() << "\""; - m_outputSink << " r=\"" << (1 - (m_style["draw:border"] ? m_style["draw:border"]->getDouble() : 0))*100.0 << "%\" >\n"; - m_outputSink << " >\n"; - - if (m_style["draw:start-color"] && m_style["draw:end-color"]) - { - m_outputSink << " getStr().cstr() << "\""; - m_outputSink << " stop-opacity=\"" << (m_style["libwpg:end-opacity"] ? m_style["libwpg:end-opacity"]->getDouble() : 1) << "\" />" << std::endl; - - m_outputSink << " getStr().cstr() << "\""; - m_outputSink << " stop-opacity=\"" << (m_style["libwpg:start-opacity"] ? m_style["libwpg:start-opacity"]->getDouble() : 1) << "\" />" << std::endl; - } - m_outputSink << " \n"; - m_outputSink << "\n"; - } - else if (m_style["draw:style"] && m_style["draw:style"]->getStr() == "linear") - { - m_outputSink << "\n"; - m_outputSink << " \n"; - - if (m_style["draw:start-color"] && m_style["draw:end-color"]) - { - m_outputSink << " getStr().cstr() << "\""; - m_outputSink << " stop-opacity=\"" << (m_style["libwpg:start-opacity"] ? m_style["libwpg:start-opacity"]->getDouble() : 1) << "\" />" << std::endl; - - m_outputSink << " getStr().cstr() << "\""; - m_outputSink << " stop-opacity=\"" << (m_style["libwpg:end-opacity"] ? m_style["libwpg:end-opacity"]->getDouble() : 1) << "\" />" << std::endl; - } - m_outputSink << " \n"; - - // not a simple horizontal gradient - if(angle != 270) - { - m_outputSink << " \n"; - m_outputSink << " \n"; - } - - m_outputSink << "\n"; - } - else if (m_style["draw:style"] && m_style["draw:style"]->getStr() == "axial") - { - m_outputSink << "\n"; - m_outputSink << " \n"; - - if (m_style["draw:start-color"] && m_style["draw:end-color"]) - { - m_outputSink << " getStr().cstr() << "\""; - m_outputSink << " stop-opacity=\"" << (m_style["libwpg:end-opacity"] ? m_style["libwpg:end-opacity"]->getDouble() : 1) << "\" />" << std::endl; - - m_outputSink << " getStr().cstr() << "\""; - m_outputSink << " stop-opacity=\"" << (m_style["libwpg:start-opacity"] ? m_style["libwpg:start-opacity"]->getDouble() : 1) << "\" />" << std::endl; - - m_outputSink << " getStr().cstr() << "\""; - m_outputSink << " stop-opacity=\"" << (m_style["libwpg:end-opacity"] ? m_style["libwpg:end-opacity"]->getDouble() : 1) << "\" />" << std::endl; - } - m_outputSink << " \n"; - - // not a simple horizontal gradient - if(angle != 270) - { - m_outputSink << " \n"; - m_outputSink << " \n"; - } - - m_outputSink << "\n"; - } - } - else - { - if (m_style["draw:style"] && m_style["draw:style"]->getStr() == "radial") - { - m_outputSink << "\n"; - m_outputSink << " getStr().cstr() << "\" cy=\"" << m_style["svg:cy"]->getStr().cstr() << "\" r=\"" << m_style["svg:r"]->getStr().cstr() << "\" >\n"; - for(unsigned c = 0; c < m_gradient.count(); c++) - { - m_outputSink << " getStr().cstr() << "\""; - - m_outputSink << " stop-color=\"" << m_gradient[c]["svg:stop-color"]->getStr().cstr() << "\""; - m_outputSink << " stop-opacity=\"" << m_gradient[c]["svg:stop-opacity"]->getDouble() << "\" />" << std::endl; - - } - m_outputSink << " \n"; - m_outputSink << "\n"; - } - else - { - m_outputSink << "\n"; - m_outputSink << " \n"; - for(unsigned c = 0; c < m_gradient.count(); c++) - { - m_outputSink << " getStr().cstr() << "\""; - - m_outputSink << " stop-color=\"" << m_gradient[c]["svg:stop-color"]->getStr().cstr() << "\""; - m_outputSink << " stop-opacity=\"" << m_gradient[c]["svg:stop-opacity"]->getDouble() << "\" />" << std::endl; - - } - m_outputSink << " \n"; - - // not a simple horizontal gradient - if(angle != 270) - { - m_outputSink << " \n"; - m_outputSink << " \n"; - } - - m_outputSink << "\n"; - } - } - } -} - -void libwpg::WPGSVGGenerator::startLayer(const ::WPXPropertyList &propList) -{ - m_outputSink << "getInt() << "\""; - if (propList["svg:fill-rule"]) - m_outputSink << " fill-rule=\"" << propList["svg:fill-rule"]->getStr().cstr() << "\""; - m_outputSink << " >\n"; -} - -void libwpg::WPGSVGGenerator::endLayer() -{ - m_outputSink << "\n"; -} - -void libwpg::WPGSVGGenerator::drawRectangle(const ::WPXPropertyList &propList) -{ - m_outputSink << "getDouble()) << "\" y=\"" << doubleToString(72*propList["svg:y"]->getDouble()) << "\" "; - m_outputSink << "width=\"" << doubleToString(72*propList["svg:width"]->getDouble()) << "\" height=\"" << doubleToString(72*propList["svg:height"]->getDouble()) << "\" "; - if((propList["svg:rx"] && propList["svg:rx"]->getInt() !=0) || (propList["svg:ry"] && propList["svg:ry"]->getInt() !=0)) - m_outputSink << "rx=\"" << doubleToString(72*propList["svg:rx"]->getDouble()) << "\" ry=\"" << doubleToString(72*propList["svg:ry"]->getDouble()) << "\" "; - writeStyle(); - m_outputSink << "/>\n"; -} - -void libwpg::WPGSVGGenerator::drawEllipse(const WPXPropertyList &propList) -{ - m_outputSink << "getDouble()) << "\" cy=\"" << doubleToString(72*propList["svg:cy"]->getDouble()) << "\" "; - m_outputSink << "rx=\"" << doubleToString(72*propList["svg:rx"]->getDouble()) << "\" ry=\"" << doubleToString(72*propList["svg:ry"]->getDouble()) << "\" "; - writeStyle(); - if (propList["libwpg:rotate"] && propList["libwpg:rotate"]->getDouble() != 0.0) - m_outputSink << " transform=\" rotate(" << doubleToString(-propList["libwpg:rotate"]->getDouble()) - << ", " << doubleToString(72*propList["svg:cy"]->getDouble()) - << ", " << doubleToString(72*propList["svg:cy"]->getDouble()) - << ")\" "; - m_outputSink << "/>\n"; -} - -void libwpg::WPGSVGGenerator::drawPolyline(const ::WPXPropertyListVector &vertices) -{ - drawPolySomething(vertices, false); -} - -void libwpg::WPGSVGGenerator::drawPolygon(const ::WPXPropertyListVector &vertices) -{ - drawPolySomething(vertices, true); -} - -void libwpg::WPGSVGGenerator::drawPolySomething(const ::WPXPropertyListVector &vertices, bool isClosed) -{ - if(vertices.count() < 2) - return; - - if(vertices.count() == 2) - { - m_outputSink << "getDouble())) << "\" y1=\"" << doubleToString(72*(vertices[0]["svg:y"]->getDouble())) << "\" "; - m_outputSink << "x2=\"" << doubleToString(72*(vertices[1]["svg:x"]->getDouble())) << "\" y2=\"" << doubleToString(72*(vertices[1]["svg:y"]->getDouble())) << "\"\n"; - writeStyle(); - m_outputSink << "/>\n"; - } - else - { - if (isClosed) - m_outputSink << "getDouble())) << " " << doubleToString(72*(vertices[i]["svg:y"]->getDouble())); - if (i < vertices.count()-1) - m_outputSink << ", "; - } - m_outputSink << "\"\n"; - writeStyle(isClosed); - m_outputSink << "/>\n"; - } -} - -void libwpg::WPGSVGGenerator::drawPath(const ::WPXPropertyListVector &path) -{ - m_outputSink << "getStr() == "M") - { - m_outputSink << "\nM"; - m_outputSink << doubleToString(72*(propList["svg:x"]->getDouble())) << "," << doubleToString(72*(propList["svg:y"]->getDouble())); - } - else if (propList["libwpg:path-action"] && propList["libwpg:path-action"]->getStr() == "L") - { - m_outputSink << "\nL"; - m_outputSink << doubleToString(72*(propList["svg:x"]->getDouble())) << "," << doubleToString(72*(propList["svg:y"]->getDouble())); - } - else if (propList["libwpg:path-action"] && propList["libwpg:path-action"]->getStr() == "C") - { - m_outputSink << "\nC"; - m_outputSink << doubleToString(72*(propList["svg:x1"]->getDouble())) << "," << doubleToString(72*(propList["svg:y1"]->getDouble())) << " "; - m_outputSink << doubleToString(72*(propList["svg:x2"]->getDouble())) << "," << doubleToString(72*(propList["svg:y2"]->getDouble())) << " "; - m_outputSink << doubleToString(72*(propList["svg:x"]->getDouble())) << "," << doubleToString(72*(propList["svg:y"]->getDouble())); - } - else if (propList["libwpg:path-action"] && propList["libwpg:path-action"]->getStr() == "A") - { - m_outputSink << "\nA"; - m_outputSink << doubleToString(72*(propList["svg:rx"]->getDouble())) << "," << doubleToString(72*(propList["svg:ry"]->getDouble())) << " "; - m_outputSink << doubleToString(propList["libwpg:rotate"] ? propList["libwpg:rotate"]->getDouble() : 0) << " "; - m_outputSink << (propList["libwpg:large-arc"] ? propList["libwpg:large-arc"]->getInt() : 1) << ","; - m_outputSink << (propList["libwpg:sweep"] ? propList["libwpg:sweep"]->getInt() : 1) << " "; - m_outputSink << doubleToString(72*(propList["svg:x"]->getDouble())) << "," << doubleToString(72*(propList["svg:y"]->getDouble())); - } - else if ((i >= path.count()-1 && i > 2) && propList["libwpg:path-action"] && propList["libwpg:path-action"]->getStr() == "Z" ) - { - isClosed = true; - m_outputSink << "\nZ"; - } - } - - m_outputSink << "\" \n"; - writeStyle(isClosed); - m_outputSink << "/>\n"; -} - -void libwpg::WPGSVGGenerator::drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData) -{ - if (!propList["libwpg:mime-type"] || propList["libwpg:mime-type"]->getStr().len() <= 0) - return; - WPXString base64 = binaryData.getBase64Data(); - m_outputSink << "getDouble()); - double y(propList["svg:y"]->getDouble()); - double width(propList["svg:width"]->getDouble()); - double height(propList["svg:height"]->getDouble()); - bool flipX(propList["draw:mirror-horizontal"] && propList["draw:mirror-horizontal"]->getInt()); - bool flipY(propList["draw:mirror-vertical"] && propList["draw:mirror-vertical"]->getInt()); - - double xmiddle = x + width / 2.0; - double ymiddle = y + height / 2.0; - m_outputSink << "x=\"" << doubleToString(72*x) << "\" y=\"" << doubleToString(72*y) << "\" "; - m_outputSink << "width=\"" << doubleToString(72*width) << "\" height=\"" << doubleToString(72*height) << "\" "; - m_outputSink << "transform=\""; - m_outputSink << " translate(" << doubleToString(72*xmiddle) << ", " << doubleToString (72*ymiddle) << ") "; - m_outputSink << " scale(" << (flipX ? "-1" : "1") << ", " << (flipY ? "-1" : "1") << ") "; - // rotation is around the center of the object's bounding box - if (propList["libwpg:rotate"]) - { - double angle(propList["libwpg:rotate"]->getDouble()); - while (angle > 180.0) - angle -= 360.0; - while (angle < -180.0) - angle += 360.0; - m_outputSink << " rotate(" << doubleToString(angle) << ") "; - } - m_outputSink << " translate(" << doubleToString(-72*xmiddle) << ", " << doubleToString (-72*ymiddle) << ") "; - m_outputSink << "\" "; - } - m_outputSink << "xlink:href=\"data:" << propList["libwpg:mime-type"]->getStr().cstr() << ";base64,"; - m_outputSink << base64.cstr(); - m_outputSink << "\" />\n"; -} - -void libwpg::WPGSVGGenerator::startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector & /* path */) -{ - double x = 0.0; - double y = 0.0; - double width = 0.0; - double height = 0.0; - m_outputSink << "getDouble(); - y = propList["svg:y"]->getDouble(); - } - - double xmiddle = x; - double ymiddle = y; - - if (propList["svg:width"]) - { - width = propList["svg:width"]->getDouble(); - xmiddle += width / 2.0; - } - - if (propList["svg:height"]) - { - height = propList["svg:height"]->getDouble(); - ymiddle += height / 2.0; - } - - if (propList["draw:textarea-vertical-align"]) - { - if (propList["draw:textarea-vertical-align"]->getStr() == "middle") - y = ymiddle; - if (propList["draw:textarea-vertical-align"]->getStr() == "bottom") - { - y += height; - if (propList["fo:padding-bottom"]) - y -= propList["fo:padding-bottom"]->getDouble(); - } - } - else - y += height; - - if (propList["fo:padding-left"]) - x += propList["fo:padding-left"]->getDouble(); - - m_outputSink << "x=\"" << doubleToString(72*x) << "\" y=\"" << doubleToString(72*y) << "\""; - - // rotation is around the center of the object's bounding box - if (propList["libwpg:rotate"] && propList["libwpg:rotate"]->getDouble() != 0.0) - { - double angle(propList["libwpg:rotate"]->getDouble()); - while (angle > 180.0) - angle -= 360.0; - while (angle < -180.0) - angle += 360.0; - m_outputSink << " transform=\"rotate(" << doubleToString(angle) << ", " << doubleToString(72*xmiddle) << ", " << doubleToString(72*ymiddle) << ")\" "; - } - m_outputSink << ">\n"; - -} - -void libwpg::WPGSVGGenerator::endTextObject() -{ - m_outputSink << "\n"; -} - -void libwpg::WPGSVGGenerator::startTextSpan(const ::WPXPropertyList &propList) -{ - m_outputSink << "getStr().cstr() << "\" "; - if (propList["fo:font-style"]) - m_outputSink << "font-style=\"" << propList["fo:font-style"]->getStr().cstr() << "\" "; - if (propList["fo:font-weight"]) - m_outputSink << "font-weight=\"" << propList["fo:font-weight"]->getStr().cstr() << "\" "; - if (propList["fo:font-variant"]) - m_outputSink << "font-variant=\"" << propList["fo:font-variant"]->getStr().cstr() << "\" "; - if (propList["fo:font-size"]) - m_outputSink << "font-size=\"" << doubleToString(propList["fo:font-size"]->getDouble()) << "\" "; - if (propList["fo:color"]) - m_outputSink << "fill=\"" << propList["fo:color"]->getStr().cstr() << "\" "; - if (propList["fo:text-transform"]) - m_outputSink << "text-transform=\"" << propList["fo:text-transform"]->getStr().cstr() << "\" "; - if (propList["svg:fill-opacity"]) - m_outputSink << "fill-opacity=\"" << doubleToString(propList["svg:fill-opacity"]->getDouble()) << "\" "; - if (propList["svg:stroke-opacity"]) - m_outputSink << "stroke-opacity=\"" << doubleToString(propList["svg:stroke-opacity"]->getDouble()) << "\" "; - m_outputSink << ">\n"; -} - -void libwpg::WPGSVGGenerator::endTextSpan() -{ - m_outputSink << "\n"; -} - -void libwpg::WPGSVGGenerator::insertText(const ::WPXString &str) -{ - WPXString tempUTF8(str, true); - m_outputSink << tempUTF8.cstr() << "\n"; -} - -// create "style" attribute based on current pen and brush -void libwpg::WPGSVGGenerator::writeStyle(bool /* isClosed */) -{ - m_outputSink << "style=\""; - - if (m_style["svg:stroke-width"]) - m_outputSink << "stroke-width: " << doubleToString(72*m_style["svg:stroke-width"]->getDouble()) << "; "; - - if (m_style["draw:stroke"] && m_style["draw:stroke"]->getStr() != "none") - { - if (m_style["svg:stroke-color"]) - m_outputSink << "stroke: " << m_style["svg:stroke-color"]->getStr().cstr() << "; "; - if(m_style["svg:stroke-opacity"] && m_style["svg:stroke-opacity"]->getInt()!= 1) - m_outputSink << "stroke-opacity: " << doubleToString(m_style["svg:stroke-opacity"]->getDouble()) << "; "; - } - - if (m_style["draw:stroke"] && m_style["draw:stroke"]->getStr() == "solid") - m_outputSink << "stroke-dasharray: solid; "; - else if (m_style["draw:stroke"] && m_style["draw:stroke"]->getStr() == "dash") - { - int dots1 = m_style["draw:dots1"]->getInt(); - int dots2 = m_style["draw:dots2"]->getInt(); - double dots1len = m_style["draw:dots1-length"]->getDouble(); - double dots2len = m_style["draw:dots2-length"]->getDouble(); - double gap = m_style["draw:distance"]->getDouble(); - m_outputSink << "stroke-dasharray: "; - for (int i = 0; i < dots1; i++) - { - if (i) - m_outputSink << ", "; - m_outputSink << (int)dots1len; - m_outputSink << ", "; - m_outputSink << (int)gap; - } - for (int j = 0; j < dots2; j++) - { - m_outputSink << ", "; - m_outputSink << (int)dots2len; - m_outputSink << ", "; - m_outputSink << (int)gap; - } - m_outputSink << "; "; - } - - if (m_style["svg:stroke-linecap"]) - m_outputSink << "stroke-linecap: " << m_style["svg:stroke-linecap"]->getStr().cstr() << "; "; - - if (m_style["svg:stroke-linejoin"]) - m_outputSink << "stroke-linejoin: " << m_style["svg:stroke-linejoin"]->getStr().cstr() << "; "; - - if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "none") - m_outputSink << "fill: none; "; - else if(m_style["svg:fill-rule"]) - m_outputSink << "fill-rule: " << m_style["svg:fill-rule"]->getStr().cstr() << "; "; - - if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "gradient") - m_outputSink << "fill: url(#grad" << m_gradientIndex-1 << "); "; - - if(m_style["draw:shadow"] && m_style["draw:shadow"]->getStr() == "visible") - m_outputSink << "filter:url(#shadow" << m_shadowIndex-1 << "); "; - - if(m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "solid") - if (m_style["draw:fill-color"]) - m_outputSink << "fill: " << m_style["draw:fill-color"]->getStr().cstr() << "; "; - if(m_style["draw:opacity"] && m_style["draw:opacity"]->getDouble() < 1) - m_outputSink << "fill-opacity: " << doubleToString(m_style["draw:opacity"]->getDouble()) << "; "; - m_outputSink << "\""; // style -} -/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/WPGSVGGenerator.h libwpg-0.3.0-rjvb/src/lib/WPGSVGGenerator.h --- libwpg-0.2.2/src/lib/WPGSVGGenerator.h 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGSVGGenerator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,80 +0,0 @@ -/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */ -/* libwpg - * Version: MPL 2.0 / LGPLv2.1+ - * - * 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/. - * - * Major Contributor(s): - * Copyright (C) 2006 Ariya Hidayat (ariya@kde.org) - * Copyright (C) 2005 Fridrich Strba (fridrich.strba@bluewin.ch) - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms - * of the GNU Lesser General Public License Version 2.1 or later - * (LGPLv2.1+), in which case the provisions of the LGPLv2.1+ are - * applicable instead of those above. - * - * For further information visit http://libwpg.sourceforge.net - */ - -/* "This product is not manufactured, approved, or supported by - * Corel Corporation or Corel Corporation Limited." - */ - -#ifndef __WPGSVGGENERATOR_H__ -#define __WPGSVGGENERATOR_H__ - -#include -#include -#include -#include "libwpg.h" - -namespace libwpg -{ - -class WPGSVGGenerator : public WPGPaintInterface -{ -public: - WPGSVGGenerator(std::ostream &output_sink); - ~WPGSVGGenerator(); - - void startGraphics(const ::WPXPropertyList &propList); - void endGraphics(); - void startLayer(const ::WPXPropertyList &propList); - void endLayer(); - void startEmbeddedGraphics(const ::WPXPropertyList & /*propList*/) {} - void endEmbeddedGraphics() {} - - void setStyle(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &gradient); - - void drawRectangle(const ::WPXPropertyList &propList); - void drawEllipse(const ::WPXPropertyList &propList); - void drawPolyline(const ::WPXPropertyListVector &vertices); - void drawPolygon(const ::WPXPropertyListVector &vertices); - void drawPath(const ::WPXPropertyListVector &path); - void drawGraphicObject(const ::WPXPropertyList &propList, const ::WPXBinaryData &binaryData); - void startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector &path); - void endTextObject(); - void startTextLine(const ::WPXPropertyList & /* propList */) {} - void endTextLine() {} - void startTextSpan(const ::WPXPropertyList &propList); - void endTextSpan(); - void insertText(const ::WPXString &str); - -private: - ::WPXPropertyListVector m_gradient; - ::WPXPropertyList m_style; - int m_gradientIndex, m_shadowIndex; - void writeStyle(bool isClosed=true); - void drawPolySomething(const ::WPXPropertyListVector &vertices, bool isClosed); - - std::ostream &m_outputSink; -}; - -} // namespace libwpg - -#endif // __WPGSVGGENERATOR_H__ -/* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/WPGXParser.cpp libwpg-0.3.0-rjvb/src/lib/WPGXParser.cpp --- libwpg-0.2.2/src/lib/WPGXParser.cpp 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGXParser.cpp 2014-03-29 10:19:42.000000000 +0000 @@ -28,7 +28,93 @@ #include "WPGXParser.h" #include "libwpg_utils.h" -WPGXParser::WPGXParser(WPXInputStream *input, libwpg::WPGPaintInterface *painter): + +namespace +{ + +static void separateTabsAndInsertText(librevenge::RVNGDrawingInterface *iface, const librevenge::RVNGString &text) +{ + if (!iface || text.empty()) + return; + librevenge::RVNGString tmpText; + librevenge::RVNGString::Iter i(text); + for (i.rewind(); i.next();) + { + if (*(i()) == '\t') + { + if (!tmpText.empty()) + { + if (iface) + iface->insertText(tmpText); + tmpText.clear(); + } + + if (iface) + iface->insertTab(); + } + else if (*(i()) == '\n') + { + if (!tmpText.empty()) + { + if (iface) + iface->insertText(tmpText); + tmpText.clear(); + } + + if (iface) + iface->insertLineBreak(); + } + else + { + tmpText.append(i()); + } + } + if (iface && !tmpText.empty()) + iface->insertText(tmpText); +} + +static void separateSpacesAndInsertText(librevenge::RVNGDrawingInterface *iface, const librevenge::RVNGString &text) +{ + if (!iface) + return; + if (text.empty()) + { + iface->insertText(text); + return; + } + librevenge::RVNGString tmpText; + int numConsecutiveSpaces = 0; + librevenge::RVNGString::Iter i(text); + for (i.rewind(); i.next();) + { + if (*(i()) == ' ') + numConsecutiveSpaces++; + else + numConsecutiveSpaces = 0; + + if (numConsecutiveSpaces > 1) + { + if (!tmpText.empty()) + { + separateTabsAndInsertText(iface, tmpText); + tmpText.clear(); + } + + if (iface) + iface->insertSpace(); + } + else + { + tmpText.append(i()); + } + } + separateTabsAndInsertText(iface, tmpText); +} + +} // anonymous namespace + + +WPGXParser::WPGXParser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter): m_input(input), m_painter(painter), m_colorPalette(std::map()) { } @@ -41,7 +127,7 @@ unsigned char WPGXParser::readU8() { - if (!m_input || m_input->atEOS()) + if (!m_input || m_input->isEnd()) return (unsigned char)0; unsigned long numBytesRead; unsigned char const *p = m_input->read(sizeof(unsigned char), numBytesRead); @@ -64,7 +150,7 @@ unsigned int p1 = (unsigned int)readU8(); unsigned int p2 = (unsigned int)readU8(); unsigned int p3 = (unsigned int)readU8(); - return (unsigned long)(p0|(p1<<8)|(p2<<16)|(p3<<24)); + return (unsigned int)(p0|(p1<<8)|(p2<<16)|(p3<<24)); } short WPGXParser::readS16() @@ -96,7 +182,7 @@ // read the next 16 bit value (LSB part, in value16 resides the MSB part) unsigned long lvalue16 = readU16(); unsigned long value32 = value16 & 0x7fff; // mask out the MSB - return (value32<<16)+lvalue16; + return (unsigned int)((value32<<16)+lvalue16); } else { @@ -117,58 +203,53 @@ return *this; } -void WPGTextDataHandler::endSubDocument() -{ - WPG_DEBUG_MSG(("WPGTextDataHandler::endSubDocument\n")); -} - -void WPGTextDataHandler::openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector & /* tabStops */) +void WPGTextDataHandler::openParagraph(const librevenge::RVNGPropertyList &propList) { - m_painter->startTextLine(propList); + m_painter->openParagraph(propList); } void WPGTextDataHandler::closeParagraph() { - m_painter->endTextLine(); + m_painter->closeParagraph(); } -void WPGTextDataHandler::openSpan(const WPXPropertyList &propList) +void WPGTextDataHandler::openSpan(const librevenge::RVNGPropertyList &propList) { - m_painter->startTextSpan(propList); + m_painter->openSpan(propList); } void WPGTextDataHandler::closeSpan() { - m_painter->endTextSpan(); + m_painter->closeSpan(); } void WPGTextDataHandler::insertTab() { - WPG_DEBUG_MSG(("WPGTextDataHandler::insertTab\n")); + m_painter->insertTab(); } void WPGTextDataHandler::insertSpace() { - m_painter->insertText(" "); + m_painter->insertSpace(); } -void WPGTextDataHandler::insertText(const WPXString &text) +void WPGTextDataHandler::insertText(const librevenge::RVNGString &text) { - m_painter->insertText(text); + separateSpacesAndInsertText(m_painter, text); } void WPGTextDataHandler::insertLineBreak() { - WPG_DEBUG_MSG(("WPGTextDataHandler::insertLineBreak\n")); + m_painter->insertLineBreak(); } -void WPGTextDataHandler::openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &/*tabStops*/) +void WPGTextDataHandler::openListElement(const librevenge::RVNGPropertyList &propList) { - m_painter->startTextLine(propList); + m_painter->openListElement(propList); } void WPGTextDataHandler::closeListElement() { - WPG_DEBUG_MSG(("WPGTextDataHandler::closeListElement\n")); + m_painter->closeListElement(); } /* vim:set shiftwidth=4 softtabstop=4 noexpandtab: */ diff -Nru libwpg-0.2.2/src/lib/WPGXParser.h libwpg-0.3.0-rjvb/src/lib/WPGXParser.h --- libwpg-0.2.2/src/lib/WPGXParser.h 2013-04-18 13:13:16.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/lib/WPGXParser.h 2014-05-23 07:49:39.000000000 +0000 @@ -28,9 +28,9 @@ #ifndef __WPGXPARSER_H__ #define __WPGXPARSER_H__ -#include "WPGPaintInterface.h" -#include -#include +#include +#include +#include #include "WPGColor.h" #include @@ -38,9 +38,9 @@ class WPGXParser { public: - WPGXParser(WPXInputStream *input, libwpg::WPGPaintInterface *painter); + WPGXParser(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter); WPGXParser(const WPGXParser &parser); - virtual ~WPGXParser() {}; + virtual ~WPGXParser() {} virtual bool parse() = 0; unsigned char readU8(); @@ -52,91 +52,102 @@ WPGXParser &operator=(const WPGXParser &parser); protected: - WPXInputStream *m_input; - libwpg::WPGPaintInterface *m_painter; + librevenge::RVNGInputStream *m_input; + librevenge::RVNGDrawingInterface *m_painter; std::map m_colorPalette; }; -class WPGTextDataHandler : public ::WPXDocumentInterface +class WPGTextDataHandler : public ::librevenge::RVNGTextInterface { public: - WPGTextDataHandler(libwpg::WPGPaintInterface *painter) : + WPGTextDataHandler(librevenge::RVNGDrawingInterface *painter) : m_painter(painter), m_fontName("Times New Roman"), m_paragraphStyle(), m_textStyle() {} ~WPGTextDataHandler() {} - void setDocumentMetaData(const WPXPropertyList & /* propList */) {} + void setDocumentMetaData(const librevenge::RVNGPropertyList & /* propList */) {} - void startDocument() {} + void startDocument(const librevenge::RVNGPropertyList & /* propList */) {} void endDocument() {} - void startSubDocument() {} - void endSubDocument(); + void defineEmbeddedFont(const librevenge::RVNGPropertyList & /* propList */) {} - void definePageStyle(const WPXPropertyList & /* propList */) {} - void openPageSpan(const WPXPropertyList & /* propList */) {} + void definePageStyle(const librevenge::RVNGPropertyList & /* propList */) {} + void openPageSpan(const librevenge::RVNGPropertyList & /* propList */) {} void closePageSpan() {} - void openHeader(const WPXPropertyList & /* propList */) {} + void openHeader(const librevenge::RVNGPropertyList & /* propList */) {} void closeHeader() {} - void openFooter(const WPXPropertyList & /* propList */) {} + void openFooter(const librevenge::RVNGPropertyList & /* propList */) {} void closeFooter() {} - void defineParagraphStyle(const WPXPropertyList & /* propList */, const WPXPropertyListVector & /* tabStops */) {} - void openParagraph(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); + void defineParagraphStyle(const librevenge::RVNGPropertyList & /* propList */) {} + void openParagraph(const librevenge::RVNGPropertyList &propList); void closeParagraph(); - void defineCharacterStyle(const WPXPropertyList & /* propList */) {} - void openSpan(const WPXPropertyList &propList); + void defineCharacterStyle(const librevenge::RVNGPropertyList & /* propList */) {} + void openSpan(const librevenge::RVNGPropertyList &propList); void closeSpan(); - void defineSectionStyle(const WPXPropertyList & /* propList */, const WPXPropertyListVector & /* columns */) {} - void openSection(const WPXPropertyList & /* propList */, const WPXPropertyListVector & /* columns */) {} + void openLink(const librevenge::RVNGPropertyList & /* propList */) {} + void closeLink() {} + + void defineSectionStyle(const librevenge::RVNGPropertyList & /* propList */) {} + void openSection(const librevenge::RVNGPropertyList & /* propList */) {} void closeSection() {} void insertTab(); void insertSpace(); - void insertText(const WPXString &text); + void insertText(const librevenge::RVNGString &text); void insertLineBreak(); - void insertField(const WPXString & /* type */, const WPXPropertyList & /* propList */) {} + void insertField(const librevenge::RVNGPropertyList & /* propList */) {} - void defineOrderedListLevel(const WPXPropertyList & /* propList */) {} - void defineUnorderedListLevel(const WPXPropertyList & /* propList */) {} - void openOrderedListLevel(const WPXPropertyList & /* propList */) {} - void openUnorderedListLevel(const WPXPropertyList & /* propList */) {} + void openOrderedListLevel(const librevenge::RVNGPropertyList & /* propList */) {} + void openUnorderedListLevel(const librevenge::RVNGPropertyList & /* propList */) {} void closeOrderedListLevel() {} void closeUnorderedListLevel() {} - void openListElement(const WPXPropertyList &propList, const WPXPropertyListVector &tabStops); + void openListElement(const librevenge::RVNGPropertyList &propList); void closeListElement(); - void openFootnote(const WPXPropertyList & /* propList */) {} + void openFootnote(const librevenge::RVNGPropertyList & /* propList */) {} void closeFootnote() {} - void openEndnote(const WPXPropertyList & /* propList */) {} + void openEndnote(const librevenge::RVNGPropertyList & /* propList */) {} void closeEndnote() {} - void openComment(const WPXPropertyList & /* propList */) {} + void openComment(const librevenge::RVNGPropertyList & /* propList */) {} void closeComment() {} - void openTextBox(const WPXPropertyList & /* propList */) {} + void openTextBox(const librevenge::RVNGPropertyList & /* propList */) {} void closeTextBox() {} - void openTable(const WPXPropertyList & /* propList */, const WPXPropertyListVector & /* columns */) {} - void openTableRow(const WPXPropertyList & /* propList */) {} + void openTable(const librevenge::RVNGPropertyList & /* propList */) {} + void openTableRow(const librevenge::RVNGPropertyList & /* propList */) {} void closeTableRow() {} - void openTableCell(const WPXPropertyList & /* propList */) {} + void openTableCell(const librevenge::RVNGPropertyList & /* propList */) {} void closeTableCell() {} - void insertCoveredTableCell(const WPXPropertyList & /* propList */) {} + void insertCoveredTableCell(const librevenge::RVNGPropertyList & /* propList */) {} void closeTable() {} - void openFrame(const WPXPropertyList & /* propList */) {} + void openFrame(const librevenge::RVNGPropertyList & /* propList */) {} void closeFrame() {} - void insertBinaryObject(const WPXPropertyList & /* propList */, const WPXBinaryData & /* data */) {} - void insertEquation(const WPXPropertyList & /* propList */, const WPXString & /* data */) {} + void openGroup(const librevenge::RVNGPropertyList & /* propList */) {} + void closeGroup() {} + + void defineGraphicStyle(const librevenge::RVNGPropertyList & /* propList */) {} + void drawRectangle(const librevenge::RVNGPropertyList & /* propList */) {} + void drawEllipse(const librevenge::RVNGPropertyList & /* propList */) {} + void drawPolygon(const librevenge::RVNGPropertyList & /* propList */) {} + void drawPolyline(const librevenge::RVNGPropertyList & /* propList */) {} + void drawPath(const librevenge::RVNGPropertyList & /* propList */) {} + void drawConnector(const librevenge::RVNGPropertyList & /* propList */) {} + + void insertBinaryObject(const librevenge::RVNGPropertyList & /* propList */) {} + void insertEquation(const librevenge::RVNGPropertyList & /* propList */) {} private: - libwpg::WPGPaintInterface *m_painter; - ::WPXString m_fontName; - ::WPXPropertyList m_paragraphStyle, m_textStyle; + librevenge::RVNGDrawingInterface *m_painter; + ::librevenge::RVNGString m_fontName; + ::librevenge::RVNGPropertyList m_paragraphStyle, m_textStyle; // Unimplemented to prevent compiler from creating crasher ones WPGTextDataHandler(const WPGTextDataHandler &); WPGTextDataHandler &operator=(const WPGTextDataHandler &); diff -Nru libwpg-0.2.2/src/Makefile.am libwpg-0.3.0-rjvb/src/Makefile.am --- libwpg-0.2.2/src/Makefile.am 2011-10-04 14:14:14.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/Makefile.am 2014-03-29 10:19:42.000000000 +0000 @@ -1 +1,5 @@ -SUBDIRS = lib conv +SUBDIRS = lib + +if BUILD_TOOLS +SUBDIRS += conv +endif diff -Nru libwpg-0.2.2/src/Makefile.in libwpg-0.3.0-rjvb/src/Makefile.in --- libwpg-0.2.2/src/Makefile.in 2013-04-18 13:16:22.000000000 +0000 +++ libwpg-0.3.0-rjvb/src/Makefile.in 2014-03-29 10:28:44.000000000 +0000 @@ -1,7 +1,7 @@ -# Makefile.in generated by automake 1.13.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ -# Copyright (C) 1994-2012 Free Software Foundation, Inc. +# Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, @@ -14,23 +14,51 @@ @SET_MAKE@ VPATH = @srcdir@ -am__make_dryrun = \ - { \ - am__dry=no; \ +am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' +am__make_running_with_option = \ + case $${target_option-} in \ + ?) ;; \ + *) echo "am__make_running_with_option: internal error: invalid" \ + "target option '$${target_option-}' specified" >&2; \ + exit 1;; \ + esac; \ + has_opt=no; \ + sane_makeflags=$$MAKEFLAGS; \ + if $(am__is_gnu_make); then \ + sane_makeflags=$$MFLAGS; \ + else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ - echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \ - | grep '^AM OK$$' >/dev/null || am__dry=yes;; \ - *) \ - for am__flg in $$MAKEFLAGS; do \ - case $$am__flg in \ - *=*|--*) ;; \ - *n*) am__dry=yes; break;; \ - esac; \ - done;; \ + bs=\\; \ + sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ + | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ + esac; \ + fi; \ + skip_next=no; \ + strip_trailopt () \ + { \ + flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ + }; \ + for flg in $$sane_makeflags; do \ + test $$skip_next = yes && { skip_next=no; continue; }; \ + case $$flg in \ + *=*|--*) continue;; \ + -*I) strip_trailopt 'I'; skip_next=yes;; \ + -*I?*) strip_trailopt 'I';; \ + -*O) strip_trailopt 'O'; skip_next=yes;; \ + -*O?*) strip_trailopt 'O';; \ + -*l) strip_trailopt 'l'; skip_next=yes;; \ + -*l?*) strip_trailopt 'l';; \ + -[dEDm]) skip_next=yes;; \ + -[JT]) skip_next=yes;; \ + esac; \ + case $$flg in \ + *$$target_option*) has_opt=yes; break;; \ esac; \ - test $$am__dry = yes; \ - } + done; \ + test $$has_opt = yes +am__make_dryrun = (target_option=n; $(am__make_running_with_option)) +am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ @@ -49,6 +77,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ +@BUILD_TOOLS_TRUE@am__append_1 = conv subdir = src DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 @@ -116,7 +145,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = lib conv DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -214,6 +243,12 @@ 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@ @@ -281,7 +316,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = lib conv +SUBDIRS = lib $(am__append_1) all: all-recursive .SUFFIXES: @@ -329,13 +364,12 @@ # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): - @fail= failcom='exit 1'; \ - for f in x $$MAKEFLAGS; do \ - case $$f in \ - *=* | --[!k]*);; \ - *k*) failcom='fail=yes';; \ - esac; \ - done; \ + @fail=; \ + if $(am__make_keepgoing); then \ + failcom='fail=yes'; \ + else \ + failcom='exit 1'; \ + fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \