diff -Nru libcdr-0.0.15/aclocal.m4 libcdr-0.1.0/aclocal.m4 --- libcdr-0.0.15/aclocal.m4 2014-04-04 13:40:05.000000000 +0000 +++ libcdr-0.1.0/aclocal.m4 2014-03-29 10:28:54.000000000 +0000 @@ -1,4 +1,4 @@ -# generated automatically by aclocal 1.14.1 -*- Autoconf -*- +# generated automatically by aclocal 1.13.4 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. @@ -247,10 +247,10 @@ # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.14' +[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.14.1], [], +m4_if([$1], [1.13.4], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) @@ -266,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.14.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]))]) @@ -291,8 +291,7 @@ : ${AR=ar} AC_CACHE_CHECK([the archiver ($AR) interface], [am_cv_ar_interface], - [AC_LANG_PUSH([C]) - am_cv_ar_interface=ar + [am_cv_ar_interface=ar AC_COMPILE_IFELSE([AC_LANG_SOURCE([[int some_variable = 0;]])], [am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([am_ar_try]) @@ -309,7 +308,7 @@ fi rm -f conftest.lib libconftest.a ]) - AC_LANG_POP([C])]) + ]) case $am_cv_ar_interface in ar) @@ -693,12 +692,6 @@ # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. -dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. -m4_define([AC_PROG_CC], -m4_defn([AC_PROG_CC]) -[_AM_PROG_CC_C_O -]) - # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- @@ -807,48 +800,7 @@ AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl - -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) - fi -fi]) +]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further @@ -856,6 +808,7 @@ m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) + # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. @@ -1037,70 +990,6 @@ AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# -# This file 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. - -# _AM_PROG_CC_C_O -# --------------- -# Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC -# to automatically call this. -AC_DEFUN([_AM_PROG_CC_C_O], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -AC_REQUIRE_AUX_FILE([compile])dnl -AC_LANG_PUSH([C])dnl -AC_CACHE_CHECK( - [whether $CC understands -c and -o together], - [am_cv_prog_cc_c_o], - [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i]) -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -AC_LANG_POP([C])]) - -# For backward compatibility. -AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) - -# Copyright (C) 2001-2013 Free Software Foundation, Inc. -# -# This file 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. - -# AM_RUN_LOG(COMMAND) -# ------------------- -# Run COMMAND, save the exit status in ac_status, and log it. -# (This has been adapted from Autoconf's _AC_RUN_LOG macro.) -AC_DEFUN([AM_RUN_LOG], -[{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD - ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD - (exit $ac_status); }]) - # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. diff -Nru libcdr-0.0.15/AUTHORS libcdr-0.1.0/AUTHORS --- libcdr-0.0.15/AUTHORS 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/AUTHORS 2014-03-29 10:23:47.000000000 +0000 @@ -3,3 +3,7 @@ Current maintainers and authors of libcdr --------------------------------------------- Fridrich Strba (fridrich.strba@bluewin.ch) + +Contributors +--------------------------------------------- +David Tardon (dtardon@redhat.com) diff -Nru libcdr-0.0.15/build/Makefile.in libcdr-0.1.0/build/Makefile.in --- libcdr-0.0.15/build/Makefile.in 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/build/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -224,6 +224,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -257,16 +258,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libcdr-0.0.15/build/win32/cdr2raw.dsp libcdr-0.1.0/build/win32/cdr2raw.dsp --- libcdr-0.0.15/build/win32/cdr2raw.dsp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/build/win32/cdr2raw.dsp 2014-03-29 10:23:47.000000000 +0000 @@ -44,16 +44,16 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\inc" /I "libwpd-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c -# ADD CPP /nologo /MT /W3 /GX /I "..\..\inc" /I "libwpd-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c +# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\inc" /I "librevenge-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c +# ADD CPP /nologo /MT /W3 /GX /I "..\..\inc" /I "librevenge-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cdr2raw.exe" /libpath:"Release\lib" -# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cdr2raw.exe" /libpath:"Release\lib" +# ADD BASE LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cdr2raw.exe" /libpath:"Release\lib" +# ADD LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cdr2raw.exe" /libpath:"Release\lib" # SUBTRACT LINK32 /nodefaultlib !ELSEIF "$(CFG)" == "cdr2raw - Win32 Debug" @@ -72,16 +72,16 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\..\..\inc" /I "libwpd-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\inc" /I "libwpd-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\..\..\inc" /I "librevenge-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\inc" /I "librevenge-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cdr2raw.exe" /libpath:"Debug\lib" -# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib kernel32.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cdr2raw.exe" /libpath:"Debug\lib" +# ADD BASE LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cdr2raw.exe" /libpath:"Debug\lib" +# ADD LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib kernel32.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cdr2raw.exe" /libpath:"Debug\lib" # SUBTRACT LINK32 /nodefaultlib !ENDIF diff -Nru libcdr-0.0.15/build/win32/cdr2raw.vcproj libcdr-0.1.0/build/win32/cdr2raw.vcproj --- libcdr-0.0.15/build/win32/cdr2raw.vcproj 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/build/win32/cdr2raw.vcproj 2014-03-29 10:23:47.000000000 +0000 @@ -70,7 +70,7 @@ /> 0x0409 - libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) + libcdr-0.0.lib;librevenge-stream-0.9.lib;librevenge-0.9.lib;%(AdditionalDependencies) Debug\bin\cdr2raw.exe true Debug\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories) @@ -111,7 +111,7 @@ 0x0409 - libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) + libcdr-0.0.lib;librevenge-stream-0.9.lib;librevenge-0.9.lib;%(AdditionalDependencies) Release\bin\cdr2raw.exe true Release\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories) diff -Nru libcdr-0.0.15/build/win32/cdr2xhtml.dsp libcdr-0.1.0/build/win32/cdr2xhtml.dsp --- libcdr-0.0.15/build/win32/cdr2xhtml.dsp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/build/win32/cdr2xhtml.dsp 2014-03-29 10:23:47.000000000 +0000 @@ -44,16 +44,16 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\inc" /I "libwpd-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c -# ADD CPP /nologo /MT /W3 /GX /I "..\..\inc" /I "libwpd-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c +# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\inc" /I "librevenge-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c +# ADD CPP /nologo /MT /W3 /GX /I "..\..\inc" /I "librevenge-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cdr2xhtml.exe" /libpath:"Release\lib" -# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cdr2xhtml.exe" /libpath:"Release\lib" +# ADD BASE LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cdr2xhtml.exe" /libpath:"Release\lib" +# ADD LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cdr2xhtml.exe" /libpath:"Release\lib" # SUBTRACT LINK32 /nodefaultlib !ELSEIF "$(CFG)" == "cdr2xhtml - Win32 Debug" @@ -72,16 +72,16 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\inc" /I "libwpd-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\inc" /I "libwpd-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\inc" /I "librevenge-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\inc" /I "librevenge-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cdr2xhtml.exe" /libpath:"Debug\lib" -# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cdr2xhtml.exe" /libpath:"Debug\lib" +# ADD BASE LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cdr2xhtml.exe" /libpath:"Debug\lib" +# ADD LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cdr2xhtml.exe" /libpath:"Debug\lib" # SUBTRACT LINK32 /nodefaultlib !ENDIF diff -Nru libcdr-0.0.15/build/win32/cdr2xhtml.vcproj libcdr-0.1.0/build/win32/cdr2xhtml.vcproj --- libcdr-0.0.15/build/win32/cdr2xhtml.vcproj 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/build/win32/cdr2xhtml.vcproj 2014-03-29 10:23:47.000000000 +0000 @@ -68,7 +68,7 @@ /> 0x0409 - libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) + libcdr-0.0.lib;librevenge-stream-0.9.lib;librevenge-0.9.lib;%(AdditionalDependencies) Release\bin\cdr2xhtml.exe true Release\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories) @@ -110,7 +110,7 @@ 0x0409 - libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) + libcdr-0.0.lib;librevenge-stream-0.9.lib;librevenge-0.9.lib;%(AdditionalDependencies) Debug\bin\cdr2xhtml.exe true Debug\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);%(AdditionalLibraryDirectories) diff -Nru libcdr-0.0.15/build/win32/cmx2raw.dsp libcdr-0.1.0/build/win32/cmx2raw.dsp --- libcdr-0.0.15/build/win32/cmx2raw.dsp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/build/win32/cmx2raw.dsp 2014-03-29 10:23:47.000000000 +0000 @@ -44,16 +44,16 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\inc" /I "libwpd-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c -# ADD CPP /nologo /MT /W3 /GX /I "..\..\inc" /I "libwpd-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c +# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\inc" /I "librevenge-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c +# ADD CPP /nologo /MT /W3 /GX /I "..\..\inc" /I "librevenge-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cmx2raw.exe" /libpath:"Release\lib" -# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cmx2raw.exe" /libpath:"Release\lib" +# ADD BASE LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cmx2raw.exe" /libpath:"Release\lib" +# ADD LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cmx2raw.exe" /libpath:"Release\lib" # SUBTRACT LINK32 /nodefaultlib !ELSEIF "$(CFG)" == "cmx2raw - Win32 Debug" @@ -72,16 +72,16 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\..\..\inc" /I "libwpd-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\inc" /I "libwpd-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "\..\..\inc" /I "librevenge-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\inc" /I "librevenge-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cmx2raw.exe" /libpath:"Debug\lib" -# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib kernel32.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cmx2raw.exe" /libpath:"Debug\lib" +# ADD BASE LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cmx2raw.exe" /libpath:"Debug\lib" +# ADD LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib kernel32.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cmx2raw.exe" /libpath:"Debug\lib" # SUBTRACT LINK32 /nodefaultlib !ENDIF diff -Nru libcdr-0.0.15/build/win32/cmx2raw.vcproj libcdr-0.1.0/build/win32/cmx2raw.vcproj --- libcdr-0.0.15/build/win32/cmx2raw.vcproj 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/build/win32/cmx2raw.vcproj 2014-03-29 10:23:47.000000000 +0000 @@ -70,7 +70,7 @@ /> 0x0409 - libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) + libcdr-0.0.lib;librevenge-stream-0.9.lib;librevenge-0.9.lib;%(AdditionalDependencies) Debug\bin\cmx2raw.exe true Debug\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories) @@ -111,7 +111,7 @@ 0x0409 - libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) + libcdr-0.0.lib;librevenge-stream-0.9.lib;librevenge-0.9.lib;%(AdditionalDependencies) Release\bin\cmx2raw.exe true Release\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories) diff -Nru libcdr-0.0.15/build/win32/cmx2xhtml.dsp libcdr-0.1.0/build/win32/cmx2xhtml.dsp --- libcdr-0.0.15/build/win32/cmx2xhtml.dsp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/build/win32/cmx2xhtml.dsp 2014-03-29 10:23:47.000000000 +0000 @@ -44,16 +44,16 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\inc" /I "libwpd-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c -# ADD CPP /nologo /MT /W3 /GX /I "..\..\inc" /I "libwpd-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c +# ADD BASE CPP /nologo /MT /W3 /GX /Zi /I "..\..\inc" /I "librevenge-0.9" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /c +# ADD CPP /nologo /MT /W3 /GX /I "..\..\inc" /I "librevenge-0.9" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cmx2xhtml.exe" /libpath:"Release\lib" -# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cmx2xhtml.exe" /libpath:"Release\lib" +# ADD BASE LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cmx2xhtml.exe" /libpath:"Release\lib" +# ADD LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /machine:IX86 /out:"Release\bin\cmx2xhtml.exe" /libpath:"Release\lib" # SUBTRACT LINK32 /nodefaultlib !ELSEIF "$(CFG)" == "cmx2xhtml - Win32 Debug" @@ -72,16 +72,16 @@ MTL=midl.exe # ADD BASE MTL /nologo /win32 # ADD MTL /nologo /win32 -# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\inc" /I "libwpd-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c -# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\inc" /I "libwpd-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "..\..\inc" /I "librevenge-0.9" /D "WIN32" /D "_DEBUG" /D "DEBUG" /D "_CONSOLE" /GZ /c +# ADD CPP /nologo /MTd /W3 /GX /ZI /Od /I "..\..\inc" /I "librevenge-0.9" /D "_DEBUG" /D "DEBUG" /D "WIN32" /D "_CONSOLE" /GZ /c # ADD BASE RSC /l 0x409 # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cmx2xhtml.exe" /libpath:"Debug\lib" -# ADD LINK32 libcdr-0.0.lib libwpd-stream-0.9.lib libwpd-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cmx2xhtml.exe" /libpath:"Debug\lib" +# ADD BASE LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cmx2xhtml.exe" /libpath:"Debug\lib" +# ADD LINK32 libcdr-0.0.lib librevenge-stream-0.9.lib librevenge-0.9.lib /nologo /subsystem:console /debug /machine:IX86 /out:"Debug\bin\cmx2xhtml.exe" /libpath:"Debug\lib" # SUBTRACT LINK32 /nodefaultlib !ENDIF diff -Nru libcdr-0.0.15/build/win32/cmx2xhtml.vcproj libcdr-0.1.0/build/win32/cmx2xhtml.vcproj --- libcdr-0.0.15/build/win32/cmx2xhtml.vcproj 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/build/win32/cmx2xhtml.vcproj 2014-03-29 10:23:47.000000000 +0000 @@ -70,7 +70,7 @@ /> 0x0409 - libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) + libcdr-0.0.lib;librevenge-stream-0.9.lib;librevenge-0.9.lib;%(AdditionalDependencies) Debug\bin\cmx2xhtml.exe true Debug\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories) @@ -111,7 +111,7 @@ 0x0409 - libcdr-0.0.lib;libwpd-stream-0.9.lib;libwpd-0.9.lib;%(AdditionalDependencies) + libcdr-0.0.lib;librevenge-stream-0.9.lib;librevenge-0.9.lib;%(AdditionalDependencies) Release\bin\cmx2xhtml.exe true Release\lib;$(LIBWPD_LIB_DIR);$(LCMS2_LIB_DIR);$(ZLIB_LIB_DIR);$(ICU_LIB_DIR);%(AdditionalLibraryDirectories) diff -Nru libcdr-0.0.15/build/win32/libcdr.dsp libcdr-0.1.0/build/win32/libcdr.dsp --- libcdr-0.0.15/build/win32/libcdr.dsp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/build/win32/libcdr.dsp 2014-03-29 10:23:47.000000000 +0000 @@ -40,8 +40,8 @@ # PROP Output_Dir "Release" # PROP Intermediate_Dir "Release" # PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\inc" /I "libwpd-0.9" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /c -# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\inc" /I "libwpd-0.9" /D "NDEBUG" /D "WIN32" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /FD /c +# ADD BASE CPP /nologo /W3 /GX /O2 /I "..\..\inc" /I "librevenge-0.9" /D "WIN32" /D "NDEBUG" /D "_LIB" /D "_CRT_SECURE_NO_WARNINGS" /YX /FD /c +# ADD CPP /nologo /MT /W3 /GR /GX /O2 /I "..\..\inc" /I "librevenge-0.9" /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 /I "..\..\inc" /I "libwpd-0.9" /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" /I "libwpd-0.9" /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" /I "librevenge-0.9" /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" /I "librevenge-0.9" /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" @@ -115,7 +115,7 @@ # End Source File # Begin Source File -SOURCE=..\..\src\lib\CDRStringVector.cpp +SOURCE=..\..\src\lib\librevenge::RVNGStringVector.cpp # End Source File # Begin Source File @@ -163,7 +163,7 @@ # End Source File # Begin Source File -SOURCE=..\..\inc\libcdr\CDRStringVector.h +SOURCE=..\..\inc\libcdr\librevenge::RVNGStringVector.h # End Source File # Begin Source File diff -Nru libcdr-0.0.15/build/win32/libcdr.vcproj libcdr-0.1.0/build/win32/libcdr.vcproj --- libcdr-0.0.15/build/win32/libcdr.vcproj 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/build/win32/libcdr.vcproj 2014-03-29 10:23:47.000000000 +0000 @@ -327,7 +327,7 @@ %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) - + %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) %(AdditionalIncludeDirectories) @@ -207,7 +207,7 @@ - + diff -Nru libcdr-0.0.15/build/win32/Makefile.in libcdr-0.1.0/build/win32/Makefile.in --- libcdr-0.0.15/build/win32/Makefile.in 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/build/win32/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -164,6 +164,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -197,16 +198,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libcdr-0.0.15/ChangeLog libcdr-0.1.0/ChangeLog --- libcdr-0.0.15/ChangeLog 2014-04-04 13:40:13.000000000 +0000 +++ libcdr-0.1.0/ChangeLog 2014-05-23 15:05:41.000000000 +0000 @@ -1,86 +1,245 @@ -2014-04-04 Fridrich Štrba [e29774fa8f4f7e915842070ec689c829d5ca2fa1] +2014-05-23 David Tardon [56003faa885246a43d2117856f54bb89326b1668] - Bump to 0.0.15 and multiply the content of NEWS + prepare for a new release - Change-Id: I39ecdf9566f0196decc1505eb0fc2e7bbe6cc37e + Change-Id: I69e95091590452d154dafadfc6f8a22ce7770eba -2014-04-04 Fridrich Štrba [3aee2631795df394df7f69b6e30fa74fbd837618] +2014-04-16 David Tardon [94eedda925e3b8a2274b4068bb50455a9fc1869a] - YIQ255 - second service - deuce + add other used projects to .pc file - Change-Id: I7cc39c45a3d4a826a20d4e57dc703bec7bd0818e - (cherry picked from commit 534d406ff9f6b124fddb3e18b44176aaba54f032) + Change-Id: Ib457b04595cfc6cc8916fc92b8cf4622afdfefe1 -2014-04-04 Fridrich Štrba [f90de3de9839f31ca6c7cb5479b6fd73506ad5dc] +2014-04-16 David Tardon [98a4e74de6a8cee5818a2929cd21a9002bab2948] - First try of YIQ + require librevenge-stream too - Change-Id: I14e981584a5d62cc9e1eff8da5821530c99ff43c - (cherry picked from commit 168d996f23d74ea2a47b4d06e841e3fc9a87f97a) + Change-Id: Iee5eb88e5fec5c9c1bb848bac237efde9a46fe4a -2014-04-04 Fridrich Štrba [44bac0a4b9b5d6c6c454305b9a8a0c970f7b65e7] +2014-04-10 Fridrich Štrba [8c30fab02698e5344cf4e6b04d70114ae2207ad4] - Disable "arrw" since we don't get it right really + A license in spec file - Change-Id: I76878be99a268d5a5f906d7080aefde98a7568d4 + (cherry picked from commit 880a1c4b3831ccd6c7233ed75939612dbca9c646) -2014-04-04 Fridrich Štrba [48a877944529262955632e599f397728ea2a7745] + Conflicts: + libcdr.spec.in - Some formatting cleanup + Change-Id: I6533912dc5d7b40d7373e6235f7ec12038f3be51 - Change-Id: Ic73a61b51994e07bfc14700a3107e2c4210048bc +2014-04-10 Fridrich Štrba [fc01f33aff7981704fd2381ef2ad01a93e465040] -2014-04-04 Fridrich Štrba [41386211aaf41342ce9de52d22a5e7da86fcb61b] + Add 'compile' to .gitignore - Try hard to avoid a sequence of several "Z" segments + Change-Id: Ibd3a2228f104650f63383a1df2ea5eeeaaac4d89 + (cherry picked from commit 9d5e526216497693fb4a9b94bf31c35585c3c5ed) - (cherry picked from commit b1d482cb6fa2182e15d73b0bb0d339c4000fc695) +2014-04-10 Fridrich Štrba [1c8d66f69f3df0a51b3720bde8ece1a4752c48fb] - Conflicts: - src/lib/CDRContentCollector.cpp + Sanitize the README file - Change-Id: I14a1f987ed59131fe3f262f81354da0f2d2fe21d + Correspond to the new simplified license + Remove the mentions of supported CDR versions in order to be more future-proof -2014-04-04 Fridrich Štrba [e71c69fad61105ec0294d1c01313ff33d62af30b] + Change-Id: I2d782a61ce938d521fb617744697e81a93dbec40 + (cherry picked from commit ec11a06d7fc5ae6c3f53149b93902fea771d806c) - Working around a CorelDraw x7 bug + fixing palettes +2014-04-04 Fridrich Štrba [534d406ff9f6b124fddb3e18b44176aaba54f032] - (cherry picked from commit f06333217ad55e841c4bd5b20b4eebbf7a9ce2f6) + YIQ255 - second service - deuce - Conflicts: - src/lib/CDRParser.cpp + Change-Id: I7cc39c45a3d4a826a20d4e57dc703bec7bd0818e - Change-Id: I56ce7bfd3a49923cbf6e989687f02cdcf287eecb +2014-04-04 Fridrich Štrba [168d996f23d74ea2a47b4d06e841e3fc9a87f97a] -2014-04-04 Fridrich Štrba [fb62608be8860b3488f4b2c687ce044d1f3a85ad] + First try of YIQ - Fix closing of paths with certain particular CDR documents + Change-Id: I14e981584a5d62cc9e1eff8da5821530c99ff43c - (cherry picked from commit ab2f1654645b90409be88686d1189bde01ad173b) +2014-04-04 Fridrich Štrba [b1d482cb6fa2182e15d73b0bb0d339c4000fc695] - Conflicts: - src/lib/CDRPath.cpp + Try hard to avoid a sequence of several "Z" segments + + Change-Id: I14a1f987ed59131fe3f262f81354da0f2d2fe21d + +2014-04-04 Fridrich Štrba [f06333217ad55e841c4bd5b20b4eebbf7a9ce2f6] + + Working around a CorelDraw x7 bug + fixing palettes + + Change-Id: I56ce7bfd3a49923cbf6e989687f02cdcf287eecb + +2014-04-03 Fridrich Štrba [ab2f1654645b90409be88686d1189bde01ad173b] + + Fix closing of paths with certain particular CDR documents Change-Id: I9d60baedd56e60ec46b5f5ed11790f38670df948 -2014-04-04 Fridrich Štrba [82a2dfb2c7bdffd7bed62020fbd2f8415d64417c] +2014-04-02 Fridrich Štrba [e5d64cd09294285a2a3f016a8e24abd98759781a] Palette 19-03 Change-Id: Id679b4f5c6f02a3982245811b06a77f4bb526421 - (cherry picked from commit e5d64cd09294285a2a3f016a8e24abd98759781a) -2014-04-04 Fridrich Štrba [8236bcd487e68056c04f6cfd5fe833d4b17a5a32] +2014-04-02 Fridrich Štrba [7e91dba8fbcb237f281ad0a113cf51326154b4d5] CorelDraw X7 txsm - (cherry picked from commit 7e91dba8fbcb237f281ad0a113cf51326154b4d5) + Change-Id: I2f0507fe2a72f3c1adb3ff60c557ca14c977ec6a - Conflicts: - src/lib/CDRParser.cpp - src/lib/CDRParser.h +2014-01-31 Fridrich Štrba [6741805f2e98fab62899ebb6776b93d473a2ec94] - Change-Id: I2f0507fe2a72f3c1adb3ff60c557ca14c977ec6a + With agreement of all contributors, simplifying licensing to MPL2 + + Change-Id: I7dec727b183d9543cdad67cd9202195cd7370877 + +2013-12-21 Fridrich Štrba [1136084ac3b014acb1455dae8ed7dd0d7dc284f0] + + Implement the RVNGInputStream::existsSubStream + + Change-Id: I6ab1179522f8c109ccb5178ca9087d25bbf15187 + +2013-12-18 Fridrich Štrba [3e06fd204357adc066efd1375540f0eb1908bb1c] + + Export only needed stuff on Windows + + Change-Id: I004e93c6159bfd7479ea14f2e40fefe9b20953b6 + +2013-12-11 Fridrich Štrba [6d30f036332c31b3bcc1a4e54d831ca63b6caa5d] + + Re-astyle + + Change-Id: Ic84f176d190362364a3f6d13a811df3447fa32e6 + +2013-12-11 Fridrich Štrba [98177d97e4c4f5f281cdc7bd2005de046333cddd] + + Allow equal identing of functions + + +2013-12-03 Fridrich Štrba [5ca4ddf38f1248908697e0b6bc301a940929f925] + + Insert only single empty text + + Change-Id: Ifa5823e5f6ba588b84858e8b0b987bb54349af46 + +2013-12-03 Fridrich Štrba [1ac63edbf85f72590b4601aa16e8fd75702c2530] + + Split spaces, tabs and lineBreaks from the text + + Change-Id: I6d7284b9a2b629f6ea609ebd726a4d421e571603 + +2013-12-03 Fridrich Štrba [00dea16c89b68668ea1ced9601fe33b728db4234] + + Emit start/endDocument calls + + Change-Id: Ic8413c9f24a0fa06ed6bbb24d1be8dd638b176aa + +2013-11-30 Fridrich Štrba [098016594ada45f56fb9777db723f98ec963fb14] + + Allow cdr/cmx2raw output callgraph + + Change-Id: I62441d16abbcd7f51a223568f93ad9252398c2f1 + +2013-11-28 David Tardon [70a49adcac0c7fa201ba75cae4784f68914cf778] + + add options file for astyle + + Change-Id: Ifa12207d6d3bde25af615b293ca1f18c839a3a2f + +2013-11-28 David Tardon [69f9ef62dca5158f84c00c24c66afca2df50b522] + + add myself to AUTHORS + + Change-Id: I40930bd9771a813c5aa4a9f4811aaacc6e552e2a + +2013-11-28 David Tardon [166993d65df5724829b1b64a27ba5cb96d745574] + + document the current astyle settings + + Change-Id: I93696d2ac46fe15b1d94cf07342cc14db34b4c7f + +2013-11-25 Fridrich Štrba [5c5d18e14ca19ef90d42a71cb1dab4fa060689dd] + + astyle -HU -A1 -k3 -y -n -s2 -r \*.cpp \*.h + + Change-Id: Iadd40c708ad1cf74843dda3a6ee6f7d374766f68 + +2013-11-23 Fridrich Štrba [84d90a4d213b15337a8030aa18e843554ca1c882] + + Fold in the gradient + + Change-Id: I431b96cc00343492e0cac255b3b9482a780d7749 + +2013-11-21 Fridrich Štrba [3bf9405bfccc355b9061a061601c834a46b28c41] + + Fold tabStops into the propList + + Change-Id: Iff95c7d1b24ba6bdf6e5c98e598ce7b35451fa7f + +2013-11-20 Fridrich Štrba [73e56f4fc9f9346c56873c04dedcad8e17d31388] + + Folding paths into propLists + + Change-Id: I1abc8e69ef452f22c0f464126bc72c2a28c03fb5 + +2013-11-19 Fridrich Štrba [be72b4f99fabd5ca109d2b64c0e3155f0f45410b] + + Don't parse arrows for versions <= 5 + + Change-Id: I90684d9c731d6daee25e18bedbbb0ee951327671 + +2013-11-19 Fridrich Štrba [c90e4c9587917bbe3c28597f6b7392f86a5ed71d] + + Use the right streams in right places + + Change-Id: I204d422d3645d4527044bb3d1750ad6ab625fc02 + +2013-11-14 Fridrich Štrba [77f866cd44b3c024ee64fe050d7ae6f55a5a8784] + + Adapt to API change in librevenge + + Change-Id: I70254919ee04d9111ef12552c113b3cc0064ab01 + +2013-11-08 David Tardon [e7ea841053efbbc8cb2ee25bf6339315713e08dc] + + adapt to generator changes + + Change-Id: I2cde7e92dc1b0407bbd5c143cdd585e21f0494d7 + +2013-11-07 Fridrich Štrba [37a7b199f6ea34ea9c4d59a9adfdd736bac28887] + + historically this svg was in svg namespace + + Change-Id: Ie68b6acfbc77b9aa712b9a72caf5ae379d59a19f + +2013-11-07 Fridrich Štrba [58cb70b98f57a1775b5c4664bf500029ae06f628] + + Some little fixes + + Change-Id: Icb50d0d2971a86997a59f484bcf25cf5a67f91cb + +2013-11-06 Fridrich Štrba [08177147508465da5207bac24661465cf0c39a12] + + callcatcher action + + Change-Id: I4e84acb68b51c9087206dfda37c592229fcc77a7 + +2013-11-05 Fridrich Štrba [007dd6502fc8b007251bc477399407dd93220389] + + SVG generator must be a core functionality + + Change-Id: I02e28aeeae34769760875020837d861d4b706fdc + +2013-11-05 Fridrich Štrba [c8d5fe5e64cb8c4075ff11402440ef85d09b958a] + + Fix dependencies + + Change-Id: Ib6face91cf14f0fbb36c03627e73f3f5c064d282 + +2013-11-05 Fridrich Štrba [a9b2a6129dde8e3e59c8f9233c391cff5ec5aef1] + + Port to librevenge + + Change-Id: I62edd528358a5f2614b75b21bdd9d89e7c8dcc8d 2013-11-03 Julien Nabet [a0177028897b054e8ac807f818b3d1eae5d44850] diff -Nru libcdr-0.0.15/compile libcdr-0.1.0/compile --- libcdr-0.0.15/compile 2014-04-04 11:59:29.000000000 +0000 +++ libcdr-0.1.0/compile 1970-01-01 00:00:00.000000000 +0000 @@ -1,347 +0,0 @@ -#! /bin/sh -# Wrapper for compilers which do not understand '-c -o'. - -scriptversion=2012-10-14.11; # UTC - -# Copyright (C) 1999-2013 Free Software Foundation, Inc. -# Written by Tom Tromey . -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program. If not, see . - -# As a special exception to the GNU General Public License, if you -# distribute this file as part of a program that contains a -# configuration script generated by Autoconf, you may include it under -# the same distribution terms that you use for the rest of that program. - -# This file is maintained in Automake, please report -# bugs to or send patches to -# . - -nl=' -' - -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent tools from complaining about whitespace usage. -IFS=" "" $nl" - -file_conv= - -# func_file_conv build_file lazy -# Convert a $build file to $host form and store it in $file -# Currently only supports Windows hosts. If the determined conversion -# type is listed in (the comma separated) LAZY, no conversion will -# take place. -func_file_conv () -{ - file=$1 - case $file in - / | /[!/]*) # absolute file, and not a UNC file - if test -z "$file_conv"; then - # lazily determine how to convert abs files - case `uname -s` in - MINGW*) - file_conv=mingw - ;; - CYGWIN*) - file_conv=cygwin - ;; - *) - file_conv=wine - ;; - esac - fi - case $file_conv/,$2, in - *,$file_conv,*) - ;; - mingw/*) - file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` - ;; - cygwin/*) - file=`cygpath -m "$file" || echo "$file"` - ;; - wine/*) - file=`winepath -w "$file" || echo "$file"` - ;; - esac - ;; - esac -} - -# func_cl_dashL linkdir -# Make cl look for libraries in LINKDIR -func_cl_dashL () -{ - func_file_conv "$1" - if test -z "$lib_path"; then - lib_path=$file - else - lib_path="$lib_path;$file" - fi - linker_opts="$linker_opts -LIBPATH:$file" -} - -# func_cl_dashl library -# Do a library search-path lookup for cl -func_cl_dashl () -{ - lib=$1 - found=no - save_IFS=$IFS - IFS=';' - for dir in $lib_path $LIB - do - IFS=$save_IFS - if $shared && test -f "$dir/$lib.dll.lib"; then - found=yes - lib=$dir/$lib.dll.lib - break - fi - if test -f "$dir/$lib.lib"; then - found=yes - lib=$dir/$lib.lib - break - fi - if test -f "$dir/lib$lib.a"; then - found=yes - lib=$dir/lib$lib.a - break - fi - done - IFS=$save_IFS - - if test "$found" != yes; then - lib=$lib.lib - fi -} - -# func_cl_wrapper cl arg... -# Adjust compile command to suit cl -func_cl_wrapper () -{ - # Assume a capable shell - lib_path= - shared=: - linker_opts= - for arg - do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - eat=1 - case $2 in - *.o | *.[oO][bB][jJ]) - func_file_conv "$2" - set x "$@" -Fo"$file" - shift - ;; - *) - func_file_conv "$2" - set x "$@" -Fe"$file" - shift - ;; - esac - ;; - -I) - eat=1 - func_file_conv "$2" mingw - set x "$@" -I"$file" - shift - ;; - -I*) - func_file_conv "${1#-I}" mingw - set x "$@" -I"$file" - shift - ;; - -l) - eat=1 - func_cl_dashl "$2" - set x "$@" "$lib" - shift - ;; - -l*) - func_cl_dashl "${1#-l}" - set x "$@" "$lib" - shift - ;; - -L) - eat=1 - func_cl_dashL "$2" - ;; - -L*) - func_cl_dashL "${1#-L}" - ;; - -static) - shared=false - ;; - -Wl,*) - arg=${1#-Wl,} - save_ifs="$IFS"; IFS=',' - for flag in $arg; do - IFS="$save_ifs" - linker_opts="$linker_opts $flag" - done - IFS="$save_ifs" - ;; - -Xlinker) - eat=1 - linker_opts="$linker_opts $2" - ;; - -*) - set x "$@" "$1" - shift - ;; - *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) - func_file_conv "$1" - set x "$@" -Tp"$file" - shift - ;; - *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) - func_file_conv "$1" mingw - set x "$@" "$file" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift - done - if test -n "$linker_opts"; then - linker_opts="-link$linker_opts" - fi - exec "$@" $linker_opts - exit 1 -} - -eat= - -case $1 in - '') - echo "$0: No command. Try '$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: compile [--help] [--version] PROGRAM [ARGS] - -Wrapper for compilers which do not understand '-c -o'. -Remove '-o dest.o' from ARGS, run PROGRAM with the remaining -arguments, and rename the output as expected. - -If you are trying to build a whole package this is not the -right script to run: please start by reading the file 'INSTALL'. - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "compile $scriptversion" - exit $? - ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) - func_cl_wrapper "$@" # Doesn't return... - ;; -esac - -ofile= -cfile= - -for arg -do - if test -n "$eat"; then - eat= - else - case $1 in - -o) - # configure might choose to run compile as 'compile cc -o foo foo.c'. - # So we strip '-o arg' only if arg is an object. - eat=1 - case $2 in - *.o | *.obj) - ofile=$2 - ;; - *) - set x "$@" -o "$2" - shift - ;; - esac - ;; - *.c) - cfile=$1 - set x "$@" "$1" - shift - ;; - *) - set x "$@" "$1" - shift - ;; - esac - fi - shift -done - -if test -z "$ofile" || test -z "$cfile"; then - # If no '-o' option was seen then we might have been invoked from a - # pattern rule where we don't need one. That is ok -- this is a - # normal compilation that the losing compiler can handle. If no - # '.c' file was seen then we are probably linking. That is also - # ok. - exec "$@" -fi - -# Name of file we expect compiler to create. -cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` - -# Create the lock directory. -# Note: use '[/\\:.-]' here to ensure that we don't use the same name -# that we are using for the .o file. Also, base the name on the expected -# object file name, since that is what matters with a parallel build. -lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d -while true; do - if mkdir "$lockdir" >/dev/null 2>&1; then - break - fi - sleep 1 -done -# FIXME: race condition here if user kills between mkdir and trap. -trap "rmdir '$lockdir'; exit 1" 1 2 15 - -# Run the compile. -"$@" -ret=$? - -if test -f "$cofile"; then - test "$cofile" = "$ofile" || mv "$cofile" "$ofile" -elif test -f "${cofile}bj"; then - test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" -fi - -rmdir "$lockdir" -exit $ret - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -Nru libcdr-0.0.15/config.guess libcdr-0.1.0/config.guess --- libcdr-0.0.15/config.guess 2014-04-04 11:59:29.000000000 +0000 +++ libcdr-0.1.0/config.guess 2014-03-29 10:28:55.000000000 +0000 @@ -1,8 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012, 2013 Free Software Foundation, Inc. -timestamp='2013-11-29' +timestamp='2012-12-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -24,7 +26,7 @@ # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # -# Originally written by Per Bothner. +# Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD @@ -50,7 +52,9 @@ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, +2012, 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -132,37 +136,6 @@ UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown -case "${UNAME_SYSTEM}" in -Linux|GNU|GNU/*) - # If the system lacks a compiler, then just pick glibc. - # We could probably try harder. - LIBC=gnu - - eval $set_cc_for_build - cat <<-EOF > $dummy.c - #include - #if defined(__UCLIBC__) - LIBC=uclibc - #elif defined(__dietlibc__) - LIBC=dietlibc - #else - LIBC=gnu - #endif - EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` - ;; -esac - -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 @@ -227,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 @@ -311,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 @@ -332,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 @@ -440,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} @@ -751,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*:*:*) @@ -813,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*:*) @@ -852,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:*) @@ -874,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}-${LIBC}`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/[-(].*//'`-${LIBC} + 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-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in @@ -911,54 +884,59 @@ EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 - if test "$?" = 0 ; then LIBC="gnulibc1" ; fi - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} - exit ;; - arc:Linux:*:* | arceb:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + 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-${LIBC} + 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-${LIBC}eabi + echo ${UNAME_MACHINE}-unknown-linux-gnueabi else - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}eabihf + echo ${UNAME_MACHINE}-unknown-linux-gnueabihf fi fi exit ;; avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; crisv32:Linux:*:*) - echo ${UNAME_MACHINE}-axis-linux-${LIBC} + echo ${UNAME_MACHINE}-axis-linux-gnu exit ;; frv:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; hexagon:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:Linux:*:*) - echo ${UNAME_MACHINE}-pc-linux-${LIBC} + LIBC=gnu + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` + echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit ;; ia64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build @@ -977,63 +955,54 @@ #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` - test x"${CPU}" != x && { echo "${CPU}-${VENDOR}-linux-${LIBC}"; exit; } + test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; - or1k:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} - exit ;; or32:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; padre:Linux:*:*) - echo sparc-${VENDOR}-linux-${LIBC} + echo sparc-unknown-linux-gnu exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-${VENDOR}-linux-${LIBC} + 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-${LIBC} ;; - PA8*) echo hppa2.0-${VENDOR}-linux-${LIBC} ;; - *) echo hppa-${VENDOR}-linux-${LIBC} ;; + 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-${LIBC} + echo powerpc64-unknown-linux-gnu exit ;; ppc:Linux:*:*) - echo powerpc-${VENDOR}-linux-${LIBC} - exit ;; - ppc64le:Linux:*:*) - echo powerpc64le-${VENDOR}-linux-${LIBC} - exit ;; - ppcle:Linux:*:*) - echo powerpcle-${VENDOR}-linux-${LIBC} + echo powerpc-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux-${LIBC} + echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; tile*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-${LIBC} + echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; xtensa*:Linux:*:*) - echo ${UNAME_MACHINE}-${VENDOR}-linux-${LIBC} + echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. @@ -1055,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 @@ -1084,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 @@ -1123,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:*) @@ -1160,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} @@ -1222,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. @@ -1238,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} @@ -1266,31 +1235,19 @@ exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - eval $set_cc_for_build - if test "$UNAME_PROCESSOR" = unknown ; then - UNAME_PROCESSOR=powerpc - fi - if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then - if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then - if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ - (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ - grep IS_64BIT_ARCH >/dev/null - then - case $UNAME_PROCESSOR in - i386) UNAME_PROCESSOR=x86_64 ;; - powerpc) UNAME_PROCESSOR=powerpc64 ;; - esac - fi - fi - elif test "$UNAME_PROCESSOR" = i386 ; then - # Avoid executing cc on OS X 10.9, as it ships with a stub - # that puts up a graphical alert prompting to install - # developer tools. Any system running Mac OS X 10.7 or - # later (Darwin 11 and later) is required to have a 64-bit - # processor. This is not true of the ARM version of Darwin - # that Apple uses in portable devices. - UNAME_PROCESSOR=x86_64 - fi + case $UNAME_PROCESSOR in + i386) + eval $set_cc_for_build + if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then + if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ + (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ + grep IS_64BIT_ARCH >/dev/null + then + UNAME_PROCESSOR="x86_64" + fi + fi ;; + unknown) UNAME_PROCESSOR=powerpc ;; + esac echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) @@ -1331,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 @@ -1346,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` @@ -1377,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 libcdr-0.0.15/config.sub libcdr-0.1.0/config.sub --- libcdr-0.0.15/config.sub 2014-04-04 11:59:29.000000000 +0000 +++ libcdr-0.1.0/config.sub 2014-03-29 10:28:55.000000000 +0000 @@ -1,8 +1,10 @@ #! /bin/sh # Configuration validation subroutine script. -# Copyright 1992-2013 Free Software Foundation, Inc. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, +# 2011, 2012, 2013 Free Software Foundation, Inc. -timestamp='2013-10-01' +timestamp='2012-12-29' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -68,7 +70,9 @@ version="\ GNU config.sub ($timestamp) -Copyright 1992-2013 Free Software Foundation, Inc. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, +2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, +2012, 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -252,12 +256,12 @@ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ - | arc | arceb \ + | arc \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ - | c4x | c8051 | clipper \ + | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ @@ -265,7 +269,6 @@ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ - | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ @@ -287,17 +290,16 @@ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ - | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ - | nios | nios2 | nios2eb | nios2el \ + | nios | nios2 \ | ns16k | ns32k \ | open8 \ - | or1k | or32 \ + | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ @@ -325,7 +327,7 @@ c6x) basic_machine=tic6x-unknown ;; - m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) + m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; @@ -367,13 +369,13 @@ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ - | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ - | c8051-* | clipper-* | craynv-* | cydra-* \ + | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ @@ -382,7 +384,6 @@ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ - | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ @@ -406,13 +407,12 @@ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ - | nios-* | nios2-* | nios2eb-* | nios2el-* \ + | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ @@ -796,7 +796,7 @@ os=-mingw64 ;; mingw32) - basic_machine=i686-pc + basic_machine=i386-pc os=-mingw32 ;; mingw32ce) @@ -832,7 +832,7 @@ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) - basic_machine=i686-pc + basic_machine=i386-pc os=-msys ;; mvs) @@ -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 @@ -1354,7 +1354,7 @@ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ - | -sym* | -kopensolaris* | -plan9* \ + | -sym* | -kopensolaris* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ @@ -1500,6 +1500,9 @@ -aros*) os=-aros ;; + -kaos*) + os=-kaos + ;; -zvmoe) os=-zvmoe ;; @@ -1548,9 +1551,6 @@ c4x-* | tic4x-*) os=-coff ;; - c8051-*) - os=-elf - ;; hexagon-*) os=-elf ;; @@ -1594,9 +1594,6 @@ mips*-*) os=-elf ;; - or1k-*) - os=-elf - ;; or32-*) os=-coff ;; diff -Nru libcdr-0.0.15/configure libcdr-0.1.0/configure --- libcdr-0.0.15/configure 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/configure 2014-03-29 10:28:55.000000000 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libcdr 0.0.15. +# Generated by GNU Autoconf 2.69 for libcdr 0.1.0. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='libcdr' PACKAGE_TARNAME='libcdr' -PACKAGE_VERSION='0.0.15' -PACKAGE_STRING='libcdr 0.0.15' +PACKAGE_VERSION='0.1.0' +PACKAGE_STRING='libcdr 0.1.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -635,8 +635,6 @@ WITH_LIBCDR_DOCS_FALSE WITH_LIBCDR_DOCS_TRUE DOXYGEN -STATIC_TOOLS_FALSE -STATIC_TOOLS_TRUE DEBUG_CXXFLAGS WINDRES PLATFORM_WIN32_FALSE @@ -662,12 +660,17 @@ ICU_CFLAGS ZLIB_LIBS ZLIB_CFLAGS +LCMS_LIBS LCMS2_LIBS LCMS2_CFLAGS -WPG_LIBS -WPG_CFLAGS -WPD_LIBS -WPD_CFLAGS +BUILD_TOOLS_FALSE +BUILD_TOOLS_TRUE +REVENGE_GENERATORS_LIBS +REVENGE_GENERATORS_CFLAGS +REVENGE_STREAM_LIBS +REVENGE_STREAM_CFLAGS +REVENGE_LIBS +REVENGE_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG @@ -700,16 +703,16 @@ DLLTOOL AS LN_S -am__fastdepCXX_FALSE -am__fastdepCXX_TRUE -CXXDEPMODE -ac_ct_CXX -CXXFLAGS -CXX CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE +ac_ct_CC +CFLAGS +CC +am__fastdepCXX_FALSE +am__fastdepCXX_TRUE +CXXDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE @@ -719,11 +722,11 @@ DEPDIR OBJEXT EXEEXT -ac_ct_CC +ac_ct_CXX CPPFLAGS LDFLAGS -CFLAGS -CC +CXXFLAGS +CXX ac_ct_AR AR AM_BACKSLASH @@ -803,33 +806,35 @@ with_gnu_ld with_sysroot enable_libtool_lock +enable_tools enable_werror enable_weffc enable_wparanoic enable_debug -enable_static_tools with_docs ' ac_precious_vars='build_alias host_alias target_alias -CC -CFLAGS +CXX +CXXFLAGS LDFLAGS LIBS CPPFLAGS -CPP -CXX -CXXFLAGS CCC +CC +CFLAGS +CPP CXXCPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR -WPD_CFLAGS -WPD_LIBS -WPG_CFLAGS -WPG_LIBS +REVENGE_CFLAGS +REVENGE_LIBS +REVENGE_STREAM_CFLAGS +REVENGE_STREAM_LIBS +REVENGE_GENERATORS_CFLAGS +REVENGE_GENERATORS_LIBS LCMS2_CFLAGS LCMS2_LIBS ZLIB_CFLAGS @@ -1376,7 +1381,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 libcdr 0.0.15 to adapt to many kinds of systems. +\`configure' configures libcdr 0.1.0 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1446,7 +1451,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libcdr 0.0.15:";; + short | recursive ) echo "Configuration of libcdr 0.1.0:";; esac cat <<\_ACEOF @@ -1465,13 +1470,13 @@ --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,26 +1489,34 @@ --without-docs Do not build documentation Some influential environment variables: - CC C compiler command - CFLAGS C compiler flags + CXX C++ compiler command + CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory + CC C compiler command + CFLAGS C compiler flags CPP C preprocessor - CXX C++ compiler command - CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path - WPD_CFLAGS C compiler flags for WPD, overriding pkg-config - WPD_LIBS linker flags for WPD, overriding pkg-config - WPG_CFLAGS C compiler flags for WPG, overriding pkg-config - WPG_LIBS linker flags for WPG, overriding pkg-config + REVENGE_CFLAGS + C compiler flags for REVENGE, overriding pkg-config + REVENGE_LIBS + linker flags for REVENGE, 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 + REVENGE_GENERATORS_CFLAGS + C compiler flags for REVENGE_GENERATORS, overriding pkg-config + REVENGE_GENERATORS_LIBS + linker flags for REVENGE_GENERATORS, overriding pkg-config LCMS2_CFLAGS C compiler flags for LCMS2, overriding pkg-config LCMS2_LIBS linker flags for LCMS2, overriding pkg-config @@ -1578,7 +1591,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libcdr configure 0.0.15 +libcdr configure 0.1.0 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1592,10 +1605,10 @@ ## Autoconf initialization. ## ## ------------------------ ## -# ac_fn_c_try_compile LINENO -# -------------------------- +# ac_fn_cxx_try_compile LINENO +# ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_compile () +ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext @@ -1615,7 +1628,7 @@ fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { - test -z "$ac_c_werror_flag" || + test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 @@ -1628,22 +1641,23 @@ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_compile +} # ac_fn_cxx_try_compile -# ac_fn_c_try_cpp LINENO -# ---------------------- -# Try to preprocess conftest.$ac_ext, and return whether this succeeded. -ac_fn_c_try_cpp () +# ac_fn_c_try_compile LINENO +# -------------------------- +# Try to compile conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - if { { ac_try="$ac_cpp conftest.$ac_ext" + rm -f conftest.$ac_objext + if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err + (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -1651,37 +1665,36 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } > conftest.i && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || + test $ac_status = 0; } && { + test -z "$ac_c_werror_flag" || test ! -s conftest.err - }; then : + } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_c_try_cpp +} # ac_fn_c_try_compile -# ac_fn_cxx_try_compile LINENO -# ---------------------------- -# Try to compile conftest.$ac_ext, and return whether this succeeded. -ac_fn_cxx_try_compile () +# ac_fn_c_try_cpp LINENO +# ---------------------- +# Try to preprocess conftest.$ac_ext, and return whether this succeeded. +ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack - rm -f conftest.$ac_objext - if { { ac_try="$ac_compile" + if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compile") 2>conftest.err + (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 @@ -1689,21 +1702,21 @@ mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } && { - test -z "$ac_cxx_werror_flag" || + test $ac_status = 0; } > conftest.i && { + test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err - } && test -s conftest.$ac_objext; then : + }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 - ac_retval=1 + ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval -} # ac_fn_cxx_try_compile +} # ac_fn_c_try_cpp # ac_fn_c_try_link LINENO # ----------------------- @@ -2095,7 +2108,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libcdr $as_me 0.0.15, which was +It was created by libcdr $as_me 0.1.0, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2446,7 +2459,7 @@ ac_config_headers="$ac_config_headers config.h" -am__api_version='1.14' +am__api_version='1.13' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do @@ -2961,7 +2974,7 @@ # Define the identity of the package. PACKAGE='libcdr' - VERSION='0.0.15' + VERSION='0.1.0' cat >>confdefs.h <<_ACEOF @@ -3012,47 +3025,6 @@ -# POSIX will say in a future version that running "rm -f" with no argument -# is OK; and we want to be able to make that assumption in our Makefile -# recipes. So use an aggressive probe to check that the usage we want is -# actually supported "in the wild" to an acceptable degree. -# See automake bug#10828. -# To make any issue more visible, cause the running configure to be aborted -# by default if the 'rm' program in use doesn't match our expectations; the -# user can still override this though. -if rm -f && rm -fr && rm -rf; then : OK; else - cat >&2 <<'END' -Oops! - -Your 'rm' program seems unable to run without file operands specified -on the command line, even when the '-f' option is present. This is contrary -to the behaviour of most rm programs out there, and not conforming with -the upcoming POSIX standard: - -Please tell bug-automake@gnu.org about your system, including the value -of your $PATH and any error possibly output before this message. This -can help us improve future automake versions. - -END - if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then - echo 'Configuration will proceed anyway, since you have set the' >&2 - echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 - echo >&2 - else - cat >&2 <<'END' -Aborting the configuration process, to ensure you take notice of the issue. - -You can download and install GNU coreutils to get an 'rm' implementation -that behaves properly: . - -If you want to complete the configuration process using your problematic -'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM -to "yes", and re-run configure. - -END - as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 - fi -fi # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; @@ -3165,21 +3137,27 @@ fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. -set dummy ${ac_tool_prefix}gcc; ac_word=$2 +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -z "$CXX"; then + if test -n "$CCC"; then + CXX=$CCC + else + if test -n "$ac_tool_prefix"; then + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; 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_CC+:} false; then : +if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -3188,7 +3166,7 @@ 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_CC="${ac_tool_prefix}gcc" + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -3198,28 +3176,32 @@ fi fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 +$as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi + test -n "$CXX" && break + done fi -if test -z "$ac_cv_prog_CC"; then - ac_ct_CC=$CC - # Extract the first word of "gcc", so it can be a program name with args. -set dummy gcc; ac_word=$2 +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; 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_CC+:} false; then : +if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH @@ -3228,7 +3210,7 @@ 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_CC="gcc" + ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi @@ -3238,17 +3220,21 @@ fi fi -ac_ct_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 +$as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi - if test "x$ac_ct_CC" = x; then - CC="" + + test -n "$ac_ct_CXX" && break +done + + if test "x$ac_ct_CXX" = x; then + CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) @@ -3256,249 +3242,43 @@ $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac - CC=$ac_ct_CC + CXX=$ac_ct_CXX fi -else - CC="$ac_cv_prog_CC" fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. -set dummy ${ac_tool_prefix}cc; 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_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_CC="${ac_tool_prefix}cc" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 fi +fi +# Provide some information about the compiler. +$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 +set X $ac_compile +ac_compiler=$2 +for ac_option in --version -v -V -qversion; do + { { ac_try="$ac_compiler $ac_option >&5" +case "(($ac_try" in + *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; + *) ac_try_echo=$ac_try;; +esac +eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" +$as_echo "$ac_try_echo"; } >&5 + (eval "$ac_compiler $ac_option >&5") 2>conftest.err + ac_status=$? + if test -s conftest.err; then + sed '10a\ +... rest of stderr output deleted ... + 10q' conftest.err >conftest.er1 + cat conftest.er1 >&5 + fi + rm -f conftest.er1 conftest.err + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; } done - done -IFS=$as_save_IFS -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ - - fi -fi -if test -z "$CC"; then - # Extract the first word of "cc", so it can be a program name with args. -set dummy cc; 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_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # Let the user override the test. -else - ac_prog_rejected=no -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 - if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then - ac_prog_rejected=yes - continue - fi - ac_cv_prog_CC="cc" - $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 - -if test $ac_prog_rejected = yes; then - # We found a bogon in the path, so make sure we never use it. - set dummy $ac_cv_prog_CC - shift - if test $# != 0; then - # We chose a different compiler from the bogus one. - # However, it has the same basename, so the bogon will be chosen - # first if we set CC to just the basename; use the full file name. - shift - ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" - fi -fi -fi -fi -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - -fi -if test -z "$CC"; then - if test -n "$ac_tool_prefix"; then - for ac_prog in cl.exe - do - # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. -set dummy $ac_tool_prefix$ac_prog; 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_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$CC"; then - ac_cv_prog_CC="$CC" # 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_CC="$ac_tool_prefix$ac_prog" - $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 -CC=$ac_cv_prog_CC -if test -n "$CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 -$as_echo "$CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$CC" && break - done -fi -if test -z "$CC"; then - ac_ct_CC=$CC - for ac_prog in cl.exe -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; 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_CC+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$ac_ct_CC"; then - ac_cv_prog_ac_ct_CC="$ac_ct_CC" # 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_CC="$ac_prog" - $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_CC=$ac_cv_prog_ac_ct_CC -if test -n "$ac_ct_CC"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 -$as_echo "$ac_ct_CC" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$ac_ct_CC" && break -done - - if test "x$ac_ct_CC" = x; then - CC="" - 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 - CC=$ac_ct_CC - fi -fi - -fi - - -test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 -$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "no acceptable C compiler found in \$PATH -See \`config.log' for more details" "$LINENO" 5; } - -# Provide some information about the compiler. -$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 -set X $ac_compile -ac_compiler=$2 -for ac_option in --version -v -V -qversion; do - { { ac_try="$ac_compiler $ac_option >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" -$as_echo "$ac_try_echo"; } >&5 - (eval "$ac_compiler $ac_option >&5") 2>conftest.err - ac_status=$? - if test -s conftest.err; then - sed '10a\ -... rest of stderr output deleted ... - 10q' conftest.err >conftest.er1 - cat conftest.er1 >&5 - fi - rm -f conftest.er1 conftest.err - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; } -done - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ +int +main () +{ ; return 0; @@ -3509,8 +3289,8 @@ # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 -$as_echo_n "checking whether the C compiler works... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 +$as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: @@ -3580,14 +3360,14 @@ { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error 77 "C compiler cannot create executables +as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 -$as_echo_n "checking for C compiler default output file name... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 +$as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext @@ -3681,7 +3461,7 @@ else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} -as_fn_error $? "cannot run C compiled programs. +as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi @@ -3743,9 +3523,9 @@ $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 -$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } -if ${ac_cv_c_compiler_gnu+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 +$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } +if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -3762,33 +3542,33 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -ac_cv_c_compiler_gnu=$ac_compiler_gnu +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 -$as_echo "$ac_cv_c_compiler_gnu" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 +$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then - GCC=yes + GXX=yes else - GCC= + GXX= fi -ac_test_CFLAGS=${CFLAGS+set} -ac_save_CFLAGS=$CFLAGS -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 -$as_echo_n "checking whether $CC accepts -g... " >&6; } -if ${ac_cv_prog_cc_g+:} false; then : +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 +$as_echo_n "checking whether $CXX accepts -g... " >&6; } +if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" + ac_save_cxx_werror_flag=$ac_cxx_werror_flag + ac_cxx_werror_flag=yes + ac_cv_prog_cxx_g=no + CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3800,10 +3580,10 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes else - CFLAGS="" + CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3815,11 +3595,11 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : else - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" + ac_cxx_werror_flag=$ac_save_cxx_werror_flag + CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3831,193 +3611,44 @@ return 0; } _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_g=yes -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +if ac_fn_cxx_try_compile "$LINENO"; then : + ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 -$as_echo "$ac_cv_prog_cc_g" >&6; } -if test "$ac_test_CFLAGS" = set; then - CFLAGS=$ac_save_CFLAGS -elif test $ac_cv_prog_cc_g = yes; then - if test "$GCC" = yes; then - CFLAGS="-g -O2" - else - CFLAGS="-g" - fi -else - if test "$GCC" = yes; then - CFLAGS="-O2" - else - CFLAGS= - fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 -$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } -if ${ac_cv_prog_cc_c89+:} false; then : - $as_echo_n "(cached) " >&6 -else - ac_cv_prog_cc_c89=no -ac_save_CC=$CC -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include -#include -struct stat; -/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ -struct buf { int x; }; -FILE * (*rcsopen) (struct buf *, struct stat *, int); -static char *e (p, i) - char **p; - int i; -{ - return p[i]; -} -static char *f (char * (*g) (char **, int), char **p, ...) -{ - char *s; - va_list v; - va_start (v,p); - s = g (p, va_arg (v,int)); - va_end (v); - return s; -} - -/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has - function prototypes and stuff, but not '\xHH' hex character constants. - These don't provoke an error unfortunately, instead are silently treated - as 'x'. The following induces an error, until -std is added to get - proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an - array size at least. It's necessary to write '\x00'==0 to get something - that's true only with -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; - -int test (int i, double x); -struct s1 {int (*f) (int a);}; -struct s2 {int (*f) (double a);}; -int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); -int argc; -char **argv; -int -main () -{ -return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; - ; - return 0; -} -_ACEOF -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - if ac_fn_c_try_compile "$LINENO"; then : - ac_cv_prog_cc_c89=$ac_arg -fi -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 -$as_echo "none needed" >&6; } ;; - xno) - { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 -$as_echo "unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 -$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; -esac -if test "x$ac_cv_prog_cc_c89" != xno; then : - -fi - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 +$as_echo "$ac_cv_prog_cxx_g" >&6; } +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +ac_ext=cpp +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -depcc="$CC" am_compiler_list= +depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } -if ${am_cv_CC_dependencies_compiler_type+:} false; then : +if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then @@ -4040,7 +3671,7 @@ # directory. mkdir sub - am_cv_CC_dependencies_compiler_type=none + am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi @@ -4113,7 +3744,7 @@ # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else - am_cv_CC_dependencies_compiler_type=$depmode + am_cv_CXX_dependencies_compiler_type=$depmode break fi fi @@ -4122,22 +3753,22 @@ cd .. rm -rf conftest.dir else - am_cv_CC_dependencies_compiler_type=none + am_cv_CXX_dependencies_compiler_type=none fi fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 -$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } -CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 +$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ - && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then - am__fastdepCC_TRUE= - am__fastdepCC_FALSE='#' + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' else - am__fastdepCC_TRUE='#' - am__fastdepCC_FALSE= + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= fi @@ -4249,18 +3880,12 @@ if ${am_cv_ar_interface+:} false; then : $as_echo_n "(cached) " >&6 else - ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu - - am_cv_ar_interface=ar + am_cv_ar_interface=ar cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int some_variable = 0; _ACEOF -if ac_fn_c_try_compile "$LINENO"; then : +if ac_fn_cxx_try_compile "$LINENO"; then : am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5 (eval $am_ar_try) 2>&5 @@ -4286,11 +3911,6 @@ fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5 @@ -4852,65 +4472,6 @@ ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu -ac_ext=c -ac_cpp='$CPP $CPPFLAGS' -ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_c_compiler_gnu -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 -$as_echo_n "checking whether $CC understands -c and -o together... " >&6; } -if ${am_cv_prog_cc_c_o+:} false; then : - $as_echo_n "(cached) " >&6 -else - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ - -int -main () -{ - - ; - return 0; -} -_ACEOF - # Make sure it works both with $CC and with simple cc. - # Following AC_PROG_CC_C_O, we do the test twice because some - # compilers refuse to overwrite an existing .o file with -o, - # though they will create one. - am_cv_prog_cc_c_o=yes - for am_i in 1 2; do - if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 - ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } \ - && test -f conftest2.$ac_objext; then - : OK - else - am_cv_prog_cc_c_o=no - break - fi - done - rm -f core conftest* - unset am_i -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 -$as_echo "$am_cv_prog_cc_c_o" >&6; } -if test "$am_cv_prog_cc_c_o" != yes; then - # Losing compiler, so override with the script. - # FIXME: It is wrong to rewrite CC. - # But if we don't then we get into trouble of one sort or another. - # A longer-term fix would be to have automake use am__CC in this case, - # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" - CC="$am_aux_dir/compile $CC" -fi -ac_ext=cpp -ac_cpp='$CXXCPP $CPPFLAGS' -ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' -ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' -ac_compiler_gnu=$ac_cv_cxx_compiler_gnu - - depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 @@ -7177,7 +6738,6 @@ - if test -n "$ac_tool_prefix"; then for ac_prog in ar do @@ -7931,6 +7491,7 @@ + # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; @@ -7997,7 +7558,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 @@ -8015,7 +7576,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*) @@ -8034,7 +7598,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*) @@ -12353,10 +11920,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 @@ -16184,10 +15755,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 @@ -16649,32 +16224,29 @@ fi fi -# ==================== -# Find additional apps -# ==================== +# =============== +# Find librevenge +# =============== pkg_failed=no -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for WPD" >&5 -$as_echo_n "checking for WPD... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for REVENGE" >&5 +$as_echo_n "checking for REVENGE... " >&6; } -if test -n "$WPD_CFLAGS"; then - pkg_cv_WPD_CFLAGS="$WPD_CFLAGS" +if test -n "$REVENGE_CFLAGS"; then + pkg_cv_REVENGE_CFLAGS="$REVENGE_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" - libwpd-0.9 >= 0.9.5 - libwpd-stream-0.9 >= 0.9.5 + librevenge-0.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " - libwpd-0.9 >= 0.9.5 - libwpd-stream-0.9 >= 0.9.5 + librevenge-0.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_WPD_CFLAGS=`$PKG_CONFIG --cflags " - libwpd-0.9 >= 0.9.5 - libwpd-stream-0.9 >= 0.9.5 + pkg_cv_REVENGE_CFLAGS=`$PKG_CONFIG --cflags " + librevenge-0.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else @@ -16683,24 +16255,21 @@ else pkg_failed=untried fi -if test -n "$WPD_LIBS"; then - pkg_cv_WPD_LIBS="$WPD_LIBS" +if test -n "$REVENGE_LIBS"; then + pkg_cv_REVENGE_LIBS="$REVENGE_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" - libwpd-0.9 >= 0.9.5 - libwpd-stream-0.9 >= 0.9.5 + librevenge-0.0 \""; } >&5 ($PKG_CONFIG --exists --print-errors " - libwpd-0.9 >= 0.9.5 - libwpd-stream-0.9 >= 0.9.5 + librevenge-0.0 ") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then - pkg_cv_WPD_LIBS=`$PKG_CONFIG --libs " - libwpd-0.9 >= 0.9.5 - libwpd-stream-0.9 >= 0.9.5 + pkg_cv_REVENGE_LIBS=`$PKG_CONFIG --libs " + librevenge-0.0 " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else @@ -16722,31 +16291,28 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - WPD_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " - libwpd-0.9 >= 0.9.5 - libwpd-stream-0.9 >= 0.9.5 + REVENGE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " + librevenge-0.0 " 2>&1` else - WPD_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " - libwpd-0.9 >= 0.9.5 - libwpd-stream-0.9 >= 0.9.5 + REVENGE_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " + librevenge-0.0 " 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$WPD_PKG_ERRORS" >&5 + echo "$REVENGE_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ( - libwpd-0.9 >= 0.9.5 - libwpd-stream-0.9 >= 0.9.5 + librevenge-0.0 ) were not met: -$WPD_PKG_ERRORS +$REVENGE_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. -Alternatively, you may set the environment variables WPD_CFLAGS -and WPD_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables REVENGE_CFLAGS +and REVENGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -16757,15 +16323,15 @@ is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. -Alternatively, you may set the environment variables WPD_CFLAGS -and WPD_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables REVENGE_CFLAGS +and REVENGE_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else - WPD_CFLAGS=$pkg_cv_WPD_CFLAGS - WPD_LIBS=$pkg_cv_WPD_LIBS + REVENGE_CFLAGS=$pkg_cv_REVENGE_CFLAGS + REVENGE_LIBS=$pkg_cv_REVENGE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } @@ -16774,26 +16340,40 @@ +# ===== +# 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 WPG" >&5 -$as_echo_n "checking for WPG... " >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for REVENGE_STREAM" >&5 +$as_echo_n "checking for REVENGE_STREAM... " >&6; } -if test -n "$WPG_CFLAGS"; then - pkg_cv_WPG_CFLAGS="$WPG_CFLAGS" +if test -n "$REVENGE_STREAM_CFLAGS"; then + pkg_cv_REVENGE_STREAM_CFLAGS="$REVENGE_STREAM_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" - libwpg-0.2 -\""; } >&5 + librevenge-stream-0.0 + \""; } >&5 ($PKG_CONFIG --exists --print-errors " - libwpg-0.2 -") 2>&5 + 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_WPG_CFLAGS=`$PKG_CONFIG --cflags " - libwpg-0.2 -" 2>/dev/null` + pkg_cv_REVENGE_STREAM_CFLAGS=`$PKG_CONFIG --cflags " + librevenge-stream-0.0 + " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -16801,22 +16381,22 @@ else pkg_failed=untried fi -if test -n "$WPG_LIBS"; then - pkg_cv_WPG_LIBS="$WPG_LIBS" +if test -n "$REVENGE_STREAM_LIBS"; then + pkg_cv_REVENGE_STREAM_LIBS="$REVENGE_STREAM_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \" - libwpg-0.2 -\""; } >&5 + librevenge-stream-0.0 + \""; } >&5 ($PKG_CONFIG --exists --print-errors " - libwpg-0.2 -") 2>&5 + 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_WPG_LIBS=`$PKG_CONFIG --libs " - libwpg-0.2 -" 2>/dev/null` + pkg_cv_REVENGE_STREAM_LIBS=`$PKG_CONFIG --libs " + librevenge-stream-0.0 + " 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes @@ -16837,28 +16417,137 @@ _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then - WPG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " - libwpg-0.2 -" 2>&1` + REVENGE_STREAM_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs " + librevenge-stream-0.0 + " 2>&1` else - WPG_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " - libwpg-0.2 -" 2>&1` + REVENGE_STREAM_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs " + librevenge-stream-0.0 + " 2>&1` fi # Put the nasty error message in config.log where it belongs - echo "$WPG_PKG_ERRORS" >&5 + echo "$REVENGE_STREAM_PKG_ERRORS" >&5 as_fn_error $? "Package requirements ( - libwpg-0.2 -) were not met: + 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. + +To get pkg-config, see . +See \`config.log' for more details" "$LINENO" 5; } +else + 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; } + +fi + +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 -$WPG_PKG_ERRORS + 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 WPG_CFLAGS -and WPG_LIBS to avoid the need to call 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." "$LINENO" 5 elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 @@ -16869,23 +16558,38 @@ 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 WPG_CFLAGS -and WPG_LIBS to avoid the need to call pkg-config. +Alternatively, you may set the environment variables REVENGE_GENERATORS_CFLAGS +and REVENGE_GENERATORS_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else - WPG_CFLAGS=$pkg_cv_WPG_CFLAGS - WPG_LIBS=$pkg_cv_WPG_LIBS + 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 +fi + + if test "x$enable_tools" = "xyes"; then + BUILD_TOOLS_TRUE= + BUILD_TOOLS_FALSE='#' +else + BUILD_TOOLS_TRUE='#' + BUILD_TOOLS_FALSE= +fi + + +# ========== +# Find lcms2 +# ========== + pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS2" >&5 $as_echo_n "checking for LCMS2... " >&6; } @@ -17404,19 +17108,19 @@ # ================================= CDR_MAJOR_VERSION=0 -CDR_MINOR_VERSION=0 +CDR_MINOR_VERSION=1 -CDR_MICRO_VERSION=15 +CDR_MICRO_VERSION=0 -CDR_VERSION=0.0.15 +CDR_VERSION=0.1.0 # AC_SUBST(LT_RELEASE, [libcdr_version_major.libcdr_version_minor]) -LT_CURRENT=`expr 100 '*' 0 + 0` +LT_CURRENT=`expr 100 '*' 0 + 1` # For 1.0.0 comment the first line and uncomment the second LT_AGE=0 # LT_AGE=libcdr_version_minor -LT_REVISION=15 +LT_REVISION=0 @@ -17712,62 +17416,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 - - # ============= # Documentation # ============= @@ -17984,8 +17632,8 @@ as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then - as_fn_error $? "conditional \"am__fastdepCC\" was never defined. +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then @@ -17996,6 +17644,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 @@ -18004,10 +17656,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 "${WITH_LIBCDR_DOCS_TRUE}" && test -z "${WITH_LIBCDR_DOCS_FALSE}"; then as_fn_error $? "conditional \"WITH_LIBCDR_DOCS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 @@ -18409,7 +18057,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libcdr $as_me 0.0.15, which was +This file was extended by libcdr $as_me 0.1.0, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -18475,7 +18123,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libcdr config.status 0.0.15 +libcdr config.status 0.1.0 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" @@ -20542,7 +20190,7 @@ Build configuration: debug: ${enable_debug} docs: ${build_docs} - static-tools: ${enable_static_tools} + tools: ${enable_tools} werror: ${enable_werror} ============================================================================== " >&5 @@ -20551,7 +20199,7 @@ Build configuration: debug: ${enable_debug} docs: ${build_docs} - static-tools: ${enable_static_tools} + tools: ${enable_tools} werror: ${enable_werror} ============================================================================== " >&6;} diff -Nru libcdr-0.0.15/configure.ac libcdr-0.1.0/configure.ac --- libcdr-0.0.15/configure.ac 2014-04-04 13:38:03.000000000 +0000 +++ libcdr-0.1.0/configure.ac 2014-03-29 10:23:47.000000000 +0000 @@ -6,8 +6,8 @@ # Version informations # ==================== m4_define([libcdr_version_major],[0]) -m4_define([libcdr_version_minor],[0]) -m4_define([libcdr_version_micro],[15]) +m4_define([libcdr_version_minor],[1]) +m4_define([libcdr_version_micro],[0]) m4_define([libcdr_version],[libcdr_version_major.libcdr_version_minor.libcdr_version_micro]) # ============= @@ -35,27 +35,46 @@ PKG_PROG_PKG_CONFIG([0.20]) -# ==================== -# Find additional apps -# ==================== -PKG_CHECK_MODULES([WPD],[ - libwpd-0.9 >= 0.9.5 - libwpd-stream-0.9 >= 0.9.5 +# =============== +# Find librevenge +# =============== +PKG_CHECK_MODULES([REVENGE],[ + librevenge-0.0 ]) -AC_SUBST(WPD_CFLAGS) -AC_SUBST(WPD_LIBS) +AC_SUBST([REVENGE_CFLAGS]) +AC_SUBST([REVENGE_LIBS]) -PKG_CHECK_MODULES([WPG],[ - libwpg-0.2 -]) -AC_SUBST(WPG_CFLAGS) -AC_SUBST(WPG_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_STREAM],[ + librevenge-stream-0.0 + ]) + PKG_CHECK_MODULES([REVENGE_GENERATORS],[ + librevenge-generators-0.0 + ]) +]) +AC_SUBST([REVENGE_STREAM_CFLAGS]) +AC_SUBST([REVENGE_STREAM_LIBS]) +AC_SUBST([REVENGE_GENERATORS_CFLAGS]) +AC_SUBST([REVENGE_GENERATORS_LIBS]) +AM_CONDITIONAL(BUILD_TOOLS, [test "x$enable_tools" = "xyes"]) + +# ========== +# Find lcms2 +# ========== PKG_CHECK_MODULES([LCMS2],[ lcms2 ]) -AC_SUBST(LCMS2_CFLAGS) -AC_SUBST(LCMS2_LIBS) +AC_SUBST([LCMS2_CFLAGS]) +AC_SUBST([LCMS_LIBS]) # ========= # Find zlib @@ -256,21 +275,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"]) - # ============= # Documentation # ============= @@ -327,7 +331,7 @@ Build configuration: debug: ${enable_debug} docs: ${build_docs} - static-tools: ${enable_static_tools} + tools: ${enable_tools} werror: ${enable_werror} ============================================================================== ]) diff -Nru libcdr-0.0.15/COPYING.GPL libcdr-0.1.0/COPYING.GPL --- libcdr-0.0.15/COPYING.GPL 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/COPYING.GPL 1970-01-01 00:00:00.000000000 +0000 @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Lesser General Public License instead.) You can apply it to -your programs, too. - - When we speak of free software, we are referring to freedom, not -price. Our General Public Licenses are designed to make sure that you -have the freedom to distribute copies of free software (and charge for -this service if you wish), that you receive source code or can get it -if you want it, that you can change the software or use pieces of it -in new free programs; and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. You must make sure that they, too, receive or can get the -source code. And you must show them these terms so they know their -rights. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's -source code as you receive it, in any medium, provided that you -conspicuously and appropriately publish on each copy an appropriate -copyright notice and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the General Public License from time to time. Such new versions will -be similar in spirit to the present version, but may differ in detail to -address new problems or concerns. - -Each version is given a distinguishing version number. If the Program -specifies a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY -FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN -OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES -PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED -OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF -MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS -TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE -PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, -REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, -INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING -OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED -TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY -YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER -PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE -POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program; if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Lesser General -Public License instead of this License. diff -Nru libcdr-0.0.15/COPYING.LGPL libcdr-0.1.0/COPYING.LGPL --- libcdr-0.0.15/COPYING.LGPL 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/COPYING.LGPL 1970-01-01 00:00:00.000000000 +0000 @@ -1,502 +0,0 @@ - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some -specially designated software packages--typically libraries--of the -Free Software Foundation and other authors who decide to use it. You -can use it too, but we suggest you first think carefully about whether -this license or the ordinary General Public License is the better -strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, -not price. Our General Public Licenses are designed to make sure that -you have the freedom to distribute copies of free software (and charge -for this service if you wish); that you receive source code or can get -it if you want it; that you can change the software and use pieces of -it in new free programs; and that you are informed that you can do -these things. - - To protect your rights, we need to make restrictions that forbid -distributors to deny you these rights or to ask you to surrender these -rights. These restrictions translate to certain responsibilities for -you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link other code with the library, you must provide -complete object files to the recipients, so that they can relink them -with the library after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the -library, and (2) we offer you this license, which gives you legal -permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that -there is no warranty for the free library. Also, if the library is -modified by someone else and passed on, the recipients should know -that what they have is not the original version, so that the original -author's reputation will not be affected by problems that might be -introduced by others. - - Finally, software patents pose a constant threat to the existence of -any free program. We wish to make sure that a company cannot -effectively restrict the users of a free program by obtaining a -restrictive license from a patent holder. Therefore, we insist that -any patent license obtained for a version of the library must be -consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the -ordinary GNU General Public License. This license, the GNU Lesser -General Public License, applies to certain designated libraries, and -is quite different from the ordinary General Public License. We use -this license for certain libraries in order to permit linking those -libraries into non-free programs. - - When a program is linked with a library, whether statically or using -a shared library, the combination of the two is legally speaking a -combined work, a derivative of the original library. The ordinary -General Public License therefore permits such linking only if the -entire combination fits its criteria of freedom. The Lesser General -Public License permits more lax criteria for linking other code with -the library. - - We call this license the "Lesser" General Public License because it -does Less to protect the user's freedom than the ordinary General -Public License. It also provides other free software developers Less -of an advantage over competing non-free programs. These disadvantages -are the reason we use the ordinary General Public License for many -libraries. However, the Lesser license provides advantages in certain -special circumstances. - - For example, on rare occasions, there may be a special need to -encourage the widest possible use of a certain library, so that it becomes -a de-facto standard. To achieve this, non-free programs must be -allowed to use the library. A more frequent case is that a free -library does the same job as widely used non-free libraries. In this -case, there is little to gain by limiting the free library to free -software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free -programs enables a greater number of people to use a large body of -free software. For example, permission to use the GNU C Library in -non-free programs enables many more people to use the whole GNU -operating system, as well as its variant, the GNU/Linux operating -system. - - Although the Lesser General Public License is Less protective of the -users' freedom, it does ensure that the user of a program that is -linked with the Library has the freedom and the wherewithal to run -that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, whereas the latter must -be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other -program which contains a notice placed by the copyright holder or -other authorized party saying it may be distributed under the terms of -this Lesser General Public License (also called "this License"). -Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the materials to be distributed need not include anything that is -normally distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties with -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -conditions are imposed on you (whether by court order, agreement or -otherwise) that contradict the conditions of this License, they do not -excuse you from the conditions of this License. If you cannot -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Lesser General Public License from time to time. -Such new versions will be similar in spirit to the present version, -but may differ in detail to address new problems or concerns. - -Each version is given a distinguishing version number. If the Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY -KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE -IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR -PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU -FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE -LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING -RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A -FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation; either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff -Nru libcdr-0.0.15/COPYING.MPL libcdr-0.1.0/COPYING.MPL --- libcdr-0.0.15/COPYING.MPL 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/COPYING.MPL 2014-03-29 10:23:47.000000000 +0000 @@ -1,470 +1,373 @@ - MOZILLA PUBLIC LICENSE - Version 1.1 +Mozilla Public License Version 2.0 +================================== - --------------- +1. Definitions +-------------- -1. Definitions. +1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + +1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + +1.3. "Contribution" + means Covered Software of a particular Contributor. + +1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + +1.5. "Incompatible With Secondary Licenses" + means + + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + +1.6. "Executable Form" + means any form of the work other than Source Code Form. + +1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + +1.8. "License" + means this document. + +1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + +1.10. "Modifications" + means any of the following: + + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + + (b) any new file in Source Code Form that contains any Covered + Software. + +1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + +1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + +1.13. "Source Code Form" + means the form of the work preferred for making modifications. + +1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + +2. License Grants and Conditions +-------------------------------- + +2.1. Grants + +Each Contributor hereby grants You a world-wide, royalty-free, +non-exclusive license: + +(a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + +(b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + +2.2. Effective Date + +The licenses granted in Section 2.1 with respect to any Contribution +become effective for each Contribution on the date the Contributor first +distributes such Contribution. + +2.3. Limitations on Grant Scope + +The licenses granted in this Section 2 are the only rights granted under +this License. No additional rights or licenses will be implied from the +distribution or licensing of Covered Software under this License. +Notwithstanding Section 2.1(b) above, no patent license is granted by a +Contributor: + +(a) for any code that a Contributor has removed from Covered Software; + or + +(b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + +(c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + +This License does not grant any rights in the trademarks, service marks, +or logos of any Contributor (except as may be necessary to comply with +the notice requirements in Section 3.4). + +2.4. Subsequent Licenses + +No Contributor makes additional grants as a result of Your choice to +distribute the Covered Software under a subsequent version of this +License (see Section 10.2) or under the terms of a Secondary License (if +permitted under the terms of Section 3.3). + +2.5. Representation + +Each Contributor represents that the Contributor believes its +Contributions are its original creation(s) or it has sufficient rights +to grant the rights to its Contributions conveyed by this License. + +2.6. Fair Use + +This License is not intended to limit any rights You have under +applicable copyright doctrines of fair use, fair dealing, or other +equivalents. + +2.7. Conditions + +Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted +in Section 2.1. + +3. Responsibilities +------------------- + +3.1. Distribution of Source Form + +All distribution of Covered Software in Source Code Form, including any +Modifications that You create or to which You contribute, must be under +the terms of this License. You must inform recipients that the Source +Code Form of the Covered Software is governed by the terms of this +License, and how they can obtain a copy of this License. You may not +attempt to alter or restrict the recipients' rights in the Source Code +Form. + +3.2. Distribution of Executable Form + +If You distribute Covered Software in Executable Form then: + +(a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + +(b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + +3.3. Distribution of a Larger Work + +You may create and distribute a Larger Work under terms of Your choice, +provided that You also comply with the requirements of this License for +the Covered Software. If the Larger Work is a combination of Covered +Software with a work governed by one or more Secondary Licenses, and the +Covered Software is not Incompatible With Secondary Licenses, this +License permits You to additionally distribute such Covered Software +under the terms of such Secondary License(s), so that the recipient of +the Larger Work may, at their option, further distribute the Covered +Software under the terms of either this License or such Secondary +License(s). + +3.4. Notices + +You may not remove or alter the substance of any license notices +(including copyright notices, patent notices, disclaimers of warranty, +or limitations of liability) contained within the Source Code Form of +the Covered Software, except that You may alter any license notices to +the extent required to remedy known factual inaccuracies. + +3.5. Application of Additional Terms + +You may choose to offer, and to charge a fee for, warranty, support, +indemnity or liability obligations to one or more recipients of Covered +Software. However, You may do so only on Your own behalf, and not on +behalf of any Contributor. You must make it absolutely clear that any +such warranty, support, indemnity, or liability obligation is offered by +You alone, and You hereby agree to indemnify every Contributor for any +liability incurred by such Contributor as a result of warranty, support, +indemnity or liability terms You offer. You may include additional +disclaimers of warranty and limitations of liability specific to any +jurisdiction. + +4. Inability to Comply Due to Statute or Regulation +--------------------------------------------------- + +If it is impossible for You to comply with any of the terms of this +License with respect to some or all of the Covered Software due to +statute, judicial order, or regulation then You must: (a) comply with +the terms of this License to the maximum extent possible; and (b) +describe the limitations and the code they affect. Such description must +be placed in a text file included with all distributions of the Covered +Software under this License. Except to the extent prohibited by statute +or regulation, such description must be sufficiently detailed for a +recipient of ordinary skill to be able to understand it. + +5. Termination +-------------- + +5.1. The rights granted under this License will terminate automatically +if You fail to comply with any of its terms. However, if You become +compliant, then the rights granted under this License from a particular +Contributor are reinstated (a) provisionally, unless and until such +Contributor explicitly and finally terminates Your grants, and (b) on an +ongoing basis, if such Contributor fails to notify You of the +non-compliance by some reasonable means prior to 60 days after You have +come back into compliance. Moreover, Your grants from a particular +Contributor are reinstated on an ongoing basis if such Contributor +notifies You of the non-compliance by some reasonable means, this is the +first time You have received notice of non-compliance with this License +from such Contributor, and You become compliant prior to 30 days after +Your receipt of the notice. + +5.2. If You initiate litigation against any entity by asserting a patent +infringement claim (excluding declaratory judgment actions, +counter-claims, and cross-claims) alleging that a Contributor Version +directly or indirectly infringes any patent, then the rights granted to +You by any and all Contributors for the Covered Software under Section +2.1 of this License shall terminate. + +5.3. In the event of termination under Sections 5.1 or 5.2 above, all +end user license agreements (excluding distributors and resellers) which +have been validly granted by You or Your distributors under this License +prior to termination shall survive termination. + +************************************************************************ +* * +* 6. Disclaimer of Warranty * +* ------------------------- * +* * +* Covered Software is provided under this License on an "as is" * +* basis, without warranty of any kind, either expressed, implied, or * +* statutory, including, without limitation, warranties that the * +* Covered Software is free of defects, merchantable, fit for a * +* particular purpose or non-infringing. The entire risk as to the * +* quality and performance of the Covered Software is with You. * +* Should any Covered Software prove defective in any respect, You * +* (not any Contributor) assume the cost of any necessary servicing, * +* repair, or correction. This disclaimer of warranty constitutes an * +* essential part of this License. No use of any Covered Software is * +* authorized under this License except under this disclaimer. * +* * +************************************************************************ + +************************************************************************ +* * +* 7. Limitation of Liability * +* -------------------------- * +* * +* Under no circumstances and under no legal theory, whether tort * +* (including negligence), contract, or otherwise, shall any * +* Contributor, or anyone who distributes Covered Software as * +* permitted above, be liable to You for any direct, indirect, * +* special, incidental, or consequential damages of any character * +* including, without limitation, damages for lost profits, loss of * +* goodwill, work stoppage, computer failure or malfunction, or any * +* and all other commercial damages or losses, even if such party * +* shall have been informed of the possibility of such damages. This * +* limitation of liability shall not apply to liability for death or * +* personal injury resulting from such party's negligence to the * +* extent applicable law prohibits such limitation. Some * +* jurisdictions do not allow the exclusion or limitation of * +* incidental or consequential damages, so this exclusion and * +* limitation may not apply to You. * +* * +************************************************************************ + +8. Litigation +------------- + +Any litigation relating to this License may be brought only in the +courts of a jurisdiction where the defendant maintains its principal +place of business and such litigation shall be governed by laws of that +jurisdiction, without reference to its conflict-of-law provisions. +Nothing in this Section shall prevent a party's ability to bring +cross-claims or counter-claims. + +9. Miscellaneous +---------------- + +This License represents the complete agreement concerning the subject +matter hereof. If any provision of this License is held to be +unenforceable, such provision shall be reformed only to the extent +necessary to make it enforceable. Any law or regulation which provides +that the language of a contract shall be construed against the drafter +shall not be used to construe this License against a Contributor. + +10. Versions of the License +--------------------------- + +10.1. New Versions + +Mozilla Foundation is the license steward. Except as provided in Section +10.3, no one other than the license steward has the right to modify or +publish new versions of this License. Each version will be given a +distinguishing version number. + +10.2. Effect of New Versions + +You may distribute the Covered Software under the terms of the version +of the License under which You originally received the Covered Software, +or under the terms of any subsequent version published by the license +steward. + +10.3. Modified Versions + +If you create software not governed by this License, and you want to +create a new license for such software, you may create and use a +modified version of this License if you rename the license and remove +any references to the name of the license steward (except to note that +such modified license differs from this License). + +10.4. Distributing Source Code Form that is Incompatible With Secondary +Licenses + +If You choose to distribute Source Code Form that is Incompatible With +Secondary Licenses under the terms of this version of the License, the +notice described in Exhibit B of this License must be attached. + +Exhibit A - Source Code Form License Notice +------------------------------------------- + + 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/. + +If it is not possible or desirable to put the notice in a particular +file, then You may include the notice in a location (such as a LICENSE +file in a relevant directory) where a recipient would be likely to look +for such a notice. - 1.0.1. "Commercial Use" means distribution or otherwise making the - Covered Code available to a third party. - - 1.1. "Contributor" means each entity that creates or contributes to - the creation of Modifications. - - 1.2. "Contributor Version" means the combination of the Original - Code, prior Modifications used by a Contributor, and the Modifications - made by that particular Contributor. - - 1.3. "Covered Code" means the Original Code or Modifications or the - combination of the Original Code and Modifications, in each case - including portions thereof. - - 1.4. "Electronic Distribution Mechanism" means a mechanism generally - accepted in the software development community for the electronic - transfer of data. - - 1.5. "Executable" means Covered Code in any form other than Source - Code. - - 1.6. "Initial Developer" means the individual or entity identified - as the Initial Developer in the Source Code notice required by Exhibit - A. - - 1.7. "Larger Work" means a work which combines Covered Code or - portions thereof with code not governed by the terms of this License. - - 1.8. "License" means this document. - - 1.8.1. "Licensable" means having the right to grant, to the maximum - extent possible, whether at the time of the initial grant or - subsequently acquired, any and all of the rights conveyed herein. - - 1.9. "Modifications" means any addition to or deletion from the - substance or structure of either the Original Code or any previous - Modifications. When Covered Code is released as a series of files, a - Modification is: - A. Any addition to or deletion from the contents of a file - containing Original Code or previous Modifications. - - B. Any new file that contains any part of the Original Code or - previous Modifications. - - 1.10. "Original Code" means Source Code of computer software code - which is described in the Source Code notice required by Exhibit A as - Original Code, and which, at the time of its release under this - License is not already Covered Code governed by this License. - - 1.10.1. "Patent Claims" means any patent claim(s), now owned or - hereafter acquired, including without limitation, method, process, - and apparatus claims, in any patent Licensable by grantor. - - 1.11. "Source Code" means the preferred form of the Covered Code for - making modifications to it, including all modules it contains, plus - any associated interface definition files, scripts used to control - compilation and installation of an Executable, or source code - differential comparisons against either the Original Code or another - well known, available Covered Code of the Contributor's choice. The - Source Code can be in a compressed or archival form, provided the - appropriate decompression or de-archiving software is widely available - for no charge. - - 1.12. "You" (or "Your") means an individual or a legal entity - exercising rights under, and complying with all of the terms of, this - License or a future version of this License issued under Section 6.1. - For legal entities, "You" includes any entity which controls, is - controlled by, or is under common control with You. For purposes of - this definition, "control" means (a) the power, direct or indirect, - to cause the direction or management of such entity, whether by - contract or otherwise, or (b) ownership of more than fifty percent - (50%) of the outstanding shares or beneficial ownership of such - entity. - -2. Source Code License. - - 2.1. The Initial Developer Grant. - The Initial Developer hereby grants You a world-wide, royalty-free, - non-exclusive license, subject to third party intellectual property - claims: - (a) under intellectual property rights (other than patent or - trademark) Licensable by Initial Developer to use, reproduce, - modify, display, perform, sublicense and distribute the Original - Code (or portions thereof) with or without Modifications, and/or - as part of a Larger Work; and - - (b) under Patents Claims infringed by the making, using or - selling of Original Code, to make, have made, use, practice, - sell, and offer for sale, and/or otherwise dispose of the - Original Code (or portions thereof). - - (c) the licenses granted in this Section 2.1(a) and (b) are - effective on the date Initial Developer first distributes - Original Code under the terms of this License. - - (d) Notwithstanding Section 2.1(b) above, no patent license is - granted: 1) for code that You delete from the Original Code; 2) - separate from the Original Code; or 3) for infringements caused - by: i) the modification of the Original Code or ii) the - combination of the Original Code with other software or devices. - - 2.2. Contributor Grant. - Subject to third party intellectual property claims, each Contributor - hereby grants You a world-wide, royalty-free, non-exclusive license - - (a) under intellectual property rights (other than patent or - trademark) Licensable by Contributor, to use, reproduce, modify, - display, perform, sublicense and distribute the Modifications - created by such Contributor (or portions thereof) either on an - unmodified basis, with other Modifications, as Covered Code - and/or as part of a Larger Work; and - - (b) under Patent Claims infringed by the making, using, or - selling of Modifications made by that Contributor either alone - and/or in combination with its Contributor Version (or portions - of such combination), to make, use, sell, offer for sale, have - made, and/or otherwise dispose of: 1) Modifications made by that - Contributor (or portions thereof); and 2) the combination of - Modifications made by that Contributor with its Contributor - Version (or portions of such combination). - - (c) the licenses granted in Sections 2.2(a) and 2.2(b) are - effective on the date Contributor first makes Commercial Use of - the Covered Code. - - (d) Notwithstanding Section 2.2(b) above, no patent license is - granted: 1) for any code that Contributor has deleted from the - Contributor Version; 2) separate from the Contributor Version; - 3) for infringements caused by: i) third party modifications of - Contributor Version or ii) the combination of Modifications made - by that Contributor with other software (except as part of the - Contributor Version) or other devices; or 4) under Patent Claims - infringed by Covered Code in the absence of Modifications made by - that Contributor. - -3. Distribution Obligations. - - 3.1. Application of License. - The Modifications which You create or to which You contribute are - governed by the terms of this License, including without limitation - Section 2.2. The Source Code version of Covered Code may be - distributed only under the terms of this License or a future version - of this License released under Section 6.1, and You must include a - copy of this License with every copy of the Source Code You - distribute. You may not offer or impose any terms on any Source Code - version that alters or restricts the applicable version of this - License or the recipients' rights hereunder. However, You may include - an additional document offering the additional rights described in - Section 3.5. - - 3.2. Availability of Source Code. - Any Modification which You create or to which You contribute must be - made available in Source Code form under the terms of this License - either on the same media as an Executable version or via an accepted - Electronic Distribution Mechanism to anyone to whom you made an - Executable version available; and if made available via Electronic - Distribution Mechanism, must remain available for at least twelve (12) - months after the date it initially became available, or at least six - (6) months after a subsequent version of that particular Modification - has been made available to such recipients. You are responsible for - ensuring that the Source Code version remains available even if the - Electronic Distribution Mechanism is maintained by a third party. - - 3.3. Description of Modifications. - You must cause all Covered Code to which You contribute to contain a - file documenting the changes You made to create that Covered Code and - the date of any change. You must include a prominent statement that - the Modification is derived, directly or indirectly, from Original - Code provided by the Initial Developer and including the name of the - Initial Developer in (a) the Source Code, and (b) in any notice in an - Executable version or related documentation in which You describe the - origin or ownership of the Covered Code. - - 3.4. Intellectual Property Matters - (a) Third Party Claims. - If Contributor has knowledge that a license under a third party's - intellectual property rights is required to exercise the rights - granted by such Contributor under Sections 2.1 or 2.2, - Contributor must include a text file with the Source Code - distribution titled "LEGAL" which describes the claim and the - party making the claim in sufficient detail that a recipient will - know whom to contact. If Contributor obtains such knowledge after - the Modification is made available as described in Section 3.2, - Contributor shall promptly modify the LEGAL file in all copies - Contributor makes available thereafter and shall take other steps - (such as notifying appropriate mailing lists or newsgroups) - reasonably calculated to inform those who received the Covered - Code that new knowledge has been obtained. - - (b) Contributor APIs. - If Contributor's Modifications include an application programming - interface and Contributor has knowledge of patent licenses which - are reasonably necessary to implement that API, Contributor must - also include this information in the LEGAL file. - - (c) Representations. - Contributor represents that, except as disclosed pursuant to - Section 3.4(a) above, Contributor believes that Contributor's - Modifications are Contributor's original creation(s) and/or - Contributor has sufficient rights to grant the rights conveyed by - this License. - - 3.5. Required Notices. - You must duplicate the notice in Exhibit A in each file of the Source - Code. If it is not possible to put such notice in a particular Source - Code file due to its structure, then You must include such notice in a - location (such as a relevant directory) where a user would be likely - to look for such a notice. If You created one or more Modification(s) - You may add your name as a Contributor to the notice described in - Exhibit A. You must also duplicate this License in any documentation - for the Source Code where You describe recipients' rights or ownership - rights relating to Covered Code. You may choose to offer, and to - charge a fee for, warranty, support, indemnity or liability - obligations to one or more recipients of Covered Code. However, You - may do so only on Your own behalf, and not on behalf of the Initial - Developer or any Contributor. You must make it absolutely clear than - any such warranty, support, indemnity or liability obligation is - offered by You alone, and You hereby agree to indemnify the Initial - Developer and every Contributor for any liability incurred by the - Initial Developer or such Contributor as a result of warranty, - support, indemnity or liability terms You offer. - - 3.6. Distribution of Executable Versions. - You may distribute Covered Code in Executable form only if the - requirements of Section 3.1-3.5 have been met for that Covered Code, - and if You include a notice stating that the Source Code version of - the Covered Code is available under the terms of this License, - including a description of how and where You have fulfilled the - obligations of Section 3.2. The notice must be conspicuously included - in any notice in an Executable version, related documentation or - collateral in which You describe recipients' rights relating to the - Covered Code. You may distribute the Executable version of Covered - Code or ownership rights under a license of Your choice, which may - contain terms different from this License, provided that You are in - compliance with the terms of this License and that the license for the - Executable version does not attempt to limit or alter the recipient's - rights in the Source Code version from the rights set forth in this - License. If You distribute the Executable version under a different - license You must make it absolutely clear that any terms which differ - from this License are offered by You alone, not by the Initial - Developer or any Contributor. You hereby agree to indemnify the - Initial Developer and every Contributor for any liability incurred by - the Initial Developer or such Contributor as a result of any such - terms You offer. - - 3.7. Larger Works. - You may create a Larger Work by combining Covered Code with other code - not governed by the terms of this License and distribute the Larger - Work as a single product. In such a case, You must make sure the - requirements of this License are fulfilled for the Covered Code. - -4. Inability to Comply Due to Statute or Regulation. - - If it is impossible for You to comply with any of the terms of this - License with respect to some or all of the Covered Code due to - statute, judicial order, or regulation then You must: (a) comply with - the terms of this License to the maximum extent possible; and (b) - describe the limitations and the code they affect. Such description - must be included in the LEGAL file described in Section 3.4 and must - be included with all distributions of the Source Code. Except to the - extent prohibited by statute or regulation, such description must be - sufficiently detailed for a recipient of ordinary skill to be able to - understand it. - -5. Application of this License. - - This License applies to code to which the Initial Developer has - attached the notice in Exhibit A and to related Covered Code. - -6. Versions of the License. - - 6.1. New Versions. - BBC Communications Corporation ("Netscape") may publish revised - and/or new versions of the License from time to time. Each version - will be given a distinguishing version number. - - 6.2. Effect of New Versions. - Once Covered Code has been published under a particular version of the - License, You may always continue to use it under the terms of that - version. You may also choose to use such Covered Code under the terms - of any subsequent version of the License published by BBC. No one - other than BBC has the right to modify the terms applicable to - Covered Code created under this License. - - 6.3. Derivative Works. - If You create or use a modified version of this License (which you may - only do in order to apply it to code which is not already Covered Code - governed by this License), You must (a) rename Your license so that - the phrases "Mozilla", "MOZILLAPL", "MOZPL", "BBC", - "MPL", "NPL" or any confusingly similar phrase do not appear in your - license (except to note that your license differs from this License) - and (b) otherwise make it clear that Your version of the license - contains terms which differ from the Mozilla Public License and - BBC Public License. (Filling in the name of the Initial - Developer, Original Code or Contributor in the notice described in - Exhibit A shall not of themselves be deemed to be modifications of - this License.) - -7. DISCLAIMER OF WARRANTY. - - COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, - WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF - DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. - THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE - IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, - YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE - COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER - OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF - ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER. - -8. TERMINATION. - - 8.1. This License and the rights granted hereunder will terminate - automatically if You fail to comply with terms herein and fail to cure - such breach within 30 days of becoming aware of the breach. All - sublicenses to the Covered Code which are properly granted shall - survive any termination of this License. Provisions which, by their - nature, must remain in effect beyond the termination of this License - shall survive. - - 8.2. If You initiate litigation by asserting a patent infringement - claim (excluding declatory judgment actions) against Initial Developer - or a Contributor (the Initial Developer or Contributor against whom - You file such action is referred to as "Participant") alleging that: - - (a) such Participant's Contributor Version directly or indirectly - infringes any patent, then any and all rights granted by such - Participant to You under Sections 2.1 and/or 2.2 of this License - shall, upon 60 days notice from Participant terminate prospectively, - unless if within 60 days after receipt of notice You either: (i) - agree in writing to pay Participant a mutually agreeable reasonable - royalty for Your past and future use of Modifications made by such - Participant, or (ii) withdraw Your litigation claim with respect to - the Contributor Version against such Participant. If within 60 days - of notice, a reasonable royalty and payment arrangement are not - mutually agreed upon in writing by the parties or the litigation claim - is not withdrawn, the rights granted by Participant to You under - Sections 2.1 and/or 2.2 automatically terminate at the expiration of - the 60 day notice period specified above. - - (b) any software, hardware, or device, other than such Participant's - Contributor Version, directly or indirectly infringes any patent, then - any rights granted to You by such Participant under Sections 2.1(b) - and 2.2(b) are revoked effective as of the date You first made, used, - sold, distributed, or had made, Modifications made by that - Participant. - - 8.3. If You assert a patent infringement claim against Participant - alleging that such Participant's Contributor Version directly or - indirectly infringes any patent where such claim is resolved (such as - by license or settlement) prior to the initiation of patent - infringement litigation, then the reasonable value of the licenses - granted by such Participant under Sections 2.1 or 2.2 shall be taken - into account in determining the amount or value of any payment or - license. - - 8.4. In the event of termination under Sections 8.1 or 8.2 above, - all end user license agreements (excluding distributors and resellers) - which have been validly granted by You or any distributor hereunder - prior to termination shall survive termination. - -9. LIMITATION OF LIABILITY. - - UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT - (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL - DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, - OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR - ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY - CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, - WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER - COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN - INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF - LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY - RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW - PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE - EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO - THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU. - -10. U.S. GOVERNMENT END USERS. - - The Covered Code is a "commercial item," as that term is defined in - 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer - software" and "commercial computer software documentation," as such - terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 - C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), - all U.S. Government End Users acquire Covered Code with only those - rights set forth herein. - -11. MISCELLANEOUS. - - This License represents the complete agreement concerning subject - matter hereof. If any provision of this License is held to be - unenforceable, such provision shall be reformed only to the extent - necessary to make it enforceable. This License shall be governed by - California law provisions (except to the extent applicable law, if - any, provides otherwise), excluding its conflict-of-law provisions. - With respect to disputes in which at least one party is a citizen of, - or an entity chartered or registered to do business in the United - States of America, any litigation relating to this License shall be - subject to the jurisdiction of the Federal Courts of the Northern - District of California, with venue lying in Santa Clara County, - California, with the losing party responsible for costs, including - without limitation, court costs and reasonable attorneys' fees and - expenses. The application of the United Nations Convention on - Contracts for the International Sale of Goods is expressly excluded. - Any law or regulation which provides that the language of a contract - shall be construed against the drafter shall not apply to this - License. - -12. RESPONSIBILITY FOR CLAIMS. - - As between Initial Developer and the Contributors, each party is - responsible for claims and damages arising, directly or indirectly, - out of its utilization of rights under this License and You agree to - work with Initial Developer and Contributors to distribute such - responsibility on an equitable basis. Nothing herein is intended or - shall be deemed to constitute any admission of liability. - -13. MULTIPLE-LICENSED CODE. - - Initial Developer may designate portions of the Covered Code as - "Multiple-Licensed". "Multiple-Licensed" means that the Initial - Developer permits you to utilize portions of the Covered Code under - Your choice of the GPL, LGPL, MIT or the alternative licenses, if - any, specified by the Initial Developer in the file described in - Exhibit A. - -EXHIBIT A -Mozilla Public License. - - ``The contents of this file are subject to the Mozilla Public License - Version 1.1 (the "License"); you may not use this file except in - compliance with the License. You may obtain a copy of the License at - http://www.mozilla.org/MPL/ - - Software distributed under the License is distributed on an "AS IS" - basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the - License for the specific language governing rights and limitations - under the License. - - The Original Code is ______________________________________. - - The Initial Developer of the Original Code is ________________________. - Portions created by ______________________ are Copyright (C) ______ - _______________________. All Rights Reserved. - - Contributor(s): ______________________________________. - - Alternatively, the contents of this file may be used under the terms - of the _____ license (the "[___] License"), in which case the - provisions of [______] License are applicable instead of those - above. If you wish to allow use of your version of this file only - under the terms of the [____] License and not to allow others to use - your version of this file under the MPL, indicate your decision by - deleting the provisions above and replace them with the notice and - other provisions required by the [___] License. If you do not delete - the provisions above, a recipient may use your version of this file - under either the MPL or the [___] License." - - [NOTE: The text of this Exhibit A may differ slightly from the text of - the notices in the Source Code files of the Original Code. You should - use the text of this Exhibit A rather than the text found in the - Original Code Source Code for Your Modifications.] +You may add additional accurate notices of copyright ownership. + +Exhibit B - "Incompatible With Secondary Licenses" Notice +--------------------------------------------------------- + + This Source Code Form is "Incompatible With Secondary Licenses", as + defined by the Mozilla Public License, v. 2.0. diff -Nru libcdr-0.0.15/debian/changelog libcdr-0.1.0/debian/changelog --- libcdr-0.0.15/debian/changelog 2014-04-09 15:29:44.000000000 +0000 +++ libcdr-0.1.0/debian/changelog 2014-07-25 13:28:52.000000000 +0000 @@ -1,8 +1,24 @@ -libcdr (0.0.15-1~precise1) precise; urgency=medium +libcdr (0.1.0-2~precise1) precise; urgency=medium * Copied from debian - -- Rico Tzschichholz Wed, 09 Apr 2014 17:29:12 +0200 + -- Rico Tzschichholz Fri, 25 Jul 2014 15:28:25 +0200 + +libcdr (0.1.0-2) experimental; urgency=low + + * actually add --with autoreconf (really closes: #749064) + * fix debian/copyright (MPL 2.0only, add MPL text) + (closes: #750801) + + -- Rene Engelhard Sun, 08 Jun 2014 11:04:08 +0200 + +libcdr (0.1.0-1) experimental; urgency=low + + * New upstream release + + * use dh-autoreconf (closes: #749064) + + -- Rene Engelhard Fri, 23 May 2014 21:09:12 +0200 libcdr (0.0.15-1) unstable; urgency=low diff -Nru libcdr-0.0.15/debian/control libcdr-0.1.0/debian/control --- libcdr-0.0.15/debian/control 2013-04-22 17:57:24.000000000 +0000 +++ libcdr-0.1.0/debian/control 2014-05-23 19:13:23.000000000 +0000 @@ -2,13 +2,13 @@ Priority: optional Maintainer: Rene Engelhard Build-Depends: autotools-dev, + dh-autoreconf, debhelper (>= 9), doxygen, libboost-dev, libicu-dev, liblcms2-dev, - libwpd-dev (>= 0.9.0), - libwpg-dev (>= 0.2.0), + librevenge-dev, pkg-config, zlib1g-dev Standards-Version: 3.9.4 @@ -18,10 +18,9 @@ Package: libcdr-dev Section: libdevel Architecture: any -Depends: libcdr-0.0-0 (= ${binary:Version}), +Depends: libcdr-0.1-1 (= ${binary:Version}), liblcms2-dev, - libwpd-dev (>= 0.9.0), - libwpg-dev (>= 0.2.0), + librevenge-dev, zlib1g-dev, ${misc:Depends} Description: library for reading and converting Corel DRAW files -- development @@ -62,7 +61,7 @@ . This package contains the documentation -Package: libcdr-0.0-0 +Package: libcdr-0.1-1 Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends} Description: library for reading and converting Corel DRAW files diff -Nru libcdr-0.0.15/debian/copyright libcdr-0.1.0/debian/copyright --- libcdr-0.0.15/debian/copyright 2013-02-27 20:30:48.000000000 +0000 +++ libcdr-0.1.0/debian/copyright 2014-06-08 09:04:06.000000000 +0000 @@ -5,11 +5,372 @@ Files: * Copyright: Copyright (C) 2011 Fridrich Strba Copyright (C) 2011 Eilidh McAdam -License: MPL-1.1 | GPL-2+ | LGPL-2+ - On Debian systems, you can find the full text of the GPL in - /usr/share/common-licenses/GPL and of the LGPL in - /usr/share/common-licenses/LGPL +License: MPL-2.0 + Mozilla Public License Version 2.0 + ================================== + . + 1. Definitions + -------------- + . + 1.1. "Contributor" + means each individual or legal entity that creates, contributes to + the creation of, or owns Covered Software. + . + 1.2. "Contributor Version" + means the combination of the Contributions of others (if any) used + by a Contributor and that particular Contributor's Contribution. + . + 1.3. "Contribution" + means Covered Software of a particular Contributor. + . + 1.4. "Covered Software" + means Source Code Form to which the initial Contributor has attached + the notice in Exhibit A, the Executable Form of such Source Code + Form, and Modifications of such Source Code Form, in each case + including portions thereof. + . + 1.5. "Incompatible With Secondary Licenses" + means + . + (a) that the initial Contributor has attached the notice described + in Exhibit B to the Covered Software; or + . + (b) that the Covered Software was made available under the terms of + version 1.1 or earlier of the License, but not also under the + terms of a Secondary License. + . + 1.6. "Executable Form" + means any form of the work other than Source Code Form. + . + 1.7. "Larger Work" + means a work that combines Covered Software with other material, in + a separate file or files, that is not Covered Software. + . + 1.8. "License" + means this document. + . + 1.9. "Licensable" + means having the right to grant, to the maximum extent possible, + whether at the time of the initial grant or subsequently, any and + all of the rights conveyed by this License. + . + 1.10. "Modifications" + means any of the following: + . + (a) any file in Source Code Form that results from an addition to, + deletion from, or modification of the contents of Covered + Software; or + . + (b) any new file in Source Code Form that contains any Covered + Software. + . + 1.11. "Patent Claims" of a Contributor + means any patent claim(s), including without limitation, method, + process, and apparatus claims, in any patent Licensable by such + Contributor that would be infringed, but for the grant of the + License, by the making, using, selling, offering for sale, having + made, import, or transfer of either its Contributions or its + Contributor Version. + . + 1.12. "Secondary License" + means either the GNU General Public License, Version 2.0, the GNU + Lesser General Public License, Version 2.1, the GNU Affero General + Public License, Version 3.0, or any later versions of those + licenses. + . + 1.13. "Source Code Form" + means the form of the work preferred for making modifications. + . + 1.14. "You" (or "Your") + means an individual or a legal entity exercising rights under this + License. For legal entities, "You" includes any entity that + controls, is controlled by, or is under common control with You. For + purposes of this definition, "control" means (a) the power, direct + or indirect, to cause the direction or management of such entity, + whether by contract or otherwise, or (b) ownership of more than + fifty percent (50%) of the outstanding shares or beneficial + ownership of such entity. + . + 2. License Grants and Conditions + -------------------------------- + . + 2.1. Grants + . + Each Contributor hereby grants You a world-wide, royalty-free, + non-exclusive license: + . + (a) under intellectual property rights (other than patent or trademark) + Licensable by such Contributor to use, reproduce, make available, + modify, display, perform, distribute, and otherwise exploit its + Contributions, either on an unmodified basis, with Modifications, or + as part of a Larger Work; and + . + (b) under Patent Claims of such Contributor to make, use, sell, offer + for sale, have made, import, and otherwise transfer either its + Contributions or its Contributor Version. + . + 2.2. Effective Date + . + The licenses granted in Section 2.1 with respect to any Contribution + become effective for each Contribution on the date the Contributor first + distributes such Contribution. + . + 2.3. Limitations on Grant Scope + . + The licenses granted in this Section 2 are the only rights granted under + this License. No additional rights or licenses will be implied from the + distribution or licensing of Covered Software under this License. + Notwithstanding Section 2.1(b) above, no patent license is granted by a + Contributor: + . + (a) for any code that a Contributor has removed from Covered Software; + or + . + (b) for infringements caused by: (i) Your and any other third party's + modifications of Covered Software, or (ii) the combination of its + Contributions with other software (except as part of its Contributor + Version); or + . + (c) under Patent Claims infringed by Covered Software in the absence of + its Contributions. + . + This License does not grant any rights in the trademarks, service marks, + or logos of any Contributor (except as may be necessary to comply with + the notice requirements in Section 3.4). + . + 2.4. Subsequent Licenses + . + No Contributor makes additional grants as a result of Your choice to + distribute the Covered Software under a subsequent version of this + License (see Section 10.2) or under the terms of a Secondary License (if + permitted under the terms of Section 3.3). + . + 2.5. Representation + . + Each Contributor represents that the Contributor believes its + Contributions are its original creation(s) or it has sufficient rights + to grant the rights to its Contributions conveyed by this License. + . + 2.6. Fair Use + . + This License is not intended to limit any rights You have under + applicable copyright doctrines of fair use, fair dealing, or other + equivalents. + . + 2.7. Conditions + . + Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted + in Section 2.1. + . + 3. Responsibilities + ------------------- + . + 3.1. Distribution of Source Form + . + All distribution of Covered Software in Source Code Form, including any + Modifications that You create or to which You contribute, must be under + the terms of this License. You must inform recipients that the Source + Code Form of the Covered Software is governed by the terms of this + License, and how they can obtain a copy of this License. You may not + attempt to alter or restrict the recipients' rights in the Source Code + Form. + . + 3.2. Distribution of Executable Form + . + If You distribute Covered Software in Executable Form then: + . + (a) such Covered Software must also be made available in Source Code + Form, as described in Section 3.1, and You must inform recipients of + the Executable Form how they can obtain a copy of such Source Code + Form by reasonable means in a timely manner, at a charge no more + than the cost of distribution to the recipient; and + . + (b) You may distribute such Executable Form under the terms of this + License, or sublicense it under different terms, provided that the + license for the Executable Form does not attempt to limit or alter + the recipients' rights in the Source Code Form under this License. + . + 3.3. Distribution of a Larger Work + . + You may create and distribute a Larger Work under terms of Your choice, + provided that You also comply with the requirements of this License for + the Covered Software. If the Larger Work is a combination of Covered + Software with a work governed by one or more Secondary Licenses, and the + Covered Software is not Incompatible With Secondary Licenses, this + License permits You to additionally distribute such Covered Software + under the terms of such Secondary License(s), so that the recipient of + the Larger Work may, at their option, further distribute the Covered + Software under the terms of either this License or such Secondary + License(s). + . + 3.4. Notices + . + You may not remove or alter the substance of any license notices + (including copyright notices, patent notices, disclaimers of warranty, + or limitations of liability) contained within the Source Code Form of + the Covered Software, except that You may alter any license notices to + the extent required to remedy known factual inaccuracies. + . + 3.5. Application of Additional Terms + . + You may choose to offer, and to charge a fee for, warranty, support, + indemnity or liability obligations to one or more recipients of Covered + Software. However, You may do so only on Your own behalf, and not on + behalf of any Contributor. You must make it absolutely clear that any + such warranty, support, indemnity, or liability obligation is offered by + You alone, and You hereby agree to indemnify every Contributor for any + liability incurred by such Contributor as a result of warranty, support, + indemnity or liability terms You offer. You may include additional + disclaimers of warranty and limitations of liability specific to any + jurisdiction. + . + 4. Inability to Comply Due to Statute or Regulation + --------------------------------------------------- + . + If it is impossible for You to comply with any of the terms of this + License with respect to some or all of the Covered Software due to + statute, judicial order, or regulation then You must: (a) comply with + the terms of this License to the maximum extent possible; and (b) + describe the limitations and the code they affect. Such description must + be placed in a text file included with all distributions of the Covered + Software under this License. Except to the extent prohibited by statute + or regulation, such description must be sufficiently detailed for a + recipient of ordinary skill to be able to understand it. + . + 5. Termination + -------------- + . + 5.1. The rights granted under this License will terminate automatically + if You fail to comply with any of its terms. However, if You become + compliant, then the rights granted under this License from a particular + Contributor are reinstated (a) provisionally, unless and until such + Contributor explicitly and finally terminates Your grants, and (b) on an + ongoing basis, if such Contributor fails to notify You of the + non-compliance by some reasonable means prior to 60 days after You have + come back into compliance. Moreover, Your grants from a particular + Contributor are reinstated on an ongoing basis if such Contributor + notifies You of the non-compliance by some reasonable means, this is the + first time You have received notice of non-compliance with this License + from such Contributor, and You become compliant prior to 30 days after + Your receipt of the notice. + . + 5.2. If You initiate litigation against any entity by asserting a patent + infringement claim (excluding declaratory judgment actions, + counter-claims, and cross-claims) alleging that a Contributor Version + directly or indirectly infringes any patent, then the rights granted to + You by any and all Contributors for the Covered Software under Section + 2.1 of this License shall terminate. + . + 5.3. In the event of termination under Sections 5.1 or 5.2 above, all + end user license agreements (excluding distributors and resellers) which + have been validly granted by You or Your distributors under this License + prior to termination shall survive termination. + . + ************************************************************************ + * * + * 6. Disclaimer of Warranty * + * ------------------------- * + * * + * Covered Software is provided under this License on an "as is" * + * basis, without warranty of any kind, either expressed, implied, or * + * statutory, including, without limitation, warranties that the * + * Covered Software is free of defects, merchantable, fit for a * + * particular purpose or non-infringing. The entire risk as to the * + * quality and performance of the Covered Software is with You. * + * Should any Covered Software prove defective in any respect, You * + * (not any Contributor) assume the cost of any necessary servicing, * + * repair, or correction. This disclaimer of warranty constitutes an * + * essential part of this License. No use of any Covered Software is * + * authorized under this License except under this disclaimer. * + * * + ************************************************************************ + . + ************************************************************************ + * * + * 7. Limitation of Liability * + * -------------------------- * + * * + * Under no circumstances and under no legal theory, whether tort * + * (including negligence), contract, or otherwise, shall any * + * Contributor, or anyone who distributes Covered Software as * + * permitted above, be liable to You for any direct, indirect, * + * special, incidental, or consequential damages of any character * + * including, without limitation, damages for lost profits, loss of * + * goodwill, work stoppage, computer failure or malfunction, or any * + * and all other commercial damages or losses, even if such party * + * shall have been informed of the possibility of such damages. This * + * limitation of liability shall not apply to liability for death or * + * personal injury resulting from such party's negligence to the * + * extent applicable law prohibits such limitation. Some * + * jurisdictions do not allow the exclusion or limitation of * + * incidental or consequential damages, so this exclusion and * + * limitation may not apply to You. * + * * + ************************************************************************ + . + 8. Litigation + ------------- + . + Any litigation relating to this License may be brought only in the + courts of a jurisdiction where the defendant maintains its principal + place of business and such litigation shall be governed by laws of that + jurisdiction, without reference to its conflict-of-law provisions. + Nothing in this Section shall prevent a party's ability to bring + cross-claims or counter-claims. + . + 9. Miscellaneous + ---------------- + . + This License represents the complete agreement concerning the subject + matter hereof. If any provision of this License is held to be + unenforceable, such provision shall be reformed only to the extent + necessary to make it enforceable. Any law or regulation which provides + that the language of a contract shall be construed against the drafter + shall not be used to construe this License against a Contributor. + . + 10. Versions of the License + --------------------------- + . + 10.1. New Versions + . + Mozilla Foundation is the license steward. Except as provided in Section + 10.3, no one other than the license steward has the right to modify or + publish new versions of this License. Each version will be given a + distinguishing version number. + . + 10.2. Effect of New Versions + . + You may distribute the Covered Software under the terms of the version + of the License under which You originally received the Covered Software, + or under the terms of any subsequent version published by the license + steward. + . + 10.3. Modified Versions + . + If you create software not governed by this License, and you want to + create a new license for such software, you may create and use a + modified version of this License if you rename the license and remove + any references to the name of the license steward (except to note that + such modified license differs from this License). + . + 10.4. Distributing Source Code Form that is Incompatible With Secondary + Licenses + . + If You choose to distribute Source Code Form that is Incompatible With + Secondary Licenses under the terms of this version of the License, the + notice described in Exhibit B of this License must be attached. + . + Exhibit A - Source Code Form License Notice + ------------------------------------------- + . + 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/. + . + If it is not possible or desirable to put the notice in a particular + file, then You may include the notice in a location (such as a LICENSE + file in a relevant directory) where a recipient would be likely to look + for such a notice. + . + You may add additional accurate notices of copyright ownership. -Files: docs/doxygen/html/jquery.js -Copyright: Copyright (c) 2009 John Resig -License: MIT | GPL-2 diff -Nru libcdr-0.0.15/debian/libcdr-0.0-0.install libcdr-0.1.0/debian/libcdr-0.0-0.install --- libcdr-0.0.15/debian/libcdr-0.0-0.install 2013-02-27 20:30:48.000000000 +0000 +++ libcdr-0.1.0/debian/libcdr-0.0-0.install 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -usr/lib/lib*.so.* diff -Nru libcdr-0.0.15/debian/libcdr-0.1-1.install libcdr-0.1.0/debian/libcdr-0.1-1.install --- libcdr-0.0.15/debian/libcdr-0.1-1.install 1970-01-01 00:00:00.000000000 +0000 +++ libcdr-0.1.0/debian/libcdr-0.1-1.install 2014-05-23 19:13:40.000000000 +0000 @@ -0,0 +1 @@ +usr/lib/lib*.so.* diff -Nru libcdr-0.0.15/debian/rules libcdr-0.1.0/debian/rules --- libcdr-0.0.15/debian/rules 2013-03-04 19:15:04.000000000 +0000 +++ libcdr-0.1.0/debian/rules 2014-06-08 08:47:27.000000000 +0000 @@ -4,7 +4,7 @@ #export DH_VERBOSE=1 %: - dh $@ + dh $@ --with autoreconf override_dh_auto_configure: dh_auto_configure -- --docdir=/usr/share/doc/libcdr-doc --libdir=/usr/lib \ diff -Nru libcdr-0.0.15/docs/doxygen/Makefile.in libcdr-0.1.0/docs/doxygen/Makefile.in --- libcdr-0.0.15/docs/doxygen/Makefile.in 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/docs/doxygen/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -164,6 +164,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -197,16 +198,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libcdr-0.0.15/docs/Makefile.in libcdr-0.1.0/docs/Makefile.in --- libcdr-0.0.15/docs/Makefile.in 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/docs/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -224,6 +224,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -257,16 +258,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libcdr-0.0.15/inc/libcdr/CDRDocument.h libcdr-0.1.0/inc/libcdr/CDRDocument.h --- libcdr-0.0.15/inc/libcdr/CDRDocument.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/inc/libcdr/CDRDocument.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,41 +1,17 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CDRDOCUMENT_H__ #define __CDRDOCUMENT_H__ -#include -#include -#include "CDRStringVector.h" - -class WPXInputStream; +#include +#include "libcdr_api.h" namespace libcdr { @@ -43,11 +19,9 @@ { public: - static bool isSupported(WPXInputStream *input); - - static bool parse(WPXInputStream *input, libwpg::WPGPaintInterface *painter); + static CDRAPI bool isSupported(librevenge::RVNGInputStream *input); - static bool generateSVG(WPXInputStream *input, CDRStringVector &output); + static CDRAPI bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter); }; } // namespace libcdr diff -Nru libcdr-0.0.15/inc/libcdr/CDRStringVector.h libcdr-0.1.0/inc/libcdr/CDRStringVector.h --- libcdr-0.0.15/inc/libcdr/CDRStringVector.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/inc/libcdr/CDRStringVector.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,60 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. - */ - -#ifndef __CDRSTRINGVECTOR_H__ -#define __CDRSTRINGVECTOR_H__ - -#include - -namespace libcdr -{ -class CDRStringVectorImpl; - -class CDRStringVector -{ -public: - CDRStringVector(); - CDRStringVector(const CDRStringVector &vec); - ~CDRStringVector(); - - CDRStringVector &operator=(const CDRStringVector &vec); - - unsigned size() const; - bool empty() const; - const WPXString &operator[](unsigned idx) const; - void append(const WPXString &str); - void clear(); - -private: - CDRStringVectorImpl *m_pImpl; -}; - -} // namespace libcdr - -#endif /* __CDRSTRINGVECTOR_H__ */ -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/inc/libcdr/CMXDocument.h libcdr-0.1.0/inc/libcdr/CMXDocument.h --- libcdr-0.0.15/inc/libcdr/CMXDocument.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/inc/libcdr/CMXDocument.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,39 +1,17 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CMXDOCUMENT_H__ #define __CMXDOCUMENT_H__ -#include -#include -#include "CDRStringVector.h" - -class WPXInputStream; +#include +#include "libcdr_api.h" namespace libcdr { @@ -41,11 +19,9 @@ { public: - static bool isSupported(WPXInputStream *input); - - static bool parse(WPXInputStream *input, libwpg::WPGPaintInterface *painter); + static CDRAPI bool isSupported(librevenge::RVNGInputStream *input); - static bool generateSVG(WPXInputStream *input, CDRStringVector &output); + static CDRAPI bool parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter); }; } // namespace libcdr diff -Nru libcdr-0.0.15/inc/libcdr/libcdr_api.h libcdr-0.1.0/inc/libcdr/libcdr_api.h --- libcdr-0.0.15/inc/libcdr/libcdr_api.h 1970-01-01 00:00:00.000000000 +0000 +++ libcdr-0.1.0/inc/libcdr/libcdr_api.h 2014-03-29 10:23:47.000000000 +0000 @@ -0,0 +1,24 @@ +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ +/* + * This file is part of the libcdr project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef __LIBCDR_API_H__ +#define __LIBCDR_API_H__ + +#ifdef DLL_EXPORT +#ifdef LIBCDR_BUILD +#define CDRAPI __declspec(dllexport) +#else +#define CDRAPI __declspec(dllimport) +#endif +#else +#define CDRAPI +#endif + +#endif +/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/inc/libcdr/libcdr.h libcdr-0.1.0/inc/libcdr/libcdr.h --- libcdr-0.0.15/inc/libcdr/libcdr.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/inc/libcdr/libcdr.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,31 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __LIBCDR_H__ @@ -33,8 +12,6 @@ #include "CDRDocument.h" #include "CMXDocument.h" -#include -#include #endif /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/inc/libcdr/Makefile.am libcdr-0.1.0/inc/libcdr/Makefile.am --- libcdr-0.0.15/inc/libcdr/Makefile.am 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/inc/libcdr/Makefile.am 2014-03-29 10:23:47.000000000 +0000 @@ -1,5 +1,5 @@ EXTRA_DIST = \ libcdr.h \ + libcdr_api.h \ CDRDocument.h \ - CDRStringVector.h \ CMXDocument.h diff -Nru libcdr-0.0.15/inc/libcdr/Makefile.in libcdr-0.1.0/inc/libcdr/Makefile.in --- libcdr-0.0.15/inc/libcdr/Makefile.in 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/inc/libcdr/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -164,6 +164,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -197,16 +198,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -264,8 +267,8 @@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ libcdr.h \ + libcdr_api.h \ CDRDocument.h \ - CDRStringVector.h \ CMXDocument.h all: all-am diff -Nru libcdr-0.0.15/inc/Makefile.in libcdr-0.1.0/inc/Makefile.in --- libcdr-0.0.15/inc/Makefile.in 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/inc/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -224,6 +224,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -257,16 +258,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ diff -Nru libcdr-0.0.15/libcdr.pc.in libcdr-0.1.0/libcdr.pc.in --- libcdr-0.0.15/libcdr.pc.in 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/libcdr.pc.in 2014-04-16 17:06:20.000000000 +0000 @@ -6,6 +6,8 @@ Name: libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@ Description: Library for parsing the Corel Draw file format structure Version: @VERSION@ -Requires: libwpd-0.9 libwpd-stream-0.9 libwpg-0.2 +Requires: librevenge-0.0 librevenge-stream-0.0 Libs: -L${libdir} -lcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@ Cflags: -I${includedir}/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@ + +Requires.private: icu-i18n lcms2 zlib diff -Nru libcdr-0.0.15/libcdr.spec libcdr-0.1.0/libcdr.spec --- libcdr-0.0.15/libcdr.spec 2014-04-04 13:40:12.000000000 +0000 +++ libcdr-0.1.0/libcdr.spec 2014-05-23 15:04:50.000000000 +0000 @@ -1,5 +1,5 @@ %define name libcdr -%define version 0.0.15 +%define version 0.1.0 %define RELEASE 1 %define release %{?CUSTOM_RELEASE} %{!?CUSTOM_RELEASE:%RELEASE} @@ -11,8 +11,8 @@ Group: System Environment/Libraries URL: http://libcdr.sf.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot -BuildRequires: libwpd-devel >= 0.9.0, gcc-c++, libstdc++-devel, pkgconfig >= 0.9.0 -License: LGPL +BuildRequires: librevenge-devel >= 0.9.0, gcc-c++, libstdc++-devel, pkgconfig >= 0.9.0 +License: MPL-2.0 Prefix: %{prefix} %description @@ -29,7 +29,7 @@ %package devel Requires: %{name} >= %{version} -Requires: libwpd-devel >= 0.9.0 +Requires: librevenge-devel >= 0.9.0 Summary: Files for developing with libcdr. Group: Development/Libraries @@ -81,7 +81,7 @@ %defattr(644,root,root,755) %{_libdir}/libcdr*.so %{_libdir}/pkgconfig/libcdr*.pc -%{_includedir}/libcdr-0.0/libcdr +%{_includedir}/libcdr-0.1/libcdr %if %{!?_without_docs:1}%{?_without_docs:0} %files docs diff -Nru libcdr-0.0.15/libcdr.spec.in libcdr-0.1.0/libcdr.spec.in --- libcdr-0.0.15/libcdr.spec.in 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/libcdr.spec.in 2014-04-16 17:06:20.000000000 +0000 @@ -11,8 +11,8 @@ Group: System Environment/Libraries URL: http://libcdr.sf.net/ BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot -BuildRequires: libwpd-devel >= 0.9.0, gcc-c++, libstdc++-devel, pkgconfig >= 0.9.0 -License: LGPL +BuildRequires: librevenge-devel >= 0.9.0, gcc-c++, libstdc++-devel, pkgconfig >= 0.9.0 +License: MPL-2.0 Prefix: %{prefix} %description @@ -29,7 +29,7 @@ %package devel Requires: %{name} >= %{version} -Requires: libwpd-devel >= 0.9.0 +Requires: librevenge-devel >= 0.9.0 Summary: Files for developing with libcdr. Group: Development/Libraries diff -Nru libcdr-0.0.15/m4/libtool.m4 libcdr-0.1.0/m4/libtool.m4 --- libcdr-0.0.15/m4/libtool.m4 2014-04-04 11:59:26.000000000 +0000 +++ libcdr-0.1.0/m4/libtool.m4 2014-03-29 10:28:53.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 libcdr-0.0.15/Makefile.am libcdr-0.1.0/Makefile.am --- libcdr-0.0.15/Makefile.am 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/Makefile.am 2014-03-29 10:23:47.000000000 +0000 @@ -8,8 +8,6 @@ EXTRA_DIST = \ AUTHORS \ - COPYING.GPL \ - COPYING.LGPL \ COPYING.MPL \ NEWS \ README \ diff -Nru libcdr-0.0.15/Makefile.in libcdr-0.1.0/Makefile.in --- libcdr-0.0.15/Makefile.in 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -83,8 +83,8 @@ $(top_srcdir)/configure $(am__configure_deps) \ $(srcdir)/config.h.in $(srcdir)/libcdr.pc.in \ $(srcdir)/libcdr.spec.in $(srcdir)/libcdr-zip.in AUTHORS NEWS \ - README ar-lib compile 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 \ @@ -279,6 +279,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -312,16 +313,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -383,8 +386,6 @@ SUBDIRS = build inc src docs EXTRA_DIST = \ AUTHORS \ - COPYING.GPL \ - COPYING.LGPL \ COPYING.MPL \ NEWS \ README \ @@ -434,8 +435,8 @@ $(am__aclocal_m4_deps): config.h: stamp-h1 - @test -f $@ || rm -f stamp-h1 - @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 + @if test ! -f $@; then rm -f stamp-h1; else :; fi + @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 @@ -670,16 +671,10 @@ $(am__post_remove_distdir) dist-tarZ: distdir - @echo WARNING: "Support for shar distribution archives is" \ - "deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir - @echo WARNING: "Support for distribution archives compressed with" \ - "legacy program 'compress' is deprecated." >&2 - @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) @@ -721,10 +716,9 @@ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ - && ../configure \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ - --srcdir=.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ diff -Nru libcdr-0.0.15/missing libcdr-0.1.0/missing --- libcdr-0.0.15/missing 2014-04-04 11:59:29.000000000 +0000 +++ libcdr-0.1.0/missing 2014-03-29 10:28:55.000000000 +0000 @@ -1,7 +1,7 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. @@ -160,7 +160,7 @@ ;; autom4te*) echo "You might have modified some maintainer files that require" - echo "the 'autom4te' program to be rebuilt." + echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) diff -Nru libcdr-0.0.15/NEWS libcdr-0.1.0/NEWS --- libcdr-0.0.15/NEWS 2011-12-05 11:28:08.000000000 +0000 +++ libcdr-0.1.0/NEWS 2014-05-23 15:03:48.000000000 +0000 @@ -0,0 +1,3 @@ +libcdr 0.1.0 + +* switch to librevenge diff -Nru libcdr-0.0.15/README libcdr-0.1.0/README --- libcdr-0.0.15/README 2013-10-16 20:23:55.000000000 +0000 +++ libcdr-0.1.0/README 2014-04-10 10:41:50.000000000 +0000 @@ -1,25 +1,13 @@ libcdr is a library and a set of tools for reading and converting binary files produced by Corel DRAW. -libcdr currently supports just CDR files from V7 to X3 and the following -features: - -- pages and page sizes -- shapes, lines, Bezier curves, bitmaps -- flat color fills, both RGB, CMYK, HLS and HSB -- different kinds of strokes including dashed strokes - -Above that libcdr provides a public API for rendering preview of pages for -applications that have no notion of pages themselves. - libcdr requires boost, icu, lcms2, libwpd, libwpg and zlib to build. Most up to date code is available from Git repository at libreoffice.org (https://gerrit.libreoffice.org/gitweb?p=libcdr.git), which is mirrored at freedesktop.org (http://cgit.freedesktop.org/libreoffice/libcdr/). See http://www.freedesktop.org/wiki/Software/libcdr for more information. -For convenience of use in third-party projects the library is available under -three licenses: GNU GPL 2.1+, GNU Lesser GPL 2.1+ and MPL 1.1+. +The library is available under MPL 2.0. Corel DRAW is a trademark by Corel. The developers of libcdr are in no way affiliated with the company. diff -Nru libcdr-0.0.15/src/conv/Makefile.am libcdr-0.1.0/src/conv/Makefile.am --- libcdr-0.0.15/src/conv/Makefile.am 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/conv/Makefile.am 2014-03-29 10:23:47.000000000 +0000 @@ -1,2 +1,5 @@ +if BUILD_TOOLS + SUBDIRS = raw svg text +endif diff -Nru libcdr-0.0.15/src/conv/Makefile.in libcdr-0.1.0/src/conv/Makefile.in --- libcdr-0.0.15/src/conv/Makefile.in 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/src/conv/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -144,7 +144,7 @@ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags -DIST_SUBDIRS = $(SUBDIRS) +DIST_SUBDIRS = raw svg text DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ @@ -224,6 +224,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -257,16 +258,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -322,7 +325,7 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -SUBDIRS = raw svg text +@BUILD_TOOLS_TRUE@SUBDIRS = raw svg text all: all-recursive .SUFFIXES: diff -Nru libcdr-0.0.15/src/conv/raw/cdr2raw.cpp libcdr-0.1.0/src/conv/raw/cdr2raw.cpp --- libcdr-0.0.15/src/conv/raw/cdr2raw.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/conv/raw/cdr2raw.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,221 +1,18 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include - +#include +#include +#include #include -#include -#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()); -} - namespace { @@ -225,6 +22,7 @@ printf("Usage: cdr2raw [OPTION] \n"); printf("\n"); printf("Options:\n"); + printf("--callgraph Display the call graph nesting level\n"); printf("--help Shows this help message\n"); return -1; } @@ -233,14 +31,17 @@ 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 (!file && strncmp(argv[i], "--", 2)) + if (!strcmp(argv[i], "--callgraph")) + printIndentLevel = true; + else if (!file && strncmp(argv[i], "--", 2)) file = argv[i]; else return printUsage(); @@ -249,7 +50,7 @@ if (!file) return printUsage(); - WPXFileStream input(file); + librevenge::RVNGFileStream input(file); if (!libcdr::CDRDocument::isSupported(&input)) { @@ -257,7 +58,7 @@ return 1; } - RawPainter painter; + librevenge::RVNGRawDrawingGenerator painter(printIndentLevel); libcdr::CDRDocument::parse(&input, &painter); return 0; diff -Nru libcdr-0.0.15/src/conv/raw/cmx2raw.cpp libcdr-0.1.0/src/conv/raw/cmx2raw.cpp --- libcdr-0.0.15/src/conv/raw/cmx2raw.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/conv/raw/cmx2raw.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,221 +1,18 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include - +#include +#include +#include #include -#include -#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()); -} - namespace { @@ -225,6 +22,7 @@ printf("Usage: cmx2raw [OPTION] \n"); printf("\n"); printf("Options:\n"); + printf("--callgraph Display the call graph nesting level\n"); printf("--help Shows this help message\n"); return -1; } @@ -233,14 +31,17 @@ 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 (!file && strncmp(argv[i], "--", 2)) + if (!strcmp(argv[i], "--callgraph")) + printIndentLevel = true; + else if (!file && strncmp(argv[i], "--", 2)) file = argv[i]; else return printUsage(); @@ -249,7 +50,7 @@ if (!file) return printUsage(); - WPXFileStream input(file); + librevenge::RVNGFileStream input(file); if (!libcdr::CMXDocument::isSupported(&input)) { @@ -257,7 +58,7 @@ return 1; } - RawPainter painter; + librevenge::RVNGRawDrawingGenerator painter(printIndentLevel); libcdr::CMXDocument::parse(&input, &painter); return 0; diff -Nru libcdr-0.0.15/src/conv/raw/Makefile.am libcdr-0.1.0/src/conv/raw/Makefile.am --- libcdr-0.0.15/src/conv/raw/Makefile.am 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/conv/raw/Makefile.am 2014-03-29 10:23:47.000000000 +0000 @@ -1,27 +1,34 @@ +if BUILD_TOOLS + bin_PROGRAMS = cdr2raw cmx2raw -AM_CXXFLAGS = -I$(top_srcdir)/inc $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS) +AM_CXXFLAGS = \ + -I$(top_srcdir)/inc \ + $(REVENGE_CFLAGS) \ + $(REVENGE_GENERATORS_CFLAGS) \ + $(REVENGE_STREAM_CFLAGS) \ + $(DEBUG_CXXFLAGS) cdr2raw_DEPENDENCIES = @CDR2RAW_WIN32_RESOURCE@ -if STATIC_TOOLS -cdr2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2RAW_WIN32_RESOURCE@ -cdr2raw_LDFLAGS = -all-static -else -cdr2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2RAW_WIN32_RESOURCE@ -endif +cdr2raw_LDADD = \ + ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ + $(REVENGE_GENERATORS_LIBS) \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ + @CDR2RAW_WIN32_RESOURCE@ cdr2raw_SOURCES = \ cdr2raw.cpp cmx2raw_DEPENDENCIES = @CMX2RAW_WIN32_RESOURCE@ -if STATIC_TOOLS -cmx2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2RAW_WIN32_RESOURCE@ -cmx2raw_LDFLAGS = -all-static -else -cmx2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2RAW_WIN32_RESOURCE@ -endif +cmx2raw_LDADD = \ + ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ + $(REVENGE_GENERATORS_LIBS) \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ + @CMX2RAW_WIN32_RESOURCE@ cmx2raw_SOURCES = \ cmx2raw.cpp @@ -47,3 +54,5 @@ BUILD_EXTRA_DIST = \ cdr2raw.rc \ cmx2raw.rc + +endif diff -Nru libcdr-0.0.15/src/conv/raw/Makefile.in libcdr-0.1.0/src/conv/raw/Makefile.in --- libcdr-0.0.15/src/conv/raw/Makefile.in 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/src/conv/raw/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -78,7 +78,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = cdr2raw$(EXEEXT) cmx2raw$(EXEEXT) +@BUILD_TOOLS_TRUE@bin_PROGRAMS = cdr2raw$(EXEEXT) cmx2raw$(EXEEXT) subdir = src/conv/raw DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/cdr2raw.rc.in $(srcdir)/cmx2raw.rc.in \ @@ -96,21 +96,17 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am_cdr2raw_OBJECTS = cdr2raw.$(OBJEXT) +am__cdr2raw_SOURCES_DIST = cdr2raw.cpp +@BUILD_TOOLS_TRUE@am_cdr2raw_OBJECTS = cdr2raw.$(OBJEXT) cdr2raw_OBJECTS = $(am_cdr2raw_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 = -cdr2raw_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(cdr2raw_LDFLAGS) $(LDFLAGS) -o $@ -am_cmx2raw_OBJECTS = cmx2raw.$(OBJEXT) +am__cmx2raw_SOURCES_DIST = cmx2raw.cpp +@BUILD_TOOLS_TRUE@am_cmx2raw_OBJECTS = cmx2raw.$(OBJEXT) cmx2raw_OBJECTS = $(am_cmx2raw_OBJECTS) -cmx2raw_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(cmx2raw_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 @@ -146,7 +142,7 @@ am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(cdr2raw_SOURCES) $(cmx2raw_SOURCES) -DIST_SOURCES = $(cdr2raw_SOURCES) $(cmx2raw_SOURCES) +DIST_SOURCES = $(am__cdr2raw_SOURCES_DIST) $(am__cmx2raw_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -225,6 +221,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -258,16 +255,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -323,32 +322,46 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CXXFLAGS = -I$(top_srcdir)/inc $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS) -cdr2raw_DEPENDENCIES = @CDR2RAW_WIN32_RESOURCE@ -@STATIC_TOOLS_FALSE@cdr2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2RAW_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cdr2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2RAW_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cdr2raw_LDFLAGS = -all-static -cdr2raw_SOURCES = \ - cdr2raw.cpp - -cmx2raw_DEPENDENCIES = @CMX2RAW_WIN32_RESOURCE@ -@STATIC_TOOLS_FALSE@cmx2raw_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2RAW_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cmx2raw_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2RAW_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cmx2raw_LDFLAGS = -all-static -cmx2raw_SOURCES = \ - cmx2raw.cpp - -EXTRA_DIST = \ - $(cdr2raw_SOURCES) \ - $(cmx2raw_SOURCES) \ - cdr2raw.rc.in \ - cmx2raw.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@cdr2raw_DEPENDENCIES = @CDR2RAW_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@cdr2raw_LDADD = \ +@BUILD_TOOLS_TRUE@ ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ @CDR2RAW_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@cdr2raw_SOURCES = \ +@BUILD_TOOLS_TRUE@ cdr2raw.cpp + +@BUILD_TOOLS_TRUE@cmx2raw_DEPENDENCIES = @CMX2RAW_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@cmx2raw_LDADD = \ +@BUILD_TOOLS_TRUE@ ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ @CMX2RAW_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@cmx2raw_SOURCES = \ +@BUILD_TOOLS_TRUE@ cmx2raw.cpp + +@BUILD_TOOLS_TRUE@EXTRA_DIST = \ +@BUILD_TOOLS_TRUE@ $(cdr2raw_SOURCES) \ +@BUILD_TOOLS_TRUE@ $(cmx2raw_SOURCES) \ +@BUILD_TOOLS_TRUE@ cdr2raw.rc.in \ +@BUILD_TOOLS_TRUE@ cmx2raw.rc.in # These may be in the builddir too -BUILD_EXTRA_DIST = \ - cdr2raw.rc \ - cmx2raw.rc +@BUILD_TOOLS_TRUE@BUILD_EXTRA_DIST = \ +@BUILD_TOOLS_TRUE@ cdr2raw.rc \ +@BUILD_TOOLS_TRUE@ cmx2raw.rc all: all-am @@ -440,11 +453,11 @@ cdr2raw$(EXEEXT): $(cdr2raw_OBJECTS) $(cdr2raw_DEPENDENCIES) $(EXTRA_cdr2raw_DEPENDENCIES) @rm -f cdr2raw$(EXEEXT) - $(AM_V_CXXLD)$(cdr2raw_LINK) $(cdr2raw_OBJECTS) $(cdr2raw_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(cdr2raw_OBJECTS) $(cdr2raw_LDADD) $(LIBS) cmx2raw$(EXEEXT): $(cmx2raw_OBJECTS) $(cmx2raw_DEPENDENCIES) $(EXTRA_cmx2raw_DEPENDENCIES) @rm -f cmx2raw$(EXEEXT) - $(AM_V_CXXLD)$(cmx2raw_LINK) $(cmx2raw_OBJECTS) $(cmx2raw_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(cmx2raw_OBJECTS) $(cmx2raw_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -688,13 +701,13 @@ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS -@OS_WIN32_TRUE@@CDR2RAW_WIN32_RESOURCE@ : cdr2raw.rc $(cdr2raw_OBJECTS) -@OS_WIN32_TRUE@ chmod +x $(top_srcdir)/build/win32/*compile-resource -@OS_WIN32_TRUE@ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource cdr2raw.rc @CDR2RAW_WIN32_RESOURCE@ - -@OS_WIN32_TRUE@@CMX2RAW_WIN32_RESOURCE@ : cmx2raw.rc $(cmx2raw_OBJECTS) -@OS_WIN32_TRUE@ chmod +x $(top_srcdir)/build/win32/*compile-resource -@OS_WIN32_TRUE@ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource cmx2raw.rc @CMX2RAW_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@@CDR2RAW_WIN32_RESOURCE@ : cdr2raw.rc $(cdr2raw_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 cdr2raw.rc @CDR2RAW_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@@CMX2RAW_WIN32_RESOURCE@ : cmx2raw.rc $(cmx2raw_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 cmx2raw.rc @CMX2RAW_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 libcdr-0.0.15/src/conv/svg/cdr2xhtml.cpp libcdr-0.1.0/src/conv/svg/cdr2xhtml.cpp --- libcdr-0.0.15/src/conv/svg/cdr2xhtml.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/conv/svg/cdr2xhtml.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,40 +1,20 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include #include #include +#include +#include +#include #include -#include -#include namespace { @@ -68,7 +48,7 @@ if (!file) return printUsage(); - WPXFileStream input(file); + librevenge::RVNGFileStream input(file); if (!libcdr::CDRDocument::isSupported(&input)) { @@ -76,13 +56,13 @@ return 1; } - libcdr::CDRStringVector output; - if (!libcdr::CDRDocument::generateSVG(&input, output)) + librevenge::RVNGStringVector output; + librevenge::RVNGSVGDrawingGenerator generator(output, "svg"); + if (!libcdr::CDRDocument::parse(&input, &generator)) { std::cerr << "ERROR: SVG Generation failed!" << std::endl; return 1; } - if (output.empty()) { std::cerr << "ERROR: No SVG document generated!" << std::endl; diff -Nru libcdr-0.0.15/src/conv/svg/cmx2xhtml.cpp libcdr-0.1.0/src/conv/svg/cmx2xhtml.cpp --- libcdr-0.0.15/src/conv/svg/cmx2xhtml.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/conv/svg/cmx2xhtml.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,40 +1,20 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include #include #include +#include +#include +#include #include -#include -#include namespace { @@ -68,7 +48,7 @@ if (!file) return printUsage(); - WPXFileStream input(file); + librevenge::RVNGFileStream input(file); if (!libcdr::CMXDocument::isSupported(&input)) { @@ -76,13 +56,13 @@ return 1; } - libcdr::CDRStringVector output; - if (!libcdr::CMXDocument::generateSVG(&input, output)) + librevenge::RVNGStringVector output; + librevenge::RVNGSVGDrawingGenerator generator(output, "svg"); + if (!libcdr::CMXDocument::parse(&input, &generator)) { std::cerr << "ERROR: SVG Generation failed!" << std::endl; return 1; } - if (output.empty()) { std::cerr << "ERROR: No SVG document generated!" << std::endl; diff -Nru libcdr-0.0.15/src/conv/svg/Makefile.am libcdr-0.1.0/src/conv/svg/Makefile.am --- libcdr-0.0.15/src/conv/svg/Makefile.am 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/conv/svg/Makefile.am 2014-03-29 10:23:47.000000000 +0000 @@ -1,27 +1,32 @@ +if BUILD_TOOLS + bin_PROGRAMS = cdr2xhtml cmx2xhtml -AM_CXXFLAGS = -I$(top_srcdir)/inc $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS) +AM_CXXFLAGS = \ + -I$(top_srcdir)/inc \ + $(REVENGE_CFLAGS) \ + $(REVENGE_STREAM_CFLAGS) \ + $(DEBUG_CXXFLAGS) cdr2xhtml_DEPENDENCIES = @CDR2XHTML_WIN32_RESOURCE@ -if STATIC_TOOLS -cdr2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2XHTML_WIN32_RESOURCE@ -cdr2xhtml_LDFLAGS = -all-static -else -cdr2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2XHTML_WIN32_RESOURCE@ -endif +cdr2xhtml_LDADD = \ + ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ + @CDR2XHTML_WIN32_RESOURCE@ cdr2xhtml_SOURCES = \ cdr2xhtml.cpp cmx2xhtml_DEPENDENCIES = @CMX2XHTML_WIN32_RESOURCE@ -if STATIC_TOOLS -cmx2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2XHTML_WIN32_RESOURCE@ -cmx2xhtml_LDFLAGS = -all-static -else -cmx2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2XHTML_WIN32_RESOURCE@ -endif +cmx2xhtml_LDADD = \ + ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ + $(REVENGE_GENERATORS_LIBS) \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ + @CMX2XHTML_WIN32_RESOURCE@ cmx2xhtml_SOURCES = \ cmx2xhtml.cpp @@ -47,3 +52,5 @@ BUILD_EXTRA_DIST = \ cdr2xhtml.rc \ cmx2xhtml.rc + +endif diff -Nru libcdr-0.0.15/src/conv/svg/Makefile.in libcdr-0.1.0/src/conv/svg/Makefile.in --- libcdr-0.0.15/src/conv/svg/Makefile.in 2014-04-04 13:40:07.000000000 +0000 +++ libcdr-0.1.0/src/conv/svg/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -78,7 +78,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = cdr2xhtml$(EXEEXT) cmx2xhtml$(EXEEXT) +@BUILD_TOOLS_TRUE@bin_PROGRAMS = cdr2xhtml$(EXEEXT) cmx2xhtml$(EXEEXT) subdir = src/conv/svg DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/cdr2xhtml.rc.in $(srcdir)/cmx2xhtml.rc.in \ @@ -96,21 +96,17 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am_cdr2xhtml_OBJECTS = cdr2xhtml.$(OBJEXT) +am__cdr2xhtml_SOURCES_DIST = cdr2xhtml.cpp +@BUILD_TOOLS_TRUE@am_cdr2xhtml_OBJECTS = cdr2xhtml.$(OBJEXT) cdr2xhtml_OBJECTS = $(am_cdr2xhtml_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 = -cdr2xhtml_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(cdr2xhtml_LDFLAGS) $(LDFLAGS) -o $@ -am_cmx2xhtml_OBJECTS = cmx2xhtml.$(OBJEXT) +am__cmx2xhtml_SOURCES_DIST = cmx2xhtml.cpp +@BUILD_TOOLS_TRUE@am_cmx2xhtml_OBJECTS = cmx2xhtml.$(OBJEXT) cmx2xhtml_OBJECTS = $(am_cmx2xhtml_OBJECTS) -cmx2xhtml_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(cmx2xhtml_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 @@ -146,7 +142,8 @@ am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(cdr2xhtml_SOURCES) $(cmx2xhtml_SOURCES) -DIST_SOURCES = $(cdr2xhtml_SOURCES) $(cmx2xhtml_SOURCES) +DIST_SOURCES = $(am__cdr2xhtml_SOURCES_DIST) \ + $(am__cmx2xhtml_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -225,6 +222,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -258,16 +256,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -323,32 +323,44 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CXXFLAGS = -I$(top_srcdir)/inc $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS) -cdr2xhtml_DEPENDENCIES = @CDR2XHTML_WIN32_RESOURCE@ -@STATIC_TOOLS_FALSE@cdr2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2XHTML_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cdr2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2XHTML_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cdr2xhtml_LDFLAGS = -all-static -cdr2xhtml_SOURCES = \ - cdr2xhtml.cpp - -cmx2xhtml_DEPENDENCIES = @CMX2XHTML_WIN32_RESOURCE@ -@STATIC_TOOLS_FALSE@cmx2xhtml_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2XHTML_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cmx2xhtml_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2XHTML_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cmx2xhtml_LDFLAGS = -all-static -cmx2xhtml_SOURCES = \ - cmx2xhtml.cpp - -EXTRA_DIST = \ - $(cdr2xhtml_SOURCES) \ - $(cmx2xhtml_SOURCES) \ - cdr2xhtml.rc.in \ - cmx2xhtml.rc.in +@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@cdr2xhtml_DEPENDENCIES = @CDR2XHTML_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@cdr2xhtml_LDADD = \ +@BUILD_TOOLS_TRUE@ ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ @CDR2XHTML_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@cdr2xhtml_SOURCES = \ +@BUILD_TOOLS_TRUE@ cdr2xhtml.cpp + +@BUILD_TOOLS_TRUE@cmx2xhtml_DEPENDENCIES = @CMX2XHTML_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@cmx2xhtml_LDADD = \ +@BUILD_TOOLS_TRUE@ ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ @CMX2XHTML_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@cmx2xhtml_SOURCES = \ +@BUILD_TOOLS_TRUE@ cmx2xhtml.cpp + +@BUILD_TOOLS_TRUE@EXTRA_DIST = \ +@BUILD_TOOLS_TRUE@ $(cdr2xhtml_SOURCES) \ +@BUILD_TOOLS_TRUE@ $(cmx2xhtml_SOURCES) \ +@BUILD_TOOLS_TRUE@ cdr2xhtml.rc.in \ +@BUILD_TOOLS_TRUE@ cmx2xhtml.rc.in # These may be in the builddir too -BUILD_EXTRA_DIST = \ - cdr2xhtml.rc \ - cmx2xhtml.rc +@BUILD_TOOLS_TRUE@BUILD_EXTRA_DIST = \ +@BUILD_TOOLS_TRUE@ cdr2xhtml.rc \ +@BUILD_TOOLS_TRUE@ cmx2xhtml.rc all: all-am @@ -440,11 +452,11 @@ cdr2xhtml$(EXEEXT): $(cdr2xhtml_OBJECTS) $(cdr2xhtml_DEPENDENCIES) $(EXTRA_cdr2xhtml_DEPENDENCIES) @rm -f cdr2xhtml$(EXEEXT) - $(AM_V_CXXLD)$(cdr2xhtml_LINK) $(cdr2xhtml_OBJECTS) $(cdr2xhtml_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(cdr2xhtml_OBJECTS) $(cdr2xhtml_LDADD) $(LIBS) cmx2xhtml$(EXEEXT): $(cmx2xhtml_OBJECTS) $(cmx2xhtml_DEPENDENCIES) $(EXTRA_cmx2xhtml_DEPENDENCIES) @rm -f cmx2xhtml$(EXEEXT) - $(AM_V_CXXLD)$(cmx2xhtml_LINK) $(cmx2xhtml_OBJECTS) $(cmx2xhtml_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(cmx2xhtml_OBJECTS) $(cmx2xhtml_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -688,13 +700,13 @@ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS -@OS_WIN32_TRUE@@CDR2XHTML_WIN32_RESOURCE@ : cdr2xhtml.rc $(cdr2xhtml_OBJECTS) -@OS_WIN32_TRUE@ chmod +x $(top_srcdir)/build/win32/*compile-resource -@OS_WIN32_TRUE@ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource cdr2xhtml.rc @CDR2XHTML_WIN32_RESOURCE@ - -@OS_WIN32_TRUE@@CMX2XHTML_WIN32_RESOURCE@ : cmx2xhtml.rc $(cmx2xhtml_OBJECTS) -@OS_WIN32_TRUE@ chmod +x $(top_srcdir)/build/win32/*compile-resource -@OS_WIN32_TRUE@ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource cmx2xhtml.rc @CMX2XHTML_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@@CDR2XHTML_WIN32_RESOURCE@ : cdr2xhtml.rc $(cdr2xhtml_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 cdr2xhtml.rc @CDR2XHTML_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@@CMX2XHTML_WIN32_RESOURCE@ : cmx2xhtml.rc $(cmx2xhtml_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 cmx2xhtml.rc @CMX2XHTML_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 libcdr-0.0.15/src/conv/text/cdr2text.cpp libcdr-0.1.0/src/conv/text/cdr2text.cpp --- libcdr-0.0.15/src/conv/text/cdr2text.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/conv/text/cdr2text.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,82 +1,19 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include +#include +#include +#include #include -#include -#include - -class TextPainter : public libwpg::WPGPaintInterface -{ -public: - TextPainter(); - - void startGraphics(const ::WPXPropertyList &) {} - void endGraphics() {} - void startLayer(const ::WPXPropertyList &) {} - void endLayer() {} - void startEmbeddedGraphics(const ::WPXPropertyList &) {} - void endEmbeddedGraphics() {} - - void setStyle(const ::WPXPropertyList &, const ::WPXPropertyListVector &) {} - - void drawRectangle(const ::WPXPropertyList &) {} - void drawEllipse(const ::WPXPropertyList &) {} - void drawPolyline(const ::WPXPropertyListVector &) {} - void drawPolygon(const ::WPXPropertyListVector &) {} - void drawPath(const ::WPXPropertyListVector &) {} - void drawGraphicObject(const ::WPXPropertyList &, const ::WPXBinaryData &) {} - void startTextObject(const ::WPXPropertyList &, const ::WPXPropertyListVector &) {} - void endTextObject() {} - void startTextLine(const ::WPXPropertyList &) {} - void endTextLine(); - void startTextSpan(const ::WPXPropertyList &) {} - void endTextSpan() {} - void insertText(const ::WPXString &str); -}; - -TextPainter::TextPainter(): libwpg::WPGPaintInterface() -{ -} - -void TextPainter::insertText(const ::WPXString &str) -{ - printf("%s", str.cstr()); -} - -void TextPainter::endTextLine() -{ - printf("\n"); -} namespace { @@ -110,7 +47,7 @@ if (!file) return printUsage(); - WPXFileStream input(file); + librevenge::RVNGFileStream input(file); if (!libcdr::CDRDocument::isSupported(&input)) { @@ -118,13 +55,17 @@ return 1; } - TextPainter painter; + librevenge::RVNGStringVector pages; + librevenge::RVNGTextDrawingGenerator painter(pages); if (!libcdr::CDRDocument::parse(&input, &painter)) { fprintf(stderr, "ERROR: Parsing of document failed!\n"); return 1; } + for (unsigned i = 0; i != pages.size(); ++i) + printf("%s", pages[i].cstr()); + return 0; } diff -Nru libcdr-0.0.15/src/conv/text/cmx2text.cpp libcdr-0.1.0/src/conv/text/cmx2text.cpp --- libcdr-0.0.15/src/conv/text/cmx2text.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/conv/text/cmx2text.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,82 +1,18 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include - +#include +#include +#include #include -#include -#include - -class TextPainter : public libwpg::WPGPaintInterface -{ -public: - TextPainter(); - - void startGraphics(const ::WPXPropertyList &) {} - void endGraphics() {} - void startLayer(const ::WPXPropertyList &) {} - void endLayer() {} - void startEmbeddedGraphics(const ::WPXPropertyList &) {} - void endEmbeddedGraphics() {} - - void setStyle(const ::WPXPropertyList &, const ::WPXPropertyListVector &) {} - - void drawRectangle(const ::WPXPropertyList &) {} - void drawEllipse(const ::WPXPropertyList &) {} - void drawPolyline(const ::WPXPropertyListVector &) {} - void drawPolygon(const ::WPXPropertyListVector &) {} - void drawPath(const ::WPXPropertyListVector &) {} - void drawGraphicObject(const ::WPXPropertyList &, const ::WPXBinaryData &) {} - void startTextObject(const ::WPXPropertyList &, const ::WPXPropertyListVector &) {} - void endTextObject() {} - void startTextLine(const ::WPXPropertyList &) {} - void endTextLine(); - void startTextSpan(const ::WPXPropertyList &) {} - void endTextSpan() {} - void insertText(const ::WPXString &str); -}; - -TextPainter::TextPainter(): libwpg::WPGPaintInterface() -{ -} - -void TextPainter::insertText(const ::WPXString &str) -{ - printf("%s", str.cstr()); -} - -void TextPainter::endTextLine() -{ - printf("\n"); -} namespace { @@ -110,7 +46,7 @@ if (!file) return printUsage(); - WPXFileStream input(file); + librevenge::RVNGFileStream input(file); if (!libcdr::CDRDocument::isSupported(&input)) { @@ -118,13 +54,17 @@ return 1; } - TextPainter painter; + librevenge::RVNGStringVector pages; + librevenge::RVNGTextDrawingGenerator painter(pages); if (!libcdr::CDRDocument::parse(&input, &painter)) { fprintf(stderr, "ERROR: Parsing of document failed!\n"); return 1; } + for (unsigned i = 0; i != pages.size(); ++i) + printf("%s", pages[i].cstr()); + return 0; } diff -Nru libcdr-0.0.15/src/conv/text/Makefile.am libcdr-0.1.0/src/conv/text/Makefile.am --- libcdr-0.0.15/src/conv/text/Makefile.am 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/conv/text/Makefile.am 2014-03-29 10:23:47.000000000 +0000 @@ -1,27 +1,34 @@ +if BUILD_TOOLS + bin_PROGRAMS = cdr2text cmx2text -AM_CXXFLAGS = -I$(top_srcdir)/inc $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS) +AM_CXXFLAGS = \ + -I$(top_srcdir)/inc \ + $(REVENGE_CFLAGS) \ + $(REVENGE_GENERATORS_CFLAGS) \ + $(REVENGE_STREAM_CFLAGS) \ + $(DEBUG_CXXFLAGS) cdr2text_DEPENDENCIES = @CDR2TEXT_WIN32_RESOURCE@ -if STATIC_TOOLS -cdr2text_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2TEXT_WIN32_RESOURCE@ -cdr2text_LDFLAGS = -all-static -else -cdr2text_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2TEXT_WIN32_RESOURCE@ -endif +cdr2text_LDADD = \ + ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ + $(REVENGE_GENERATORS_LIBS) \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ + @CDR2TEXT_WIN32_RESOURCE@ cdr2text_SOURCES = \ cdr2text.cpp cmx2text_DEPENDENCIES = @CMX2TEXT_WIN32_RESOURCE@ -if STATIC_TOOLS -cmx2text_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2TEXT_WIN32_RESOURCE@ -cmx2text_LDFLAGS = -all-static -else -cmx2text_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2TEXT_WIN32_RESOURCE@ -endif +cmx2text_LDADD = \ + ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ + $(REVENGE_GENERATORS_LIBS) \ + $(REVENGE_LIBS) \ + $(REVENGE_STREAM_LIBS) \ + @CMX2TEXT_WIN32_RESOURCE@ cmx2text_SOURCES = \ cmx2text.cpp @@ -47,3 +54,5 @@ BUILD_EXTRA_DIST = \ cdr2text.rc \ cmx2text.rc + +endif diff -Nru libcdr-0.0.15/src/conv/text/Makefile.in libcdr-0.1.0/src/conv/text/Makefile.in --- libcdr-0.0.15/src/conv/text/Makefile.in 2014-04-04 13:40:07.000000000 +0000 +++ libcdr-0.1.0/src/conv/text/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -78,7 +78,7 @@ POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ -bin_PROGRAMS = cdr2text$(EXEEXT) cmx2text$(EXEEXT) +@BUILD_TOOLS_TRUE@bin_PROGRAMS = cdr2text$(EXEEXT) cmx2text$(EXEEXT) subdir = src/conv/text DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/cdr2text.rc.in $(srcdir)/cmx2text.rc.in \ @@ -96,21 +96,17 @@ CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) -am_cdr2text_OBJECTS = cdr2text.$(OBJEXT) +am__cdr2text_SOURCES_DIST = cdr2text.cpp +@BUILD_TOOLS_TRUE@am_cdr2text_OBJECTS = cdr2text.$(OBJEXT) cdr2text_OBJECTS = $(am_cdr2text_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 = -cdr2text_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(cdr2text_LDFLAGS) $(LDFLAGS) -o $@ -am_cmx2text_OBJECTS = cmx2text.$(OBJEXT) +am__cmx2text_SOURCES_DIST = cmx2text.cpp +@BUILD_TOOLS_TRUE@am_cmx2text_OBJECTS = cmx2text.$(OBJEXT) cmx2text_OBJECTS = $(am_cmx2text_OBJECTS) -cmx2text_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ - $(CXXFLAGS) $(cmx2text_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 @@ -146,7 +142,8 @@ am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = SOURCES = $(cdr2text_SOURCES) $(cmx2text_SOURCES) -DIST_SOURCES = $(cdr2text_SOURCES) $(cmx2text_SOURCES) +DIST_SOURCES = $(am__cdr2text_SOURCES_DIST) \ + $(am__cmx2text_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ @@ -225,6 +222,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -258,16 +256,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -323,32 +323,46 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -AM_CXXFLAGS = -I$(top_srcdir)/inc $(WPD_CFLAGS) $(WPG_CFLAGS) $(DEBUG_CXXFLAGS) -cdr2text_DEPENDENCIES = @CDR2TEXT_WIN32_RESOURCE@ -@STATIC_TOOLS_FALSE@cdr2text_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CDR2TEXT_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cdr2text_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CDR2TEXT_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cdr2text_LDFLAGS = -all-static -cdr2text_SOURCES = \ - cdr2text.cpp - -cmx2text_DEPENDENCIES = @CMX2TEXT_WIN32_RESOURCE@ -@STATIC_TOOLS_FALSE@cmx2text_LDADD = ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la $(WPD_LIBS) @CMX2TEXT_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cmx2text_LDADD = ../../lib/@CDR_OBJDIR@/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.a $(WPD_LIBS) @CMX2TEXT_WIN32_RESOURCE@ -@STATIC_TOOLS_TRUE@cmx2text_LDFLAGS = -all-static -cmx2text_SOURCES = \ - cmx2text.cpp - -EXTRA_DIST = \ - $(cdr2text_SOURCES) \ - $(cmx2text_SOURCES) \ - cdr2text.rc.in \ - cmx2text.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@cdr2text_DEPENDENCIES = @CDR2TEXT_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@cdr2text_LDADD = \ +@BUILD_TOOLS_TRUE@ ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ @CDR2TEXT_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@cdr2text_SOURCES = \ +@BUILD_TOOLS_TRUE@ cdr2text.cpp + +@BUILD_TOOLS_TRUE@cmx2text_DEPENDENCIES = @CMX2TEXT_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@cmx2text_LDADD = \ +@BUILD_TOOLS_TRUE@ ../../lib/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@.la \ +@BUILD_TOOLS_TRUE@ $(REVENGE_GENERATORS_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_LIBS) \ +@BUILD_TOOLS_TRUE@ $(REVENGE_STREAM_LIBS) \ +@BUILD_TOOLS_TRUE@ @CMX2TEXT_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@cmx2text_SOURCES = \ +@BUILD_TOOLS_TRUE@ cmx2text.cpp + +@BUILD_TOOLS_TRUE@EXTRA_DIST = \ +@BUILD_TOOLS_TRUE@ $(cdr2text_SOURCES) \ +@BUILD_TOOLS_TRUE@ $(cmx2text_SOURCES) \ +@BUILD_TOOLS_TRUE@ cdr2text.rc.in \ +@BUILD_TOOLS_TRUE@ cmx2text.rc.in # These may be in the builddir too -BUILD_EXTRA_DIST = \ - cdr2text.rc \ - cmx2text.rc +@BUILD_TOOLS_TRUE@BUILD_EXTRA_DIST = \ +@BUILD_TOOLS_TRUE@ cdr2text.rc \ +@BUILD_TOOLS_TRUE@ cmx2text.rc all: all-am @@ -440,11 +454,11 @@ cdr2text$(EXEEXT): $(cdr2text_OBJECTS) $(cdr2text_DEPENDENCIES) $(EXTRA_cdr2text_DEPENDENCIES) @rm -f cdr2text$(EXEEXT) - $(AM_V_CXXLD)$(cdr2text_LINK) $(cdr2text_OBJECTS) $(cdr2text_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(cdr2text_OBJECTS) $(cdr2text_LDADD) $(LIBS) cmx2text$(EXEEXT): $(cmx2text_OBJECTS) $(cmx2text_DEPENDENCIES) $(EXTRA_cmx2text_DEPENDENCIES) @rm -f cmx2text$(EXEEXT) - $(AM_V_CXXLD)$(cmx2text_LINK) $(cmx2text_OBJECTS) $(cmx2text_LDADD) $(LIBS) + $(AM_V_CXXLD)$(CXXLINK) $(cmx2text_OBJECTS) $(cmx2text_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) @@ -688,13 +702,13 @@ tags tags-am uninstall uninstall-am uninstall-binPROGRAMS -@OS_WIN32_TRUE@@CDR2TEXT_WIN32_RESOURCE@ : cdr2text.rc $(cdr2text_OBJECTS) -@OS_WIN32_TRUE@ chmod +x $(top_srcdir)/build/win32/*compile-resource -@OS_WIN32_TRUE@ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource cdr2text.rc @CDR2TEXT_WIN32_RESOURCE@ - -@OS_WIN32_TRUE@@CMX2TEXT_WIN32_RESOURCE@ : cmx2text.rc $(cmx2text_OBJECTS) -@OS_WIN32_TRUE@ chmod +x $(top_srcdir)/build/win32/*compile-resource -@OS_WIN32_TRUE@ WINDRES=@WINDRES@ $(top_srcdir)/build/win32/lt-compile-resource cmx2text.rc @CMX2TEXT_WIN32_RESOURCE@ +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@@CDR2TEXT_WIN32_RESOURCE@ : cdr2text.rc $(cdr2text_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 cdr2text.rc @CDR2TEXT_WIN32_RESOURCE@ + +@BUILD_TOOLS_TRUE@@OS_WIN32_TRUE@@CMX2TEXT_WIN32_RESOURCE@ : cmx2text.rc $(cmx2text_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 cmx2text.rc @CMX2TEXT_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 libcdr-0.0.15/src/lib/CDRCollector.cpp libcdr-0.1.0/src/lib/CDRCollector.cpp --- libcdr-0.0.15/src/lib/CDRCollector.cpp 2014-04-04 13:35:46.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRCollector.cpp 2014-04-10 10:41:50.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include @@ -89,7 +69,7 @@ cmsCloseProfile(tmpRGBProfile); } -void libcdr::CDRParserState::setColorTransform(WPXInputStream *input) +void libcdr::CDRParserState::setColorTransform(librevenge::RVNGInputStream *input) { if (!input) return; @@ -580,9 +560,9 @@ return (unsigned)((red << 16) | (green << 8) | blue); } -WPXString libcdr::CDRParserState::getRGBColorString(const libcdr::CDRColor &color) +librevenge::RVNGString libcdr::CDRParserState::getRGBColorString(const libcdr::CDRColor &color) { - WPXString tempString; + librevenge::RVNGString tempString; tempString.sprintf("#%.6x", _getRGBColor(color)); return tempString; } diff -Nru libcdr-0.0.15/src/lib/CDRCollector.h libcdr-0.1.0/src/lib/CDRCollector.h --- libcdr-0.0.15/src/lib/CDRCollector.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRCollector.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CDRCOLLECTOR_H__ @@ -33,8 +13,8 @@ #include #include #include -#include -#include +#include +#include #include #include "CDRTypes.h" #include "CDRPath.h" @@ -54,22 +34,22 @@ public: CDRParserState(); ~CDRParserState(); - std::map m_bmps; + std::map m_bmps; std::map m_patterns; - std::map m_vects; + std::map m_vects; std::vector m_pages; std::map m_documentPalette; std::map > m_texts; unsigned _getRGBColor(const CDRColor &color); unsigned getBMPColor(const CDRColor &color); - WPXString getRGBColorString(const CDRColor &color); + librevenge::RVNGString getRGBColorString(const CDRColor &color); cmsHTRANSFORM m_colorTransformCMYK2RGB; cmsHTRANSFORM m_colorTransformLab2RGB; cmsHTRANSFORM m_colorTransformRGB2RGB; void setColorTransform(const std::vector &profile); - void setColorTransform(WPXInputStream *input); + void setColorTransform(librevenge::RVNGInputStream *input); private: CDRParserState(const CDRParserState &); @@ -111,7 +91,7 @@ virtual void collectColorProfile(const std::vector &profile) = 0; virtual void collectBBox(double x0, double y0, double x1, double y1) = 0; virtual void collectSpnd(unsigned spnd) = 0; - virtual void collectVectorPattern(unsigned id, const WPXBinaryData &data) = 0; + virtual void collectVectorPattern(unsigned id, const librevenge::RVNGBinaryData &data) = 0; virtual void collectPaletteEntry(unsigned colorId, unsigned userId, const CDRColor &color) = 0; virtual void collectText(unsigned textId, unsigned styleId, const std::vector &data, const std::vector &charDescriptions, const std::map &styleOverrides) = 0; diff -Nru libcdr-0.0.15/src/lib/CDRColorPalettes.h libcdr-0.1.0/src/lib/CDRColorPalettes.h --- libcdr-0.0.15/src/lib/CDRColorPalettes.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRColorPalettes.h 2014-04-10 10:41:50.000000000 +0000 @@ -1,29 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * 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/. */ /* These palettes are necessary to be able to convert the colours from CorelDraw internal palettes, diff -Nru libcdr-0.0.15/src/lib/CDRContentCollector.cpp libcdr-0.1.0/src/lib/CDRContentCollector.cpp --- libcdr-0.0.15/src/lib/CDRContentCollector.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRContentCollector.cpp 2014-04-10 10:41:50.000000000 +0000 @@ -1,36 +1,16 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include #include +#include #include -#include "CDRSVGGenerator.h" #include "CDRContentCollector.h" #include "CDRInternalStream.h" #include "libcdr_utils.h" @@ -47,8 +27,8 @@ #define DUMP_VECT 0 #endif -libcdr::CDRContentCollector::CDRContentCollector(libcdr::CDRParserState &ps, libwpg::WPGPaintInterface *painter) : - m_painter(painter), +libcdr::CDRContentCollector::CDRContentCollector(libcdr::CDRParserState &ps, librevenge::RVNGDrawingInterface *painter) : + m_painter(painter), m_isDocumentStarted(false), m_isPageProperties(false), m_isPageStarted(false), m_ignorePage(false), m_page(ps.m_pages[0]), m_pageIndex(0), m_currentFillStyle(), m_currentLineStyle(), m_spnd(0), m_currentObjectLevel(0), m_currentGroupLevel(0), m_currentVectLevel(0), m_currentPageLevel(0), @@ -64,20 +44,43 @@ { if (m_isPageStarted) _endPage(); + if (m_isDocumentStarted) + _endDocument(); +} + +void libcdr::CDRContentCollector::_startDocument() +{ + if (m_isDocumentStarted) + return; + librevenge::RVNGPropertyList propList; + if (m_painter) + m_painter->startDocument(propList); + m_isDocumentStarted = true; +} + +void libcdr::CDRContentCollector::_endDocument() +{ + if (!m_isDocumentStarted) + return; + if (m_isPageStarted) + _endPage(); + if (m_painter) + m_painter->endDocument(); + m_isDocumentStarted = false; } void libcdr::CDRContentCollector::_startPage(double width, double height) { if (m_ignorePage) return; - WPXPropertyList propList; + if (!m_isDocumentStarted) + _startDocument(); + librevenge::RVNGPropertyList propList; propList.insert("svg:width", width); propList.insert("svg:height", height); if (m_painter) - { - m_painter->startGraphics(propList); - m_isPageStarted = true; - } + m_painter->startPage(propList); + m_isPageStarted = true; } void libcdr::CDRContentCollector::_endPage() @@ -90,7 +93,7 @@ m_contentOutputElements.pop(); } if (m_painter) - m_painter->endGraphics(); + m_painter->endPage(); m_isPageStarted = false; } @@ -117,7 +120,7 @@ { if (!m_isPageStarted && !m_currentVectLevel && !m_ignorePage) _startPage(m_page.width, m_page.height); - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; CDROutputElementList outputElement; // Since the CDR objects are drawn in reverse order, reverse the logic of groups too outputElement.addEndGroup(); @@ -185,11 +188,10 @@ double previousY = 0.0; double x = 0.0; double y = 0.0; - WPXPropertyList style; - WPXPropertyListVector gradient; - _fillProperties(style, gradient); + librevenge::RVNGPropertyList style; + _fillProperties(style); _lineProperties(style); - outputElement.addStyle(style, gradient); + outputElement.addStyle(style); m_currentPath.transform(m_currentTransforms); if (!m_groupTransforms.empty()) m_currentPath.transform(m_groupTransforms.top()); @@ -198,17 +200,17 @@ tmpTrafo = CDRTransform(1.0, 0.0, 0.0, 0.0, -1.0, m_page.height); m_currentPath.transform(tmpTrafo); - std::vector tmpPath; + std::vector tmpPath; - WPXPropertyListVector path; + librevenge::RVNGPropertyListVector path; m_currentPath.writeOut(path); bool isPathClosed = m_currentPath.isClosed(); - WPXPropertyListVector::Iter i(path); + librevenge::RVNGPropertyListVector::Iter i(path); for (i.rewind(); i.next();) { - if (!i()["libwpg:path-action"]) + if (!i()["librevenge:path-action"]) continue; if (i()["svg:x"] && i()["svg:y"]) { @@ -222,7 +224,7 @@ firstPoint = false; wasMove = true; } - else if (i()["libwpg:path-action"]->getStr() == "M") + else if (i()["librevenge:path-action"]->getStr() == "M") { // This is needed for a good generation of path from polygon if (CDR_ALMOST_ZERO(previousX - x) && CDR_ALMOST_ZERO(previousY - y)) @@ -235,8 +237,8 @@ { if ((CDR_ALMOST_ZERO(initialX - previousX) && CDR_ALMOST_ZERO(initialY - previousY)) || isPathClosed) { - WPXPropertyList node; - node.insert("libwpg:path-action", "Z"); + librevenge::RVNGPropertyList node; + node.insert("librevenge:path-action", "Z"); tmpPath.push_back(node); } } @@ -264,9 +266,9 @@ } } - else if (i()["libwpg:path-action"]->getStr() == "Z") + else if (i()["librevenge:path-action"]->getStr() == "Z") { - if (tmpPath.back()["libwpg:path-action"] && tmpPath.back()["libwpg:path-action"]->getStr() != "Z") + if (tmpPath.back()["librevenge:path-action"] && tmpPath.back()["librevenge:path-action"]->getStr() != "Z") tmpPath.push_back(i()); } } @@ -276,10 +278,10 @@ { if ((CDR_ALMOST_ZERO(initialX - previousX) && CDR_ALMOST_ZERO(initialY - previousY)) || isPathClosed) { - if (tmpPath.back()["libwpg:path-action"] && tmpPath.back()["libwpg:path-action"]->getStr() != "Z") + if (tmpPath.back()["librevenge:path-action"] && tmpPath.back()["librevenge:path-action"]->getStr() != "Z") { - WPXPropertyList closedPath; - closedPath.insert("libwpg:path-action", "Z"); + librevenge::RVNGPropertyList closedPath; + closedPath.insert("librevenge:path-action", "Z"); tmpPath.push_back(closedPath); } } @@ -289,11 +291,12 @@ } if (!tmpPath.empty()) { - WPXPropertyListVector outputPath; - for (std::vector::const_iterator iter = tmpPath.begin(); iter != tmpPath.end(); ++iter) + librevenge::RVNGPropertyListVector outputPath; + for (std::vector::const_iterator iter = tmpPath.begin(); iter != tmpPath.end(); ++iter) outputPath.append(*iter); - - outputElement.addPath(outputPath); + librevenge::RVNGPropertyList propList; + propList.insert("svg:d", outputPath); + outputElement.addPath(propList); } m_currentPath.clear(); @@ -336,7 +339,7 @@ double height = sqrt((corner2x - corner1x)*(corner2x - corner1x) + (corner2y - corner1y)*(corner2y - corner1y)); double rotate = atan2(corner3y-corner2y, corner3x-corner2x); - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; propList.insert("svg:x", cx - width / 2.0); propList.insert("svg:width", width); @@ -360,11 +363,11 @@ rotate -= 2.0*M_PI; if (rotate != 0.0) - propList.insert("libwpg:rotate", rotate * 180 / M_PI, WPX_GENERIC); - - propList.insert("libwpg:mime-type", "image/bmp"); + propList.insert("librevenge:rotate", rotate * 180 / M_PI, librevenge::RVNG_GENERIC); - outputElement.addGraphicObject(propList, m_currentImage.getImage()); + propList.insert("librevenge:mime-type", "image/bmp"); + propList.insert("office:binary-data", m_currentImage.getImage()); + outputElement.addGraphicObject(propList); } if (m_currentText && !m_currentText->empty()) { @@ -414,7 +417,7 @@ if (y1 > y2) std::swap(y1, y2); - WPXPropertyList textFrameProps; + librevenge::RVNGPropertyList textFrameProps; textFrameProps.insert("svg:width", fabs(x2-x1)); textFrameProps.insert("svg:height", fabs(y2-y1)); textFrameProps.insert("svg:x", x1); @@ -423,10 +426,10 @@ textFrameProps.insert("fo:padding-bottom", 0.0); textFrameProps.insert("fo:padding-left", 0.0); textFrameProps.insert("fo:padding-right", 0.0); - outputElement.addStartTextObject(textFrameProps, WPXPropertyListVector()); + outputElement.addStartTextObject(textFrameProps); for (unsigned i = 0; i < m_currentText->size(); ++i) { - WPXPropertyList paraProps; + librevenge::RVNGPropertyList paraProps; bool rtl = false; switch ((*m_currentText)[i].m_line[0].m_charStyle.m_align) { @@ -458,21 +461,21 @@ // paraProps.insert("fo:text-indent", (*m_currentText)[i].m_charStyle.m_firstIndent); // paraProps.insert("fo:margin-left", (*m_currentText)[i].m_charStyle.m_leftIndent); // paraProps.insert("fo:margin-right", (*m_currentText)[i].m_charStyle.m_rightIndent); - outputElement.addStartTextLine(paraProps); + outputElement.addOpenParagraph(paraProps); for (unsigned j = 0; j < (*m_currentText)[i].m_line.size(); ++j) { - WPXPropertyList spanProps; + librevenge::RVNGPropertyList spanProps; double fontSize = (double)cdr_round(144.0*(*m_currentText)[i].m_line[j].m_charStyle.m_fontSize) / 2.0; - spanProps.insert("fo:font-size", fontSize, WPX_POINT); + spanProps.insert("fo:font-size", fontSize, librevenge::RVNG_POINT); if ((*m_currentText)[i].m_line[j].m_charStyle.m_fontName.len()) spanProps.insert("style:font-name", (*m_currentText)[i].m_line[j].m_charStyle.m_fontName); if ((*m_currentText)[i].m_line[j].m_charStyle.m_fillStyle.fillType != (unsigned short)-1) spanProps.insert("fo:color", m_ps.getRGBColorString((*m_currentText)[i].m_line[j].m_charStyle.m_fillStyle.color1)); - outputElement.addStartTextSpan(spanProps); + outputElement.addOpenSpan(spanProps); outputElement.addInsertText((*m_currentText)[i].m_line[j].m_text); - outputElement.addEndTextSpan(); + outputElement.addCloseSpan(); } - outputElement.addEndTextLine(); + outputElement.addCloseParagraph(); } outputElement.addEndTextObject(); } @@ -507,7 +510,7 @@ } while (!m_groupLevels.empty() && level <= m_groupLevels.top()) { - WPXPropertyList propList; + librevenge::RVNGPropertyList propList; CDROutputElementList outputElement; // since the CDR objects are drawn in reverse order, reverse group marks too outputElement.addStartGroup(propList); @@ -517,28 +520,28 @@ } if (m_currentVectLevel && m_spnd && m_groupLevels.empty() && !m_fillOutputElements.empty()) { - CDRStringVector svgOutput; - CDRSVGGenerator generator(svgOutput); - WPXPropertyList propList; + librevenge::RVNGStringVector svgOutput; + librevenge::RVNGSVGDrawingGenerator generator(svgOutput, ""); + librevenge::RVNGPropertyList propList; propList.insert("svg:width", m_page.width); propList.insert("svg:height", m_page.height); - generator.startGraphics(propList); + generator.startPage(propList); while (!m_fillOutputElements.empty()) { m_fillOutputElements.top().draw(&generator); m_fillOutputElements.pop(); } - generator.endGraphics(); + generator.endPage(); if (!svgOutput.empty()) { const char *header = "\n\n"; - WPXBinaryData output((const unsigned char *)header, strlen(header)); + librevenge::RVNGBinaryData output((const unsigned char *)header, strlen(header)); output.append((unsigned char *)svgOutput[0].cstr(), strlen(svgOutput[0].cstr())); m_ps.m_vects[m_spnd] = output; } #if DUMP_VECT - WPXString filename; + librevenge::RVNGString filename; filename.sprintf("vect%.8x.svg", m_spnd); FILE *f = fopen(filename.cstr(), "wb"); if (f) @@ -607,10 +610,10 @@ m_polygon = new CDRPolygon(numAngles, nextPoint, rx, ry, cx, cy); } -void libcdr::CDRContentCollector::_fillProperties(WPXPropertyList &propList, WPXPropertyListVector &vec) +void libcdr::CDRContentCollector::_fillProperties(librevenge::RVNGPropertyList &propList) { if (m_fillOpacity < 1.0) - propList.insert("draw:opacity", m_fillOpacity, WPX_PERCENT); + propList.insert("draw:opacity", m_fillOpacity, librevenge::RVNG_PERCENT); if (m_currentFillStyle.fillType == 0) propList.insert("draw:fill", "none"); else @@ -657,19 +660,19 @@ while (angle > 360.0) angle -= 360.0; propList.insert("draw:angle", (int)angle); - propList.insert("draw:border", (double)(m_currentFillStyle.gradient.m_edgeOffset)/100.0, WPX_PERCENT); + propList.insert("draw:border", (double)(m_currentFillStyle.gradient.m_edgeOffset)/100.0, librevenge::RVNG_PERCENT); break; case 2: // radial - propList.insert("draw:border", (2.0 * (double)(m_currentFillStyle.gradient.m_edgeOffset)/100.0), WPX_PERCENT); + propList.insert("draw:border", (2.0 * (double)(m_currentFillStyle.gradient.m_edgeOffset)/100.0), librevenge::RVNG_PERCENT); propList.insert("draw:style", "radial"); - propList.insert("svg:cx", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), WPX_PERCENT); - propList.insert("svg:cy", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), WPX_PERCENT); + propList.insert("svg:cx", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), librevenge::RVNG_PERCENT); + propList.insert("svg:cy", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), librevenge::RVNG_PERCENT); break; case 4: // square - propList.insert("draw:border", (2.0 * (double)(m_currentFillStyle.gradient.m_edgeOffset)/100.0), WPX_PERCENT); + propList.insert("draw:border", (2.0 * (double)(m_currentFillStyle.gradient.m_edgeOffset)/100.0), librevenge::RVNG_PERCENT); propList.insert("draw:style", "square"); - propList.insert("svg:cx", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), WPX_PERCENT); - propList.insert("svg:cy", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), WPX_PERCENT); + propList.insert("svg:cx", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), librevenge::RVNG_PERCENT); + propList.insert("svg:cy", (double)(0.5 + m_currentFillStyle.gradient.m_centerXOffset/200.0), librevenge::RVNG_PERCENT); break; default: propList.insert("draw:style", "linear"); @@ -679,15 +682,17 @@ while (angle > 360.0) angle -= 360.0; propList.insert("draw:angle", (int)angle); + librevenge::RVNGPropertyListVector vec; for (unsigned i = 0; i < m_currentFillStyle.gradient.m_stops.size(); i++) { libcdr::CDRGradientStop &gradStop = m_currentFillStyle.gradient.m_stops[i]; - WPXPropertyList stopElement; - stopElement.insert("svg:offset", gradStop.m_offset, WPX_PERCENT); + librevenge::RVNGPropertyList stopElement; + stopElement.insert("svg:offset", gradStop.m_offset, librevenge::RVNG_PERCENT); stopElement.insert("svg:stop-color", m_ps.getRGBColorString(gradStop.m_color)); - stopElement.insert("svg:stop-opacity", m_fillOpacity, WPX_PERCENT); + stopElement.insert("svg:stop-opacity", m_fillOpacity, librevenge::RVNG_PERCENT); vec.append(stopElement); } + propList.insert("svg:linearGradient", vec); break; } } @@ -702,15 +707,17 @@ while (angle > 360.0) angle -= 360.0; propList.insert("draw:angle", (int)angle); + librevenge::RVNGPropertyListVector vec; for (unsigned i = 0; i < m_currentFillStyle.gradient.m_stops.size(); i++) { libcdr::CDRGradientStop &gradStop = m_currentFillStyle.gradient.m_stops[i]; - WPXPropertyList stopElement; - stopElement.insert("svg:offset", gradStop.m_offset, WPX_PERCENT); + librevenge::RVNGPropertyList stopElement; + stopElement.insert("svg:offset", gradStop.m_offset, librevenge::RVNG_PERCENT); stopElement.insert("svg:stop-color", m_ps.getRGBColorString(gradStop.m_color)); - stopElement.insert("svg:stop-opacity", m_fillOpacity, WPX_PERCENT); + stopElement.insert("svg:stop-opacity", m_fillOpacity, librevenge::RVNG_PERCENT); vec.append(stopElement); } + propList.insert("svg:linearGradient", vec); } break; case 7: // Pattern @@ -719,10 +726,10 @@ if (iterPattern != m_ps.m_patterns.end()) { propList.insert("draw:fill", "bitmap"); - WPXBinaryData image; + librevenge::RVNGBinaryData image; _generateBitmapFromPattern(image, iterPattern->second, m_currentFillStyle.color1, m_currentFillStyle.color2); #if DUMP_PATTERN - WPXString filename; + librevenge::RVNGString filename; filename.sprintf("pattern%.8x.bmp", m_currentFillStyle.imageFill.id); FILE *f = fopen(filename.cstr(), "wb"); if (f) @@ -734,12 +741,12 @@ } #endif propList.insert("draw:fill-image", image.getBase64Data()); - propList.insert("libwpg:mime-type", "image/bmp"); + propList.insert("librevenge:mime-type", "image/bmp"); propList.insert("style:repeat", "repeat"); if (m_currentFillStyle.imageFill.isRelative) { - propList.insert("svg:width", m_currentFillStyle.imageFill.width, WPX_PERCENT); - propList.insert("svg:height", m_currentFillStyle.imageFill.height, WPX_PERCENT); + propList.insert("svg:width", m_currentFillStyle.imageFill.width, librevenge::RVNG_PERCENT); + propList.insert("svg:height", m_currentFillStyle.imageFill.height, librevenge::RVNG_PERCENT); } else { @@ -757,9 +764,9 @@ if (m_currentFillStyle.imageFill.isRelative) { if (m_currentFillStyle.imageFill.xOffset != 0.0 && m_currentFillStyle.imageFill.xOffset != 1.0) - propList.insert("draw:fill-image-ref-point-x", m_currentFillStyle.imageFill.xOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-x", m_currentFillStyle.imageFill.xOffset, librevenge::RVNG_PERCENT); if (m_currentFillStyle.imageFill.yOffset != 0.0 && m_currentFillStyle.imageFill.yOffset != 1.0) - propList.insert("draw:fill-image-ref-point-y", m_currentFillStyle.imageFill.yOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-y", m_currentFillStyle.imageFill.yOffset, librevenge::RVNG_PERCENT); } else { @@ -770,7 +777,7 @@ xOffset += 1.0; while (xOffset > 1.0) xOffset -= 1.0; - propList.insert("draw:fill-image-ref-point-x", xOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-x", xOffset, librevenge::RVNG_PERCENT); } if (m_fillTransforms.getTranslateY() != 0.0) { @@ -779,7 +786,7 @@ yOffset += 1.0; while (yOffset > 1.0) yOffset -= 1.0; - propList.insert("draw:fill-image-ref-point-y", 1.0 - yOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-y", 1.0 - yOffset, librevenge::RVNG_PERCENT); } } } @@ -795,17 +802,17 @@ case 9: // Bitmap case 11: // Texture { - std::map::iterator iterBmp = m_ps.m_bmps.find(m_currentFillStyle.imageFill.id); + std::map::iterator iterBmp = m_ps.m_bmps.find(m_currentFillStyle.imageFill.id); if (iterBmp != m_ps.m_bmps.end()) { - propList.insert("libwpg:mime-type", "image/bmp"); + propList.insert("librevenge:mime-type", "image/bmp"); propList.insert("draw:fill", "bitmap"); propList.insert("draw:fill-image", iterBmp->second.getBase64Data()); propList.insert("style:repeat", "repeat"); if (m_currentFillStyle.imageFill.isRelative) { - propList.insert("svg:width", m_currentFillStyle.imageFill.width, WPX_PERCENT); - propList.insert("svg:height", m_currentFillStyle.imageFill.height, WPX_PERCENT); + propList.insert("svg:width", m_currentFillStyle.imageFill.width, librevenge::RVNG_PERCENT); + propList.insert("svg:height", m_currentFillStyle.imageFill.height, librevenge::RVNG_PERCENT); } else { @@ -823,9 +830,9 @@ if (m_currentFillStyle.imageFill.isRelative) { if (m_currentFillStyle.imageFill.xOffset != 0.0 && m_currentFillStyle.imageFill.xOffset != 1.0) - propList.insert("draw:fill-image-ref-point-x", m_currentFillStyle.imageFill.xOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-x", m_currentFillStyle.imageFill.xOffset, librevenge::RVNG_PERCENT); if (m_currentFillStyle.imageFill.yOffset != 0.0 && m_currentFillStyle.imageFill.yOffset != 1.0) - propList.insert("draw:fill-image-ref-point-y", m_currentFillStyle.imageFill.yOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-y", m_currentFillStyle.imageFill.yOffset, librevenge::RVNG_PERCENT); } else { @@ -836,7 +843,7 @@ xOffset += 1.0; while (xOffset > 1.0) xOffset -= 1.0; - propList.insert("draw:fill-image-ref-point-x", xOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-x", xOffset, librevenge::RVNG_PERCENT); } if (m_fillTransforms.getTranslateY() != 0.0) { @@ -845,7 +852,7 @@ yOffset += 1.0; while (yOffset > 1.0) yOffset -= 1.0; - propList.insert("draw:fill-image-ref-point-y", 1.0 - yOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-y", 1.0 - yOffset, librevenge::RVNG_PERCENT); } } } @@ -855,17 +862,17 @@ break; case 10: // Full color { - std::map::iterator iterVect = m_ps.m_vects.find(m_currentFillStyle.imageFill.id); + std::map::iterator iterVect = m_ps.m_vects.find(m_currentFillStyle.imageFill.id); if (iterVect != m_ps.m_vects.end()) { propList.insert("draw:fill", "bitmap"); - propList.insert("libwpg:mime-type", "image/svg+xml"); + propList.insert("librevenge:mime-type", "image/svg+xml"); propList.insert("draw:fill-image", iterVect->second.getBase64Data()); propList.insert("style:repeat", "repeat"); if (m_currentFillStyle.imageFill.isRelative) { - propList.insert("svg:width", m_currentFillStyle.imageFill.width, WPX_PERCENT); - propList.insert("svg:height", m_currentFillStyle.imageFill.height, WPX_PERCENT); + propList.insert("svg:width", m_currentFillStyle.imageFill.width, librevenge::RVNG_PERCENT); + propList.insert("svg:height", m_currentFillStyle.imageFill.height, librevenge::RVNG_PERCENT); } else { @@ -883,9 +890,9 @@ if (m_currentFillStyle.imageFill.isRelative) { if (m_currentFillStyle.imageFill.xOffset != 0.0 && m_currentFillStyle.imageFill.xOffset != 1.0) - propList.insert("draw:fill-image-ref-point-x", m_currentFillStyle.imageFill.xOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-x", m_currentFillStyle.imageFill.xOffset, librevenge::RVNG_PERCENT); if (m_currentFillStyle.imageFill.yOffset != 0.0 && m_currentFillStyle.imageFill.yOffset != 1.0) - propList.insert("draw:fill-image-ref-point-y", m_currentFillStyle.imageFill.yOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-y", m_currentFillStyle.imageFill.yOffset, librevenge::RVNG_PERCENT); } else { @@ -896,7 +903,7 @@ xOffset += 1.0; while (xOffset > 1.0) xOffset -= 1.0; - propList.insert("draw:fill-image-ref-point-x", xOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-x", xOffset, librevenge::RVNG_PERCENT); } if (m_fillTransforms.getTranslateY() != 0.0) { @@ -905,7 +912,7 @@ yOffset += 1.0; while (yOffset > 1.0) yOffset -= 1.0; - propList.insert("draw:fill-image-ref-point-y", 1.0 - yOffset, WPX_PERCENT); + propList.insert("draw:fill-image-ref-point-y", 1.0 - yOffset, librevenge::RVNG_PERCENT); } } } @@ -921,7 +928,7 @@ } } -void libcdr::CDRContentCollector::_lineProperties(WPXPropertyList &propList) +void libcdr::CDRContentCollector::_lineProperties(librevenge::RVNGPropertyList &propList) { if (m_currentLineStyle.lineType == (unsigned short)-1) { @@ -1020,10 +1027,10 @@ dots2len = dots1len; } propList.insert("draw:dots1", dots1); - propList.insert("draw:dots1-length", 72.0*(m_currentLineStyle.lineWidth * scale)*dots1len, WPX_POINT); + propList.insert("draw:dots1-length", 72.0*(m_currentLineStyle.lineWidth * scale)*dots1len, librevenge::RVNG_POINT); propList.insert("draw:dots2", dots2); - propList.insert("draw:dots2-length", 72.0*(m_currentLineStyle.lineWidth * scale)*dots2len, WPX_POINT); - propList.insert("draw:distance", 72.0*(m_currentLineStyle.lineWidth * scale)*gap, WPX_POINT); + propList.insert("draw:dots2-length", 72.0*(m_currentLineStyle.lineWidth * scale)*dots2len, librevenge::RVNG_POINT); + propList.insert("draw:distance", 72.0*(m_currentLineStyle.lineWidth * scale)*gap, librevenge::RVNG_POINT); } } else @@ -1043,7 +1050,7 @@ startMarker.transform(m_groupTransforms.top()); CDRTransform tmpTrafo = CDRTransform(1.0, 0.0, 0.0, 0.0, -1.0, 0); startMarker.transform(tmpTrafo); - WPXString path, viewBox; + librevenge::RVNGString path, viewBox; double width; startMarker.writeOut(path, viewBox, width); propList.insert("draw:marker-start-viewbox", viewBox); @@ -1058,7 +1065,7 @@ endMarker.transform(m_groupTransforms.top()); CDRTransform tmpTrafo = CDRTransform(-1.0, 0.0, 0.0, 0.0, -1.0, 0); endMarker.transform(tmpTrafo); - WPXString path, viewBox; + librevenge::RVNGString path, viewBox; double width; endMarker.writeOut(path, viewBox, width); propList.insert("draw:marker-end-viewbox", viewBox); @@ -1070,7 +1077,7 @@ } -void libcdr::CDRContentCollector::_generateBitmapFromPattern(WPXBinaryData &bitmap, const CDRPattern &pattern, const CDRColor &fgColor, const CDRColor &bgColor) +void libcdr::CDRContentCollector::_generateBitmapFromPattern(librevenge::RVNGBinaryData &bitmap, const CDRPattern &pattern, const CDRColor &fgColor, const CDRColor &bgColor) { unsigned height = pattern.height; unsigned width = pattern.width; @@ -1140,7 +1147,7 @@ void libcdr::CDRContentCollector::collectBitmap(unsigned imageId, double x1, double x2, double y1, double y2) { - std::map::iterator iter = m_ps.m_bmps.find(imageId); + std::map::iterator iter = m_ps.m_bmps.find(imageId); if (iter != m_ps.m_bmps.end()) m_currentImage = CDRImage(iter->second, x1, x2, y1, y2); } @@ -1176,26 +1183,27 @@ m_spnd = spnd; } -void libcdr::CDRContentCollector::collectVectorPattern(unsigned id, const WPXBinaryData &data) +void libcdr::CDRContentCollector::collectVectorPattern(unsigned id, const librevenge::RVNGBinaryData &data) { - WPXInputStream *input = const_cast(data.getDataStream()); - input->seek(0, WPX_SEEK_SET); + librevenge::RVNGInputStream *input = const_cast(data.getDataStream()); + input->seek(0, librevenge::RVNG_SEEK_SET); if (!libcdr::CMXDocument::isSupported(input)) return; - CDRStringVector svgOutput; - input->seek(0, WPX_SEEK_SET); - if (!libcdr::CMXDocument::generateSVG(input, svgOutput)) + input->seek(0, librevenge::RVNG_SEEK_SET); + librevenge::RVNGStringVector svgOutput; + librevenge::RVNGSVGDrawingGenerator generator(svgOutput, ""); + if (!libcdr::CMXDocument::parse(input, &generator)) return; if (!svgOutput.empty()) { const char *header = "\n\n"; - WPXBinaryData output((const unsigned char *)header, strlen(header)); + librevenge::RVNGBinaryData output((const unsigned char *)header, strlen(header)); output.append((unsigned char *)svgOutput[0].cstr(), strlen(svgOutput[0].cstr())); m_ps.m_vects[id] = output; } #if DUMP_VECT - WPXString filename; + librevenge::RVNGString filename; filename.sprintf("vect%.8x.svg", id); FILE *f = fopen(filename.cstr(), "wb"); if (f) diff -Nru libcdr-0.0.15/src/lib/CDRContentCollector.h libcdr-0.1.0/src/lib/CDRContentCollector.h --- libcdr-0.0.15/src/lib/CDRContentCollector.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRContentCollector.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CDRCONTENTCOLLECTOR_H__ @@ -33,7 +13,7 @@ #include #include #include -#include +#include #include #include "CDRTypes.h" #include "CDRPath.h" @@ -46,7 +26,7 @@ class CDRContentCollector : public CDRCollector { public: - CDRContentCollector(CDRParserState &ps, ::libwpg::WPGPaintInterface *painter); + CDRContentCollector(CDRParserState &ps, ::librevenge::RVNGDrawingInterface *painter); virtual ~CDRContentCollector(); // collector functions @@ -78,7 +58,7 @@ void collectColorProfile(const std::vector &) {} void collectBBox(double x0, double y0, double x1, double y1); void collectSpnd(unsigned spnd); - void collectVectorPattern(unsigned id, const WPXBinaryData &data); + void collectVectorPattern(unsigned id, const librevenge::RVNGBinaryData &data); void collectPaletteEntry(unsigned, unsigned, const CDRColor &) {} void collectText(unsigned, unsigned, const std::vector &, const std::vector &, const std::map &) {} @@ -91,16 +71,19 @@ CDRContentCollector &operator=(const CDRContentCollector &); // helper functions + void _startDocument(); + void _endDocument(); void _startPage(double width, double height); void _endPage(); void _flushCurrentPath(); - void _fillProperties(WPXPropertyList &propList, WPXPropertyListVector &vec); - void _lineProperties(WPXPropertyList &propList); - void _generateBitmapFromPattern(WPXBinaryData &bitmap, const CDRPattern &pattern, const CDRColor &fgColor, const CDRColor &bgColor); + void _fillProperties(librevenge::RVNGPropertyList &propList); + void _lineProperties(librevenge::RVNGPropertyList &propList); + void _generateBitmapFromPattern(librevenge::RVNGBinaryData &bitmap, const CDRPattern &pattern, const CDRColor &fgColor, const CDRColor &bgColor); - libwpg::WPGPaintInterface *m_painter; + librevenge::RVNGDrawingInterface *m_painter; + bool m_isDocumentStarted; bool m_isPageProperties; bool m_isPageStarted; bool m_ignorePage; diff -Nru libcdr-0.0.15/src/lib/CDRDocument.cpp libcdr-0.1.0/src/lib/CDRDocument.cpp --- libcdr-0.0.15/src/lib/CDRDocument.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRDocument.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include @@ -32,10 +12,8 @@ #include #include #include "CDRParser.h" -#include "CDRSVGGenerator.h" #include "CDRContentCollector.h" #include "CDRStylesCollector.h" -#include "CDRZipStream.h" #include "libcdr_utils.h" #include "CDRDocumentStructure.h" @@ -44,14 +22,14 @@ namespace { -static unsigned getCDRVersion(WPXInputStream *input) +static unsigned getCDRVersion(librevenge::RVNGInputStream *input) { unsigned riff = readU32(input); if ((riff & 0xffff) == 0x4c57) // "WL\0" return 200; if (riff != CDR_FOURCC_RIFF) return 0; - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); char signature_c = (char)readU8(input); if (signature_c != 'C' && signature_c != 'c') return 0; @@ -81,27 +59,25 @@ \return A value that indicates whether the content from the input stream is a Corel Draw Document that libcdr is able to parse */ -bool libcdr::CDRDocument::isSupported(WPXInputStream *input) +CDRAPI bool libcdr::CDRDocument::isSupported(librevenge::RVNGInputStream *input) { - WPXInputStream *tmpInput = input; + librevenge::RVNGInputStream *tmpInput = input; try { - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); unsigned version = getCDRVersion(input); if (version) return true; - CDRZipStream zinput(input); - // Yes, we are kidnapping here the OLE document API and extending - // it to support also zip files. - if (zinput.isOLEStream()) + if (tmpInput->isStructured()) { - input = zinput.getDocumentOLEStream("content/riffData.cdr"); + input = tmpInput->getSubStreamByName("content/riffData.cdr"); if (!input) - input = zinput.getDocumentOLEStream("content/root.dat"); + input = tmpInput->getSubStreamByName("content/root.dat"); } + tmpInput->seek(0, librevenge::RVNG_SEEK_SET); if (!input) return false; - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); version = getCDRVersion(input); if (input != tmpInput) delete input; @@ -126,9 +102,9 @@ \param painter A CDRPainterInterface implementation \return A value that indicates whether the parsing was successful */ -bool libcdr::CDRDocument::parse(::WPXInputStream *input, libwpg::WPGPaintInterface *painter) +CDRAPI bool libcdr::CDRDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter) { - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); bool retVal = false; unsigned version = 0; try @@ -136,10 +112,10 @@ version = getCDRVersion(input); if (version) { - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); CDRParserState ps; CDRStylesCollector stylesCollector(ps); - CDRParser stylesParser(std::vector(), &stylesCollector); + CDRParser stylesParser(std::vector(), &stylesCollector); if (version >= 300) retVal = stylesParser.parseRecords(input); else @@ -148,9 +124,9 @@ retVal = false; if (retVal) { - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); CDRContentCollector contentCollector(ps, painter); - CDRParser contentParser(std::vector(), &contentCollector); + CDRParser contentParser(std::vector(), &contentCollector); if (version >= 300) retVal = contentParser.parseRecords(input); else @@ -165,26 +141,26 @@ return false; } - WPXInputStream *tmpInput = input; - std::vector dataStreams; + librevenge::RVNGInputStream *tmpInput = input; + std::vector dataStreams; try { - CDRZipStream zinput(input); - bool isZipDocument = zinput.isOLEStream(); std::vector dataFiles; - if (isZipDocument) + if (tmpInput->isStructured()) { - input = zinput.getDocumentOLEStream("content/riffData.cdr"); + tmpInput->seek(0, librevenge::RVNG_SEEK_SET); + input = tmpInput->getSubStreamByName("content/riffData.cdr"); if (!input) { - input = zinput.getDocumentOLEStream("content/root.dat"); + tmpInput->seek(0, librevenge::RVNG_SEEK_SET); + input = tmpInput->getSubStreamByName("content/root.dat"); if (input) { - boost::scoped_ptr tmpStream(zinput.getDocumentOLEStream("content/dataFileList.dat")); + boost::scoped_ptr tmpStream(tmpInput->getSubStreamByName("content/dataFileList.dat")); if (bool(tmpStream)) { std::string dataFileName; - while (!tmpStream->atEOS()) + while (!tmpStream->isEnd()) { unsigned char character = readU8(tmpStream.get()); if (character == 0x0a) @@ -207,21 +183,23 @@ std::string streamName("content/data/"); streamName += dataFiles[i]; CDR_DEBUG_MSG(("Extracting stream: %s\n", streamName.c_str())); - dataStreams.push_back(zinput.getDocumentOLEStream(streamName.c_str())); + tmpInput->seek(0, librevenge::RVNG_SEEK_SET); + dataStreams.push_back(tmpInput->getSubStreamByName(streamName.c_str())); } if (!input) input = tmpInput; - input->seek(0, WPX_SEEK_SET); CDRParserState ps; - // libcdr extension to the getDocumentOLEStream. Will extract the first stream in the + // libcdr extension to the getSubStreamByName. Will extract the first stream in the // given directory - WPXInputStream *cmykProfile = zinput.getDocumentOLEStream("color/profiles/cmyk/"); + tmpInput->seek(0, librevenge::RVNG_SEEK_SET); + librevenge::RVNGInputStream *cmykProfile = tmpInput->getSubStreamByName("color/profiles/cmyk/"); if (cmykProfile) { ps.setColorTransform(cmykProfile); delete cmykProfile; } - WPXInputStream *rgbProfile = zinput.getDocumentOLEStream("color/profiles/rgb/"); + tmpInput->seek(0, librevenge::RVNG_SEEK_SET); + librevenge::RVNGInputStream *rgbProfile = tmpInput->getSubStreamByName("color/profiles/rgb/"); if (rgbProfile) { ps.setColorTransform(rgbProfile); @@ -229,12 +207,13 @@ } CDRStylesCollector stylesCollector(ps); CDRParser stylesParser(dataStreams, &stylesCollector); + input->seek(0, librevenge::RVNG_SEEK_SET); retVal = stylesParser.parseRecords(input); if (ps.m_pages.empty()) retVal = false; if (retVal) { - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); CDRContentCollector contentCollector(ps, painter); CDRParser contentParser(dataStreams, &contentCollector); retVal = contentParser.parseRecords(input); @@ -247,23 +226,9 @@ if (input != tmpInput) delete input; input = tmpInput; - for (std::vector::iterator iter = dataStreams.begin(); iter != dataStreams.end(); ++iter) + for (std::vector::iterator iter = dataStreams.begin(); iter != dataStreams.end(); ++iter) delete *iter; return retVal; } -/** -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 libcdr::CDRDocument::generateSVG(::WPXInputStream *input, libcdr::CDRStringVector &output) -{ - libcdr::CDRSVGGenerator generator(output); - bool result = libcdr::CDRDocument::parse(input, &generator); - return result; -} - /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/src/lib/CDRDocumentStructure.h libcdr-0.1.0/src/lib/CDRDocumentStructure.h --- libcdr-0.0.15/src/lib/CDRDocumentStructure.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRDocumentStructure.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,29 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CDRDOCUMENTSTRUCTURE_H__ diff -Nru libcdr-0.0.15/src/lib/CDRInternalStream.cpp libcdr-0.1.0/src/lib/CDRInternalStream.cpp --- libcdr-0.0.15/src/lib/CDRInternalStream.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRInternalStream.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,34 +1,12 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #include #include "CDRInternalStream.h" #include "libcdr_utils.h" @@ -38,14 +16,14 @@ #define CHUNK 16384 libcdr::CDRInternalStream::CDRInternalStream(const std::vector &buffer) : - WPXInputStream(), + librevenge::RVNGInputStream(), m_offset(0), m_buffer(buffer) { } -libcdr::CDRInternalStream::CDRInternalStream(WPXInputStream *input, unsigned long size, bool compressed) : - WPXInputStream(), +libcdr::CDRInternalStream::CDRInternalStream(librevenge::RVNGInputStream *input, unsigned long size, bool compressed) : + librevenge::RVNGInputStream(), m_offset(0), m_buffer() { @@ -139,11 +117,11 @@ return &m_buffer[oldOffset]; } -int libcdr::CDRInternalStream::seek(long offset, WPX_SEEK_TYPE seekType) +int libcdr::CDRInternalStream::seek(long offset, librevenge::RVNG_SEEK_TYPE seekType) { - if (seekType == WPX_SEEK_CUR) + if (seekType == librevenge::RVNG_SEEK_CUR) m_offset += offset; - else if (seekType == WPX_SEEK_SET) + else if (seekType == librevenge::RVNG_SEEK_SET) m_offset = offset; if (m_offset < 0) @@ -165,7 +143,7 @@ return m_offset; } -bool libcdr::CDRInternalStream::atEOS() +bool libcdr::CDRInternalStream::isEnd() { if ((long)m_offset >= (long)m_buffer.size()) return true; diff -Nru libcdr-0.0.15/src/lib/CDRInternalStream.h libcdr-0.1.0/src/lib/CDRInternalStream.h --- libcdr-0.0.15/src/lib/CDRInternalStream.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRInternalStream.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,64 +1,57 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - #ifndef __CDRINTERNALSTREAM_H__ #define __CDRINTERNALSTREAM_H__ #include -#include +#include namespace libcdr { -class CDRInternalStream : public WPXInputStream +class CDRInternalStream : public librevenge::RVNGInputStream { public: - CDRInternalStream(WPXInputStream *input, unsigned long size, bool compressed=false); + CDRInternalStream(librevenge::RVNGInputStream *input, unsigned long size, bool compressed=false); CDRInternalStream(const std::vector &buffer); ~CDRInternalStream() {} - bool isOLEStream() + bool isStructured() { return false; } - WPXInputStream *getDocumentOLEStream(const char *) + unsigned subStreamCount() + { + return 0; + } + const char *subStreamName(unsigned) + { + return 0; + } + bool existsSubStream(const char *) + { + return false; + } + librevenge::RVNGInputStream *getSubStreamByName(const char *) + { + return 0; + } + librevenge::RVNGInputStream *getSubStreamById(unsigned) { return 0; } - const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); - int seek(long offset, WPX_SEEK_TYPE seekType); + int seek(long offset, librevenge::RVNG_SEEK_TYPE seekType); long tell(); - bool atEOS(); + bool isEnd(); unsigned long getSize() const { return m_buffer.size(); diff -Nru libcdr-0.0.15/src/lib/CDROutputElementList.cpp libcdr-0.1.0/src/lib/CDROutputElementList.cpp --- libcdr-0.0.15/src/lib/CDROutputElementList.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDROutputElementList.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "CDROutputElementList.h" @@ -32,12 +12,96 @@ namespace libcdr { +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 + class CDROutputElement { public: CDROutputElement() {} virtual ~CDROutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter) = 0; + virtual void draw(librevenge::RVNGDrawingInterface *painter) = 0; virtual CDROutputElement *clone() = 0; }; @@ -45,133 +109,130 @@ class CDRStyleOutputElement : public CDROutputElement { public: - CDRStyleOutputElement(const WPXPropertyList &propList, const WPXPropertyListVector &propListVec); + CDRStyleOutputElement(const librevenge::RVNGPropertyList &propList); virtual ~CDRStyleOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { - return new CDRStyleOutputElement(m_propList, m_propListVec); + return new CDRStyleOutputElement(m_propList); } private: - WPXPropertyList m_propList; - WPXPropertyListVector m_propListVec; + librevenge::RVNGPropertyList m_propList; }; class CDRPathOutputElement : public CDROutputElement { public: - CDRPathOutputElement(const WPXPropertyListVector &propListVec); + CDRPathOutputElement(const librevenge::RVNGPropertyList &propList); virtual ~CDRPathOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { - return new CDRPathOutputElement(m_propListVec); + return new CDRPathOutputElement(m_propList); } private: - WPXPropertyListVector m_propListVec; + librevenge::RVNGPropertyList m_propList; }; class CDRGraphicObjectOutputElement : public CDROutputElement { public: - CDRGraphicObjectOutputElement(const WPXPropertyList &propList, const ::WPXBinaryData &binaryData); + CDRGraphicObjectOutputElement(const librevenge::RVNGPropertyList &propList); virtual ~CDRGraphicObjectOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { - return new CDRGraphicObjectOutputElement(m_propList, m_binaryData); + return new CDRGraphicObjectOutputElement(m_propList); } private: - WPXPropertyList m_propList; - WPXBinaryData m_binaryData; + librevenge::RVNGPropertyList m_propList; }; class CDRStartTextObjectOutputElement : public CDROutputElement { public: - CDRStartTextObjectOutputElement(const WPXPropertyList &propList, const WPXPropertyListVector &propListVec); + CDRStartTextObjectOutputElement(const librevenge::RVNGPropertyList &propList); virtual ~CDRStartTextObjectOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { - return new CDRStartTextObjectOutputElement(m_propList, m_propListVec); + return new CDRStartTextObjectOutputElement(m_propList); } private: - WPXPropertyList m_propList; - WPXPropertyListVector m_propListVec; + librevenge::RVNGPropertyList m_propList; }; -class CDRStartTextLineOutputElement : public CDROutputElement +class CDROpenParagraphOutputElement : public CDROutputElement { public: - CDRStartTextLineOutputElement(const WPXPropertyList &propList); - virtual ~CDRStartTextLineOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + CDROpenParagraphOutputElement(const librevenge::RVNGPropertyList &propList); + virtual ~CDROpenParagraphOutputElement() {} + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { - return new CDRStartTextLineOutputElement(m_propList); + return new CDROpenParagraphOutputElement(m_propList); } private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; -class CDRStartTextSpanOutputElement : public CDROutputElement +class CDROpenSpanOutputElement : public CDROutputElement { public: - CDRStartTextSpanOutputElement(const WPXPropertyList &propList); - virtual ~CDRStartTextSpanOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + CDROpenSpanOutputElement(const librevenge::RVNGPropertyList &propList); + virtual ~CDROpenSpanOutputElement() {} + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { - return new CDRStartTextSpanOutputElement(m_propList); + return new CDROpenSpanOutputElement(m_propList); } private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class CDRInsertTextOutputElement : public CDROutputElement { public: - CDRInsertTextOutputElement(const WPXString &text); + CDRInsertTextOutputElement(const librevenge::RVNGString &text); virtual ~CDRInsertTextOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { return new CDRInsertTextOutputElement(m_text); } private: - WPXString m_text; + librevenge::RVNGString m_text; }; -class CDREndTextSpanOutputElement : public CDROutputElement +class CDRCloseSpanOutputElement : public CDROutputElement { public: - CDREndTextSpanOutputElement(); - virtual ~CDREndTextSpanOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + CDRCloseSpanOutputElement(); + virtual ~CDRCloseSpanOutputElement() {} + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { - return new CDREndTextSpanOutputElement(); + return new CDRCloseSpanOutputElement(); } }; -class CDREndTextLineOutputElement : public CDROutputElement +class CDRCloseParagraphOutputElement : public CDROutputElement { public: - CDREndTextLineOutputElement(); - virtual ~CDREndTextLineOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + CDRCloseParagraphOutputElement(); + virtual ~CDRCloseParagraphOutputElement() {} + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { - return new CDREndTextLineOutputElement(); + return new CDRCloseParagraphOutputElement(); } }; @@ -181,7 +242,7 @@ public: CDREndTextObjectOutputElement(); virtual ~CDREndTextObjectOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { return new CDREndTextObjectOutputElement(); @@ -191,15 +252,15 @@ class CDRStartLayerOutputElement : public CDROutputElement { public: - CDRStartLayerOutputElement(const WPXPropertyList &propList); + CDRStartLayerOutputElement(const librevenge::RVNGPropertyList &propList); virtual ~CDRStartLayerOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { return new CDRStartLayerOutputElement(m_propList); } private: - WPXPropertyList m_propList; + librevenge::RVNGPropertyList m_propList; }; class CDREndLayerOutputElement : public CDROutputElement @@ -207,7 +268,7 @@ public: CDREndLayerOutputElement(); virtual ~CDREndLayerOutputElement() {} - virtual void draw(libwpg::WPGPaintInterface *painter); + virtual void draw(librevenge::RVNGDrawingInterface *painter); virtual CDROutputElement *clone() { return new CDREndLayerOutputElement(); @@ -216,95 +277,95 @@ } // namespace libcdr -libcdr::CDRStyleOutputElement::CDRStyleOutputElement(const WPXPropertyList &propList, const WPXPropertyListVector &propListVec) : - m_propList(propList), m_propListVec(propListVec) {} +libcdr::CDRStyleOutputElement::CDRStyleOutputElement(const librevenge::RVNGPropertyList &propList) : + m_propList(propList) {} -void libcdr::CDRStyleOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDRStyleOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) - painter->setStyle(m_propList, m_propListVec); + painter->setStyle(m_propList); } -libcdr::CDRPathOutputElement::CDRPathOutputElement(const WPXPropertyListVector &propListVec) : - m_propListVec(propListVec) {} +libcdr::CDRPathOutputElement::CDRPathOutputElement(const librevenge::RVNGPropertyList &propList) : + m_propList(propList) {} -void libcdr::CDRPathOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDRPathOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) - painter->drawPath(m_propListVec); + painter->drawPath(m_propList); } -libcdr::CDRGraphicObjectOutputElement::CDRGraphicObjectOutputElement(const WPXPropertyList &propList, const ::WPXBinaryData &binaryData) : - m_propList(propList), m_binaryData(binaryData) {} +libcdr::CDRGraphicObjectOutputElement::CDRGraphicObjectOutputElement(const librevenge::RVNGPropertyList &propList) : + m_propList(propList) {} -void libcdr::CDRGraphicObjectOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDRGraphicObjectOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) - painter->drawGraphicObject(m_propList, m_binaryData); + painter->drawGraphicObject(m_propList); } -libcdr::CDRStartTextObjectOutputElement::CDRStartTextObjectOutputElement(const WPXPropertyList &propList, const WPXPropertyListVector &propListVec) : - m_propList(propList), m_propListVec(propListVec) {} +libcdr::CDRStartTextObjectOutputElement::CDRStartTextObjectOutputElement(const librevenge::RVNGPropertyList &propList) : + m_propList(propList) {} -void libcdr::CDRStartTextObjectOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDRStartTextObjectOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) - painter->startTextObject(m_propList, m_propListVec); + painter->startTextObject(m_propList); } -libcdr::CDRStartTextSpanOutputElement::CDRStartTextSpanOutputElement(const WPXPropertyList &propList) : +libcdr::CDROpenSpanOutputElement::CDROpenSpanOutputElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} -void libcdr::CDRStartTextSpanOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDROpenSpanOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) - painter->startTextSpan(m_propList); + painter->openSpan(m_propList); } -libcdr::CDRStartTextLineOutputElement::CDRStartTextLineOutputElement(const WPXPropertyList &propList) : +libcdr::CDROpenParagraphOutputElement::CDROpenParagraphOutputElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} -void libcdr::CDRStartTextLineOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDROpenParagraphOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) - painter->startTextLine(m_propList); + painter->openParagraph(m_propList); } -libcdr::CDRInsertTextOutputElement::CDRInsertTextOutputElement(const WPXString &text) : +libcdr::CDRInsertTextOutputElement::CDRInsertTextOutputElement(const librevenge::RVNGString &text) : m_text(text) {} -void libcdr::CDRInsertTextOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDRInsertTextOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) - painter->insertText(m_text); + separateSpacesAndInsertText(painter, m_text); } -libcdr::CDREndTextSpanOutputElement::CDREndTextSpanOutputElement() {} +libcdr::CDRCloseSpanOutputElement::CDRCloseSpanOutputElement() {} -void libcdr::CDREndTextSpanOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDRCloseSpanOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) - painter->endTextSpan(); + painter->closeSpan(); } -libcdr::CDREndTextLineOutputElement::CDREndTextLineOutputElement() {} +libcdr::CDRCloseParagraphOutputElement::CDRCloseParagraphOutputElement() {} -void libcdr::CDREndTextLineOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDRCloseParagraphOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) - painter->endTextLine(); + painter->closeParagraph(); } libcdr::CDREndTextObjectOutputElement::CDREndTextObjectOutputElement() {} -void libcdr::CDREndTextObjectOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDREndTextObjectOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) painter->endTextObject(); @@ -313,17 +374,17 @@ libcdr::CDREndLayerOutputElement::CDREndLayerOutputElement() {} -void libcdr::CDREndLayerOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDREndLayerOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) painter->endLayer(); } -libcdr::CDRStartLayerOutputElement::CDRStartLayerOutputElement(const WPXPropertyList &propList) : +libcdr::CDRStartLayerOutputElement::CDRStartLayerOutputElement(const librevenge::RVNGPropertyList &propList) : m_propList(propList) {} -void libcdr::CDRStartLayerOutputElement::draw(libwpg::WPGPaintInterface *painter) +void libcdr::CDRStartLayerOutputElement::draw(librevenge::RVNGDrawingInterface *painter) { if (painter) painter->startLayer(m_propList); @@ -356,12 +417,6 @@ return *this; } -void libcdr::CDROutputElementList::append(const libcdr::CDROutputElementList &elementList) -{ - for (std::vector::const_iterator cstiter = elementList.m_elements.begin(); cstiter != elementList.m_elements.end(); ++cstiter) - m_elements.push_back((*cstiter)->clone()); -} - libcdr::CDROutputElementList::~CDROutputElementList() { for (std::vector::iterator iter = m_elements.begin(); iter != m_elements.end(); ++iter) @@ -369,55 +424,55 @@ m_elements.clear(); } -void libcdr::CDROutputElementList::draw(libwpg::WPGPaintInterface *painter) const +void libcdr::CDROutputElementList::draw(librevenge::RVNGDrawingInterface *painter) const { for (std::vector::const_iterator iter = m_elements.begin(); iter != m_elements.end(); ++iter) (*iter)->draw(painter); } -void libcdr::CDROutputElementList::addStyle(const WPXPropertyList &propList, const WPXPropertyListVector &propListVec) +void libcdr::CDROutputElementList::addStyle(const librevenge::RVNGPropertyList &propList) { - m_elements.push_back(new CDRStyleOutputElement(propList, propListVec)); + m_elements.push_back(new CDRStyleOutputElement(propList)); } -void libcdr::CDROutputElementList::addPath(const WPXPropertyListVector &propListVec) +void libcdr::CDROutputElementList::addPath(const librevenge::RVNGPropertyList &propList) { - m_elements.push_back(new CDRPathOutputElement(propListVec)); + m_elements.push_back(new CDRPathOutputElement(propList)); } -void libcdr::CDROutputElementList::addGraphicObject(const WPXPropertyList &propList, const ::WPXBinaryData &binaryData) +void libcdr::CDROutputElementList::addGraphicObject(const librevenge::RVNGPropertyList &propList) { - m_elements.push_back(new CDRGraphicObjectOutputElement(propList, binaryData)); + m_elements.push_back(new CDRGraphicObjectOutputElement(propList)); } -void libcdr::CDROutputElementList::addStartTextObject(const WPXPropertyList &propList, const WPXPropertyListVector &propListVec) +void libcdr::CDROutputElementList::addStartTextObject(const librevenge::RVNGPropertyList &propList) { - m_elements.push_back(new CDRStartTextObjectOutputElement(propList, propListVec)); + m_elements.push_back(new CDRStartTextObjectOutputElement(propList)); } -void libcdr::CDROutputElementList::addStartTextLine(const WPXPropertyList &propList) +void libcdr::CDROutputElementList::addOpenParagraph(const librevenge::RVNGPropertyList &propList) { - m_elements.push_back(new CDRStartTextLineOutputElement(propList)); + m_elements.push_back(new CDROpenParagraphOutputElement(propList)); } -void libcdr::CDROutputElementList::addStartTextSpan(const WPXPropertyList &propList) +void libcdr::CDROutputElementList::addOpenSpan(const librevenge::RVNGPropertyList &propList) { - m_elements.push_back(new CDRStartTextSpanOutputElement(propList)); + m_elements.push_back(new CDROpenSpanOutputElement(propList)); } -void libcdr::CDROutputElementList::addInsertText(const WPXString &text) +void libcdr::CDROutputElementList::addInsertText(const librevenge::RVNGString &text) { m_elements.push_back(new CDRInsertTextOutputElement(text)); } -void libcdr::CDROutputElementList::addEndTextSpan() +void libcdr::CDROutputElementList::addCloseSpan() { - m_elements.push_back(new CDREndTextSpanOutputElement()); + m_elements.push_back(new CDRCloseSpanOutputElement()); } -void libcdr::CDROutputElementList::addEndTextLine() +void libcdr::CDROutputElementList::addCloseParagraph() { - m_elements.push_back(new CDREndTextLineOutputElement()); + m_elements.push_back(new CDRCloseParagraphOutputElement()); } void libcdr::CDROutputElementList::addEndTextObject() @@ -425,7 +480,7 @@ m_elements.push_back(new CDREndTextObjectOutputElement()); } -void libcdr::CDROutputElementList::addStartGroup(const WPXPropertyList &propList) +void libcdr::CDROutputElementList::addStartGroup(const librevenge::RVNGPropertyList &propList) { m_elements.push_back(new CDRStartLayerOutputElement(propList)); } diff -Nru libcdr-0.0.15/src/lib/CDROutputElementList.h libcdr-0.1.0/src/lib/CDROutputElementList.h --- libcdr-0.0.15/src/lib/CDROutputElementList.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDROutputElementList.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CDROUTPUTELEMENTLIST_H__ @@ -33,8 +13,8 @@ #include #include #include -#include -#include +#include +#include namespace libcdr { @@ -48,19 +28,18 @@ CDROutputElementList(const CDROutputElementList &elementList); CDROutputElementList &operator=(const CDROutputElementList &elementList); virtual ~CDROutputElementList(); - void append(const CDROutputElementList &elementList); - void draw(libwpg::WPGPaintInterface *painter) const; - void addStyle(const WPXPropertyList &propList, const WPXPropertyListVector &propListVec); - void addPath(const WPXPropertyListVector &propListVec); - void addGraphicObject(const WPXPropertyList &propList, const ::WPXBinaryData &binaryData); - void addStartTextObject(const WPXPropertyList &propList, const WPXPropertyListVector &propListVec); - void addStartTextLine(const WPXPropertyList &propList); - void addStartTextSpan(const WPXPropertyList &propList); - void addInsertText(const WPXString &text); - void addEndTextSpan(); - void addEndTextLine(); + void draw(librevenge::RVNGDrawingInterface *painter) const; + void addStyle(const librevenge::RVNGPropertyList &propList); + void addPath(const librevenge::RVNGPropertyList &propList); + void addGraphicObject(const librevenge::RVNGPropertyList &propList); + void addStartTextObject(const librevenge::RVNGPropertyList &propList); + void addOpenParagraph(const librevenge::RVNGPropertyList &propList); + void addOpenSpan(const librevenge::RVNGPropertyList &propList); + void addInsertText(const librevenge::RVNGString &text); + void addCloseSpan(); + void addCloseParagraph(); void addEndTextObject(); - void addStartGroup(const WPXPropertyList &propList); + void addStartGroup(const librevenge::RVNGPropertyList &propList); void addEndGroup(); bool empty() const { diff -Nru libcdr-0.0.15/src/lib/CDRParser.cpp libcdr-0.1.0/src/lib/CDRParser.cpp --- libcdr-0.0.15/src/lib/CDRParser.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRParser.cpp 2014-04-10 10:41:50.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include @@ -90,7 +70,7 @@ unsigned dropCapId; }; -static void processNameForEncoding(WPXString &name, unsigned short &encoding) +static void processNameForEncoding(librevenge::RVNGString &name, unsigned short &encoding) { std::string fontName(name.cstr()); size_t length = fontName.length(); @@ -173,7 +153,7 @@ } // anonymous namespace -libcdr::CDRParser::CDRParser(const std::vector &externalStreams, libcdr::CDRCollector *collector) +libcdr::CDRParser::CDRParser(const std::vector &externalStreams, libcdr::CDRCollector *collector) : CommonParser(collector), m_externalStreams(externalStreams), m_fonts(), m_fillStyles(), m_lineStyles(), m_arrows(), m_version(0) {} @@ -182,11 +162,11 @@ m_collector->collectLevel(0); } -bool libcdr::CDRParser::parseWaldo(WPXInputStream *input) +bool libcdr::CDRParser::parseWaldo(librevenge::RVNGInputStream *input) { try { - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); unsigned short magic = readU16(input); if (magic != 0x4c57) return false; @@ -194,15 +174,15 @@ m_precision = libcdr::PRECISION_16BIT; if ('e' >= readU8(input)) m_version = 100; - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); std::vector offsets; unsigned i = 0; for (i = 0; i < 8; ++i) offsets.push_back(readU32(input)); - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); for (i = 0; i < 10; i++) offsets.push_back(readU32(input)); - input->seek(offsets[0], WPX_SEEK_SET); + input->seek(offsets[0], librevenge::RVNG_SEEK_SET); CDR_DEBUG_MSG(("CDRParser::parseWaldo, Mcfg offset 0x%x\n", (unsigned)input->tell())); readMcfg(input, 275); std::vector records; @@ -215,24 +195,24 @@ std::map recordsOther; if (offsets[3]) { - input->seek(offsets[3], WPX_SEEK_SET); + input->seek(offsets[3], librevenge::RVNG_SEEK_SET); if (!gatherWaldoInformation(input, records, records2, records3, records4, records6, records7, records8, recordsOther)) return false; } if (offsets[5]) { - input->seek(offsets[5], WPX_SEEK_SET); + input->seek(offsets[5], librevenge::RVNG_SEEK_SET); gatherWaldoInformation(input, records, records2, records3, records4, records6, records7, records8, recordsOther); } if (offsets[11]) { - input->seek(offsets[11], WPX_SEEK_SET); + input->seek(offsets[11], librevenge::RVNG_SEEK_SET); gatherWaldoInformation(input, records, records2, records3, records4, records6, records7, records8, recordsOther); } std::map records1; for (std::vector::iterator iterVec = records.begin(); iterVec != records.end(); ++iterVec) { - input->seek(iterVec->offset, WPX_SEEK_SET); + input->seek(iterVec->offset, librevenge::RVNG_SEEK_SET); unsigned length = readU32(input); if (length != 0x18) { @@ -243,7 +223,7 @@ unsigned short previous = readU16(input); unsigned short child = readU16(input); unsigned short parent = readU16(input); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned short moreDataID = readU16(input); double x0 = readCoordinate(input); double y0 = readCoordinate(input); @@ -255,8 +235,8 @@ { std::map::const_iterator iter7 = records7.find(moreDataID); if (iter7 != records7.end()) - input->seek(iter7->second.offset, WPX_SEEK_SET); - input->seek(0x26, WPX_SEEK_CUR); + input->seek(iter7->second.offset, librevenge::RVNG_SEEK_SET); + input->seek(0x26, librevenge::RVNG_SEEK_CUR); double v0 = readFixedPoint(input); double v1 = readFixedPoint(input); double v2 = readFixedPoint(input) / 1000.0; @@ -304,7 +284,7 @@ } } -bool libcdr::CDRParser::gatherWaldoInformation(WPXInputStream *input, std::vector &records, std::map &records2, +bool libcdr::CDRParser::gatherWaldoInformation(librevenge::RVNGInputStream *input, std::vector &records, std::map &records2, std::map &records3, std::map &records4, std::map &records6, std::map &records7, std::map &records8, std::map recordsOther) @@ -312,7 +292,7 @@ try { unsigned short numRecords = readU16(input); - for (; numRecords > 0 && !input->atEOS(); --numRecords) + for (; numRecords > 0 && !input->isEnd(); --numRecords) { unsigned char recordType = readU8(input); unsigned recordId = readU32(input); @@ -355,7 +335,7 @@ } -bool libcdr::CDRParser::parseWaldoStructure(WPXInputStream *input, std::stack &waldoStack, +bool libcdr::CDRParser::parseWaldoStructure(librevenge::RVNGInputStream *input, std::stack &waldoStack, const std::map &records1, std::map &records2) { while (!waldoStack.empty()) @@ -400,10 +380,10 @@ return true; } -void libcdr::CDRParser::readWaldoRecord(WPXInputStream *input, const WaldoRecordInfo &info) +void libcdr::CDRParser::readWaldoRecord(librevenge::RVNGInputStream *input, const WaldoRecordInfo &info) { CDR_DEBUG_MSG(("CDRParser::readWaldoRecord, type %i, id %x, offset %x\n", info.type, info.id, info.offset)); - input->seek(info.offset, WPX_SEEK_SET); + input->seek(info.offset, librevenge::RVNG_SEEK_SET); switch (info.type) { case 2: @@ -426,7 +406,7 @@ } } -void libcdr::CDRParser::readWaldoTrfd(WPXInputStream *input) +void libcdr::CDRParser::readWaldoTrfd(librevenge::RVNGInputStream *input) { if (m_version >= 400) return; @@ -439,9 +419,9 @@ if (m_version >= 300) { long startPosition = input->tell(); - input->seek(0x0a, WPX_SEEK_CUR); + input->seek(0x0a, librevenge::RVNG_SEEK_CUR); unsigned offset = readUnsigned(input); - input->seek(startPosition+offset, WPX_SEEK_SET); + input->seek(startPosition+offset, librevenge::RVNG_SEEK_SET); v0 = readFixedPoint(input); v1 = readFixedPoint(input); x0 = (double)readS32(input) / 1000.0; @@ -466,7 +446,7 @@ m_collector->collectTransform(trafos, m_version < 400); } -void libcdr::CDRParser::readWaldoLoda(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readWaldoLoda(librevenge::RVNGInputStream *input, unsigned length) { if (m_version >= 300) return; @@ -478,17 +458,17 @@ unsigned fillOffset = readU16(input); if (outlOffset) { - input->seek(startPosition + outlOffset, WPX_SEEK_SET); + input->seek(startPosition + outlOffset, librevenge::RVNG_SEEK_SET); readWaldoOutl(input); } if (fillOffset) { - input->seek(startPosition + fillOffset, WPX_SEEK_SET); + input->seek(startPosition + fillOffset, librevenge::RVNG_SEEK_SET); readWaldoFill(input); } if (shapeOffset) { - input->seek(startPosition + shapeOffset, WPX_SEEK_SET); + input->seek(startPosition + shapeOffset, librevenge::RVNG_SEEK_SET); if (chunkType == 0x00) // Rectangle readRectangle(input); else if (chunkType == 0x01) // Ellipse @@ -500,17 +480,17 @@ else if (chunkType == 0x04) // Bitmap readBitmap(input); } - input->seek(startPosition + length, WPX_SEEK_SET); + input->seek(startPosition + length, librevenge::RVNG_SEEK_SET); } -bool libcdr::CDRParser::parseRecords(WPXInputStream *input, unsigned *blockLengths, unsigned level) +bool libcdr::CDRParser::parseRecords(librevenge::RVNGInputStream *input, unsigned *blockLengths, unsigned level) { if (!input) { return false; } m_collector->collectLevel(level); - while (!input->atEOS()) + while (!input->isEnd()) { if (!parseRecord(input, blockLengths, level)) return false; @@ -518,7 +498,7 @@ return true; } -bool libcdr::CDRParser::parseRecord(WPXInputStream *input, unsigned *blockLengths, unsigned level) +bool libcdr::CDRParser::parseRecord(librevenge::RVNGInputStream *input, unsigned *blockLengths, unsigned level) { if (!input) { @@ -527,11 +507,11 @@ try { m_collector->collectLevel(level); - while (!input->atEOS() && readU8(input) == 0) + while (!input->isEnd() && readU8(input) == 0) { } - if (!input->atEOS()) - input->seek(-1, WPX_SEEK_CUR); + if (!input->isEnd()) + input->seek(-1, librevenge::RVNG_SEEK_CUR); else return true; unsigned fourCC = readU32(input); @@ -557,7 +537,7 @@ if (listType == CDR_FOURCC_cmpr) { cmprsize = readU32(input); - input->seek(12, WPX_SEEK_CUR); + input->seek(12, librevenge::RVNG_SEEK_CUR); if (readU32(input) != CDR_FOURCC_CPng) return false; if (readU16(input) != 1) @@ -594,7 +574,7 @@ std::vector tmpBlockLengths; unsigned blocksLength = length + position - input->tell(); CDRInternalStream tmpBlocksStream(input, blocksLength, compressed); - while (!tmpBlocksStream.atEOS()) + while (!tmpBlocksStream.isEnd()) tmpBlockLengths.push_back(readU32(&tmpBlocksStream)); if (!parseRecords(&tmpStream, tmpBlockLengths.size() ? &tmpBlockLengths[0] : 0, level+1)) return false; @@ -603,7 +583,7 @@ else readRecord(fourCC, length, input); - input->seek(position + length, WPX_SEEK_SET); + input->seek(position + length, librevenge::RVNG_SEEK_SET); return true; } catch (...) @@ -612,7 +592,7 @@ } } -void libcdr::CDRParser::readRecord(unsigned fourCC, unsigned length, WPXInputStream *input) +void libcdr::CDRParser::readRecord(unsigned fourCC, unsigned length, librevenge::RVNGInputStream *input) { long recordStart = input->tell(); switch (fourCC) @@ -638,7 +618,7 @@ readFild(input, length); break; case CDR_FOURCC_arrw: - // readArrw(input, length); + readArrw(input, length); break; case CDR_FOURCC_flgs: readFlags(input, length); @@ -691,17 +671,17 @@ default: break; } - input->seek(recordStart + length, WPX_SEEK_CUR); + input->seek(recordStart + length, librevenge::RVNG_SEEK_CUR); } -double libcdr::CDRParser::readRectCoord(WPXInputStream *input) +double libcdr::CDRParser::readRectCoord(librevenge::RVNGInputStream *input) { if (m_version < 1500) return readCoordinate(input); return readDouble(input) / 254000.0; } -libcdr::CDRColor libcdr::CDRParser::readColor(WPXInputStream *input) +libcdr::CDRColor libcdr::CDRParser::readColor(librevenge::RVNGInputStream *input) { unsigned short colorModel = 0; unsigned colorValue = 0; @@ -730,7 +710,7 @@ else { paletteID = readU16(input); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); } unsigned short ix = readU16(input); unsigned short tint = readU16(input); @@ -1068,7 +1048,7 @@ else if (colorModel == 0x0e) { unsigned short paletteID = readU16(input); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned short ix = readU16(input); unsigned short tint = readU16(input); switch (paletteID) @@ -1146,7 +1126,7 @@ } else { - input->seek(6, WPX_SEEK_CUR); + input->seek(6, librevenge::RVNG_SEEK_CUR); colorValue = readU32(input); } } @@ -1164,7 +1144,7 @@ colorValue |= (m & 0xff); colorValue <<= 8; colorValue |= (c & 0xff); - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); } else { @@ -1174,7 +1154,7 @@ return libcdr::CDRColor(colorModel, colorValue); } -void libcdr::CDRParser::readRectangle(WPXInputStream *input) +void libcdr::CDRParser::readRectangle(librevenge::RVNGInputStream *input) { double x0 = readRectCoord(input); double y0 = readRectCoord(input); @@ -1198,16 +1178,16 @@ scaleX = readDouble(input); scaleY = readDouble(input); unsigned int scale_with = readU8(input); - input->seek(7, WPX_SEEK_CUR); + input->seek(7, librevenge::RVNG_SEEK_CUR); if (scale_with == 0) { r3 = readDouble(input); corner_type = readU8(input); - input->seek(15, WPX_SEEK_CUR); + input->seek(15, librevenge::RVNG_SEEK_CUR); r2 = readDouble(input); - input->seek(16, WPX_SEEK_CUR); + input->seek(16, librevenge::RVNG_SEEK_CUR); r1 = readDouble(input); - input->seek(16, WPX_SEEK_CUR); + input->seek(16, librevenge::RVNG_SEEK_CUR); r0 = readDouble(input); double width = fabs(x0*scaleX / 2.0); @@ -1221,11 +1201,11 @@ { r3 = readRectCoord(input); corner_type = readU8(input); - input->seek(15, WPX_SEEK_CUR); + input->seek(15, librevenge::RVNG_SEEK_CUR); r2 = readRectCoord(input); - input->seek(16, WPX_SEEK_CUR); + input->seek(16, librevenge::RVNG_SEEK_CUR); r1 = readRectCoord(input); - input->seek(16, WPX_SEEK_CUR); + input->seek(16, librevenge::RVNG_SEEK_CUR); r0 = readRectCoord(input); } } @@ -1286,7 +1266,7 @@ m_collector->collectPath(path); } -void libcdr::CDRParser::readEllipse(WPXInputStream *input) +void libcdr::CDRParser::readEllipse(librevenge::RVNGInputStream *input) { CDR_DEBUG_MSG(("CDRParser::readEllipse\n")); @@ -1350,12 +1330,12 @@ m_collector->collectPath(path); } -void libcdr::CDRParser::readDisp(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readDisp(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); #if DUMP_PREVIEW_IMAGE - WPXBinaryData previewImage; + librevenge::RVNGBinaryData previewImage; previewImage.append(0x42); previewImage.append(0x4d); @@ -1370,16 +1350,16 @@ previewImage.append(0x00); long startPosition = input->tell(); - input->seek(0x18, WPX_SEEK_CUR); + input->seek(0x18, librevenge::RVNG_SEEK_CUR); int lengthX = length + 10 - readU32(input); - input->seek(startPosition, WPX_SEEK_SET); + input->seek(startPosition, librevenge::RVNG_SEEK_SET); previewImage.append((unsigned char)((lengthX) & 0x000000ff)); previewImage.append((unsigned char)(((lengthX) & 0x0000ff00) >> 8)); previewImage.append((unsigned char)(((lengthX) & 0x00ff0000) >> 16)); previewImage.append((unsigned char)(((lengthX) & 0xff000000) >> 24)); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); for (unsigned i = 4; iseek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); std::vector > points; std::vector pointTypes; for (unsigned j=0; jseek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned short pointNum = readU16(input)+readU16(input); - input->seek(16, WPX_SEEK_CUR); + input->seek(16, librevenge::RVNG_SEEK_CUR); std::vector > points; std::vector pointTypes; for (unsigned j=0; jseek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned short pointNum = readU16(input); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); std::vector pointTypes; for (unsigned k=0; kseek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); std::vector > points; for (unsigned j=0; jseek(2, WPX_SEEK_CUR); - input->seek(8, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); imageId = readUnsigned(input); - input->seek(20, WPX_SEEK_CUR); + input->seek(20, librevenge::RVNG_SEEK_CUR); CDRPath path; path.appendMoveTo(x1, y1); path.appendLineTo(x1, y2); @@ -1494,19 +1476,19 @@ y1 = (double)readCoordinate(input); x2 = (double)readCoordinate(input); y2 = (double)readCoordinate(input); - input->seek(16, WPX_SEEK_CUR); + input->seek(16, librevenge::RVNG_SEEK_CUR); - input->seek(16, WPX_SEEK_CUR); + input->seek(16, librevenge::RVNG_SEEK_CUR); imageId = readUnsigned(input); if (m_version < 800) - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); else if (m_version >= 800 && m_version < 900) - input->seek(12, WPX_SEEK_CUR); + input->seek(12, librevenge::RVNG_SEEK_CUR); else - input->seek(20, WPX_SEEK_CUR); + input->seek(20, librevenge::RVNG_SEEK_CUR); unsigned short pointNum = readU16(input); - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); std::vector > points; std::vector pointTypes; for (unsigned j=0; jcollectBitmap(imageId, x1, x2, y1, y2); } -void libcdr::CDRParser::readWaldoOutl(WPXInputStream *input) +void libcdr::CDRParser::readWaldoOutl(librevenge::RVNGInputStream *input) { if (m_version >= 400) return; @@ -1533,13 +1515,13 @@ double stretch = (double)readU16(input) / 100.0; double angle = readAngle(input); libcdr::CDRColor color = readColor(input); - input->seek(7, WPX_SEEK_CUR); + input->seek(7, librevenge::RVNG_SEEK_CUR); unsigned short numDash = readU8(input); int fixPosition = input->tell(); std::vector dashArray; for (unsigned short i = 0; i < numDash; ++i) dashArray.push_back(readU8(input)); - input->seek(fixPosition + 10, WPX_SEEK_SET); + input->seek(fixPosition + 10, librevenge::RVNG_SEEK_SET); unsigned short joinType = readU16(input); unsigned short capsType = readU16(input); unsigned startMarkerId = readU32(input); @@ -1555,7 +1537,7 @@ m_collector->collectLineStyle(lineType, capsType, joinType, lineWidth, stretch, angle, color, dashArray, startMarker, endMarker); } -void libcdr::CDRParser::readWaldoFill(WPXInputStream *input) +void libcdr::CDRParser::readWaldoFill(librevenge::RVNGInputStream *input) { if (m_version >= 400) return; @@ -1579,7 +1561,7 @@ color2 = readColor(input); if (m_version >= 200) { - input->seek(7, WPX_SEEK_CUR); + input->seek(7, librevenge::RVNG_SEEK_CUR); gradient.m_edgeOffset = readS16(input); gradient.m_centerXOffset = readInteger(input); gradient.m_centerYOffset = readInteger(input); @@ -1602,7 +1584,7 @@ color2 = readColor(input); if (m_version >= 200) { - input->seek(7, WPX_SEEK_CUR); + input->seek(7, librevenge::RVNG_SEEK_CUR); gradient.m_edgeOffset = readS16(input); gradient.m_centerXOffset = readInteger(input); gradient.m_centerYOffset = readInteger(input); @@ -1624,7 +1606,7 @@ double tileOffsetX = (double)readU16(input) / 100.0; double tileOffsetY = (double)readU16(input) / 100.0; double rcpOffset = (double)readU16(input) / 100.0; - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); color1 = readColor(input); color2 = readColor(input); imageFill = libcdr::CDRImageFill(patternId, patternWidth, patternHeight, false, tileOffsetX, tileOffsetY, rcpOffset, 0); @@ -1638,7 +1620,7 @@ double tileOffsetX = (double)readU16(input) / 100.0; double tileOffsetY = (double)readU16(input) / 100.0; double rcpOffset = (double)readU16(input) / 100.0; - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); imageFill = libcdr::CDRImageFill(patternId, patternWidth, patternHeight, false, tileOffsetX, tileOffsetY, rcpOffset, 0); } break; @@ -1648,7 +1630,7 @@ m_collector->collectFillStyle(fillType, color1, color2, gradient, imageFill); } -void libcdr::CDRParser::readTrfd(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readTrfd(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -1658,16 +1640,16 @@ unsigned startOfArgs = readUnsigned(input); std::vector argOffsets(numOfArgs, 0); unsigned i = 0; - input->seek(startPosition+startOfArgs, WPX_SEEK_SET); + input->seek(startPosition+startOfArgs, librevenge::RVNG_SEEK_SET); while (iseek(startPosition+argOffsets[i], WPX_SEEK_SET); + input->seek(startPosition+argOffsets[i], librevenge::RVNG_SEEK_SET); if (m_version >= 1300) - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); unsigned short tmpType = readU16(input); if (tmpType == 0x08) // trafo { @@ -1678,7 +1660,7 @@ double v4 = 0.0; double y0 = 0.0; if (m_version >= 600) - input->seek(6, WPX_SEEK_CUR); + input->seek(6, librevenge::RVNG_SEEK_CUR); if (m_version >= 500) { v0 = readDouble(input); @@ -1702,7 +1684,7 @@ else if (tmpType == 0x10) { #if 0 - input->seek(6, WPX_SEEK_CUR); + input->seek(6, librevenge::RVNG_SEEK_CUR); unsigned short type = readU16(input); double x = readCoordinate(input); double y = readCoordinate(input); @@ -1729,10 +1711,10 @@ } if (!trafos.empty()) m_collector->collectTransform(trafos,m_version < 400); - input->seek(startPosition+chunkLength, WPX_SEEK_SET); + input->seek(startPosition+chunkLength, librevenge::RVNG_SEEK_SET); } -void libcdr::CDRParser::readFild(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readFild(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -1740,9 +1722,9 @@ unsigned short v13flag = 0; if (m_version >= 1300) { - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); v13flag = readU16(input); - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); } unsigned short fillType = readU16(input); libcdr::CDRColor color1; @@ -1754,45 +1736,45 @@ case 1: // Solid { if (m_version >= 1300) - input->seek(13, WPX_SEEK_CUR); + input->seek(13, librevenge::RVNG_SEEK_CUR); else - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); color1 = readColor(input); } break; case 2: // Gradient { if (m_version >= 1300) - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); else - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); gradient.m_type = readU8(input); if (m_version >= 1300) { - input->seek(17, WPX_SEEK_CUR); + input->seek(17, librevenge::RVNG_SEEK_CUR); gradient.m_edgeOffset = readS16(input); } else if (m_version >= 600) { - input->seek(19, WPX_SEEK_CUR); + input->seek(19, librevenge::RVNG_SEEK_CUR); gradient.m_edgeOffset = readS32(input); } else { - input->seek(11, WPX_SEEK_CUR); + input->seek(11, librevenge::RVNG_SEEK_CUR); gradient.m_edgeOffset = readS16(input); } gradient.m_angle = readAngle(input); gradient.m_centerXOffset = readInteger(input); gradient.m_centerYOffset = readInteger(input); if (m_version >= 600) - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); gradient.m_mode = (unsigned char)(readUnsigned(input) & 0xff); gradient.m_midPoint = (double)readU8(input) / 100.0; - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); unsigned short numStops = (unsigned short)(readUnsigned(input) & 0xffff); if (m_version >= 1300) - input->seek(3, WPX_SEEK_CUR); + input->seek(3, librevenge::RVNG_SEEK_CUR); for (unsigned short i = 0; i < numStops; ++i) { libcdr::CDRGradientStop stop; @@ -1800,13 +1782,13 @@ if (m_version >= 1300) { if (v13flag == 0x9e || (m_version >= 1600 && v13flag == 0x96)) - input->seek(26, WPX_SEEK_CUR); + input->seek(26, librevenge::RVNG_SEEK_CUR); else - input->seek(5, WPX_SEEK_CUR); + input->seek(5, librevenge::RVNG_SEEK_CUR); } stop.m_offset = (double)readUnsigned(input) / 100.0; if (m_version >= 1300) - input->seek(3, WPX_SEEK_CUR); + input->seek(3, librevenge::RVNG_SEEK_CUR); gradient.m_stops.push_back(stop); } } @@ -1814,9 +1796,9 @@ case 7: // Pattern { if (m_version >= 1300) - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); else - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); unsigned patternId = readU32(input); int tmpWidth = readInteger(input); int tmpHeight = readInteger(input); @@ -1828,7 +1810,7 @@ tileOffsetY = (double)readU16(input) / 100.0; } else - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); double rcpOffset = (double)readU16(input) / 100.0; unsigned char flags = readU8(input); double patternWidth = (double)tmpWidth / (m_version < 600 ? 1000.0 : 254000.0); @@ -1841,16 +1823,16 @@ patternHeight = (double)tmpHeight / 100.0; } if (m_version >= 1300) - input->seek(6, WPX_SEEK_CUR); + input->seek(6, librevenge::RVNG_SEEK_CUR); else - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); color1 = readColor(input); if (m_version >= 1300) { if (v13flag == 0x94 || (m_version >= 1600 && v13flag == 0x8c)) - input->seek(31, WPX_SEEK_CUR); + input->seek(31, librevenge::RVNG_SEEK_CUR); else - input->seek(10, WPX_SEEK_CUR); + input->seek(10, librevenge::RVNG_SEEK_CUR); } color2 = readColor(input); imageFill = libcdr::CDRImageFill(patternId, patternWidth, patternHeight, isRelative, tileOffsetX, tileOffsetY, rcpOffset, flags); @@ -1860,12 +1842,12 @@ { if (m_version < 600) fillType = 10; - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); unsigned patternId = readUnsigned(input); if (m_version >= 1600) - input->seek(26, WPX_SEEK_CUR); + input->seek(26, librevenge::RVNG_SEEK_CUR); else if (m_version >= 1300) - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); int tmpWidth = readUnsigned(input); int tmpHeight = readUnsigned(input); double tileOffsetX = 0.0; @@ -1876,7 +1858,7 @@ tileOffsetY = (double)readU16(input) / 100.0; } else - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); double rcpOffset = (double)readU16(input) / 100.0; unsigned char flags = readU8(input); double patternWidth = (double)tmpWidth / (m_version < 600 ? 1000.0 :254000.0); @@ -1889,9 +1871,9 @@ patternHeight = (double)tmpHeight / 100.0; } if (m_version >= 1300) - input->seek(17, WPX_SEEK_CUR); + input->seek(17, librevenge::RVNG_SEEK_CUR); else - input->seek(21, WPX_SEEK_CUR); + input->seek(21, librevenge::RVNG_SEEK_CUR); if (m_version >= 600) patternId = readUnsigned(input); imageFill = libcdr::CDRImageFill(patternId, patternWidth, patternHeight, isRelative, tileOffsetX, tileOffsetY, rcpOffset, flags); @@ -1902,12 +1884,12 @@ if (m_version >= 1300) { if (v13flag == 0x4e) - input->seek(28, WPX_SEEK_CUR); + input->seek(28, librevenge::RVNG_SEEK_CUR); else - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); } else - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); unsigned patternId = readUnsigned(input); int tmpWidth = readUnsigned(input); int tmpHeight = readUnsigned(input); @@ -1919,7 +1901,7 @@ tileOffsetY = (double)readU16(input) / 100.0; } else - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); double rcpOffset = (double)readU16(input) / 100.0; unsigned char flags = readU8(input); double patternWidth = (double)tmpWidth / (m_version < 600 ? 1000.0 :254000.0); @@ -1932,9 +1914,9 @@ patternHeight = (double)tmpHeight / 100.0; } if (m_version >= 1300) - input->seek(17, WPX_SEEK_CUR); + input->seek(17, librevenge::RVNG_SEEK_CUR); else - input->seek(21, WPX_SEEK_CUR); + input->seek(21, librevenge::RVNG_SEEK_CUR); if (m_version >= 600) patternId = readUnsigned(input); imageFill = libcdr::CDRImageFill(patternId, patternWidth, patternHeight, isRelative, tileOffsetX, tileOffsetY, rcpOffset, flags); @@ -1947,12 +1929,12 @@ if (m_version >= 1300) { if (v13flag == 0x18e) - input->seek(36, WPX_SEEK_CUR); + input->seek(36, librevenge::RVNG_SEEK_CUR); else - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); } else - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); unsigned patternId = readU32(input); double patternWidth = 1.0; double patternHeight = 1.0; @@ -1971,7 +1953,7 @@ tileOffsetY = (double)readU16(input) / 100.0; } else - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); rcpOffset = (double)readU16(input) / 100.0; flags = readU8(input); patternWidth = (double)tmpWidth / 254000.0; @@ -1984,9 +1966,9 @@ patternHeight = (double)tmpHeight / 100.0; } if (m_version >= 1300) - input->seek(17, WPX_SEEK_CUR); + input->seek(17, librevenge::RVNG_SEEK_CUR); else - input->seek(21, WPX_SEEK_CUR); + input->seek(21, librevenge::RVNG_SEEK_CUR); patternId = readUnsigned(input); } imageFill = libcdr::CDRImageFill(patternId, patternWidth, patternHeight, isRelative, tileOffsetX, tileOffsetY, rcpOffset, flags); @@ -1998,7 +1980,7 @@ m_fillStyles[fillId] = CDRFillStyle(fillType, color1, color2, gradient, imageFill); } -void libcdr::CDRParser::readOutl(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readOutl(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2009,7 +1991,7 @@ unsigned lngth = 0; while (id != 1) { - input->seek(lngth, WPX_SEEK_CUR); + input->seek(lngth, librevenge::RVNG_SEEK_CUR); id = readU32(input); lngth = readU32(input); } @@ -2018,30 +2000,30 @@ unsigned short capsType = readU16(input); unsigned short joinType = readU16(input); if (m_version < 1300 && m_version >= 600) - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); double lineWidth = (double)readCoordinate(input); double stretch = (double)readU16(input) / 100.0; if (m_version >= 600) - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); double angle = readAngle(input); if (m_version >= 1300) - input->seek(46, WPX_SEEK_CUR); + input->seek(46, librevenge::RVNG_SEEK_CUR); else if (m_version >= 600) - input->seek(52, WPX_SEEK_CUR); + input->seek(52, librevenge::RVNG_SEEK_CUR); libcdr::CDRColor color = readColor(input); if (m_version < 600) - input->seek(10, WPX_SEEK_CUR); + input->seek(10, librevenge::RVNG_SEEK_CUR); else - input->seek(16, WPX_SEEK_CUR); + input->seek(16, librevenge::RVNG_SEEK_CUR); unsigned short numDash = readU16(input); int fixPosition = input->tell(); std::vector dashArray; for (unsigned short i = 0; i < numDash; ++i) dashArray.push_back(readU16(input)); if (m_version < 600) - input->seek(fixPosition + 20, WPX_SEEK_SET); + input->seek(fixPosition + 20, librevenge::RVNG_SEEK_SET); else - input->seek(fixPosition + 22, WPX_SEEK_SET); + input->seek(fixPosition + 22, librevenge::RVNG_SEEK_SET); unsigned startMarkerId = readU32(input); std::map::const_iterator iter = m_arrows.find(startMarkerId); CDRPath startMarker; @@ -2055,7 +2037,7 @@ m_lineStyles[lineId] = CDRLineStyle(lineType, capsType, joinType, lineWidth, stretch, angle, color, dashArray, startMarker, endMarker); } -void libcdr::CDRParser::readLoda(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readLoda(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2070,16 +2052,16 @@ std::vector argOffsets(numOfArgs, 0); std::vector argTypes(numOfArgs, 0); unsigned i = 0; - input->seek(startPosition+startOfArgs, WPX_SEEK_SET); + input->seek(startPosition+startOfArgs, librevenge::RVNG_SEEK_SET); while (iseek(startPosition+startOfArgTypes, WPX_SEEK_SET); + input->seek(startPosition+startOfArgTypes, librevenge::RVNG_SEEK_SET); while (i>0) argTypes[--i] = readUnsigned(input); for (i=0; i < argTypes.size(); i++) { - input->seek(startPosition+argOffsets[i], WPX_SEEK_SET); + input->seek(startPosition+argOffsets[i], librevenge::RVNG_SEEK_SET); if (argTypes[i] == 0x1e) // loda coords { if ((m_version >= 400 && chunkType == 0x01) || (m_version < 400 && chunkType == 0x00)) // Rectangle @@ -2138,10 +2120,10 @@ else if (argTypes[i] == 0x4aba) readPageSize(input); } - input->seek(startPosition+chunkLength, WPX_SEEK_SET); + input->seek(startPosition+chunkLength, librevenge::RVNG_SEEK_SET); } -void libcdr::CDRParser::readFlags(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readFlags(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2149,21 +2131,21 @@ m_collector->collectFlags(flags, m_version >= 400); } -void libcdr::CDRParser::readMcfg(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readMcfg(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); if (m_version >= 1300) - input->seek(12, WPX_SEEK_CUR); + input->seek(12, librevenge::RVNG_SEEK_CUR); else if (m_version >= 900) - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); else if (m_version < 700 && m_version >= 600) - input->seek(0x1c, WPX_SEEK_CUR); + input->seek(0x1c, librevenge::RVNG_SEEK_CUR); double width = 0.0; double height = 0.0; if (m_version < 400) { - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); double x0 = readCoordinate(input); double y0 = readCoordinate(input); double x1 = readCoordinate(input); @@ -2179,12 +2161,12 @@ m_collector->collectPageSize(width, height, -width/2.0, -height/2.0); } -void libcdr::CDRParser::readPolygonCoords(WPXInputStream *input) +void libcdr::CDRParser::readPolygonCoords(librevenge::RVNGInputStream *input) { CDR_DEBUG_MSG(("CDRParser::readPolygonCoords\n")); unsigned short pointNum = readU16(input); - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); std::vector > points; std::vector pointTypes; for (unsigned j=0; jcollectPolygon(); } -void libcdr::CDRParser::readPolygonTransform(WPXInputStream *input) +void libcdr::CDRParser::readPolygonTransform(librevenge::RVNGInputStream *input) { if (m_version < 1300) - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned numAngles = readU32(input); unsigned nextPoint = readU32(input); if (nextPoint <= 1) nextPoint = readU32(input); else - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); if (m_version >= 1300) - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); double rx = readDouble(input); double ry = readDouble(input); double cx = readCoordinate(input); @@ -2219,14 +2201,14 @@ m_collector->collectPolygonTransform(numAngles, nextPoint, rx, ry, cx, cy); } -void libcdr::CDRParser::readPageSize(WPXInputStream *input) +void libcdr::CDRParser::readPageSize(librevenge::RVNGInputStream *input) { double width = readCoordinate(input); double height = readCoordinate(input); m_collector->collectPageSize(width, height, -width/2.0, -height/2.0); } -void libcdr::CDRParser::readWaldoBmp(WPXInputStream *input, unsigned length, unsigned id) +void libcdr::CDRParser::readWaldoBmp(librevenge::RVNGInputStream *input, unsigned length, unsigned id) { if (m_version >= 400) return; @@ -2234,7 +2216,7 @@ return; if (readU8(input) != 0x4d) return; - input->seek(-2, WPX_SEEK_CUR); + input->seek(-2, librevenge::RVNG_SEEK_CUR); unsigned long tmpNumBytesRead = 0; const unsigned char *tmpBuffer = input->read(length, tmpNumBytesRead); if (!tmpNumBytesRead || length != tmpNumBytesRead) @@ -2245,7 +2227,7 @@ return; } -void libcdr::CDRParser::readBmp(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readBmp(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2257,7 +2239,7 @@ if (readU8(input) != 0x4d) return; unsigned lngth = readU32(input); - input->seek(-6, WPX_SEEK_CUR); + input->seek(-6, librevenge::RVNG_SEEK_CUR); unsigned long tmpNumBytesRead = 0; const unsigned char *tmpBuffer = input->read(lngth, tmpNumBytesRead); if (!tmpNumBytesRead || lngth != tmpNumBytesRead) @@ -2268,24 +2250,24 @@ return; } if (m_version < 600) - input->seek(14, WPX_SEEK_CUR); + input->seek(14, librevenge::RVNG_SEEK_CUR); else if (m_version < 700) - input->seek(46, WPX_SEEK_CUR); + input->seek(46, librevenge::RVNG_SEEK_CUR); else - input->seek(50, WPX_SEEK_CUR); + input->seek(50, librevenge::RVNG_SEEK_CUR); unsigned colorModel = readU32(input); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned width = readU32(input); unsigned height = readU32(input); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned bpp = readU32(input); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned bmpsize = readU32(input); - input->seek(32, WPX_SEEK_CUR); + input->seek(32, librevenge::RVNG_SEEK_CUR); std::vector palette; if (bpp < 24 && colorModel != 5 && colorModel != 6) { - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); unsigned short palettesize = readU16(input); for (unsigned short i = 0; i collectBmp(imageId, colorModel, width, height, bpp, palette, bitmap); } -void libcdr::CDRParser::readOpacity(WPXInputStream *input, unsigned /* length */) +void libcdr::CDRParser::readOpacity(librevenge::RVNGInputStream *input, unsigned /* length */) { if (m_version < 1300) - input->seek(10, WPX_SEEK_CUR); + input->seek(10, librevenge::RVNG_SEEK_CUR); else - input->seek(14, WPX_SEEK_CUR); + input->seek(14, librevenge::RVNG_SEEK_CUR); double opacity = (double)readU16(input) / 1000.0; m_collector->collectFillOpacity(opacity); } -void libcdr::CDRParser::readBmpf(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readBmpf(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2324,13 +2306,13 @@ return; unsigned width = readU32(input); unsigned height = readU32(input); - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); unsigned bpp = readU16(input); if (bpp != 1) return; - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned dataSize = readU32(input); - input->seek(length - dataSize - 28, WPX_SEEK_CUR); + input->seek(length - dataSize - 28, librevenge::RVNG_SEEK_CUR); std::vector pattern(dataSize); unsigned long tmpNumBytesRead = 0; const unsigned char *tmpBuffer = input->read(dataSize, tmpNumBytesRead); @@ -2340,22 +2322,22 @@ m_collector->collectBmpf(patternId, width, height, pattern); } -void libcdr::CDRParser::readWaldoBmpf(WPXInputStream *input, unsigned id) +void libcdr::CDRParser::readWaldoBmpf(librevenge::RVNGInputStream *input, unsigned id) { unsigned headerLength = readU32(input); if (headerLength != 40) return; unsigned width = readU32(input); unsigned height = readU32(input); - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); unsigned bpp = readU16(input); if (bpp != 1) return; - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned dataSize = readU32(input); std::vector pattern(dataSize); unsigned long tmpNumBytesRead = 0; - input->seek(24, WPX_SEEK_CUR); // TODO: is this empirical experience universal??? + input->seek(24, librevenge::RVNG_SEEK_CUR); // TODO: is this empirical experience universal??? const unsigned char *tmpBuffer = input->read(dataSize, tmpNumBytesRead); if (dataSize != tmpNumBytesRead) return; @@ -2363,12 +2345,12 @@ m_collector->collectBmpf(id, width, height, pattern); } -void libcdr::CDRParser::readPpdt(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readPpdt(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); unsigned short pointNum = readU16(input); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); std::vector > points; std::vector knotVector; for (unsigned j=0; jcollectPpdt(points, knotVector); } -void libcdr::CDRParser::readFtil(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readFtil(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2398,7 +2380,7 @@ m_collector->collectFillTransform(fillTrafos); } -void libcdr::CDRParser::readVersion(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readVersion(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2409,7 +2391,7 @@ m_precision = libcdr::PRECISION_32BIT; } -bool libcdr::CDRParser::_redirectX6Chunk(WPXInputStream **input, unsigned &length) +bool libcdr::CDRParser::_redirectX6Chunk(librevenge::RVNGInputStream **input, unsigned &length) { if (m_version >= 1600 && length == 0x10) { @@ -2421,8 +2403,8 @@ *input = m_externalStreams[streamNumber]; if (*input) { - (*input)->seek(streamOffset, WPX_SEEK_SET); - return !(*input)->atEOS(); + (*input)->seek(streamOffset, librevenge::RVNG_SEEK_SET); + return !(*input)->isEnd(); } else return false; @@ -2434,7 +2416,7 @@ return true; } -void libcdr::CDRParser::readIccd(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readIccd(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2449,7 +2431,7 @@ m_collector->collectColorProfile(profile); } -void libcdr::CDRParser::readBBox(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readBBox(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2460,7 +2442,7 @@ m_collector->collectBBox(x0, y0, x1, y1); } -void libcdr::CDRParser::readSpnd(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readSpnd(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2468,7 +2450,7 @@ m_collector->collectSpnd(spnd); } -void libcdr::CDRParser::readVpat(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readVpat(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); @@ -2477,31 +2459,31 @@ const unsigned char *buffer = input->read(length-4, numBytesRead); if (numBytesRead) { - WPXBinaryData data(buffer, numBytesRead); + librevenge::RVNGBinaryData data(buffer, numBytesRead); m_collector->collectVectorPattern(fillId, data); } } -void libcdr::CDRParser::readUidr(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readUidr(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); unsigned colorId = readU32(input); unsigned userId = readU32(input); - input->seek(36, WPX_SEEK_CUR); + input->seek(36, librevenge::RVNG_SEEK_CUR); CDRColor color = readColor(input); m_collector->collectPaletteEntry(colorId, userId, color); } -void libcdr::CDRParser::readFont(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readFont(librevenge::RVNGInputStream *input, unsigned length) { if (!_redirectX6Chunk(&input, length)) throw GenericException(); unsigned short fontId = readU16(input); unsigned short fontEncoding = readU16(input); - input->seek(14, WPX_SEEK_CUR); + input->seek(14, librevenge::RVNG_SEEK_CUR); std::vector name; - WPXString fontName; + librevenge::RVNGString fontName; if (m_version >= 1200) { unsigned short character = 0; @@ -2541,7 +2523,7 @@ m_fonts[fontId] = CDRFont(fontName, fontEncoding); } -void libcdr::CDRParser::readStlt(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readStlt(librevenge::RVNGInputStream *input, unsigned length) { #ifndef DEBUG unsigned version = m_version; @@ -2565,10 +2547,10 @@ for (i=0; iseek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); fillIds[fillId] = readU32(input); if (m_version >= 1300) - input->seek(48, WPX_SEEK_CUR); + input->seek(48, librevenge::RVNG_SEEK_CUR); } unsigned numOutls = readU32(input); CDR_DEBUG_MSG(("CDRParser::readStlt numOutls 0x%x\n", numOutls)); @@ -2576,7 +2558,7 @@ for (i=0; iseek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); outlIds[outlId] = readU32(input); } unsigned numFonts = readU32(input); @@ -2587,17 +2569,17 @@ { unsigned fontStyleId = readU32(input); if (m_version < 1000) - input->seek(12, WPX_SEEK_CUR); + input->seek(12, librevenge::RVNG_SEEK_CUR); else - input->seek(20, WPX_SEEK_CUR); + input->seek(20, librevenge::RVNG_SEEK_CUR); fontIds[fontStyleId] = readU16(input); fontEncodings[fontStyleId] = readU16(input); - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); fontSizes[fontStyleId] = readCoordinate(input); if (m_version < 1000) - input->seek(12, WPX_SEEK_CUR); + input->seek(12, librevenge::RVNG_SEEK_CUR); else - input->seek(20, WPX_SEEK_CUR); + input->seek(20, librevenge::RVNG_SEEK_CUR); } unsigned numAligns = readU32(input); std::map aligns; @@ -2605,49 +2587,49 @@ for (i=0; iseek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); aligns[alignId] = readU32(input); } unsigned numIntervals = readU32(input); CDR_DEBUG_MSG(("CDRParser::readStlt numIntervals 0x%x\n", numIntervals)); for (i=0; iseek(52, WPX_SEEK_CUR); + input->seek(52, librevenge::RVNG_SEEK_CUR); } unsigned numSet5s = readU32(input); CDR_DEBUG_MSG(("CDRParser::readStlt numSet5s 0x%x\n", numSet5s)); for (i=0; iseek(152, WPX_SEEK_CUR); + input->seek(152, librevenge::RVNG_SEEK_CUR); } unsigned numTabs = readU32(input); CDR_DEBUG_MSG(("CDRParser::readStlt numTabs 0x%x\n", numTabs)); for (i=0; iseek(784, WPX_SEEK_CUR); + input->seek(784, librevenge::RVNG_SEEK_CUR); } unsigned numBullets = readU32(input); CDR_DEBUG_MSG(("CDRParser::readStlt numBullets 0x%x\n", numBullets)); for (i=0; iseek(40, WPX_SEEK_CUR); + input->seek(40, librevenge::RVNG_SEEK_CUR); if (m_version > 1300) - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); if (m_version >= 1300) { if (readU32(input)) - input->seek(68, WPX_SEEK_CUR); + input->seek(68, librevenge::RVNG_SEEK_CUR); else - input->seek(12, WPX_SEEK_CUR); + input->seek(12, librevenge::RVNG_SEEK_CUR); } else { - input->seek(20, WPX_SEEK_CUR); + input->seek(20, librevenge::RVNG_SEEK_CUR); if (m_version >= 1000) - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); if (readU32(input)) - input->seek(8, WPX_SEEK_CUR); - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); } } unsigned numIndents = readU32(input); @@ -2656,7 +2638,7 @@ for (i=0; iseek(12, WPX_SEEK_CUR); + input->seek(12, librevenge::RVNG_SEEK_CUR); rightIndents[indentId] = readCoordinate(input); firstIndents[indentId] = readCoordinate(input); leftIndents[indentId] = readCoordinate(input); @@ -2665,15 +2647,15 @@ CDR_DEBUG_MSG(("CDRParser::readStlt numHypens 0x%x\n", numHypens)); for (i=0; iseek(32, WPX_SEEK_CUR); + input->seek(32, librevenge::RVNG_SEEK_CUR); if (m_version >= 1300) - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); } unsigned numDropcaps = readU32(input); CDR_DEBUG_MSG(("CDRParser::readStlt numDropcaps 0x%x\n", numDropcaps)); for (i=0; iseek(28, WPX_SEEK_CUR); + input->seek(28, librevenge::RVNG_SEEK_CUR); } try { @@ -2685,7 +2667,7 @@ CDR_DEBUG_MSG(("CDRParser::readStlt numSet11s 0x%x\n", numSet11s)); for (i=0; iseek(12, WPX_SEEK_CUR); + input->seek(12, librevenge::RVNG_SEEK_CUR); } } std::map styles; @@ -2697,12 +2679,12 @@ unsigned styleId = readU32(input); CDRStltRecord style; style.parentId = readU32(input); - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); unsigned namelen = readU32(input); CDR_DEBUG_MSG(("CDRParser::readStlt parsing styles namelen 0x%x\n", namelen)); if (m_version >= 1200) namelen *= 2; - input->seek(namelen, WPX_SEEK_CUR); + input->seek(namelen, librevenge::RVNG_SEEK_CUR); style.fillId = readU32(input); style.outlId = readU32(input); if (num > 1) @@ -2804,7 +2786,7 @@ { CDR_DEBUG_MSG(("Catching EndOfStreamException and trying to parse as version 801\n")); m_version = 801; - input->seek(startPosition, WPX_SEEK_SET); + input->seek(startPosition, librevenge::RVNG_SEEK_SET); readStlt(input, length); return; } @@ -2823,7 +2805,7 @@ #endif } -void libcdr::CDRParser::readTxsm(WPXInputStream *input, unsigned length) +void libcdr::CDRParser::readTxsm(librevenge::RVNGInputStream *input, unsigned length) { #ifndef DEBUG try @@ -2840,42 +2822,42 @@ if (m_version >= 1600) return readTxsm16(input); if (m_version >= 1500) - input->seek(0x25, WPX_SEEK_CUR); + input->seek(0x25, librevenge::RVNG_SEEK_CUR); else - input->seek(0x24, WPX_SEEK_CUR); + input->seek(0x24, librevenge::RVNG_SEEK_CUR); if (readU32(input)) { if (m_version < 800) - input->seek(32, WPX_SEEK_CUR); + input->seek(32, librevenge::RVNG_SEEK_CUR); } if (m_version < 800) - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned textId = readU32(input); - input->seek(48, WPX_SEEK_CUR); + input->seek(48, librevenge::RVNG_SEEK_CUR); if (m_version >= 800) { if (readU32(input)) { - input->seek(32, WPX_SEEK_CUR); + input->seek(32, librevenge::RVNG_SEEK_CUR); if (m_version >= 1300) - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); } } if (m_version >= 1500) - input->seek(12, WPX_SEEK_CUR); + input->seek(12, librevenge::RVNG_SEEK_CUR); unsigned num = readU32(input); unsigned num4 = 1; if (!num) { if (m_version >= 800) - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); if (m_version > 800) - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); if (m_version >= 1400) - input->seek(2, WPX_SEEK_CUR); - input->seek(24, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); + input->seek(24, librevenge::RVNG_SEEK_CUR); if (m_version < 800) - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); num4 = readU32(input); } @@ -2883,8 +2865,8 @@ { unsigned stlId = readU32(input); if (m_version >= 1300 && num) - input->seek(1, WPX_SEEK_CUR); - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); unsigned numRecords = readU32(input); std::map charStyles; unsigned i = 0; @@ -2913,15 +2895,15 @@ charStyle.m_charSet = charSet; } if (fl2&2) // Bold/Italic, etc. - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); if (fl2&4) // Font Size charStyle.m_fontSize = readCoordinate(input); if (fl2&8) // assumption - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); if (fl2&0x10) // Offset X - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); if (fl2&0x20) // Offset Y - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); if (fl2&0x40) // Font Colour { unsigned fillId = readU32(input); @@ -2929,7 +2911,7 @@ if (iter != m_fillStyles.end()) charStyle.m_fillStyle = iter->second; if (m_version >= 1500) - input->seek(48, WPX_SEEK_CUR); + input->seek(48, librevenge::RVNG_SEEK_CUR); } if (fl2&0x80) // Font Outl Colour { @@ -2943,20 +2925,20 @@ if (m_version >= 1300) { unsigned tlen = readU32(input); - input->seek(tlen*2, WPX_SEEK_CUR); + input->seek(tlen*2, librevenge::RVNG_SEEK_CUR); } else - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); } if (fl3&0x20) // Something { unsigned flag = readU8(input); if (flag) - input->seek(52, WPX_SEEK_CUR); + input->seek(52, librevenge::RVNG_SEEK_CUR); } if (fl0 == 0x02) if (m_version >= 1300) - input->seek(48, WPX_SEEK_CUR); + input->seek(48, librevenge::RVNG_SEEK_CUR); charStyles[2*i] = charStyle; } @@ -2981,7 +2963,7 @@ std::vector textData(numBytesRead); if (numBytesRead) memcpy(&textData[0], buffer, numBytesRead); - input->seek(1, WPX_SEEK_CUR); //skip the 0 ending character + input->seek(1, librevenge::RVNG_SEEK_CUR); //skip the 0 ending character if (!textData.empty()) m_collector->collectText(textId, stlId, textData, charDescriptions, charStyles); @@ -2994,54 +2976,54 @@ #endif } -void libcdr::CDRParser::readTxsm16(WPXInputStream *input) +void libcdr::CDRParser::readTxsm16(librevenge::RVNGInputStream *input) { #ifndef DEBUG try { #endif unsigned frameFlag = readU32(input); - input->seek(41, WPX_SEEK_CUR); + input->seek(41, librevenge::RVNG_SEEK_CUR); unsigned textId = readU32(input); - input->seek(48, WPX_SEEK_CUR); + input->seek(48, librevenge::RVNG_SEEK_CUR); if (!frameFlag) { - input->seek(28, WPX_SEEK_CUR); + input->seek(28, librevenge::RVNG_SEEK_CUR); unsigned tlen = readU32(input); if (m_version < 1700) tlen *= 2; - input->seek(tlen + 4, WPX_SEEK_CUR); + input->seek(tlen + 4, librevenge::RVNG_SEEK_CUR); } else { unsigned textOnPath = readU32(input); if (textOnPath == 1) { - input->seek(4, WPX_SEEK_CUR); // var1 - input->seek(4, WPX_SEEK_CUR); // Orientation - input->seek(4, WPX_SEEK_CUR); // var2 - input->seek(4, WPX_SEEK_CUR); // var3 - input->seek(4, WPX_SEEK_CUR); // Offset - input->seek(4, WPX_SEEK_CUR); // var4 - input->seek(4, WPX_SEEK_CUR); // Distance - input->seek(4, WPX_SEEK_CUR); // var5 - input->seek(4, WPX_SEEK_CUR); // Mirror Vert - input->seek(4, WPX_SEEK_CUR); // Mirror Hor - input->seek(4, WPX_SEEK_CUR); // var6 - input->seek(4, WPX_SEEK_CUR); // var7 + input->seek(4, librevenge::RVNG_SEEK_CUR); // var1 + input->seek(4, librevenge::RVNG_SEEK_CUR); // Orientation + input->seek(4, librevenge::RVNG_SEEK_CUR); // var2 + input->seek(4, librevenge::RVNG_SEEK_CUR); // var3 + input->seek(4, librevenge::RVNG_SEEK_CUR); // Offset + input->seek(4, librevenge::RVNG_SEEK_CUR); // var4 + input->seek(4, librevenge::RVNG_SEEK_CUR); // Distance + input->seek(4, librevenge::RVNG_SEEK_CUR); // var5 + input->seek(4, librevenge::RVNG_SEEK_CUR); // Mirror Vert + input->seek(4, librevenge::RVNG_SEEK_CUR); // Mirror Hor + input->seek(4, librevenge::RVNG_SEEK_CUR); // var6 + input->seek(4, librevenge::RVNG_SEEK_CUR); // var7 } else - input->seek(8, WPX_SEEK_CUR); - input->seek(4, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); } unsigned stlId = readU32(input); if (frameFlag) - input->seek(1, WPX_SEEK_CUR); - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); unsigned len2 = readU32(input); if (m_version < 1700) @@ -3056,15 +3038,15 @@ for (i=0; iseek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned flag = readU8(input); - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); unsigned lenN = 0; if (flag & 0x04) { lenN = readU32(input); lenN *= 2; - input->seek(lenN, WPX_SEEK_CUR); + input->seek(lenN, librevenge::RVNG_SEEK_CUR); } lenN = readU32(input); if (m_version < 1700) @@ -3097,15 +3079,15 @@ #endif } -void libcdr::CDRParser::readTxsm6(WPXInputStream *input) +void libcdr::CDRParser::readTxsm6(librevenge::RVNGInputStream *input) { unsigned fflag1 = readU32(input); - input->seek(0x20, WPX_SEEK_CUR); + input->seek(0x20, librevenge::RVNG_SEEK_CUR); unsigned textId = readU32(input); - input->seek(48, WPX_SEEK_CUR); - input->seek(4, WPX_SEEK_CUR); + input->seek(48, librevenge::RVNG_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); if (!fflag1) - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); unsigned stlId = readU32(input); unsigned numSt = readU32(input); unsigned i = 0; @@ -3114,7 +3096,7 @@ { CDRCharacterStyle charStyle; unsigned char flag = readU8(input); - input->seek(3, WPX_SEEK_CUR); + input->seek(3, librevenge::RVNG_SEEK_CUR); if (flag&0x01) { unsigned short fontId = readU16(input); @@ -3129,13 +3111,13 @@ charStyle.m_charSet = charSet; } else - input->seek(4, WPX_SEEK_CUR); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); if (flag&0x04) charStyle.m_fontSize = readCoordinate(input); else - input->seek(4, WPX_SEEK_CUR); - input->seek(44, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); + input->seek(44, librevenge::RVNG_SEEK_CUR); if (flag&0x10) { unsigned fillId = readU32(input); @@ -3157,21 +3139,21 @@ std::vector charDescriptions; for (i=0; iseek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); textData.push_back(readU8(input)); - input->seek(5, WPX_SEEK_CUR); + input->seek(5, librevenge::RVNG_SEEK_CUR); charDescriptions.push_back(readU8(input) << 1); - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); } if (!textData.empty()) m_collector->collectText(textId, stlId, textData, charDescriptions, charStyles); } -void libcdr::CDRParser::readTxsm5(WPXInputStream *input) +void libcdr::CDRParser::readTxsm5(librevenge::RVNGInputStream *input) { - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned textId = readU16(input); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned stlId = readU16(input); unsigned numSt = readU16(input); unsigned i = 0; @@ -3180,7 +3162,7 @@ { CDRCharacterStyle charStyle; unsigned char flag = readU8(input); - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); if (flag&0x01) { unsigned short fontId = readU8(input); @@ -3195,13 +3177,13 @@ charStyle.m_charSet = charSet; } else - input->seek(2, WPX_SEEK_CUR); - input->seek(6, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); + input->seek(6, librevenge::RVNG_SEEK_CUR); if (flag&0x04) charStyle.m_fontSize = readCoordinate(input); else - input->seek(2, WPX_SEEK_CUR); - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); if (flag&0x10) { unsigned fillId = readU32(input); @@ -3210,7 +3192,7 @@ charStyle.m_fillStyle = iter->second; } else - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); if (flag&0x20) { unsigned outlId = readU32(input); @@ -3219,8 +3201,8 @@ charStyle.m_lineStyle = iter->second; } else - input->seek(4, WPX_SEEK_CUR); - input->seek(14, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); + input->seek(14, librevenge::RVNG_SEEK_CUR); charStyles[2*i] = charStyle; } unsigned numChars = readU16(input); @@ -3228,21 +3210,21 @@ std::vector charDescriptions; for (i=0; iseek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); textData.push_back(readU8(input)); - input->seek(1, WPX_SEEK_CUR); + input->seek(1, librevenge::RVNG_SEEK_CUR); charDescriptions.push_back((readU16(input) >> 3) & 0xff); } if (!textData.empty()) m_collector->collectText(textId, stlId, textData, charDescriptions, charStyles); } -void libcdr::CDRParser::readUdta(WPXInputStream *input) +void libcdr::CDRParser::readUdta(librevenge::RVNGInputStream *input) { CDR_DEBUG_MSG(("libcdr::CDRParser::readUdta\n")); if (m_version >= 1300 && m_version < 1600) { - input->seek(6, WPX_SEEK_CUR); // Not sure what these bytes are for. Field id? + input->seek(6, librevenge::RVNG_SEEK_CUR); // Not sure what these bytes are for. Field id? std::vector name; unsigned short c; for (;;) @@ -3251,12 +3233,12 @@ name.push_back((unsigned char)(c & 0xff)); name.push_back((unsigned char)(c >> 8)); } - WPXString fieldName; + librevenge::RVNGString fieldName; appendCharacters(fieldName, name); } } -void libcdr::CDRParser::readStyd(WPXInputStream *input) +void libcdr::CDRParser::readStyd(librevenge::RVNGInputStream *input) { CDR_DEBUG_MSG(("libcdr::CDRParser::readStyd\n")); if (m_version >= 700) @@ -3275,16 +3257,16 @@ std::vector argOffsets(numOfArgs, 0); std::vector argTypes(numOfArgs, 0); unsigned i = 0; - input->seek(startPosition+startOfArgs, WPX_SEEK_SET); + input->seek(startPosition+startOfArgs, librevenge::RVNG_SEEK_SET); while (iseek(startPosition+startOfArgTypes, WPX_SEEK_SET); + input->seek(startPosition+startOfArgTypes, librevenge::RVNG_SEEK_SET); while (i>0) argTypes[--i] = readUnsigned(input); for (i=0; i < argTypes.size(); i++) { - input->seek(startPosition+argOffsets[i], WPX_SEEK_SET); + input->seek(startPosition+argOffsets[i], librevenge::RVNG_SEEK_SET); CDR_DEBUG_MSG(("Styd: argument type: 0x%x\n", argTypes[i])); switch (argTypes[i]) { @@ -3309,7 +3291,7 @@ case STYD_FONTS: { if (m_version >= 600) - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); unsigned short fontId = readUnsignedShort(input); std::map::const_iterator iterFont = m_fonts.find(fontId); if (iterFont != m_fonts.end()) @@ -3321,7 +3303,7 @@ if (charSet) charStyle.m_charSet = charSet; if (m_version >= 600) - input->seek(8, WPX_SEEK_CUR); + input->seek(8, librevenge::RVNG_SEEK_CUR); charStyle.m_fontSize = readCoordinate(input); break; } @@ -3346,33 +3328,33 @@ break; } } - input->seek(startPosition+chunkLength, WPX_SEEK_SET); + input->seek(startPosition+chunkLength, librevenge::RVNG_SEEK_SET); m_collector->collectStld(styleId, charStyle); } -void libcdr::CDRParser::readArtisticText(WPXInputStream *input) +void libcdr::CDRParser::readArtisticText(librevenge::RVNGInputStream *input) { double x = readCoordinate(input); double y = readCoordinate(input); m_collector->collectArtisticText(x, y); } -void libcdr::CDRParser::readParagraphText(WPXInputStream *input) +void libcdr::CDRParser::readParagraphText(librevenge::RVNGInputStream *input) { - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); double width = readCoordinate(input); double height = readCoordinate(input); m_collector->collectParagraphText(0.0, 0.0, width, height); } -void libcdr::CDRParser::_readX6StyleString(WPXInputStream *input, unsigned length, libcdr::CDRCharacterStyle &style) +void libcdr::CDRParser::_readX6StyleString(librevenge::RVNGInputStream *input, unsigned length, libcdr::CDRCharacterStyle &style) { std::vector styleBuffer(length); unsigned long numBytesRead = 0; const unsigned char *tmpBuffer = input->read(length, numBytesRead); if (numBytesRead) memcpy(&styleBuffer[0], tmpBuffer, numBytesRead); - WPXString styleString; + librevenge::RVNGString styleString; if (m_version >= 1700) libcdr::appendCharacters(styleString, styleBuffer, 0); else diff -Nru libcdr-0.0.15/src/lib/CDRParser.h libcdr-0.1.0/src/lib/CDRParser.h --- libcdr-0.0.15/src/lib/CDRParser.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRParser.h 2014-04-10 10:41:50.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CDRPARSER_H__ @@ -35,7 +15,7 @@ #include #include #include -#include +#include #include "CDRTypes.h" #include "CommonParser.h" @@ -47,76 +27,76 @@ class CDRParser : protected CommonParser { public: - explicit CDRParser(const std::vector &externalStreams, CDRCollector *collector); + explicit CDRParser(const std::vector &externalStreams, CDRCollector *collector); virtual ~CDRParser(); - bool parseRecords(WPXInputStream *input, unsigned *blockLengths = 0, unsigned level = 0); - bool parseWaldo(WPXInputStream *input); + bool parseRecords(librevenge::RVNGInputStream *input, unsigned *blockLengths = 0, unsigned level = 0); + bool parseWaldo(librevenge::RVNGInputStream *input); private: CDRParser(); CDRParser(const CDRParser &); CDRParser &operator=(const CDRParser &); - bool parseWaldoStructure(WPXInputStream *input, std::stack &waldoStack, + bool parseWaldoStructure(librevenge::RVNGInputStream *input, std::stack &waldoStack, const std::map &records1, std::map &records2); - bool gatherWaldoInformation(WPXInputStream *input, std::vector &records, std::map &records2, + bool gatherWaldoInformation(librevenge::RVNGInputStream *input, std::vector &records, std::map &records2, std::map &records3, std::map &records4, std::map &records6, std::map &records7, std::map &records8, std::map recordsOther); - void readWaldoRecord(WPXInputStream *input, const WaldoRecordInfo &info); - bool parseRecord(WPXInputStream *input, unsigned *blockLengths = 0, unsigned level = 0); - void readRecord(unsigned fourCC, unsigned length, WPXInputStream *input); - double readRectCoord(WPXInputStream *input); - CDRColor readColor(WPXInputStream *input); - - void readRectangle(WPXInputStream *input); - void readEllipse(WPXInputStream *input); - void readLineAndCurve(WPXInputStream *input); - void readBitmap(WPXInputStream *input); - void readPageSize(WPXInputStream *input); - void readWaldoBmp(WPXInputStream *input, unsigned length, unsigned id); - void readWaldoBmpf(WPXInputStream *input, unsigned id); - void readWaldoTrfd(WPXInputStream *input); - void readWaldoOutl(WPXInputStream *input); - void readWaldoFill(WPXInputStream *input); - void readWaldoLoda(WPXInputStream *input, unsigned length); - void readOpacity(WPXInputStream *input, unsigned length); - void readTrfd(WPXInputStream *input, unsigned length); - void readFild(WPXInputStream *input, unsigned length); - void readOutl(WPXInputStream *input, unsigned length); - void readLoda(WPXInputStream *input, unsigned length); - void readFlags(WPXInputStream *input, unsigned length); - void readMcfg(WPXInputStream *input, unsigned length); - void readPath(WPXInputStream *input); - void readArrw(WPXInputStream *input, unsigned length); - void readPolygonCoords(WPXInputStream *input); - void readPolygonTransform(WPXInputStream *input); - void readBmp(WPXInputStream *input, unsigned length); - void readBmpf(WPXInputStream *input, unsigned length); - void readPpdt(WPXInputStream *input, unsigned length); - void readFtil(WPXInputStream *input, unsigned length); - void readDisp(WPXInputStream *input, unsigned length); - void readVersion(WPXInputStream *input, unsigned length); - void readIccd(WPXInputStream *input, unsigned length); - void readBBox(WPXInputStream *input, unsigned length); - void readSpnd(WPXInputStream *input, unsigned length); - void readVpat(WPXInputStream *input, unsigned length); - void readUidr(WPXInputStream *input, unsigned length); - void readFont(WPXInputStream *input, unsigned length); - void readStlt(WPXInputStream *input, unsigned length); - void readStyd(WPXInputStream *input); - void readTxsm(WPXInputStream *input, unsigned length); - void readTxsm16(WPXInputStream *input); - void readTxsm6(WPXInputStream *input); - void readTxsm5(WPXInputStream *input); - void readUdta(WPXInputStream *input); - void readArtisticText(WPXInputStream *input); - void readParagraphText(WPXInputStream *input); + void readWaldoRecord(librevenge::RVNGInputStream *input, const WaldoRecordInfo &info); + bool parseRecord(librevenge::RVNGInputStream *input, unsigned *blockLengths = 0, unsigned level = 0); + void readRecord(unsigned fourCC, unsigned length, librevenge::RVNGInputStream *input); + double readRectCoord(librevenge::RVNGInputStream *input); + CDRColor readColor(librevenge::RVNGInputStream *input); + + void readRectangle(librevenge::RVNGInputStream *input); + void readEllipse(librevenge::RVNGInputStream *input); + void readLineAndCurve(librevenge::RVNGInputStream *input); + void readBitmap(librevenge::RVNGInputStream *input); + void readPageSize(librevenge::RVNGInputStream *input); + void readWaldoBmp(librevenge::RVNGInputStream *input, unsigned length, unsigned id); + void readWaldoBmpf(librevenge::RVNGInputStream *input, unsigned id); + void readWaldoTrfd(librevenge::RVNGInputStream *input); + void readWaldoOutl(librevenge::RVNGInputStream *input); + void readWaldoFill(librevenge::RVNGInputStream *input); + void readWaldoLoda(librevenge::RVNGInputStream *input, unsigned length); + void readOpacity(librevenge::RVNGInputStream *input, unsigned length); + void readTrfd(librevenge::RVNGInputStream *input, unsigned length); + void readFild(librevenge::RVNGInputStream *input, unsigned length); + void readOutl(librevenge::RVNGInputStream *input, unsigned length); + void readLoda(librevenge::RVNGInputStream *input, unsigned length); + void readFlags(librevenge::RVNGInputStream *input, unsigned length); + void readMcfg(librevenge::RVNGInputStream *input, unsigned length); + void readPath(librevenge::RVNGInputStream *input); + void readArrw(librevenge::RVNGInputStream *input, unsigned length); + void readPolygonCoords(librevenge::RVNGInputStream *input); + void readPolygonTransform(librevenge::RVNGInputStream *input); + void readBmp(librevenge::RVNGInputStream *input, unsigned length); + void readBmpf(librevenge::RVNGInputStream *input, unsigned length); + void readPpdt(librevenge::RVNGInputStream *input, unsigned length); + void readFtil(librevenge::RVNGInputStream *input, unsigned length); + void readDisp(librevenge::RVNGInputStream *input, unsigned length); + void readVersion(librevenge::RVNGInputStream *input, unsigned length); + void readIccd(librevenge::RVNGInputStream *input, unsigned length); + void readBBox(librevenge::RVNGInputStream *input, unsigned length); + void readSpnd(librevenge::RVNGInputStream *input, unsigned length); + void readVpat(librevenge::RVNGInputStream *input, unsigned length); + void readUidr(librevenge::RVNGInputStream *input, unsigned length); + void readFont(librevenge::RVNGInputStream *input, unsigned length); + void readStlt(librevenge::RVNGInputStream *input, unsigned length); + void readStyd(librevenge::RVNGInputStream *input); + void readTxsm(librevenge::RVNGInputStream *input, unsigned length); + void readTxsm16(librevenge::RVNGInputStream *input); + void readTxsm6(librevenge::RVNGInputStream *input); + void readTxsm5(librevenge::RVNGInputStream *input); + void readUdta(librevenge::RVNGInputStream *input); + void readArtisticText(librevenge::RVNGInputStream *input); + void readParagraphText(librevenge::RVNGInputStream *input); - bool _redirectX6Chunk(WPXInputStream **input, unsigned &length); - void _readX6StyleString(WPXInputStream *input, unsigned length, CDRCharacterStyle &style); + bool _redirectX6Chunk(librevenge::RVNGInputStream **input, unsigned &length); + void _readX6StyleString(librevenge::RVNGInputStream *input, unsigned length, CDRCharacterStyle &style); - std::vector m_externalStreams; + std::vector m_externalStreams; std::map m_fonts; std::map m_fillStyles; diff -Nru libcdr-0.0.15/src/lib/CDRPath.cpp libcdr-0.1.0/src/lib/CDRPath.cpp --- libcdr-0.0.15/src/lib/CDRPath.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRPath.cpp 2014-04-10 10:41:50.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include @@ -250,7 +230,7 @@ : m_x(x), m_y(y) {} ~CDRMoveToElement() {} - void writeOut(WPXPropertyListVector &vec) const; + void writeOut(librevenge::RVNGPropertyListVector &vec) const; void transform(const CDRTransforms &trafos); void transform(const CDRTransform &trafo); CDRPathElement *clone(); @@ -266,7 +246,7 @@ : m_x(x), m_y(y) {} ~CDRLineToElement() {} - void writeOut(WPXPropertyListVector &vec) const; + void writeOut(librevenge::RVNGPropertyListVector &vec) const; void transform(const CDRTransforms &trafos); void transform(const CDRTransform &trafo); CDRPathElement *clone(); @@ -286,7 +266,7 @@ m_x(x), m_y(y) {} ~CDRCubicBezierToElement() {} - void writeOut(WPXPropertyListVector &vec) const; + void writeOut(librevenge::RVNGPropertyListVector &vec) const; void transform(const CDRTransforms &trafos); void transform(const CDRTransform &trafo); CDRPathElement *clone(); @@ -308,7 +288,7 @@ m_x(x), m_y(y) {} ~CDRQuadraticBezierToElement() {} - void writeOut(WPXPropertyListVector &vec) const; + void writeOut(librevenge::RVNGPropertyListVector &vec) const; void transform(const CDRTransforms &trafos); void transform(const CDRTransform &trafo); CDRPathElement *clone(); @@ -325,7 +305,7 @@ CDRSplineToElement(const std::vector > &points) : m_points(points) {} ~CDRSplineToElement() {} - void writeOut(WPXPropertyListVector &vec) const; + void writeOut(librevenge::RVNGPropertyListVector &vec) const; void transform(const CDRTransforms &trafos); void transform(const CDRTransform &trafo); CDRPathElement *clone(); @@ -346,7 +326,7 @@ m_x(x), m_y(y) {} ~CDRArcToElement() {} - void writeOut(WPXPropertyListVector &vec) const; + void writeOut(librevenge::RVNGPropertyListVector &vec) const; void transform(const CDRTransforms &trafos); void transform(const CDRTransform &trafo); CDRPathElement *clone(); @@ -365,7 +345,7 @@ public: CDRClosePathElement() {} ~CDRClosePathElement() {} - void writeOut(WPXPropertyListVector &vec) const; + void writeOut(librevenge::RVNGPropertyListVector &vec) const; void transform(const CDRTransforms &trafos); void transform(const CDRTransform &trafo); CDRPathElement *clone(); @@ -374,10 +354,10 @@ } // namespace libcdr -void libcdr::CDRMoveToElement::writeOut(WPXPropertyListVector &vec) const +void libcdr::CDRMoveToElement::writeOut(librevenge::RVNGPropertyListVector &vec) const { - WPXPropertyList node; - node.insert("libwpg:path-action", "M"); + librevenge::RVNGPropertyList node; + node.insert("librevenge:path-action", "M"); node.insert("svg:x", m_x); node.insert("svg:y", m_y); vec.append(node); @@ -398,10 +378,10 @@ return new CDRMoveToElement(m_x, m_y); } -void libcdr::CDRLineToElement::writeOut(WPXPropertyListVector &vec) const +void libcdr::CDRLineToElement::writeOut(librevenge::RVNGPropertyListVector &vec) const { - WPXPropertyList node; - node.insert("libwpg:path-action", "L"); + librevenge::RVNGPropertyList node; + node.insert("librevenge:path-action", "L"); node.insert("svg:x", m_x); node.insert("svg:y", m_y); vec.append(node); @@ -422,10 +402,10 @@ return new CDRLineToElement(m_x, m_y); } -void libcdr::CDRCubicBezierToElement::writeOut(WPXPropertyListVector &vec) const +void libcdr::CDRCubicBezierToElement::writeOut(librevenge::RVNGPropertyListVector &vec) const { - WPXPropertyList node; - node.insert("libwpg:path-action", "C"); + librevenge::RVNGPropertyList node; + node.insert("librevenge:path-action", "C"); node.insert("svg:x1", m_x1); node.insert("svg:y1", m_y1); node.insert("svg:x2", m_x2); @@ -454,10 +434,10 @@ return new CDRCubicBezierToElement(m_x1, m_y1, m_x2, m_y2, m_x, m_y); } -void libcdr::CDRQuadraticBezierToElement::writeOut(WPXPropertyListVector &vec) const +void libcdr::CDRQuadraticBezierToElement::writeOut(librevenge::RVNGPropertyListVector &vec) const { - WPXPropertyList node; - node.insert("libwpg:path-action", "Q"); + librevenge::RVNGPropertyList node; + node.insert("librevenge:path-action", "Q"); node.insert("svg:x1", m_x1); node.insert("svg:y1", m_y1); node.insert("svg:x", m_x); @@ -494,28 +474,28 @@ return i - CDR_SPLINE_DEGREE; } -void libcdr::CDRSplineToElement::writeOut(WPXPropertyListVector &vec) const +void libcdr::CDRSplineToElement::writeOut(librevenge::RVNGPropertyListVector &vec) const { - WPXPropertyList node; + librevenge::RVNGPropertyList node; #if DEBUG_SPLINES /* Code for visual debugging of the spline decomposition */ - node.insert("libwpg:path-action", "M"); + node.insert("librevenge:path-action", "M"); node.insert("svg:x", m_points[0].first); node.insert("svg:y", m_points[0].second); vec.append(node); for (unsigned j = 0; j < m_points.size(); ++j) { - node.insert("libwpg:path-action", "L"); + node.insert("librevenge:path-action", "L"); node.insert("svg:x", m_points[j].first); node.insert("svg:y", m_points[j].second); vec.append(node); } #endif - node.insert("libwpg:path-action", "M"); + node.insert("librevenge:path-action", "M"); node.insert("svg:x", m_points[0].first); node.insert("svg:y", m_points[0].second); vec.append(node); @@ -566,7 +546,7 @@ // Pass the segment to the path node.clear(); - node.insert("libwpg:path-action", "C"); + node.insert("librevenge:path-action", "C"); node.insert("svg:x1", Qw[1].first); node.insert("svg:y1", Qw[1].second); node.insert("svg:x2", Qw[2].first); @@ -610,15 +590,15 @@ return new CDRSplineToElement(m_points); } -void libcdr::CDRArcToElement::writeOut(WPXPropertyListVector &vec) const +void libcdr::CDRArcToElement::writeOut(librevenge::RVNGPropertyListVector &vec) const { - WPXPropertyList node; - node.insert("libwpg:path-action", "A"); + librevenge::RVNGPropertyList node; + node.insert("librevenge:path-action", "A"); node.insert("svg:rx", m_rx); node.insert("svg:ry", m_ry); - node.insert("libwpg:rotate", m_rotation * 180 / M_PI, WPX_GENERIC); - node.insert("libwpg:large-arc", m_largeArc); - node.insert("libwpg:sweep", m_sweep); + node.insert("librevenge:rotate", m_rotation * 180 / M_PI, librevenge::RVNG_GENERIC); + node.insert("librevenge:large-arc", m_largeArc); + node.insert("librevenge:sweep", m_sweep); node.insert("svg:x", m_x); node.insert("svg:y", m_y); vec.append(node); @@ -652,10 +632,10 @@ return new CDRClosePathElement(); } -void libcdr::CDRClosePathElement::writeOut(WPXPropertyListVector &vec) const +void libcdr::CDRClosePathElement::writeOut(librevenge::RVNGPropertyListVector &vec) const { - WPXPropertyList node; - node.insert("libwpg:path-action", "Z"); + librevenge::RVNGPropertyList node; + node.insert("librevenge:path-action", "Z"); vec.append(node); } @@ -726,7 +706,7 @@ m_elements.push_back((*iter)->clone()); } -void libcdr::CDRPath::writeOut(WPXPropertyListVector &vec) const +void libcdr::CDRPath::writeOut(librevenge::RVNGPropertyListVector &vec) const { bool wasZ = true; for (std::vector::const_iterator iter = m_elements.begin(); iter != m_elements.end(); ++iter) @@ -747,14 +727,14 @@ } } -void libcdr::CDRPath::writeOut(WPXString &path, WPXString &viewBox, double &width) const +void libcdr::CDRPath::writeOut(librevenge::RVNGString &path, librevenge::RVNGString &viewBox, double &width) const { - WPXPropertyListVector vec; + librevenge::RVNGPropertyListVector vec; writeOut(vec); if (vec.count() == 0) return; // This must be a mistake and we do not want to crash lower - if (vec[0]["libwpg:path-action"]->getStr() == "Z") + if (vec[0]["librevenge:path-action"]->getStr() == "Z") return; // try to find the bounding box @@ -785,7 +765,7 @@ double xmin, xmax, ymin, ymax; - if (vec[k]["libwpg:path-action"]->getStr() == "C") + if (vec[k]["librevenge:path-action"]->getStr() == "C") { getCubicBezierBBox(lastX, lastY, vec[k]["svg:x1"]->getDouble(), vec[k]["svg:y1"]->getDouble(), vec[k]["svg:x2"]->getDouble(), vec[k]["svg:y2"]->getDouble(), @@ -796,7 +776,7 @@ qx = (qx < xmax ? xmax : qx); qy = (qy < ymax ? ymax : qy); } - if (vec[k]["libwpg:path-action"]->getStr() == "Q") + if (vec[k]["librevenge:path-action"]->getStr() == "Q") { getQuadraticBezierBBox(lastX, lastY, vec[k]["svg:x1"]->getDouble(), vec[k]["svg:y1"]->getDouble(), vec[k]["svg:x"]->getDouble(), vec[k]["svg:y"]->getDouble(), xmin, ymin, xmax, ymax); @@ -806,12 +786,12 @@ qx = (qx < xmax ? xmax : qx); qy = (qy < ymax ? ymax : qy); } - if (vec[k]["libwpg:path-action"]->getStr() == "A") + if (vec[k]["librevenge:path-action"]->getStr() == "A") { getEllipticalArcBBox(lastX, lastY, vec[k]["svg:rx"]->getDouble(), vec[k]["svg:ry"]->getDouble(), - vec[k]["libwpg:rotate"] ? vec[k]["libwpg:rotate"]->getDouble() : 0.0, - vec[k]["libwpg:large-arc"] ? vec[k]["libwpg:large-arc"]->getInt() : 1, - vec[k]["libwpg:sweep"] ? vec[k]["libwpg:sweep"]->getInt() : 1, + vec[k]["librevenge:rotate"] ? vec[k]["librevenge:rotate"]->getDouble() : 0.0, + vec[k]["librevenge:large-arc"] ? vec[k]["librevenge:large-arc"]->getInt() : 1, + vec[k]["librevenge:sweep"] ? vec[k]["librevenge:sweep"]->getInt() : 1, vec[k]["svg:x"]->getDouble(), vec[k]["svg:y"]->getDouble(), xmin, ymin, xmax, ymax); px = (px > xmin ? xmin : px); @@ -829,21 +809,21 @@ for (unsigned i = 0; i < vec.count(); ++i) { - WPXString sElement; - if (vec[i]["libwpg:path-action"]->getStr() == "M") + librevenge::RVNGString sElement; + if (vec[i]["librevenge:path-action"]->getStr() == "M") { // 2540 is 2.54*1000, 2.54 in = 1 inch sElement.sprintf("M%i %i", (unsigned)((vec[i]["svg:x"]->getDouble()-px)*2540), (unsigned)((vec[i]["svg:y"]->getDouble()-py)*2540)); path.append(sElement); } - else if (vec[i]["libwpg:path-action"]->getStr() == "L") + else if (vec[i]["librevenge:path-action"]->getStr() == "L") { sElement.sprintf("L%i %i", (unsigned)((vec[i]["svg:x"]->getDouble()-px)*2540), (unsigned)((vec[i]["svg:y"]->getDouble()-py)*2540)); path.append(sElement); } - else if (vec[i]["libwpg:path-action"]->getStr() == "C") + else if (vec[i]["librevenge:path-action"]->getStr() == "C") { sElement.sprintf("C%i %i %i %i %i %i", (unsigned)((vec[i]["svg:x1"]->getDouble()-px)*2540), (unsigned)((vec[i]["svg:y1"]->getDouble()-py)*2540), (unsigned)((vec[i]["svg:x2"]->getDouble()-px)*2540), @@ -851,23 +831,23 @@ (unsigned)((vec[i]["svg:y"]->getDouble()-py)*2540)); path.append(sElement); } - else if (vec[i]["libwpg:path-action"]->getStr() == "Q") + else if (vec[i]["librevenge:path-action"]->getStr() == "Q") { sElement.sprintf("Q%i %i %i %i", (unsigned)((vec[i]["svg:x1"]->getDouble()-px)*2540), (unsigned)((vec[i]["svg:y1"]->getDouble()-py)*2540), (unsigned)((vec[i]["svg:x"]->getDouble()-px)*2540), (unsigned)((vec[i]["svg:y"]->getDouble()-py)*2540)); path.append(sElement); } - else if (vec[i]["libwpg:path-action"]->getStr() == "A") + else if (vec[i]["librevenge:path-action"]->getStr() == "A") { sElement.sprintf("A%i %i %i %i %i %i %i", (unsigned)((vec[i]["svg:rx"]->getDouble())*2540), - (unsigned)((vec[i]["svg:ry"]->getDouble())*2540), (vec[i]["libwpg:rotate"] ? vec[i]["libwpg:rotate"]->getInt() : 0), - (vec[i]["libwpg:large-arc"] ? vec[i]["libwpg:large-arc"]->getInt() : 1), - (vec[i]["libwpg:sweep"] ? vec[i]["libwpg:sweep"]->getInt() : 1), + (unsigned)((vec[i]["svg:ry"]->getDouble())*2540), (vec[i]["librevenge:rotate"] ? vec[i]["librevenge:rotate"]->getInt() : 0), + (vec[i]["librevenge:large-arc"] ? vec[i]["librevenge:large-arc"]->getInt() : 1), + (vec[i]["librevenge:sweep"] ? vec[i]["librevenge:sweep"]->getInt() : 1), (unsigned)((vec[i]["svg:x"]->getDouble()-px)*2540), (unsigned)((vec[i]["svg:y"]->getDouble()-py)*2540)); path.append(sElement); } - else if (vec[i]["libwpg:path-action"]->getStr() == "Z") + else if (vec[i]["librevenge:path-action"]->getStr() == "Z") { path.append(" Z"); } diff -Nru libcdr-0.0.15/src/lib/CDRPath.h libcdr-0.1.0/src/lib/CDRPath.h --- libcdr-0.0.15/src/lib/CDRPath.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRPath.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,37 +1,17 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CDRPATH_H__ #define __CDRPATH_H__ #include -#include +#include namespace libcdr { @@ -44,7 +24,7 @@ public: CDRPathElement() {} virtual ~CDRPathElement() {} - virtual void writeOut(WPXPropertyListVector &vec) const = 0; + virtual void writeOut(librevenge::RVNGPropertyListVector &vec) const = 0; virtual void transform(const CDRTransforms &trafos) = 0; virtual void transform(const CDRTransform &trafo) = 0; virtual CDRPathElement *clone() = 0; @@ -69,8 +49,8 @@ void appendClosePath(); void appendPath(const CDRPath &path); - void writeOut(WPXPropertyListVector &vec) const; - void writeOut(WPXString &path, WPXString &viewBox, double &width) const; + void writeOut(librevenge::RVNGPropertyListVector &vec) const; + void writeOut(librevenge::RVNGString &path, librevenge::RVNGString &viewBox, double &width) const; void transform(const CDRTransforms &trafos); void transform(const CDRTransform &trafo); CDRPathElement *clone(); diff -Nru libcdr-0.0.15/src/lib/CDRStringVector.cpp libcdr-0.1.0/src/lib/CDRStringVector.cpp --- libcdr-0.0.15/src/lib/CDRStringVector.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRStringVector.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,96 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. - */ - -#include -#include - -namespace libcdr -{ -class CDRStringVectorImpl -{ -public: - CDRStringVectorImpl() : m_strings() {} - ~CDRStringVectorImpl() {} - std::vector m_strings; -}; - -} // namespace libcdr - -libcdr::CDRStringVector::CDRStringVector() - : m_pImpl(new CDRStringVectorImpl()) -{ -} - -libcdr::CDRStringVector::CDRStringVector(const CDRStringVector &vec) - : m_pImpl(new CDRStringVectorImpl(*(vec.m_pImpl))) -{ -} - -libcdr::CDRStringVector::~CDRStringVector() -{ - delete m_pImpl; -} - -libcdr::CDRStringVector &libcdr::CDRStringVector::operator=(const CDRStringVector &vec) -{ - // Check for self-assignment - if (this == &vec) - return *this; - if (m_pImpl) - delete m_pImpl; - m_pImpl = new CDRStringVectorImpl(*(vec.m_pImpl)); - return *this; -} - -unsigned libcdr::CDRStringVector::size() const -{ - return (unsigned)(m_pImpl->m_strings.size()); -} - -bool libcdr::CDRStringVector::empty() const -{ - return m_pImpl->m_strings.empty(); -} - -const WPXString &libcdr::CDRStringVector::operator[](unsigned idx) const -{ - return m_pImpl->m_strings[idx]; -} - -void libcdr::CDRStringVector::append(const WPXString &str) -{ - m_pImpl->m_strings.push_back(str); -} - -void libcdr::CDRStringVector::clear() -{ - m_pImpl->m_strings.clear(); -} - -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/src/lib/CDRStylesCollector.cpp libcdr-0.1.0/src/lib/CDRStylesCollector.cpp --- libcdr-0.0.15/src/lib/CDRStylesCollector.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRStylesCollector.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include @@ -54,7 +34,7 @@ void libcdr::CDRStylesCollector::collectBmp(unsigned imageId, unsigned colorModel, unsigned width, unsigned height, unsigned bpp, const std::vector &palette, const std::vector &bitmap) { libcdr::CDRInternalStream stream(bitmap); - WPXBinaryData image; + librevenge::RVNGBinaryData image; unsigned tmpPixelSize = (unsigned)(height * width); if (tmpPixelSize < (unsigned)height) // overflow @@ -164,7 +144,7 @@ if (storeBMP) { #if DUMP_IMAGE - WPXString filename; + librevenge::RVNGString filename; filename.sprintf("bitmap%.8x.bmp", imageId); FILE *f = fopen(filename.cstr(), "wb"); if (f) @@ -182,9 +162,9 @@ void libcdr::CDRStylesCollector::collectBmp(unsigned imageId, const std::vector &bitmap) { - WPXBinaryData image(&bitmap[0], bitmap.size()); + librevenge::RVNGBinaryData image(&bitmap[0], bitmap.size()); #if DUMP_IMAGE - WPXString filename; + librevenge::RVNGString filename; filename.sprintf("bitmap%.8x.bmp", imageId); FILE *f = fopen(filename.cstr(), "wb"); if (f) @@ -250,7 +230,7 @@ tmpCharStyle.overrideCharacterStyle(iter->second); if (charDescriptions[i] != tmpCharDescription) { - WPXString text; + librevenge::RVNGString text; if (!tmpTextData.empty()) { if (tmpCharDescription & 0x01) @@ -269,7 +249,7 @@ } if (!tmpTextData.empty()) { - WPXString text; + librevenge::RVNGString text; if (tmpCharDescription & 0x01) appendCharacters(text, tmpTextData); else diff -Nru libcdr-0.0.15/src/lib/CDRStylesCollector.h libcdr-0.1.0/src/lib/CDRStylesCollector.h --- libcdr-0.0.15/src/lib/CDRStylesCollector.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRStylesCollector.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CDRSTYLESCOLLECTOR_H__ @@ -33,7 +13,7 @@ #include #include #include -#include +#include #include #include "CDRTypes.h" #include "CDRPath.h" @@ -78,7 +58,7 @@ void collectColorProfile(const std::vector &profile); void collectBBox(double, double, double, double) {} void collectSpnd(unsigned) {} - void collectVectorPattern(unsigned, const WPXBinaryData &) {} + void collectVectorPattern(unsigned, const librevenge::RVNGBinaryData &) {} void collectPaletteEntry(unsigned colorId, unsigned userId, const CDRColor &color); void collectText(unsigned textId, unsigned styleId, const std::vector &data, const std::vector &charDescriptions, const std::map &styleOverrides); diff -Nru libcdr-0.0.15/src/lib/CDRSVGGenerator.cpp libcdr-0.1.0/src/lib/CDRSVGGenerator.cpp --- libcdr-0.0.15/src/lib/CDRSVGGenerator.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRSVGGenerator.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,675 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. - */ - -#include "CDRSVGGenerator.h" -#include -#include -#include -#include - -static std::string doubleToString(const double value) -{ - WPXProperty *prop = WPXPropertyFactory::newDoubleProp(value); - std::string retVal = prop->getStr().cstr(); - delete prop; - return retVal; -} - -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; -} - -libcdr::CDRSVGGenerator::CDRSVGGenerator(libcdr::CDRStringVector &vec): m_gradient(), m_style(), m_gradientIndex(1), m_patternIndex(1), m_shadowIndex(1), m_outputSink(), m_vec(vec) -{ -} - -libcdr::CDRSVGGenerator::~CDRSVGGenerator() -{ -} - -void libcdr::CDRSVGGenerator::startGraphics(const WPXPropertyList &propList) -{ - m_outputSink << "getDouble())) << "\" "; - if (propList["svg:height"]) - m_outputSink << "height=\"" << doubleToString(72*(propList["svg:height"]->getDouble())) << "\""; - m_outputSink << " >\n"; -} - -void libcdr::CDRSVGGenerator::endGraphics() -{ - m_outputSink << "\n"; - m_vec.append(m_outputSink.str().c_str()); - m_outputSink.str(""); -} - -void libcdr::CDRSVGGenerator::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"; - } - } - } - else if (m_style["draw:fill"] && m_style["draw:fill"]->getStr() == "bitmap") - { - if (m_style["draw:fill-image"] && m_style["libwpg:mime-type"]) - { - m_outputSink << "\n"; - m_outputSink << " getDouble())) << "\" "; - else - m_outputSink << "width=\"100\" "; - - if (m_style["svg:height"]) - m_outputSink << "height=\"" << doubleToString(72*(m_style["svg:height"]->getDouble())) << "\">" << std::endl; - else - m_outputSink << "height=\"100\">" << std::endl; - m_outputSink << "getDouble())) << "\" "; - else - m_outputSink << "x=\"0\" "; - - if (m_style["svg:y"]) - m_outputSink << "y=\"" << doubleToString(72*(m_style["svg:y"]->getDouble())) << "\" "; - else - m_outputSink << "y=\"0\" "; - - if (m_style["svg:width"]) - m_outputSink << "width=\"" << doubleToString(72*(m_style["svg:width"]->getDouble())) << "\" "; - else - m_outputSink << "width=\"100\" "; - - if (m_style["svg:height"]) - m_outputSink << "height=\"" << doubleToString(72*(m_style["svg:height"]->getDouble())) << "\" "; - else - m_outputSink << "height=\"100\" "; - - m_outputSink << "xlink:href=\"data:" << m_style["libwpg:mime-type"]->getStr().cstr() << ";base64,"; - m_outputSink << m_style["draw:fill-image"]->getStr().cstr(); - m_outputSink << "\" />\n"; - m_outputSink << " \n"; - m_outputSink << "\n"; - } - } -} - -void libcdr::CDRSVGGenerator::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 libcdr::CDRSVGGenerator::endLayer() -{ - m_outputSink << "\n"; -} - -void libcdr::CDRSVGGenerator::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 libcdr::CDRSVGGenerator::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 libcdr::CDRSVGGenerator::drawPolyline(const ::WPXPropertyListVector &vertices) -{ - drawPolySomething(vertices, false); -} - -void libcdr::CDRSVGGenerator::drawPolygon(const ::WPXPropertyListVector &vertices) -{ - drawPolySomething(vertices, true); -} - -void libcdr::CDRSVGGenerator::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 libcdr::CDRSVGGenerator::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() == "Q") - { - m_outputSink << "\nQ"; - m_outputSink << doubleToString(72*(propList["svg:x1"]->getDouble())) << "," << doubleToString(72*(propList["svg:y1"]->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 (propList["libwpg:path-action"] && propList["libwpg:path-action"]->getStr() == "Z") - { - isClosed = true; - m_outputSink << "\nZ"; - } - } - - m_outputSink << "\" \n"; - writeStyle(isClosed); - m_outputSink << "/>\n"; -} - -void libcdr::CDRSVGGenerator::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 libcdr::CDRSVGGenerator::startTextObject(const ::WPXPropertyList &propList, const ::WPXPropertyListVector & /* path */) -{ - double x = 0.0; - double y = 0.0; - double height = 0.0; - m_outputSink << "getDouble(); - y = propList["svg:y"]->getDouble(); - } - - double xmiddle = x; - double ymiddle = y; - - if (propList["svg:width"]) - { - double 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 libcdr::CDRSVGGenerator::endTextObject() -{ - m_outputSink << "\n"; -} - -void libcdr::CDRSVGGenerator::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 libcdr::CDRSVGGenerator::endTextSpan() -{ - m_outputSink << "\n"; -} - -void libcdr::CDRSVGGenerator::insertText(const ::WPXString &str) -{ - WPXString tempUTF8(str, true); - m_outputSink << tempUTF8.cstr() << "\n"; -} - -// create "style" attribute based on current pen and brush -void libcdr::CDRSVGGenerator::writeStyle(bool /* isClosed */) -{ - m_outputSink << "style=\""; - - if (m_style["svg:stroke-width"]) - { - double width = m_style["svg:stroke-width"]->getDouble(); - if (width == 0.0 && m_style["draw:stroke"] && m_style["draw:stroke"]->getStr() != "none") - width = 0.2 / 72.0; // reasonable hairline - m_outputSink << "stroke-width: " << doubleToString(72*width) << "; "; - } - 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: none; "; - 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:fill"] && m_style["draw:fill"]->getStr() == "bitmap") - m_outputSink << "fill: url(#img" << m_patternIndex-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=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/src/lib/CDRSVGGenerator.h libcdr-0.1.0/src/lib/CDRSVGGenerator.h --- libcdr-0.0.15/src/lib/CDRSVGGenerator.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRSVGGenerator.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,88 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. - */ - -#ifndef __CDRSVGGENERATOR_H__ -#define __CDRSVGGENERATOR_H__ - -#include -#include -#include -#include -#include -#include - -namespace libcdr -{ - -class CDRSVGGenerator : public libwpg::WPGPaintInterface -{ -public: - CDRSVGGenerator(CDRStringVector &vec); - ~CDRSVGGenerator(); - - 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; - int m_patternIndex; - int m_shadowIndex; - void writeStyle(bool isClosed=true); - void drawPolySomething(const ::WPXPropertyListVector &vertices, bool isClosed); - - std::ostringstream m_outputSink; - CDRStringVector &m_vec; -}; - -} // namespace libcdr - -#endif // __CDRSVGGENERATOR_H__ -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/src/lib/CDRTransforms.cpp libcdr-0.1.0/src/lib/CDRTransforms.cpp --- libcdr-0.0.15/src/lib/CDRTransforms.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRTransforms.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,31 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "CDRTransforms.h" @@ -172,64 +151,6 @@ } } -double libcdr::CDRTransform::_getScaleX() const -{ - double x0 = 0.0; - double x1 = 1.0; - double y0 = 0.0; - double y1 = 0.0; - applyToPoint(x0, y0); - applyToPoint(x1, y1); - return x1 - x0; -} - -double libcdr::CDRTransform::getScaleX() const -{ - return fabs(_getScaleX()); -} - -bool libcdr::CDRTransform::getFlipX() const -{ - return (0 > _getScaleX()); -} - -double libcdr::CDRTransform::_getScaleY() const -{ - double x0 = 0.0; - double x1 = 0.0; - double y0 = 0.0; - double y1 = 1.0; - applyToPoint(x0, y0); - applyToPoint(x1, y1); - return y1 - y0; -} - -double libcdr::CDRTransform::getScaleY() const -{ - return fabs(_getScaleY()); -} - -bool libcdr::CDRTransform::getFlipY() const -{ - return (0 > _getScaleY()); -} - -double libcdr::CDRTransform::getTranslateX() const -{ - double x = 0.0; - double y = 0.0; - applyToPoint(x, y); - return x; -} - -double libcdr::CDRTransform::getTranslateY() const -{ - double x = 0.0; - double y = 0.0; - applyToPoint(x, y); - return y; -} - libcdr::CDRTransforms::CDRTransforms() : m_trafos() diff -Nru libcdr-0.0.15/src/lib/CDRTransforms.h libcdr-0.1.0/src/lib/CDRTransforms.h --- libcdr-0.0.15/src/lib/CDRTransforms.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRTransforms.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,29 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CDRTRANSFORMS_H__ @@ -45,16 +26,8 @@ void applyToPoint(double &x, double &y) const; void applyToArc(double &rx, double &ry, double &rotation, bool &sweep, double &endx, double &endy) const; - double getScaleX() const; - double getScaleY() const; - double getTranslateX() const; - double getTranslateY() const; - bool getFlipX() const; - bool getFlipY() const; private: - double _getScaleX() const; - double _getScaleY() const; double m_v0; double m_v1; double m_x0; diff -Nru libcdr-0.0.15/src/lib/CDRTypes.cpp libcdr-0.1.0/src/lib/CDRTypes.cpp --- libcdr-0.0.15/src/lib/CDRTypes.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRTypes.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,31 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "CDRTypes.h" @@ -101,102 +80,5 @@ path.appendSplineTo(tmpPoints); } -libcdr::CDRCMYKColor::CDRCMYKColor(unsigned colorValue, bool percentage) - : c((double)(colorValue & 0xff) / (percentage ? 100.0 : 255.0)), - m((double)((colorValue & 0xff00) >> 8) / (percentage ? 100.0 : 255.0)), - y((double)((colorValue & 0xff0000) >> 16) / (percentage ? 100.0 : 255.0)), - k((double)((colorValue & 0xff000000) >> 24) / (percentage ? 100.0 : 255.0)) -{ -} - -void libcdr::CDRCMYKColor::applyTint(double tint) -{ - if (tint < 0.0) - tint = 0.0; - if (tint > 1.0) - tint = 1.0; - c *= tint; - m *= tint; - y *= tint; - k *= tint; -} - -unsigned libcdr::CDRCMYKColor::getColorValue() const -{ - return 0; -} - - -libcdr::CDRRGBColor::CDRRGBColor(unsigned colorValue) - : r((double)(colorValue & 0xff) / 255.0), - g((double)((colorValue & 0xff00) >> 8) / 255.0), - b((double)((colorValue & 0xff0000) >> 16) / 255.0) -{ -} - -void libcdr::CDRRGBColor::applyTint(double tint) -{ - if (tint < 0.0) - tint = 0.0; - if (tint > 1.0) - tint = 1.0; - r = 1.0 + r*tint - tint; - g = 1.0 + g*tint - tint; - b = 1.0 + b*tint - tint; -} - -unsigned libcdr::CDRRGBColor::getColorValue() const -{ - return 0; -} - - -libcdr::CDRLab2Color::CDRLab2Color(unsigned colorValue) - : L((double)(colorValue & 0xff)*100.0/255.0), - a((double)(signed char)((colorValue & 0xff00) >> 8)), - b((double)(signed char)((colorValue & 0xff0000) >> 16)) -{ -} - -void libcdr::CDRLab2Color::applyTint(double tint) -{ - if (tint < 0.0) - tint = 0.0; - if (tint > 1.0) - tint = 1.0; - L = (1.0 - tint)*100.0 + tint*L; - a *= tint; - b *= tint; -} - -unsigned libcdr::CDRLab2Color::getColorValue() const -{ - return 0; -} - - -libcdr::CDRLab4Color::CDRLab4Color(unsigned colorValue) - : L((double)(colorValue & 0xff)*100.0/255.0), - a((double)((signed char)(((colorValue & 0xff00) >> 8) - 0x80))), - b((double)((signed char)(((colorValue & 0xff0000) >> 16) - 0x80))) -{ -} - -void libcdr::CDRLab4Color::applyTint(double tint) -{ - if (tint < 0.0) - tint = 0.0; - if (tint > 1.0) - tint = 1.0; - L = (1.0 - tint)*100.0 + tint*L; - a *= tint; - b *= tint; -} - -unsigned libcdr::CDRLab4Color::getColorValue() const -{ - return 0; -} - /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/src/lib/CDRTypes.h libcdr-0.1.0/src/lib/CDRTypes.h --- libcdr-0.0.15/src/lib/CDRTypes.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRTypes.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,29 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CDRTYPES_H__ @@ -31,7 +12,7 @@ #include #include -#include +#include #include "CDRTransforms.h" #include "CDRPath.h" #include "libcdr_utils.h" @@ -155,7 +136,7 @@ struct CDRCharacterStyle { unsigned short m_charSet; - WPXString m_fontName; + librevenge::RVNGString m_fontName; double m_fontSize; unsigned m_align; double m_leftIndent, m_firstIndent, m_rightIndent; @@ -209,13 +190,13 @@ struct CDRImage { - WPXBinaryData m_image; + librevenge::RVNGBinaryData m_image; double m_x1; double m_x2; double m_y1; double m_y2; CDRImage() : m_image(), m_x1(0.0), m_x2(0.0), m_y1(0.0), m_y2(0.0) {} - CDRImage(const WPXBinaryData &image, double x1, double x2, double y1, double y2) + CDRImage(const librevenge::RVNGBinaryData &image, double x1, double x2, double y1, double y2) : m_image(image), m_x1(x1), m_x2(x2), m_y1(y1), m_y2(y2) {} double getMiddleX() const { @@ -225,7 +206,7 @@ { return (m_y1 + m_y2) / 2.0; } - const WPXBinaryData &getImage() const + const librevenge::RVNGBinaryData &getImage() const { return m_image; } @@ -306,7 +287,6 @@ struct CDRCMYKColor { - CDRCMYKColor(unsigned colorValue, bool percentage = true); CDRCMYKColor(double cyan, double magenta, double yellow, double black) : c(cyan), m(magenta), y(yellow), k(black) {} ~CDRCMYKColor() {} @@ -314,55 +294,44 @@ double m; double y; double k; - void applyTint(double tint); - unsigned getColorValue() const; }; struct CDRRGBColor { - CDRRGBColor(unsigned colorValue); CDRRGBColor(double red, double green, double blue) : r(red), g(green), b(blue) {} ~CDRRGBColor() {} double r; double g; double b; - void applyTint(double tint); - unsigned getColorValue() const; }; struct CDRLab2Color { - CDRLab2Color(unsigned colorValue); CDRLab2Color(double l, double A, double B) : L(l), a(A), b(B) {} ~CDRLab2Color() {} double L; double a; double b; - void applyTint(double tint); - unsigned getColorValue() const; }; struct CDRLab4Color { - CDRLab4Color(unsigned colorValue); CDRLab4Color(double l, double A, double B) : L(l), a(A), b(B) {} ~CDRLab4Color() {} double L; double a; double b; - void applyTint(double tint); - unsigned getColorValue() const; }; struct CDRText { CDRText() : m_text(), m_charStyle() {} - CDRText(const WPXString &text, const CDRCharacterStyle &charStyle) + CDRText(const librevenge::RVNGString &text, const CDRCharacterStyle &charStyle) : m_text(text), m_charStyle(charStyle) {} - WPXString m_text; + librevenge::RVNGString m_text; CDRCharacterStyle m_charStyle; }; @@ -384,11 +353,11 @@ struct CDRFont { CDRFont() : m_name(), m_encoding(0) {} - CDRFont(const WPXString &name, unsigned short encoding) + CDRFont(const librevenge::RVNGString &name, unsigned short encoding) : m_name(name), m_encoding(encoding) {} CDRFont(const CDRFont &font) : m_name(font.m_name), m_encoding(font.m_encoding) {} - WPXString m_name; + librevenge::RVNGString m_name; unsigned short m_encoding; }; diff -Nru libcdr-0.0.15/src/lib/CDRZipStream.cpp libcdr-0.1.0/src/lib/CDRZipStream.cpp --- libcdr-0.0.15/src/lib/CDRZipStream.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRZipStream.cpp 1970-01-01 00:00:00.000000000 +0000 @@ -1,398 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. - */ - - -#include -#include -#include -#include -#include "CDRZipStream.h" -#include "CDRInternalStream.h" -#include "libcdr_utils.h" - -namespace -{ - -struct LocalFileHeader -{ - unsigned short general_flag; - unsigned short compression; - unsigned crc32; - unsigned compressed_size; - unsigned uncompressed_size; - std::string filename; - LocalFileHeader() - : general_flag(0), compression(0), crc32(0), compressed_size(0), uncompressed_size(0), filename() {} - ~LocalFileHeader() {} -}; - -struct CentralDirectoryEntry -{ - unsigned short general_flag; - unsigned short compression; - unsigned crc32; - unsigned compressed_size; - unsigned uncompressed_size; - unsigned offset; - std::string filename; - CentralDirectoryEntry() - : general_flag(0), compression(0), crc32(0), compressed_size(0), uncompressed_size(0), offset(0), filename() {} - ~CentralDirectoryEntry() {} -}; - -struct CentralDirectoryEnd -{ - unsigned cdir_size; - unsigned cdir_offset; - CentralDirectoryEnd() - : cdir_size(0), cdir_offset(0) {} - ~CentralDirectoryEnd() {} -}; - -} // anonymous namespace - -namespace libcdr -{ - -struct CDRZipStreamImpl -{ - WPXInputStream *m_input; - unsigned m_cdir_offset; - std::map m_cdir; - bool m_initialized; - CDRZipStreamImpl(WPXInputStream *input) - : m_input(input), m_cdir_offset(0), m_cdir(), m_initialized(false) {} - ~CDRZipStreamImpl() {} - - bool isZipStream(); - WPXInputStream *getSubstream(const char *name); -private: - CDRZipStreamImpl(const CDRZipStreamImpl &); - CDRZipStreamImpl &operator=(const CDRZipStreamImpl &); - - bool findCentralDirectoryEnd(); - bool readCentralDirectoryEnd(CentralDirectoryEnd &end); - bool readCentralDirectory(const CentralDirectoryEnd &end); - bool readLocalFileHeader(LocalFileHeader &header); - bool areHeadersConsistent(const LocalFileHeader &header, const CentralDirectoryEntry &entry); -}; - -} // namespace libcdr - - -using namespace libcdr; - - -libcdr::CDRZipStream::CDRZipStream(WPXInputStream *input) : - WPXInputStream(), - m_pImpl(new CDRZipStreamImpl(input)) -{ -} - -libcdr::CDRZipStream::~CDRZipStream() -{ - if (m_pImpl) - delete m_pImpl; -} - -const unsigned char *libcdr::CDRZipStream::read(unsigned long numBytes, unsigned long &numBytesRead) -{ - return m_pImpl->m_input->read(numBytes, numBytesRead); -} - -int libcdr::CDRZipStream::seek(long offset, WPX_SEEK_TYPE seekType) -{ - return m_pImpl->m_input->seek(offset, seekType); -} - -long libcdr::CDRZipStream::tell() -{ - return m_pImpl->m_input->tell(); -} - -bool libcdr::CDRZipStream::atEOS() -{ - return m_pImpl->m_input->atEOS(); -} - -bool libcdr::CDRZipStream::isOLEStream() -{ - return m_pImpl->isZipStream(); -} - -WPXInputStream *libcdr::CDRZipStream::getDocumentOLEStream(const char *name) -{ - if (!m_pImpl->isZipStream()) - return 0; - return m_pImpl->getSubstream(name); -} - -#define CDIR_ENTRY_SIG 0x02014b50 -#define LOC_FILE_HEADER_SIG 0x04034b50 -#define CDIR_END_SIG 0x06054b50 - -bool libcdr::CDRZipStreamImpl::findCentralDirectoryEnd() -{ - if (m_cdir_offset || m_input->seek(-1024, WPX_SEEK_END)) - m_input->seek(m_cdir_offset, WPX_SEEK_SET); - try - { - while (!m_input->atEOS()) - { - unsigned signature = readU32(m_input); - if (signature == CDIR_END_SIG) - { - m_input->seek(-4, WPX_SEEK_CUR); - m_cdir_offset = m_input->tell(); - return true; - } - else - m_input->seek(-3, WPX_SEEK_CUR); - } - } - catch (...) - { - return false; - } - return false; -} - -bool libcdr::CDRZipStreamImpl::isZipStream() -{ - if (m_cdir_offset) - { - if (m_cdir.empty()) - return false; - return true; - } - if (m_initialized) - return false; - m_initialized = true; - if (!findCentralDirectoryEnd()) - return false; - CentralDirectoryEnd end; - if (!readCentralDirectoryEnd(end)) - return false; - if (!readCentralDirectory(end)) - return false; - if (m_cdir.empty()) - return false; - CentralDirectoryEntry entry = m_cdir.begin()->second; - m_input->seek(entry.offset, WPX_SEEK_SET); - LocalFileHeader header; - if (!readLocalFileHeader(header)) - return false; - if (!areHeadersConsistent(header, entry)) - return false; - return true; -} - -bool libcdr::CDRZipStreamImpl::readCentralDirectory(const CentralDirectoryEnd &end) -{ - try - { - m_input->seek(end.cdir_offset, WPX_SEEK_SET); - while (!m_input->atEOS()) - { - unsigned signature = readU32(m_input); - if (signature != CDIR_ENTRY_SIG) - { - if (m_cdir.empty()) - return false; - else - return true; - } - - CentralDirectoryEntry entry; - m_input->seek(4, WPX_SEEK_CUR); - entry.general_flag = readU16(m_input); - entry.compression = readU16(m_input); - m_input->seek(4, WPX_SEEK_CUR); - entry.crc32 = readU32(m_input); - entry.compressed_size = readU32(m_input); - entry.uncompressed_size = readU32(m_input); - unsigned short filename_size = readU16(m_input); - unsigned short extra_field_size = readU16(m_input); - unsigned short file_comment_size = readU16(m_input); - m_input->seek(8, WPX_SEEK_CUR); - entry.offset = readU32(m_input); - entry.filename.clear(); - entry.filename.reserve(filename_size); - unsigned long bytesRead = 0; - const unsigned char *buffer = m_input->read(filename_size, bytesRead); - entry.filename.assign((const char *)buffer, bytesRead); - m_input->seek(extra_field_size+file_comment_size, WPX_SEEK_CUR); - - m_cdir[entry.filename] = entry; - } - } - catch (...) - { - return false; - } - return true; -} - -WPXInputStream *libcdr::CDRZipStreamImpl::getSubstream(const char *name) -{ - if (m_cdir.empty()) - return 0; - std::map::const_iterator iter = m_cdir.lower_bound(name); - if (iter == m_cdir.end()) - return 0; - if (m_cdir.key_comp()(name, iter->first)) - { - size_t name_length = strlen(name); - if (iter->first.compare(0, name_length, name)) - return 0; - } - CentralDirectoryEntry entry = iter->second; - m_input->seek(entry.offset, WPX_SEEK_SET); - LocalFileHeader header; - if (!readLocalFileHeader(header)) - return 0; - if (!areHeadersConsistent(header, entry)) - return 0; - if (!entry.compression) - return new CDRInternalStream(m_input, entry.compressed_size); - else - { - int ret; - z_stream strm; - - /* allocate inflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit2(&strm,-MAX_WBITS); - if (ret != Z_OK) - return 0; - - unsigned long numBytesRead = 0; - const unsigned char *compressedData = m_input->read(entry.compressed_size, numBytesRead); - if (numBytesRead != entry.compressed_size) - return 0; - - strm.avail_in = numBytesRead; - strm.next_in = (Bytef *)compressedData; - - std::vectordata(entry.uncompressed_size); - - strm.avail_out = entry.uncompressed_size; - strm.next_out = reinterpret_cast(&data[0]); - ret = inflate(&strm, Z_FINISH); - switch (ret) - { - case Z_NEED_DICT: - case Z_DATA_ERROR: - case Z_MEM_ERROR: - (void)inflateEnd(&strm); - data.clear(); - return 0; - } - (void)inflateEnd(&strm); - return new CDRInternalStream(data); - } -} - -bool libcdr::CDRZipStreamImpl::readCentralDirectoryEnd(CentralDirectoryEnd &end) -{ - try - { - unsigned signature = readU32(m_input); - if (signature != CDIR_END_SIG) - return false; - - m_input->seek(8, WPX_SEEK_CUR); - end.cdir_size = readU32(m_input); - end.cdir_offset = readU32(m_input); - unsigned short comment_size = readU16(m_input); - m_input->seek(comment_size, WPX_SEEK_CUR); - } - catch (...) - { - return false; - } - return true; -} - -bool libcdr::CDRZipStreamImpl::readLocalFileHeader(LocalFileHeader &header) -{ - try - { - unsigned signature = readU32(m_input); - if (signature != LOC_FILE_HEADER_SIG) - return false; - - m_input->seek(2, WPX_SEEK_CUR); - header.general_flag = readU16(m_input); - header.compression = readU16(m_input); - m_input->seek(4, WPX_SEEK_CUR); - header.crc32 = readU32(m_input); - header.compressed_size = readU32(m_input); - header.uncompressed_size = readU32(m_input); - unsigned short filename_size = readU16(m_input); - unsigned short extra_field_size = readU16(m_input); - header.filename.clear(); - header.filename.reserve(filename_size); - unsigned long bytesRead = 0; - const unsigned char *buffer = m_input->read(filename_size, bytesRead); - header.filename.assign((const char *)buffer, bytesRead); - m_input->seek(extra_field_size, WPX_SEEK_CUR); - } - catch (...) - { - return false; - } - return true; -} - -bool libcdr::CDRZipStreamImpl::areHeadersConsistent(const LocalFileHeader &header, const CentralDirectoryEntry &entry) -{ - if (header.general_flag != entry.general_flag) - return false; - if (header.compression != entry.compression) - return false; - if (!(header.general_flag & 0x08)) - { - if (header.crc32 != entry.crc32) - return false; - if (header.compressed_size != entry.compressed_size) - return false; - if (header.uncompressed_size != entry.uncompressed_size) - return false; - } - return true; -} - - -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/src/lib/CDRZipStream.h libcdr-0.1.0/src/lib/CDRZipStream.h --- libcdr-0.0.15/src/lib/CDRZipStream.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CDRZipStream.h 1970-01-01 00:00:00.000000000 +0000 @@ -1,64 +0,0 @@ -/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ - * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. - */ - - -#ifndef __CDRZIPSTREAM_H__ -#define __CDRZIPSTREAM_H__ - -#include - -#include - -namespace libcdr -{ -struct CDRZipStreamImpl; - -class CDRZipStream : public WPXInputStream -{ -public: - CDRZipStream(WPXInputStream *input); - ~CDRZipStream(); - - bool isOLEStream(); - WPXInputStream *getDocumentOLEStream(const char *); - - const unsigned char *read(unsigned long numBytes, unsigned long &numBytesRead); - int seek(long offset, WPX_SEEK_TYPE seekType); - long tell(); - bool atEOS(); - -private: - CDRZipStream(const CDRZipStream &); - CDRZipStream &operator=(const CDRZipStream &); - CDRZipStreamImpl *m_pImpl; -}; - -} // namespace libcdr - -#endif -/* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/src/lib/CMXDocument.cpp libcdr-0.1.0/src/lib/CMXDocument.cpp --- libcdr-0.0.15/src/lib/CMXDocument.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CMXDocument.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include @@ -32,10 +12,8 @@ #include #include "CDRDocumentStructure.h" #include "CMXParser.h" -#include "CDRSVGGenerator.h" #include "CDRContentCollector.h" #include "CDRStylesCollector.h" -#include "CDRZipStream.h" #include "libcdr_utils.h" /** @@ -44,14 +22,14 @@ \return A value that indicates whether the content from the input stream is a Corel Draw Document that libcdr is able to parse */ -bool libcdr::CMXDocument::isSupported(WPXInputStream *input) +CDRAPI bool libcdr::CMXDocument::isSupported(librevenge::RVNGInputStream *input) try { - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); unsigned riff = readU32(input); if (riff != CDR_FOURCC_RIFF && riff != CDR_FOURCC_RIFX) return false; - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); char signature_c = (char)readU8(input); if (signature_c != 'C' && signature_c != 'c') return false; @@ -76,9 +54,9 @@ \param painter A CDRPainterInterface implementation \return A value that indicates whether the parsing was successful */ -bool libcdr::CMXDocument::parse(::WPXInputStream *input, libwpg::WPGPaintInterface *painter) +CDRAPI bool libcdr::CMXDocument::parse(librevenge::RVNGInputStream *input, librevenge::RVNGDrawingInterface *painter) { - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); CDRParserState ps; CDRStylesCollector stylesCollector(ps); CMXParser stylesParser(&stylesCollector); @@ -87,7 +65,7 @@ retVal = false; if (retVal) { - input->seek(0, WPX_SEEK_SET); + input->seek(0, librevenge::RVNG_SEEK_SET); CDRContentCollector contentCollector(ps, painter); CMXParser contentParser(&contentCollector); retVal = contentParser.parseRecords(input); @@ -95,18 +73,4 @@ return retVal; } -/** -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 libcdr::CMXDocument::generateSVG(::WPXInputStream *input, libcdr::CDRStringVector &output) -{ - libcdr::CDRSVGGenerator generator(output); - bool result = libcdr::CMXDocument::parse(input, &generator); - return result; -} - /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ diff -Nru libcdr-0.0.15/src/lib/CMXDocumentStructure.h libcdr-0.1.0/src/lib/CMXDocumentStructure.h --- libcdr-0.0.15/src/lib/CMXDocumentStructure.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CMXDocumentStructure.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,29 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CMXDOCUMENTSTRUCTURE_H__ diff -Nru libcdr-0.0.15/src/lib/CMXParser.cpp libcdr-0.1.0/src/lib/CMXParser.cpp --- libcdr-0.0.15/src/lib/CMXParser.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CMXParser.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,33 +1,13 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include +#include #include #include #include @@ -59,7 +39,7 @@ { } -bool libcdr::CMXParser::parseRecords(WPXInputStream *input, long size, unsigned level) +bool libcdr::CMXParser::parseRecords(librevenge::RVNGInputStream *input, long size, unsigned level) { if (!input) { @@ -69,7 +49,7 @@ long endPosition = -1; if (size > 0) endPosition = input->tell() + size; - while (!input->atEOS() && (endPosition < 0 || input->tell() < endPosition)) + while (!input->isEnd() && (endPosition < 0 || input->tell() < endPosition)) { if (!parseRecord(input, level)) return false; @@ -77,7 +57,7 @@ return true; } -bool libcdr::CMXParser::parseRecord(WPXInputStream *input, unsigned level) +bool libcdr::CMXParser::parseRecord(librevenge::RVNGInputStream *input, unsigned level) { if (!input) { @@ -86,11 +66,11 @@ try { m_collector->collectLevel(level); - while (!input->atEOS() && readU8(input) == 0) + while (!input->isEnd() && readU8(input) == 0) { } - if (!input->atEOS()) - input->seek(-1, WPX_SEEK_CUR); + if (!input->isEnd()) + input->seek(-1, librevenge::RVNG_SEEK_CUR); else return true; unsigned fourCC = readU32(input); @@ -104,7 +84,7 @@ #ifdef DEBUG unsigned listType = readU32(input); #else - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); #endif CDR_DEBUG_MSG(("CMX listType: %s\n", toFourCC(listType))); unsigned dataSize = length-4; @@ -115,7 +95,7 @@ readRecord(fourCC, length, input); if (input->tell() < endPosition) - input->seek(endPosition, WPX_SEEK_SET); + input->seek(endPosition, librevenge::RVNG_SEEK_SET); return true; } catch (...) @@ -124,7 +104,7 @@ } } -void libcdr::CMXParser::readRecord(unsigned fourCC, unsigned &length, WPXInputStream *input) +void libcdr::CMXParser::readRecord(unsigned fourCC, unsigned &length, librevenge::RVNGInputStream *input) { long recordEnd = input->tell() + length; switch (fourCC) @@ -145,12 +125,12 @@ break; } if (input->tell() < recordEnd) - input->seek(recordEnd, WPX_SEEK_SET); + input->seek(recordEnd, librevenge::RVNG_SEEK_SET); } -void libcdr::CMXParser::readCMXHeader(WPXInputStream *input) +void libcdr::CMXParser::readCMXHeader(librevenge::RVNGInputStream *input) { - WPXString tmpString; + librevenge::RVNGString tmpString; unsigned i = 0; for (i = 0; i < 32; i++) tmpString.append((char)readU8(input)); @@ -194,7 +174,7 @@ CDR_DEBUG_MSG(("CMX Base Units: %u\n", m_unit)); m_scale = readDouble(input, m_bigEndian); CDR_DEBUG_MSG(("CMX Units Scale: %.9f\n", m_scale)); - input->seek(12, WPX_SEEK_CUR); + input->seek(12, librevenge::RVNG_SEEK_CUR); m_indexSectionOffset = readU32(input, m_bigEndian); m_infoSectionOffset = readU32(input, m_bigEndian); m_thumbnailOffset = readU32(input, m_bigEndian); @@ -206,33 +186,33 @@ CDR_DEBUG_MSG(("CMX Bounding Box: x: %f, y: %f, w: %f, h: %f\n", box.m_x, box.m_y, box.m_w, box.m_h)); } -void libcdr::CMXParser::readDisp(WPXInputStream *input, unsigned length) +void libcdr::CMXParser::readDisp(librevenge::RVNGInputStream *input, unsigned length) { - WPXBinaryData previewImage; - previewImage.append(0x42); - previewImage.append(0x4d); + librevenge::RVNGBinaryData previewImage; + previewImage.append((unsigned char)0x42); + previewImage.append((unsigned char)0x4d); previewImage.append((unsigned char)((length+8) & 0x000000ff)); previewImage.append((unsigned char)(((length+8) & 0x0000ff00) >> 8)); previewImage.append((unsigned char)(((length+8) & 0x00ff0000) >> 16)); previewImage.append((unsigned char)(((length+8) & 0xff000000) >> 24)); - previewImage.append(0x00); - previewImage.append(0x00); - previewImage.append(0x00); - previewImage.append(0x00); + previewImage.append((unsigned char)0x00); + previewImage.append((unsigned char)0x00); + previewImage.append((unsigned char)0x00); + previewImage.append((unsigned char)0x00); long startPosition = input->tell(); - input->seek(0x18, WPX_SEEK_CUR); + input->seek(0x18, librevenge::RVNG_SEEK_CUR); int lengthX = length + 10 - readU32(input); - input->seek(startPosition, WPX_SEEK_SET); + input->seek(startPosition, librevenge::RVNG_SEEK_SET); previewImage.append((unsigned char)((lengthX) & 0x000000ff)); previewImage.append((unsigned char)(((lengthX) & 0x0000ff00) >> 8)); previewImage.append((unsigned char)(((lengthX) & 0x00ff0000) >> 16)); previewImage.append((unsigned char)(((lengthX) & 0xff000000) >> 24)); - input->seek(4, WPX_SEEK_CUR); + input->seek(4, librevenge::RVNG_SEEK_CUR); for (unsigned i = 4; itell(); - while (!input->atEOS() && endPosition > input->tell()) + while (!input->isEnd() && endPosition > input->tell()) { long startPosition = input->tell(); int instructionSize = readS16(input, m_bigEndian); @@ -291,11 +271,11 @@ default: break; } - input->seek(m_nextInstructionOffset, WPX_SEEK_SET); + input->seek(m_nextInstructionOffset, librevenge::RVNG_SEEK_SET); } } -void libcdr::CMXParser::readBeginPage(WPXInputStream *input) +void libcdr::CMXParser::readBeginPage(librevenge::RVNGInputStream *input) { CDRBox box; CDRTransform matrix; @@ -318,7 +298,7 @@ switch (tagId) { case CMX_Tag_BeginPage_PageSpecification: - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); flags = readU32(input, m_bigEndian); box = readBBox(input); break; @@ -328,13 +308,13 @@ default: break; } - input->seek(startOffset + tagLength, WPX_SEEK_SET); + input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } else if (m_precision == libcdr::PRECISION_16BIT) { - input->seek(2, WPX_SEEK_CUR); + input->seek(2, librevenge::RVNG_SEEK_CUR); flags = readU32(input, m_bigEndian); box = readBBox(input); } @@ -344,14 +324,14 @@ m_collector->collectFlags(flags, true); m_collector->collectPageSize(box.getWidth(), box.getHeight(), box.getMinX(), box.getMinY()); } -void libcdr::CMXParser::readBeginLayer(WPXInputStream * /* input */) +void libcdr::CMXParser::readBeginLayer(librevenge::RVNGInputStream * /* input */) { } -void libcdr::CMXParser::readBeginGroup(WPXInputStream * /* input */) +void libcdr::CMXParser::readBeginGroup(librevenge::RVNGInputStream * /* input */) { } -void libcdr::CMXParser::readPolyCurve(WPXInputStream *input) +void libcdr::CMXParser::readPolyCurve(librevenge::RVNGInputStream *input) { unsigned pointNum = 0; std::vector > points; @@ -390,7 +370,7 @@ default: break; } - input->seek(startOffset + tagLength, WPX_SEEK_SET); + input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } @@ -416,7 +396,7 @@ m_collector->collectLevel(1); } -void libcdr::CMXParser::readEllipse(WPXInputStream *input) +void libcdr::CMXParser::readEllipse(librevenge::RVNGInputStream *input) { double angle1 = 0.0; double angle2 = 0.0; @@ -460,7 +440,7 @@ default: break; } - input->seek(startOffset + tagLength, WPX_SEEK_SET); + input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } @@ -518,7 +498,7 @@ m_collector->collectLevel(1); } -void libcdr::CMXParser::readRectangle(WPXInputStream *input) +void libcdr::CMXParser::readRectangle(librevenge::RVNGInputStream *input) { double cx = 0.0; double cy = 0.0; @@ -557,13 +537,13 @@ default: break; } - input->seek(startOffset + tagLength, WPX_SEEK_SET); + input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } else if (m_precision == libcdr::PRECISION_16BIT) { - input->seek(3, WPX_SEEK_CUR); + input->seek(3, librevenge::RVNG_SEEK_CUR); cx = readCoordinate(input, m_bigEndian); cy = readCoordinate(input, m_bigEndian); width = readCoordinate(input, m_bigEndian); @@ -605,7 +585,7 @@ m_collector->collectLevel(1); } -libcdr::CDRTransform libcdr::CMXParser::readMatrix(WPXInputStream *input) +libcdr::CDRTransform libcdr::CMXParser::readMatrix(librevenge::RVNGInputStream *input) { CDRTransform matrix; unsigned short type = readU16(input, m_bigEndian); @@ -626,7 +606,7 @@ } } -libcdr::CDRBox libcdr::CMXParser::readBBox(WPXInputStream *input) +libcdr::CDRBox libcdr::CMXParser::readBBox(librevenge::RVNGInputStream *input) { double x0 = readCoordinate(input, m_bigEndian); double y0 = readCoordinate(input, m_bigEndian); @@ -636,7 +616,7 @@ return box; } -void libcdr::CMXParser::readFill(WPXInputStream *input) +void libcdr::CMXParser::readFill(librevenge::RVNGInputStream *input) { unsigned fillIdentifier = readU16(input, m_bigEndian); switch (fillIdentifier) @@ -665,7 +645,7 @@ default: break; } - input->seek(startOffset + tagLength, WPX_SEEK_SET); + input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } @@ -694,7 +674,7 @@ } } -void libcdr::CMXParser::readRenderingAttributes(WPXInputStream *input) +void libcdr::CMXParser::readRenderingAttributes(librevenge::RVNGInputStream *input) { unsigned char tagId = 0; unsigned short tagLength = 0; @@ -720,7 +700,7 @@ default: break; } - input->seek(startOffset + tagLength, WPX_SEEK_SET); + input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } @@ -749,7 +729,7 @@ default: break; } - input->seek(startOffset + tagLength, WPX_SEEK_SET); + input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } @@ -774,7 +754,7 @@ default: break; } - input->seek(startOffset + tagLength, WPX_SEEK_SET); + input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } @@ -799,7 +779,7 @@ default: break; } - input->seek(startOffset + tagLength, WPX_SEEK_SET); + input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } @@ -824,14 +804,14 @@ default: break; } - input->seek(startOffset + tagLength, WPX_SEEK_SET); + input->seek(startOffset + tagLength, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } } } -void libcdr::CMXParser::readJumpAbsolute(WPXInputStream *input) +void libcdr::CMXParser::readJumpAbsolute(librevenge::RVNGInputStream *input) { if (m_precision == libcdr::PRECISION_32BIT) { @@ -855,7 +835,7 @@ default: break; } - input->seek(endOffset, WPX_SEEK_SET); + input->seek(endOffset, librevenge::RVNG_SEEK_SET); } while (tagId != CMX_Tag_EndTag); } diff -Nru libcdr-0.0.15/src/lib/CMXParser.h libcdr-0.1.0/src/lib/CMXParser.h --- libcdr-0.0.15/src/lib/CMXParser.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CMXParser.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __CMXPARSER_H__ @@ -34,7 +14,7 @@ #include #include #include -#include +#include #include "CDRTypes.h" #include "CommonParser.h" @@ -48,36 +28,36 @@ public: explicit CMXParser(CDRCollector *collector); virtual ~CMXParser(); - bool parseRecords(WPXInputStream *input, long size = -1, unsigned level = 0); + bool parseRecords(librevenge::RVNGInputStream *input, long size = -1, unsigned level = 0); private: CMXParser(); CMXParser(const CMXParser &); CMXParser &operator=(const CMXParser &); - bool parseRecord(WPXInputStream *input, unsigned level = 0); - void readRecord(unsigned fourCC, unsigned &length, WPXInputStream *input); + bool parseRecord(librevenge::RVNGInputStream *input, unsigned level = 0); + void readRecord(unsigned fourCC, unsigned &length, librevenge::RVNGInputStream *input); - void readCMXHeader(WPXInputStream *input); - void readDisp(WPXInputStream *input, unsigned length); - void readCcmm(WPXInputStream *input, long &recordEnd); - void readPage(WPXInputStream *input, unsigned length); + void readCMXHeader(librevenge::RVNGInputStream *input); + void readDisp(librevenge::RVNGInputStream *input, unsigned length); + void readCcmm(librevenge::RVNGInputStream *input, long &recordEnd); + void readPage(librevenge::RVNGInputStream *input, unsigned length); // Command readers - void readBeginPage(WPXInputStream *input); - void readBeginLayer(WPXInputStream *input); - void readBeginGroup(WPXInputStream *input); - void readPolyCurve(WPXInputStream *input); - void readEllipse(WPXInputStream *input); - void readRectangle(WPXInputStream *input); - void readJumpAbsolute(WPXInputStream *input); + void readBeginPage(librevenge::RVNGInputStream *input); + void readBeginLayer(librevenge::RVNGInputStream *input); + void readBeginGroup(librevenge::RVNGInputStream *input); + void readPolyCurve(librevenge::RVNGInputStream *input); + void readEllipse(librevenge::RVNGInputStream *input); + void readRectangle(librevenge::RVNGInputStream *input); + void readJumpAbsolute(librevenge::RVNGInputStream *input); // Types readers - CDRTransform readMatrix(WPXInputStream *input); - CDRBox readBBox(WPXInputStream *input); - void readFill(WPXInputStream *input); + CDRTransform readMatrix(librevenge::RVNGInputStream *input); + CDRBox readBBox(librevenge::RVNGInputStream *input); + void readFill(librevenge::RVNGInputStream *input); // Complex types readers - void readRenderingAttributes(WPXInputStream *input); + void readRenderingAttributes(librevenge::RVNGInputStream *input); bool m_bigEndian; unsigned short m_unit; diff -Nru libcdr-0.0.15/src/lib/CommonParser.cpp libcdr-0.1.0/src/lib/CommonParser.cpp --- libcdr-0.0.15/src/lib/CommonParser.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CommonParser.cpp 2014-04-10 10:41:50.000000000 +0000 @@ -1,33 +1,13 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include +#include #include "libcdr_utils.h" #include "CommonParser.h" @@ -42,7 +22,7 @@ { } -double libcdr::CommonParser::readCoordinate(WPXInputStream *input, bool bigEndian) +double libcdr::CommonParser::readCoordinate(librevenge::RVNGInputStream *input, bool bigEndian) { if (m_precision == PRECISION_UNKNOWN) throw UnknownPrecisionException(); @@ -51,7 +31,7 @@ return (double)readS32(input, bigEndian) / 254000.0; } -unsigned libcdr::CommonParser::readUnsigned(WPXInputStream *input, bool bigEndian) +unsigned libcdr::CommonParser::readUnsigned(librevenge::RVNGInputStream *input, bool bigEndian) { if (m_precision == PRECISION_UNKNOWN) throw UnknownPrecisionException(); @@ -60,7 +40,7 @@ return readU32(input, bigEndian); } -unsigned short libcdr::CommonParser::readUnsignedShort(WPXInputStream *input, bool bigEndian) +unsigned short libcdr::CommonParser::readUnsignedShort(librevenge::RVNGInputStream *input, bool bigEndian) { if (m_precision == PRECISION_UNKNOWN) throw UnknownPrecisionException(); @@ -69,7 +49,7 @@ return readU16(input, bigEndian); } -int libcdr::CommonParser::readInteger(WPXInputStream *input, bool bigEndian) +int libcdr::CommonParser::readInteger(librevenge::RVNGInputStream *input, bool bigEndian) { if (m_precision == PRECISION_UNKNOWN) throw UnknownPrecisionException(); @@ -78,7 +58,7 @@ return readS32(input, bigEndian); } -double libcdr::CommonParser::readAngle(WPXInputStream *input, bool bigEndian) +double libcdr::CommonParser::readAngle(librevenge::RVNGInputStream *input, bool bigEndian) { if (m_precision == PRECISION_UNKNOWN) throw UnknownPrecisionException(); diff -Nru libcdr-0.0.15/src/lib/CommonParser.h libcdr-0.1.0/src/lib/CommonParser.h --- libcdr-0.0.15/src/lib/CommonParser.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/CommonParser.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __COMMONPARSER_H__ @@ -33,8 +13,6 @@ #include "CDRCollector.h" #include "CDRPath.h" -class WPXInputSTream; - namespace libcdr { @@ -54,12 +32,12 @@ protected: - double readRectCoord(WPXInputStream *input, bool bigEndian = false); - double readCoordinate(WPXInputStream *input, bool bigEndian = false); - unsigned readUnsigned(WPXInputStream *input, bool bigEndian = false); - unsigned short readUnsignedShort(WPXInputStream *input, bool bigEndian = false); - int readInteger(WPXInputStream *input, bool bigEndian = false); - double readAngle(WPXInputStream *input, bool bigEndian = false); + double readRectCoord(librevenge::RVNGInputStream *input, bool bigEndian = false); + double readCoordinate(librevenge::RVNGInputStream *input, bool bigEndian = false); + unsigned readUnsigned(librevenge::RVNGInputStream *input, bool bigEndian = false); + unsigned short readUnsignedShort(librevenge::RVNGInputStream *input, bool bigEndian = false); + int readInteger(librevenge::RVNGInputStream *input, bool bigEndian = false); + double readAngle(librevenge::RVNGInputStream *input, bool bigEndian = false); void processPath(const std::vector > &points, const std::vector &types, CDRPath &path); void outputPath(const std::vector > &points, const std::vector &types); diff -Nru libcdr-0.0.15/src/lib/libcdr_utils.cpp libcdr-0.1.0/src/lib/libcdr_utils.cpp --- libcdr-0.0.15/src/lib/libcdr_utils.cpp 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/libcdr_utils.cpp 2014-03-29 10:23:47.000000000 +0000 @@ -1,30 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2012 Fridrich Strba - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include @@ -159,7 +139,7 @@ } } -static void _appendUCS4(WPXString &text, UChar32 ucs4Character) +static void _appendUCS4(librevenge::RVNGString &text, UChar32 ucs4Character) { // Convert carriage returns to new line characters // Writerperfect/LibreOffice will replace them by @@ -176,9 +156,9 @@ } // anonymous namespace -uint8_t libcdr::readU8(WPXInputStream *input, bool /* bigEndian */) +uint8_t libcdr::readU8(librevenge::RVNGInputStream *input, bool /* bigEndian */) { - if (!input || input->atEOS()) + if (!input || input->isEnd()) { CDR_DEBUG_MSG(("Throwing EndOfStreamException\n")); throw EndOfStreamException(); @@ -192,9 +172,9 @@ throw EndOfStreamException(); } -uint16_t libcdr::readU16(WPXInputStream *input, bool bigEndian) +uint16_t libcdr::readU16(librevenge::RVNGInputStream *input, bool bigEndian) { - if (!input || input->atEOS()) + if (!input || input->isEnd()) { CDR_DEBUG_MSG(("Throwing EndOfStreamException\n")); throw EndOfStreamException(); @@ -212,14 +192,14 @@ throw EndOfStreamException(); } -int16_t libcdr::readS16(WPXInputStream *input, bool bigEndian) +int16_t libcdr::readS16(librevenge::RVNGInputStream *input, bool bigEndian) { return (int16_t)readU16(input, bigEndian); } -uint32_t libcdr::readU32(WPXInputStream *input, bool bigEndian) +uint32_t libcdr::readU32(librevenge::RVNGInputStream *input, bool bigEndian) { - if (!input || input->atEOS()) + if (!input || input->isEnd()) { CDR_DEBUG_MSG(("Throwing EndOfStreamException\n")); throw EndOfStreamException(); @@ -237,14 +217,14 @@ throw EndOfStreamException(); } -int32_t libcdr::readS32(WPXInputStream *input, bool bigEndian) +int32_t libcdr::readS32(librevenge::RVNGInputStream *input, bool bigEndian) { return (int32_t)readU32(input, bigEndian); } -uint64_t libcdr::readU64(WPXInputStream *input, bool bigEndian) +uint64_t libcdr::readU64(librevenge::RVNGInputStream *input, bool bigEndian) { - if (!input || input->atEOS()) + if (!input || input->isEnd()) { CDR_DEBUG_MSG(("Throwing EndOfStreamException\n")); throw EndOfStreamException(); @@ -262,7 +242,7 @@ throw EndOfStreamException(); } -double libcdr::readDouble(WPXInputStream *input, bool bigEndian) +double libcdr::readDouble(librevenge::RVNGInputStream *input, bool bigEndian) { union { @@ -275,7 +255,7 @@ return tmpUnion.d; } -double libcdr::readFixedPoint(WPXInputStream *input, bool bigEndian) +double libcdr::readFixedPoint(librevenge::RVNGInputStream *input, bool bigEndian) { unsigned fixedPointNumber = readU32(input, bigEndian); short fixedPointNumberIntegerPart = (short)((fixedPointNumber & 0xFFFF0000) >> 16); @@ -288,13 +268,13 @@ return (d>0) ? int(d+0.5) : int(d-0.5); } -void libcdr::writeU16(WPXBinaryData &buffer, const int value) +void libcdr::writeU16(librevenge::RVNGBinaryData &buffer, const int value) { buffer.append((unsigned char)(value & 0xFF)); buffer.append((unsigned char)((value >> 8) & 0xFF)); } -void libcdr::writeU32(WPXBinaryData &buffer, const int value) +void libcdr::writeU32(librevenge::RVNGBinaryData &buffer, const int value) { buffer.append((unsigned char)(value & 0xFF)); buffer.append((unsigned char)((value >> 8) & 0xFF)); @@ -302,12 +282,7 @@ buffer.append((unsigned char)((value >> 24) & 0xFF)); } -void libcdr::writeU8(WPXBinaryData &buffer, const int value) -{ - buffer.append((unsigned char)(value & 0xFF)); -} - -void libcdr::appendCharacters(WPXString &text, std::vector characters, unsigned short charset) +void libcdr::appendCharacters(librevenge::RVNGString &text, std::vector characters, unsigned short charset) { if (characters.empty()) return; @@ -424,7 +399,7 @@ } } -void libcdr::appendCharacters(WPXString &text, std::vector characters) +void libcdr::appendCharacters(librevenge::RVNGString &text, std::vector characters) { if (characters.empty()) return; diff -Nru libcdr-0.0.15/src/lib/libcdr_utils.h libcdr-0.1.0/src/lib/libcdr_utils.h --- libcdr-0.0.15/src/lib/libcdr_utils.h 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/libcdr_utils.h 2014-03-29 10:23:47.000000000 +0000 @@ -1,31 +1,10 @@ /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ -/* libcdr - * Version: MPL 1.1 / GPLv2+ / LGPLv2+ +/* + * This file is part of the libcdr project. * - * The contents of this file are subject to the Mozilla Public License Version - * 1.1 (the "License"); you may not use this file except in compliance with - * the License or as specified alternatively below. You may obtain a copy of - * the License at http://www.mozilla.org/MPL/ - * - * Software distributed under the License is distributed on an "AS IS" basis, - * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License - * for the specific language governing rights and limitations under the - * License. - * - * Major Contributor(s): - * Copyright (C) 2011 Fridrich Strba - * Copyright (C) 2011 Eilidh McAdam - * - * - * All Rights Reserved. - * - * For minor contributions see the git repository. - * - * Alternatively, the contents of this file may be used under the terms of - * either the GNU General Public License Version 2 or later (the "GPLv2+"), or - * the GNU Lesser General Public License Version 2 or later (the "LGPLv2+"), - * in which case the provisions of the GPLv2+ or the LGPLv2+ are applicable - * instead of those above. + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef __LIBCDR_UTILS_H__ @@ -35,8 +14,8 @@ #include #include #include -#include -#include +#include +#include #ifndef M_PI #define M_PI 3.14159265358979323846 @@ -99,24 +78,23 @@ namespace libcdr { -uint8_t readU8(WPXInputStream *input, bool bigEndian=false); -uint16_t readU16(WPXInputStream *input, bool bigEndian=false); -uint32_t readU32(WPXInputStream *input, bool bigEndian=false); -uint64_t readU64(WPXInputStream *input, bool bigEndian=false); -int32_t readS32(WPXInputStream *input, bool bigEndian=false); -int16_t readS16(WPXInputStream *input, bool bigEndian=false); +uint8_t readU8(librevenge::RVNGInputStream *input, bool bigEndian=false); +uint16_t readU16(librevenge::RVNGInputStream *input, bool bigEndian=false); +uint32_t readU32(librevenge::RVNGInputStream *input, bool bigEndian=false); +uint64_t readU64(librevenge::RVNGInputStream *input, bool bigEndian=false); +int32_t readS32(librevenge::RVNGInputStream *input, bool bigEndian=false); +int16_t readS16(librevenge::RVNGInputStream *input, bool bigEndian=false); -double readDouble(WPXInputStream *input, bool bigEndian=false); +double readDouble(librevenge::RVNGInputStream *input, bool bigEndian=false); -double readFixedPoint(WPXInputStream *input, bool bigEndian=false); +double readFixedPoint(librevenge::RVNGInputStream *input, bool bigEndian=false); int cdr_round(double d); -void writeU8(WPXBinaryData &buffer, const int value); -void writeU16(WPXBinaryData &buffer, const int value); -void writeU32(WPXBinaryData &buffer, const int value); -void appendCharacters(WPXString &text, std::vector characters, unsigned short charset); -void appendCharacters(WPXString &text, std::vector characters); +void writeU16(librevenge::RVNGBinaryData &buffer, const int value); +void writeU32(librevenge::RVNGBinaryData &buffer, const int value); +void appendCharacters(librevenge::RVNGString &text, std::vector characters, unsigned short charset); +void appendCharacters(librevenge::RVNGString &text, std::vector characters); #ifdef DEBUG const char *toFourCC(unsigned value, bool bigEndian=false); diff -Nru libcdr-0.0.15/src/lib/Makefile.am libcdr-0.1.0/src/lib/Makefile.am --- libcdr-0.0.15/src/lib/Makefile.am 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/lib/Makefile.am 2014-03-29 10:23:47.000000000 +0000 @@ -8,13 +8,13 @@ libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_includedir = $(includedir)/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@/libcdr libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_include_HEADERS = \ $(top_srcdir)/inc/libcdr/libcdr.h \ + $(top_srcdir)/inc/libcdr/libcdr_api.h \ $(top_srcdir)/inc/libcdr/CDRDocument.h \ - $(top_srcdir)/inc/libcdr/CDRStringVector.h \ $(top_srcdir)/inc/libcdr/CMXDocument.h -AM_CXXFLAGS = -I$(top_srcdir)/inc $(WPD_CFLAGS) $(WPG_CFLAGS) $(LCMS2_CFLAGS) $(ZLIB_CFLAGS) $(ICU_CFLAGS) $(DEBUG_CXXFLAGS) +AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(LCMS2_CFLAGS) $(ZLIB_CFLAGS) $(ICU_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBCDR_BUILD=1 -libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LIBADD = $(WPD_LIBS) $(LCMS2_LIBS) $(ZLIB_LIBS) $(ICU_LIBS) @LIBCDR_WIN32_RESOURCE@ +libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LIBADD = $(REVENGE_LIBS) $(LCMS2_LIBS) $(ZLIB_LIBS) $(ICU_LIBS) @LIBCDR_WIN32_RESOURCE@ libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_DEPENDENCIES = @LIBCDR_WIN32_RESOURCE@ libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_SOURCES = \ @@ -25,12 +25,9 @@ CDROutputElementList.cpp \ CDRParser.cpp \ CDRPath.cpp \ - CDRStringVector.cpp \ CDRStylesCollector.cpp \ - CDRSVGGenerator.cpp \ CDRTransforms.cpp \ CDRTypes.cpp \ - CDRZipStream.cpp \ CMXDocument.cpp \ CMXParser.cpp \ CommonParser.cpp \ @@ -45,10 +42,8 @@ CDRParser.h \ CDRPath.h \ CDRStylesCollector.h \ - CDRSVGGenerator.h \ CDRTransforms.h \ CDRTypes.h \ - CDRZipStream.h \ CMXDocumentStructure.h \ CMXParser.h \ CommonParser.h \ diff -Nru libcdr-0.0.15/src/lib/Makefile.in libcdr-0.1.0/src/lib/Makefile.in --- libcdr-0.0.15/src/lib/Makefile.in 2014-04-04 13:40:07.000000000 +0000 +++ libcdr-0.1.0/src/lib/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -128,10 +128,8 @@ am_libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_OBJECTS = \ CDRCollector.lo CDRContentCollector.lo CDRDocument.lo \ CDRInternalStream.lo CDROutputElementList.lo CDRParser.lo \ - CDRPath.lo CDRStringVector.lo CDRStylesCollector.lo \ - CDRSVGGenerator.lo CDRTransforms.lo CDRTypes.lo \ - CDRZipStream.lo CMXDocument.lo CMXParser.lo CommonParser.lo \ - libcdr_utils.lo + CDRPath.lo CDRStylesCollector.lo CDRTransforms.lo CDRTypes.lo \ + CMXDocument.lo CMXParser.lo CommonParser.lo libcdr_utils.lo libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_OBJECTS = $(am_libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) @@ -259,6 +257,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -292,16 +291,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -363,12 +364,12 @@ libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_includedir = $(includedir)/libcdr-@CDR_MAJOR_VERSION@.@CDR_MINOR_VERSION@/libcdr libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_include_HEADERS = \ $(top_srcdir)/inc/libcdr/libcdr.h \ + $(top_srcdir)/inc/libcdr/libcdr_api.h \ $(top_srcdir)/inc/libcdr/CDRDocument.h \ - $(top_srcdir)/inc/libcdr/CDRStringVector.h \ $(top_srcdir)/inc/libcdr/CMXDocument.h -AM_CXXFLAGS = -I$(top_srcdir)/inc $(WPD_CFLAGS) $(WPG_CFLAGS) $(LCMS2_CFLAGS) $(ZLIB_CFLAGS) $(ICU_CFLAGS) $(DEBUG_CXXFLAGS) -libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LIBADD = $(WPD_LIBS) $(LCMS2_LIBS) $(ZLIB_LIBS) $(ICU_LIBS) @LIBCDR_WIN32_RESOURCE@ +AM_CXXFLAGS = -I$(top_srcdir)/inc $(REVENGE_CFLAGS) $(LCMS2_CFLAGS) $(ZLIB_CFLAGS) $(ICU_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBCDR_BUILD=1 +libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LIBADD = $(REVENGE_LIBS) $(LCMS2_LIBS) $(ZLIB_LIBS) $(ICU_LIBS) @LIBCDR_WIN32_RESOURCE@ libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_DEPENDENCIES = @LIBCDR_WIN32_RESOURCE@ libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined libcdr_@CDR_MAJOR_VERSION@_@CDR_MINOR_VERSION@_la_SOURCES = \ @@ -379,12 +380,9 @@ CDROutputElementList.cpp \ CDRParser.cpp \ CDRPath.cpp \ - CDRStringVector.cpp \ CDRStylesCollector.cpp \ - CDRSVGGenerator.cpp \ CDRTransforms.cpp \ CDRTypes.cpp \ - CDRZipStream.cpp \ CMXDocument.cpp \ CMXParser.cpp \ CommonParser.cpp \ @@ -399,10 +397,8 @@ CDRParser.h \ CDRPath.h \ CDRStylesCollector.h \ - CDRSVGGenerator.h \ CDRTransforms.h \ CDRTypes.h \ - CDRZipStream.h \ CMXDocumentStructure.h \ CMXParser.h \ CommonParser.h \ @@ -504,12 +500,9 @@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDROutputElementList.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDRParser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDRPath.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDRSVGGenerator.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDRStringVector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDRStylesCollector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDRTransforms.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDRTypes.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CDRZipStream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CMXDocument.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CMXParser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CommonParser.Plo@am__quote@ diff -Nru libcdr-0.0.15/src/Makefile.am libcdr-0.1.0/src/Makefile.am --- libcdr-0.0.15/src/Makefile.am 2014-04-04 13:30:23.000000000 +0000 +++ libcdr-0.1.0/src/Makefile.am 2014-03-29 10:23:47.000000000 +0000 @@ -1 +1,5 @@ -SUBDIRS = lib conv +SUBDIRS = lib + +if BUILD_TOOLS +SUBDIRS += conv +endif diff -Nru libcdr-0.0.15/src/Makefile.in libcdr-0.1.0/src/Makefile.in --- libcdr-0.0.15/src/Makefile.in 2014-04-04 13:40:06.000000000 +0000 +++ libcdr-0.1.0/src/Makefile.in 2014-03-29 10:28:55.000000000 +0000 @@ -1,4 +1,4 @@ -# Makefile.in generated by automake 1.14.1 from Makefile.am. +# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. @@ -77,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 @@ -144,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`; \ @@ -224,6 +225,7 @@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LCMS2_CFLAGS = @LCMS2_CFLAGS@ LCMS2_LIBS = @LCMS2_LIBS@ +LCMS_LIBS = @LCMS_LIBS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBCDR_WIN32_RESOURCE = @LIBCDR_WIN32_RESOURCE@ @@ -257,16 +259,18 @@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ +REVENGE_CFLAGS = @REVENGE_CFLAGS@ +REVENGE_GENERATORS_CFLAGS = @REVENGE_GENERATORS_CFLAGS@ +REVENGE_GENERATORS_LIBS = @REVENGE_GENERATORS_LIBS@ +REVENGE_LIBS = @REVENGE_LIBS@ +REVENGE_STREAM_CFLAGS = @REVENGE_STREAM_CFLAGS@ +REVENGE_STREAM_LIBS = @REVENGE_STREAM_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ WINDRES = @WINDRES@ -WPD_CFLAGS = @WPD_CFLAGS@ -WPD_LIBS = @WPD_LIBS@ -WPG_CFLAGS = @WPG_CFLAGS@ -WPG_LIBS = @WPG_LIBS@ ZLIB_CFLAGS = @ZLIB_CFLAGS@ ZLIB_LIBS = @ZLIB_LIBS@ abs_builddir = @abs_builddir@ @@ -322,7 +326,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: