Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package libodfgen for openSUSE:Factory checked in at 2021-01-22 21:50:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libodfgen (Old) and /work/SRC/openSUSE:Factory/.libodfgen.new.28504 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libodfgen" Fri Jan 22 21:50:02 2021 rev:17 rq:865051 version:0.1.8 Changes: -------- --- /work/SRC/openSUSE:Factory/libodfgen/libodfgen.changes 2020-09-01 20:01:13.064419822 +0200 +++ /work/SRC/openSUSE:Factory/.libodfgen.new.28504/libodfgen.changes 2021-01-22 21:50:20.549680463 +0100 @@ -1,0 +2,15 @@ +Tue Jan 19 21:35:36 UTC 2021 - Dirk M??ller <dmuel...@suse.com> + +- update to 0.1.8: + + use libxml2 to parse xml's equations... + + code modernization: + use range-based for loop, use nullptr, + fix too small loop variables, + don't access static members through instance, + + retrieve more border's attributes in tables, + + retrieve draw:auto-grow-width,draw:fit-to-size,draw:z-index, + style:print-content, style:shrink-to-fit attributes in graphics + + output numbers with more precision, +- Other improvements and fixes. + +------------------------------------------------------------------- Old: ---- libodfgen-0.1.7.tar.xz New: ---- libodfgen-0.1.8.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libodfgen.spec ++++++ --- /var/tmp/diff_new_pack.VS7BWF/_old 2021-01-22 21:50:21.181681360 +0100 +++ /var/tmp/diff_new_pack.VS7BWF/_new 2021-01-22 21:50:21.189681371 +0100 @@ -1,7 +1,7 @@ # # spec file for package libodfgen # -# Copyright (c) 2020 SUSE LLC +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,13 +18,13 @@ %define libname libodfgen-0_1-1 Name: libodfgen -Version: 0.1.7 +Version: 0.1.8 Release: 0 Summary: Library to generate ODF documents from libwpd's and libwpg's api calls License: LGPL-2.1-or-later AND MPL-2.0+ Group: Productivity/Publishing/Word URL: http://libwpd.sourceforge.net -Source: http://downloads.sourceforge.net/project/libwpd/%{name}/%{name}-%{version}/%{name}-%{version}.tar.xz +Source: https://downloads.sourceforge.net/project/libwpd/%{name}/%{name}-%{version}/%{name}-%{version}.tar.xz BuildRequires: doxygen BuildRequires: fdupes BuildRequires: gcc-c++ @@ -32,6 +32,7 @@ BuildRequires: xz BuildRequires: pkgconfig(librevenge-0.0) BuildRequires: pkgconfig(librevenge-stream-0.0) +BuildRequires: pkgconfig(libxml-2.0) %description libodfgen is a general purpose library designed to generate ODF documents ++++++ libodfgen-0.1.7.tar.xz -> libodfgen-0.1.8.tar.xz ++++++ ++++ 3012 lines of diff (skipped) ++++ retrying with extended exclude list diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/ChangeLog new/libodfgen-0.1.8/ChangeLog --- old/libodfgen-0.1.7/ChangeLog 2018-06-13 09:21:21.000000000 +0200 +++ new/libodfgen-0.1.8/ChangeLog 2021-01-06 11:34:13.000000000 +0100 @@ -1,3 +1,136 @@ +2021-01-06 ALONSO Laurent <laurent.alo...@inria.fr> [8119035756c9d11e7bf523c5d7cc66dbf78a9238] + +tconfigure.ac: update micro revision to prepare a release... + + +2021-01-06 ALONSO Laurent <laurent.alo...@inria.fr> [6d82aa26dc48d78c27a79a73bd1709f1efbc8f20] + +tappendXML: try to retrieve the main namespace... + + +2020-12-30 ALONSO Laurent <laurent.alo...@inria.fr> [03c5eea6955159a12f25aee814b7f61d744ee7d6] + +tcppcheck: correct some warnings... + + +2020-12-30 ALONSO Laurent <laurent.alo...@inria.fr> [7de53ec507101319c5decc910619d1b1d06322da] + +tastyle: ... + + +2020-12-30 ALONSO Laurent <laurent.alo...@inria.fr> [208f71f73db30ef822f2e8cc878cb9d61ede9314] + +tupdate README/NEWS files... + + +2020-12-30 ALONSO Laurent <laurent.alo...@inria.fr> [42498362815191152f4583dd18b2c055402835ce] + +tconfigure.ac: HAVE_VISIBILITY must be always defined... + + +2020-12-30 ALONSO Laurent <laurent.alo...@inria.fr> [2edf8af587d538b2982de93c23616ce82e2594bd] + +tGraphicStyle.cxx: try to retrieve style:print-content src/OdfGenerator.cxx: try to retrieve text:bookmark-{start|end} + + +2019-12-07 Miklos Vajna <vmik...@collabora.com> [a596b8f5eb57ddcb39a2e6818e190d4570d14e84] + +tDon't access static members through instance + + +2019-12-07 Miklos Vajna <vmik...@collabora.com> [dd7801667f1985fe0fb5ba7c3d9678506b570693] + +tMake these member functions static + + +2019-12-07 Miklos Vajna <vmik...@collabora.com> [bc3dccc7fd3cdf3b62b41f4f3c1876134a0b2a18] + +tUse nullptr + + +2019-12-07 Miklos Vajna <vmik...@collabora.com> [61db52fa1c9f4eebb8f14f150cb9ab6b7c597e8e] + +tUse range-based for loop + + +2019-11-24 Miklos Vajna <vmik...@collabora.com> [38aacbd4fc0606f6cf5ca4b11608750d607acaf4] + +tReadability: make these member functions const + + +2019-11-23 alonso <laurent.alo...@inria.fr> [5110672e4a0ba071fdfb53830c5a7f6ca6a8be58] + +tOdgGenerator[picture]: retrieve draw:z-index + + +2019-11-22 alonso <laurent.alo...@inria.fr> [2626a260c60abb26cb5fb13f2c989bb807e557a2] + +tOdgGenerator[text box]: retrieve draw:z-index... + + +2019-05-24 ALONSO Laurent <laurent.alo...@inria.fr> [0f8a5b79ee841afa8b4beee53957cb2785a7249a] + +tOdsGenerator: does not output double with std::fixed... + + +2019-04-11 ALONSO Laurent <laurent.alo...@inria.fr> [fbe6bf59e3dd863f6a937354a446f3a178b31d2c] + +tGraphicStyle.cxx: retrieve draw:auto-grow-width,draw:fit-to-size,style:shrink-to-fit + + +2019-03-31 David Tardon <dtar...@redhat.com> [f3e5e16a6da8dac0abcdf048a058d4110a155f3b] + +tdo not reinvent the wheel + + +2019-01-19 Miklos Vajna <vmik...@collabora.com> [353c97f0163a9a6d8460445ace725cfe4cda50eb] + +tFix too small loop variables + +tThese loop variables had narrower type 'unsigned int' than the iteration's +tupper bound 'unsigned long'. + +2018-12-29 David Tardon <dtar...@redhat.com> [13d8c49e1a04f71ccdc512e3ae0f15614d10dd18] + +tWaE: drop unnecessary parentheses + + +2018-12-29 David Tardon <dtar...@redhat.com> [465256d662e306769adf9e47ae31e31b79e1def3] + +tcheck for __attribute__((visibility)) too + + +2018-08-19 osnola <alo...@loria.fr> [e5bc388a6710bedc105b7422549f1d1cde49c829] + +tOdfGenerator.cxx: retrieve table:table-background attribute + do not create headers in odp table... + + +2018-08-19 osnola <alo...@loria.fr> [80156c071c3d881f82f686ddd39c401a3e68080c] + +tsheet: emit style:row-height instead of style:min-row-height as LibreOffice seems to ignore style:min-row-height... + + +2018-07-19 osnola <alo...@loria.fr> [78c936032632e8fc0eb258f699b8623eb6ad9be4] + +tOdgGenerator: define xmlns:number... + + +2018-07-19 osnola <alo...@loria.fr> [7ecea2f3eed53092cdc912c6eb713de9abd9a57c] + +tTableStyle.cxx: try to retrieve more borders when generating odg/p. + + +2018-06-17 David Tardon <dtar...@redhat.com> [5e9ab6abfc6915b4f3c9cceb48f3d527ef37adc3] + +tallow building with gcc 4.8 + +tregex is really supported only from 4.9 up. + +2018-06-16 David Tardon <dtar...@redhat.com> [cb0e97de34b694f92b3ace3f04d4a01e334f6b2e] + +tfix out-of-tree build of tests + + 2018-06-12 osnola <alo...@loria.fr> [c2825b346522b47f965758588573022c53e6cb45] tupdate NEWS diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/NEWS new/libodfgen-0.1.8/NEWS --- old/libodfgen-0.1.7/NEWS 2018-06-12 19:14:29.000000000 +0200 +++ new/libodfgen-0.1.8/NEWS 2020-12-30 13:28:21.000000000 +0100 @@ -1,3 +1,17 @@ +libodfgen 0.1.8 +- All: + + use libxml2 to parse xml's equations... + + code modernization: + use range-based for loop, use nullptr, + fix too small loop variables, + don't access static members through instance, + + retrieve more border's attributes in tables, + + retrieve draw:auto-grow-width,draw:fit-to-size,draw:z-index, + style:print-content, style:shrink-to-fit attributes in graphics +- Spreadsheet: + + output numbers with more precision, +- Other improvements and fixes. + libodfgen 0.1.7 - All: + switch to C++-11 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/README new/libodfgen-0.1.8/README --- old/libodfgen-0.1.7/README 2016-04-10 10:38:03.000000000 +0200 +++ new/libodfgen-0.1.8/README 2020-12-30 13:28:06.000000000 +0100 @@ -13,9 +13,9 @@ BUILD DEPENDENCIES: * librevenge +* libxml2 * pkgconfig (for the build system to find librevenge) * doxygen (unless you choose to disable building of API documentation) -* boost (unless you build with C++ shared_ptr) BUILD AND INSTALLATION: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/compile new/libodfgen-0.1.8/compile --- old/libodfgen-0.1.7/compile 2016-04-10 10:39:24.000000000 +0200 +++ new/libodfgen-0.1.8/compile 2020-12-30 12:53:54.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Wrapper for compilers which do not understand '-c -o'. -scriptversion=2012-10-14.11; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1999-2014 Free Software Foundation, Inc. +# Copyright (C) 1999-2018 Free Software Foundation, Inc. # Written by Tom Tromey <tro...@cygnus.com>. # # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -255,7 +255,8 @@ echo "compile $scriptversion" exit $? ;; - cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac @@ -339,9 +340,9 @@ # Local Variables: # mode: shell-script # sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/config.h.in new/libodfgen-0.1.8/config.h.in --- old/libodfgen-0.1.7/config.h.in 2018-06-12 19:04:45.000000000 +0200 +++ new/libodfgen-0.1.8/config.h.in 2021-01-05 13:11:00.000000000 +0100 @@ -9,6 +9,9 @@ /* Define to 1 if the system has the `format' function attribute */ #undef HAVE_FUNC_ATTRIBUTE_FORMAT +/* Define to 1 if the system has the `visibility' function attribute */ +#undef HAVE_FUNC_ATTRIBUTE_VISIBILITY + /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/configure.ac new/libodfgen-0.1.8/configure.ac --- old/libodfgen-0.1.7/configure.ac 2018-06-12 19:03:04.000000000 +0200 +++ new/libodfgen-0.1.8/configure.ac 2021-01-04 15:57:07.000000000 +0100 @@ -7,7 +7,7 @@ # ==================== m4_define([libodfgen_version_major],[0]) m4_define([libodfgen_version_minor],[1]) -m4_define([libodfgen_version_micro],[7]) +m4_define([libodfgen_version_micro],[8]) m4_define([libodfgen_version],[libodfgen_version_major.libodfgen_version_minor.libodfgen_version_micro]) # ============= @@ -46,6 +46,8 @@ AC_SUBST([REVENGE_CFLAGS]) AC_SUBST([REVENGE_LIGS]) +PKG_CHECK_MODULES([XML], [libxml-2.0]) + # ================================= # Libtool/Version Makefile settings # ================================= @@ -86,22 +88,20 @@ AC_MSG_RESULT([$platform_win32]) AM_CONDITIONAL([PLATFORM_WIN32], [test "x$platform_win32" = "xyes"]) -AS_IF([test $platform_win32 = yes], - [], +AS_IF([test "x$platform_win32" = "xyes"], + [ + AM_CONDITIONAL([HAVE_VISIBILITY], [ test "x" != "x" ] ) + ], [ AC_MSG_CHECKING([for -fvisibility=hidden compiler flag]) saved_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS -fvisibility=hidden" - AC_TRY_COMPILE([], [], - [ - AC_MSG_RESULT([yes]) - CXXFLAGS="$CXXFLAGS -DLIBODFGEN_VISIBILITY" - ], - [ - AC_MSG_RESULT([no]) - CXXFLAGS="$saved_CXXFLAGS" - ] - ) + AC_TRY_COMPILE([], [], [have_visibility=yes], [have_visibility=no]) + AC_MSG_RESULT([$have_visibility]) + CXXFLAGS="$saved_CXXFLAGS" + AX_GCC_FUNC_ATTRIBUTE([visibility]) + AM_CONDITIONAL([HAVE_VISIBILITY], [ + test "$have_visibility" = "yes" && test "$ax_cv_have_func_attribute_visibility" = "yes"]) ] ) @@ -118,7 +118,7 @@ CXXFLAGS="$CXXFLAGS -Werror" ]) AC_ARG_ENABLE([weffc], - [AS_HELP_STRING([--disable-weffc], [ Disable -Weffc++ warnings, usefull when using an old version of gcc or of boost])], + [AS_HELP_STRING([--disable-weffc], [ Disable -Weffc++ warnings, usefull when using an old version of gcc])], [enable_weffc="$enableval"], [enable_weffc=yes] ) @@ -247,7 +247,6 @@ Build configuration: debug: ${enable_debug} docs: ${build_docs} - shared_ptr: ${with_sharedptr} werror: ${enable_werror} ============================================================================== ]) Binary files old/libodfgen-0.1.7/m4/._libtool.m4 and new/libodfgen-0.1.8/m4/._libtool.m4 differ Binary files old/libodfgen-0.1.7/m4/._ltoptions.m4 and new/libodfgen-0.1.8/m4/._ltoptions.m4 differ Binary files old/libodfgen-0.1.7/m4/._ltsugar.m4 and new/libodfgen-0.1.8/m4/._ltsugar.m4 differ Binary files old/libodfgen-0.1.7/m4/._lt~obsolete.m4 and new/libodfgen-0.1.8/m4/._lt~obsolete.m4 differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/m4/libtool.m4 new/libodfgen-0.1.8/m4/libtool.m4 --- old/libodfgen-0.1.7/m4/libtool.m4 2016-04-10 10:39:17.000000000 +0200 +++ new/libodfgen-0.1.8/m4/libtool.m4 2020-12-30 12:53:50.000000000 +0100 @@ -1067,16 +1067,11 @@ _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - darwin*) # darwin 5.x on - # if running on 10.5 or later, the deployment target defaults - # to the OS version, if on x86, and 10.4, the deployment - # target defaults to 10.4. Don't you love it? - case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in - 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) - _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; - 10.[[012]][[,.]]*) + darwin*) + case ${MACOSX_DEPLOYMENT_TARGET},$host in + 10.[[012]],*|,*powerpc*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; - 10.*) + *) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/missing new/libodfgen-0.1.8/missing --- old/libodfgen-0.1.7/missing 2016-04-10 10:39:24.000000000 +0200 +++ new/libodfgen-0.1.8/missing 2020-12-30 12:53:54.000000000 +0100 @@ -1,9 +1,9 @@ #! /bin/sh # Common wrapper for a few potentially missing GNU programs. -scriptversion=2013-10-28.13; # UTC +scriptversion=2018-03-07.03; # UTC -# Copyright (C) 1996-2014 Free Software Foundation, Inc. +# Copyright (C) 1996-2018 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard <pin...@iro.umontreal.ca>, 1996. # This program is free software; you can redistribute it and/or modify @@ -17,7 +17,7 @@ # 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 <http://www.gnu.org/licenses/>. +# along with this program. If not, see <https://www.gnu.org/licenses/>. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a @@ -101,9 +101,9 @@ exit $st fi -perl_URL=http://www.perl.org/ -flex_URL=http://flex.sourceforge.net/ -gnu_software_URL=http://www.gnu.org/software +perl_URL=https://www.perl.org/ +flex_URL=https://github.com/westes/flex +gnu_software_URL=https://www.gnu.org/software program_details () { @@ -207,9 +207,9 @@ exit $st # Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) +# eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" +# time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/GraphicFunctions.cxx new/libodfgen-0.1.8/src/GraphicFunctions.cxx --- old/libodfgen-0.1.7/src/GraphicFunctions.cxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/GraphicFunctions.cxx 2019-02-21 13:01:39.000000000 +0100 @@ -329,7 +329,7 @@ double lastPrevY = 0.0; px = py = qx = qy = 0.0; - for (unsigned k = 0; k < path.count(); ++k) + for (unsigned long k = 0; k < path.count(); ++k) { if (!path[k]["librevenge:path-action"]) continue; @@ -430,7 +430,7 @@ librevenge::RVNGString convertPath(const librevenge::RVNGPropertyListVector &path, double px, double py) { librevenge::RVNGString sValue(""); - for (unsigned i = 0; i < path.count(); ++i) + for (unsigned long i = 0; i < path.count(); ++i) { if (!path[i]["librevenge:path-action"]) continue; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/GraphicStyle.cxx new/libodfgen-0.1.8/src/GraphicStyle.cxx --- old/libodfgen-0.1.7/src/GraphicStyle.cxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/GraphicStyle.cxx 2019-05-03 12:04:18.000000000 +0200 @@ -374,7 +374,8 @@ // other char const *others[] = { - "draw:auto-grow-height", + "draw:auto-grow-height", "draw:auto-grow-width", + "draw:fit-to-size", "draw:ole-draw-aspect", "draw:show-unit", "fo:background-color", @@ -383,7 +384,8 @@ "style:background-transparency", "style:border-line-width","style:border-line-width-top","style:border-line-width-left", "style:border-line-width-bottom","style:border-line-width-right", - "style:mirror", "style:parent-style-name", + "style:shrink-to-fit", + "style:mirror", "style:parent-style-name", "style:print-content", "style:run-through", "style:wrap" }; for (auto &other : others) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/GraphicStyle.hxx new/libodfgen-0.1.8/src/GraphicStyle.hxx --- old/libodfgen-0.1.7/src/GraphicStyle.hxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/GraphicStyle.hxx 2019-12-08 11:43:27.000000000 +0100 @@ -82,7 +82,7 @@ /** append the graphic in the element, ie. the stroke, pattern, bitmap, marker properties */ void addGraphicProperties(librevenge::RVNGPropertyList const &style, librevenge::RVNGPropertyList &element); /** append the frame, ... properties in the element, ie. all properties excepted the graphic properties */ - void addFrameProperties(librevenge::RVNGPropertyList const &propList, librevenge::RVNGPropertyList &element); + static void addFrameProperties(librevenge::RVNGPropertyList const &propList, librevenge::RVNGPropertyList &element); protected: FillManager &mFillManager; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/Makefile.am new/libodfgen-0.1.8/src/Makefile.am --- old/libodfgen-0.1.7/src/Makefile.am 2016-04-15 16:26:32.000000000 +0200 +++ new/libodfgen-0.1.8/src/Makefile.am 2019-04-01 12:41:09.000000000 +0200 @@ -6,9 +6,13 @@ lib_LTLIBRARIES = libodfgen-@LIBODFGEN_MAJOR_VERSION@.@LIBODFGEN_MINOR_VERSION@.la -AM_CXXFLAGS = -I$(top_srcdir)/inc/ $(REVENGE_CFLAGS) $(DEBUG_CXXFLAGS) -DLIBODFGEN_BUILD +AM_CXXFLAGS = -I$(top_srcdir)/inc/ $(REVENGE_CFLAGS) $(DEBUG_CXXFLAGS) $(XML_CFLAGS) -DLIBODFGEN_BUILD -libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_LIBADD = @LIBODFGEN_WIN32_RESOURCE@ $(REVENGE_LIBS) +if HAVE_VISIBILITY +AM_CXXFLAGS += -fvisibility=hidden -DLIBODFGEN_VISIBILITY +endif + +libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_LIBADD = @LIBODFGEN_WIN32_RESOURCE@ $(REVENGE_LIBS) $(XML_LIBS) libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_DEPENDENCIES = @LIBODFGEN_WIN32_RESOURCE@ libodfgen_@LIBODFGEN_MAJOR_VERSION@_@LIBODFGEN_MINOR_VERSION@_la_LDFLAGS = $(version_info) -export-dynamic -no-undefined diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/NumberingStyle.cxx new/libodfgen-0.1.8/src/NumberingStyle.cxx --- old/libodfgen-0.1.7/src/NumberingStyle.cxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/NumberingStyle.cxx 2019-12-08 11:43:27.000000000 +0100 @@ -40,7 +40,7 @@ { } -void NumberingStyle::writeCondition(librevenge::RVNGPropertyList const &propList, OdfDocumentHandler *pHandler, NumberingManager const &manager) const +void NumberingStyle::writeCondition(librevenge::RVNGPropertyList const &propList, OdfDocumentHandler *pHandler, NumberingManager const &manager) { librevenge::RVNGString applyName(""); librevenge::RVNGPropertyListVector const *formula=propList.child("librevenge:formula"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/NumberingStyle.hxx new/libodfgen-0.1.8/src/NumberingStyle.hxx --- old/libodfgen-0.1.7/src/NumberingStyle.hxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/NumberingStyle.hxx 2019-12-08 11:43:27.000000000 +0100 @@ -52,7 +52,7 @@ static librevenge::RVNGString getHashName(const librevenge::RVNGPropertyList &xPropList); private: - void writeCondition(librevenge::RVNGPropertyList const &propList, OdfDocumentHandler *pHandler, NumberingManager const &manager) const; + static void writeCondition(librevenge::RVNGPropertyList const &propList, OdfDocumentHandler *pHandler, NumberingManager const &manager); librevenge::RVNGPropertyList mPropList; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/OdcGenerator.cxx new/libodfgen-0.1.8/src/OdcGenerator.cxx --- old/libodfgen-0.1.7/src/OdcGenerator.cxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/OdcGenerator.cxx 2019-12-08 11:43:27.000000000 +0100 @@ -85,7 +85,7 @@ librevenge::RVNGString getChartStyleName(int id); void writeChartStyle(librevenge::RVNGPropertyList const &style, OdfDocumentHandler *pHandler); - librevenge::RVNGString getAddressString(librevenge::RVNGPropertyListVector const *vector) const; + static librevenge::RVNGString getAddressString(librevenge::RVNGPropertyListVector const *vector); std::stack<ChartDocumentState> mChartDocumentStates; protected: @@ -185,7 +185,7 @@ } librevenge::RVNGPropertyList graphProp; mGraphicManager.addGraphicProperties(style,graphProp); - mGraphicManager.addFrameProperties(style,graphProp); + GraphicStyleManager::addFrameProperties(style,graphProp); if (!style["fo:min-width"] && graphProp["fo:min-width"]) graphProp.remove("fo:min-width"); if (!graphProp.empty()) @@ -197,7 +197,7 @@ } -librevenge::RVNGString OdcGeneratorPrivate::getAddressString(librevenge::RVNGPropertyListVector const *vector) const +librevenge::RVNGString OdcGeneratorPrivate::getAddressString(librevenge::RVNGPropertyListVector const *vector) { librevenge::RVNGString res(""); if (!vector) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/OdfGenerator.cxx new/libodfgen-0.1.8/src/OdfGenerator.cxx --- old/libodfgen-0.1.7/src/OdfGenerator.cxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/OdfGenerator.cxx 2021-01-06 11:16:44.000000000 +0100 @@ -34,12 +34,14 @@ #include <cctype> #include <limits> +#include <memory> #include <string> #include <stack> -#include <regex> #include <librevenge/librevenge.h> +#include <libxml/parser.h> + #include "DocumentElement.hxx" #include "GraphicFunctions.hxx" #include "InternalHandler.hxx" @@ -48,6 +50,9 @@ using namespace libodfgen; +namespace +{ + static void appendUnicodeTo(unsigned long val, librevenge::RVNGString &buffer) { uint8_t first; @@ -92,6 +97,81 @@ buffer.append(outbuf); } +struct XMLException {}; + +const char *xmlCast(const xmlChar *const str) +{ + return reinterpret_cast<const char *>(str); +} + +static void addAttributes(xmlAttributePtr attr, std::shared_ptr<TagOpenElement> &element) +{ + for (; attr; attr = xmlAttributePtr(attr->next)) + { + std::string value; + + for (xmlNodePtr node = attr->children; node; node = node->next) + if (node->type == XML_TEXT_NODE) + value += xmlCast(node->content); + element->addAttribute(xmlCast(attr->name), value.c_str()); + } +} + +static void appendNameSpace(xmlNsPtr nSpace, std::shared_ptr<TagOpenElement> &element) +{ + if (nSpace->type==XML_NAMESPACE_DECL && nSpace->href) + { + std::string tag("xmlns"); + if (nSpace->prefix) tag+=std::string(":")+xmlCast(nSpace->prefix); + std::string value(xmlCast(nSpace->href)); + element->addAttribute(tag.c_str(), value.c_str()); + // FIXME: look also next to check if there is other namespace + } +} + +static void appendElements(xmlNodePtr node, DocumentElementVector &out, bool rootNode=false) +{ + for (; node; node = node->next) + { + switch (node->type) + { + case XML_ELEMENT_NODE: + { + auto element = xmlElementPtr(node); + auto tag = std::make_shared<TagOpenElement>(xmlCast(element->name)); + out.push_back(tag); + if (rootNode && node->nsDef) appendNameSpace(node->nsDef, tag); + addAttributes(element->attributes, tag); + appendElements(element->children, out); + out.push_back(std::make_shared<TagCloseElement>(xmlCast(element->name))); + break; + } + case XML_TEXT_NODE: + out.push_back(std::make_shared<CharDataElement>(xmlCast(node->content))); + break; + default: + break; + } + } +} + +void appendXML(const std::string &data, DocumentElementVector &out) +{ + std::unique_ptr<xmlDoc, void(*)(xmlDocPtr)> doc + { + // FIXME: coverity warns that using XML_PARSE_RECOVER is unsafe, + // but libstaroffice generates α , so we must first fix libstaroffice before removing XML_PARSE_RECOVER + xmlReadDoc(reinterpret_cast<const xmlChar *>(data.c_str()), "", nullptr, + XML_PARSE_RECOVER | XML_PARSE_NOERROR | XML_PARSE_NOWARNING | XML_PARSE_NONET | XML_PARSE_NOCDATA | XML_PARSE_NSCLEAN), + xmlFreeDoc}; + if (!doc) + throw XMLException(); + + appendElements(doc->children, out, true); +} + +} + OdfGenerator::OdfGenerator() : mpCurrentStorage() , mStorageStack() @@ -276,13 +356,13 @@ file.write(pHandler); TagCloseElement("manifest:file-entry").write(pHandler); } - for (auto oIt=mNameObjectMap.begin(); oIt!=mNameObjectMap.end(); ++oIt) + for (auto &oIt : mNameObjectMap) { - if (!oIt->second) continue; + if (!oIt.second) continue; TagOpenElement file("manifest:file-entry"); - file.addAttribute("manifest:media-type",oIt->second->mType); - file.addAttribute("manifest:full-path", oIt->first); + file.addAttribute("manifest:media-type",oIt.second->mType); + file.addAttribute("manifest:full-path", oIt.first); file.write(pHandler); TagCloseElement("manifest:file-entry").write(pHandler); } @@ -318,10 +398,10 @@ "table:use-regular-expressions", "table:use-wildcards" }; // checkme: had also childs elements: table:iteration, table:null-date - for (size_t i=0; i<ODFGEN_N_ELEMENTS(wh); ++i) + for (auto &i : wh) { - if (child[wh[i]]) - calcSetting->addAttribute(wh[i], child[wh[i]]->getStr()); + if (child[i]) + calcSetting->addAttribute(i, child[i]->getStr()); } mpBodyStorage->push_back(calcSetting); mpBodyStorage->push_back(std::make_shared<TagCloseElement>("table:calculation-settings")); @@ -359,10 +439,10 @@ librevenge::RVNGStringVector OdfGenerator::getObjectNames() const { librevenge::RVNGStringVector res; - for (auto it=mNameObjectMap.begin(); it!=mNameObjectMap.end(); ++it) + for (const auto &it : mNameObjectMap) { - if (!it->second || it->second->mIsDir) continue; - res.append(it->first); + if (!it.second || it.second->mIsDir) continue; + res.append(it.first); } return res; } @@ -550,7 +630,7 @@ // we do not want to add the default solid stroke if there are some double/... borders if (!propList["draw:stroke"]) graphic.remove("draw:stroke"); - mGraphicManager.addFrameProperties(propList, graphic); + GraphicStyleManager::addFrameProperties(propList, graphic); graphic.insert("style:parent-style-name", frameStyleName); graphic.insert("draw:ole-draw-aspect", "1"); librevenge::RVNGString frameAutomaticStyleName= @@ -588,7 +668,8 @@ "fo:max-width", "fo:max-height", "style:rel-width", "style:rel-height", // checkme "text:anchor-page-number", "text:anchor-type", - "table:end-cell-address" + "table:end-cell-address", + "table:table-background" }; for (auto &i : frameAttrib) { @@ -863,7 +944,8 @@ openElement->addAttribute(wh[i], librevenge::RVNGString::escapeXML(propList[wh[i]]->getStr())); } } - else if (type == "text:reference-mark" || type == "text:reference-mark-start" || type == "text:reference-mark-end") + else if (type == "text:reference-mark" || type == "text:reference-mark-start" || type == "text:reference-mark-end" || + type == "text:bookmark-start" || type == "text:bookmark-end") { for (int i=0; i<1; ++i) { @@ -1271,7 +1353,7 @@ mpCurrentStorage->push_back(std::make_shared<TagCloseElement>("table:table")); } -bool OdfGenerator::openTableRow(const librevenge::RVNGPropertyList &propList) +bool OdfGenerator::openTableRow(const librevenge::RVNGPropertyList &propList, bool compatibleOdp) { Table *table=mTableManager.getActualTable(); if (!table) @@ -1279,7 +1361,7 @@ ODFGEN_DEBUG_MSG(("OdfGenerator::openTableRow called with no table\n")); return false; } - librevenge::RVNGString rowName=table->openRow(propList); + librevenge::RVNGString rowName=table->openRow(propList, compatibleOdp); if (rowName.empty()) return false; bool inHeader=false; @@ -1385,83 +1467,15 @@ ODFGEN_DEBUG_MSG(("OdfGenerator::insertEquation: can not find the data\n")); return; } - // check quickly for false file, ie. check that the file begins at least with '<' - auto p=data.c_str(); - while (*p && *p==' ') ++p; - if (*p!='<') - { - ODFGEN_DEBUG_MSG(("OdfGenerator::insertEquation: sorry, I do not recognize a mathml file\n")); - return; - } try { - std::vector<std::shared_ptr<DocumentElement> > elementStack; + std::vector<std::shared_ptr<DocumentElement>> elementStack; elementStack.push_back(std::make_shared<TagOpenElement>("draw:object")); - std::stack<std::string> nameStack; - - std::regex elementOrDataExpr("\\s*((?:<[^>]+>)|(?:[^<]+))"); // element or data - std::regex begElementExpr("<\\s*(/{0,1})\\s*([a-zA-Z]+)"); // <[/]name - std::regex attributeExpr("\\s*([a-zA-Z]+)\\s*=\\s*([\"'])([^\"']*)\\2"); // attribName=attribValue - std::regex endElementExpr("\\s*(/{0,1})\\s*>\\s*"); // [/]> - - std::smatch bm; - for (auto i=std::sregex_iterator(data.begin(), data.end(), elementOrDataExpr); i!=std::sregex_iterator(); ++i) - { - if (i->size()!=2 || !i->prefix().str().empty()) - throw "find a prefix"; - auto element=(*i)[1].str(); - if (element.size()<2 || element[0]!='<') // string data - { - // the string is xml escaped, we must retrieve the original string - librevenge::RVNGString res; - unescapeXML(element.c_str(), element.size(), res); - elementStack.push_back(std::make_shared<CharDataElement>(res)); - continue; - } - if (!std::regex_search(element,bm,begElementExpr) || !bm.prefix().str().empty() || bm.size()<3) // an element - throw "can not parse element"; - auto keyword=bm[2].str(); - bool closeElement=bm[1].str()=="/"; - auto remain=bm.suffix().str(), endElement=remain; - std::shared_ptr<TagOpenElement> elt; - if (!closeElement) - { - elt=std::make_shared<TagOpenElement>(keyword.c_str()); - for (auto attr=std::sregex_iterator(remain.begin(), remain.end(), attributeExpr); attr!=std::sregex_iterator(); ++attr) - { - if (attr->size()!=4 || !attr->prefix().str().empty()) - throw "find a prefix when parsing attribute"; - elt->addAttribute((*attr)[1].str().c_str(), (*attr)[3].str().c_str()); - endElement=attr->suffix().str(); - } - } - if (!std::regex_search(endElement,bm,endElementExpr) || bm.size()<2 || !bm.prefix().str().empty() || !bm.suffix().str().empty() || (closeElement && !bm[1].str().empty())) - throw "can not find end element"; - - if (closeElement) - { - if (nameStack.empty() || nameStack.top()!=keyword) - throw "bad close element"; - nameStack.pop(); - elementStack.push_back(std::make_shared<TagCloseElement>(keyword.c_str())); - continue; - } - elementStack.push_back(elt); - if (bm[1].str().empty()) - nameStack.push(keyword); - else - elementStack.push_back(std::make_shared<TagCloseElement>(keyword.c_str())); - } - if (!nameStack.empty()) - throw "not empty name stack"; + appendXML(data, elementStack); elementStack.push_back(std::make_shared<TagCloseElement>("draw:object")); mpCurrentStorage->insert(mpCurrentStorage->end(), elementStack.begin(), elementStack.end()); } - catch (char const *s) - { - ODFGEN_DEBUG_MSG(("OdfGenerator::insertEquation: ARGHH, catch an exception (%s) when decoding picture!!!\n", s)); - } catch (...) { ODFGEN_DEBUG_MSG(("OdfGenerator::insertEquation: ARGHH, catch an exception when decoding picture!!!\n")); @@ -1591,7 +1605,7 @@ librevenge::RVNGPropertyList styleList; mGraphicManager.addGraphicProperties(mGraphicStyle,styleList); if (mGraphicStyle["style:display-name"]) - mGraphicManager.addFrameProperties(mGraphicStyle,styleList); + GraphicStyleManager::addFrameProperties(mGraphicStyle,styleList); return mGraphicManager.findOrAdd(styleList, useStyleAutomaticZone() ? Style::Z_StyleAutomatic : Style::Z_ContentAutomatic); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/OdfGenerator.hxx new/libodfgen-0.1.8/src/OdfGenerator.hxx --- old/libodfgen-0.1.7/src/OdfGenerator.hxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/OdfGenerator.hxx 2019-02-21 13:01:39.000000000 +0100 @@ -273,7 +273,7 @@ /// call to close a table void closeTable(); /// call to open a table row - bool openTableRow(const librevenge::RVNGPropertyList &propList); + bool openTableRow(const librevenge::RVNGPropertyList &propList, bool compatibleOdp=false); /// call to close a table row void closeTableRow(); /// returns true if a table row is opened diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/OdgGenerator.cxx new/libodfgen-0.1.8/src/OdgGenerator.cxx --- old/libodfgen-0.1.7/src/OdgGenerator.cxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/OdgGenerator.cxx 2019-12-08 11:43:27.000000000 +0100 @@ -65,7 +65,7 @@ void updatePageSpanPropertiesToCreatePage(librevenge::RVNGPropertyList &propList); bool writeTargetDocument(OdfDocumentHandler *pHandler, OdfStreamType streamType) override; - void _writeSettings(OdfDocumentHandler *pHandler); + void _writeSettings(OdfDocumentHandler *pHandler) const; void _writeStyles(OdfDocumentHandler *pHandler); void _writeAutomaticStyles(OdfDocumentHandler *pHandler, OdfStreamType streamType); @@ -178,14 +178,14 @@ || (strcmp(i.key(), "style:repeat") == 0)) removedKeys.push_back(i.key()); } - for (std::deque<std::string>::const_iterator it = removedKeys.begin(); it != removedKeys.end(); ++it) - pList.remove(it->c_str()); + for (const auto &removedKey : removedKeys) + pList.remove(removedKey.c_str()); // do not generate footnote separator data pList.insert("librevenge:footnote", librevenge::RVNGPropertyListVector()); } -void OdgGeneratorPrivate::_writeSettings(OdfDocumentHandler *pHandler) +void OdgGeneratorPrivate::_writeSettings(OdfDocumentHandler *pHandler) const { TagOpenElement("office:settings").write(pHandler); @@ -300,6 +300,7 @@ docContentPropList.addAttribute("xmlns:table", "urn:oasis:names:tc:opendocument:xmlns:table:1.0"); docContentPropList.addAttribute("xmlns:xlink", "http://www.w3.org/1999/xlink"); docContentPropList.addAttribute("xmlns:meta", "urn:oasis:names:tc:opendocument:xmlns:meta:1.0"); + docContentPropList.addAttribute("xmlns:number", "urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"); docContentPropList.addAttribute("xmlns:dc", "http://purl.org/dc/elements/1.1/"); docContentPropList.addAttribute("xmlns:svg", "urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0"); docContentPropList.addAttribute("xmlns:fo", "urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0"); @@ -650,6 +651,8 @@ if (propList["draw:display"]) pDrawFrameElement->addAttribute("draw:display", propList["draw:display"]->getStr()); + if (propList["draw:z-index"]) + pDrawFrameElement->addAttribute("draw:z-index", propList["draw:z-index"]->getStr()); mpImpl->getCurrentStorage()->push_back(pDrawFrameElement); @@ -686,7 +689,7 @@ if (!propList["draw:fill"]) tmpList.insert("draw:fill", "none"); mpImpl->getGraphicManager().addGraphicProperties(tmpList, graphicStyle); - mpImpl->getGraphicManager().addFrameProperties(propList, graphicStyle); + GraphicStyleManager::addFrameProperties(propList, graphicStyle); librevenge::RVNGString sValue=mpImpl->getGraphicManager().findOrAdd (graphicStyle, mpImpl->useStyleAutomaticZone() ? Style::Z_StyleAutomatic : Style::Z_ContentAutomatic); @@ -708,6 +711,7 @@ } static char const *attrib[]= { + "draw:z-index", "fo:min-width", "fo:min-height", "fo:max-width", "fo:max-height", "fo:padding-top", "fo:padding-bottom", "fo:padding-left", "fo:padding-right", "draw:textarea-vertical-align", "draw:fill", "draw:fill-color" }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/OdpGenerator.cxx new/libodfgen-0.1.8/src/OdpGenerator.cxx --- old/libodfgen-0.1.7/src/OdpGenerator.cxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/OdpGenerator.cxx 2019-12-08 11:43:27.000000000 +0100 @@ -97,11 +97,11 @@ void updatePageSpanPropertiesToCreatePage(librevenge::RVNGPropertyList &propList); - void writeNotesStyles(OdfDocumentHandler *pHandler); + static void writeNotesStyles(OdfDocumentHandler *pHandler); //! returns the document type bool writeTargetDocument(OdfDocumentHandler *pHandler, OdfStreamType streamType) override; - void _writeSettings(OdfDocumentHandler *pHandler); + void _writeSettings(OdfDocumentHandler *pHandler) const; void _writeStyles(OdfDocumentHandler *pHandler); void _writeAutomaticStyles(OdfDocumentHandler *pHandler, OdfStreamType streamType); @@ -176,8 +176,8 @@ (strncmp(i.key(), "presentation:", 13) == 0) || (strcmp(i.key(), "style:repeat") == 0)) removedKeys.push_back(i.key()); } - for (std::deque<std::string>::const_iterator it = removedKeys.begin(); it != removedKeys.end(); ++it) - pList.remove(it->c_str()); + for (const auto &removedKey : removedKeys) + pList.remove(removedKey.c_str()); // do not generate footnote separator data pList.insert("librevenge:footnote", librevenge::RVNGPropertyListVector()); @@ -191,7 +191,7 @@ if (!propList["draw:fill"]) tmpList.insert("draw:fill", "none"); mGraphicManager.addGraphicProperties(tmpList, graphicStyle); - mGraphicManager.addFrameProperties(propList, graphicStyle); + GraphicStyleManager::addFrameProperties(propList, graphicStyle); librevenge::RVNGString sValue=mGraphicManager.findOrAdd (graphicStyle, useStyleAutomaticZone() ? Style::Z_StyleAutomatic : Style::Z_ContentAutomatic); @@ -342,7 +342,7 @@ } } -void OdpGeneratorPrivate::_writeSettings(OdfDocumentHandler *pHandler) +void OdpGeneratorPrivate::_writeSettings(OdfDocumentHandler *pHandler) const { TagOpenElement("office:settings").write(pHandler); @@ -963,7 +963,7 @@ { if (mpImpl->mState.mInComment) return; - mpImpl->openTableRow(propList); + mpImpl->openTableRow(propList, true); } void OdpGenerator::closeTableRow() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/OdsGenerator.cxx new/libodfgen-0.1.8/src/OdsGenerator.cxx --- old/libodfgen-0.1.7/src/OdsGenerator.cxx 2018-06-12 18:48:12.000000000 +0200 +++ new/libodfgen-0.1.8/src/OdsGenerator.cxx 2019-05-24 12:04:21.000000000 +0200 @@ -55,7 +55,7 @@ { std::ostringstream os; os.imbue(std::locale::classic()); - os << std::fixed << std::setprecision(8) << value; + os << std::setprecision(8) << value; return os.str().c_str(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/OdtGenerator.cxx new/libodfgen-0.1.8/src/OdtGenerator.cxx --- old/libodfgen-0.1.7/src/OdtGenerator.cxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/OdtGenerator.cxx 2020-03-07 12:09:18.000000000 +0100 @@ -66,7 +66,7 @@ { State() : mbFirstElement(true), mbFirstParagraphInPageSpan(false), mbInFakeSection(false), mbListElementOpenedAtCurrentLevel(false), - mbTableCellOpened(false), mbInNote(false), + mbTableCellOpened(false), mbInNote(false), mbInTextBox(false), mbInFrame(false) { } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/PageSpan.cxx new/libodfgen-0.1.8/src/PageSpan.cxx --- old/libodfgen-0.1.7/src/PageSpan.cxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/PageSpan.cxx 2019-12-08 11:43:27.000000000 +0100 @@ -258,7 +258,7 @@ void PageSpan::_writeContent(const char *contentTagName, const libodfgen::DocumentElementVector &content, - OdfDocumentHandler *pHandler) const + OdfDocumentHandler *pHandler) { bool hasTagName=contentTagName && strlen(contentTagName); if (hasTagName) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/PageSpan.hxx new/libodfgen-0.1.8/src/PageSpan.hxx --- old/libodfgen-0.1.7/src/PageSpan.hxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/PageSpan.hxx 2020-12-30 11:09:12.000000000 +0100 @@ -157,8 +157,8 @@ static librevenge::RVNGString protectString(librevenge::RVNGString const &orig); protected: void storeContent(ContentType type, const std::shared_ptr<libodfgen::DocumentElementVector> &pContent); - void _writeContent(const char *contentTagName, const libodfgen::DocumentElementVector &content, - OdfDocumentHandler *pHandler) const; + static void _writeContent(const char *contentTagName, const libodfgen::DocumentElementVector &content, + OdfDocumentHandler *pHandler); private: PageSpan(const PageSpan &); PageSpan &operator=(const PageSpan &); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/SheetStyle.cxx new/libodfgen-0.1.8/src/SheetStyle.cxx --- old/libodfgen-0.1.7/src/SheetStyle.cxx 2018-05-31 10:19:21.000000000 +0200 +++ new/libodfgen-0.1.8/src/SheetStyle.cxx 2020-12-30 13:42:23.000000000 +0100 @@ -180,10 +180,10 @@ styleOpen.write(pHandler); TagOpenElement stylePropertiesOpen("style:table-row-properties"); - if (mPropList["style:min-row-height"]) - stylePropertiesOpen.addAttribute("style:min-row-height", mPropList["style:min-row-height"]->getStr()); - else if (mPropList["style:row-height"]) + if (mPropList["style:row-height"]) stylePropertiesOpen.addAttribute("style:row-height", mPropList["style:row-height"]->getStr()); + else if (mPropList["style:min-row-height"]) // min-row does not seem to work + stylePropertiesOpen.addAttribute("style:row-height", mPropList["style:min-row-height"]->getStr()); if (mPropList["style:use-optimal-row-height"]) stylePropertiesOpen.addAttribute("style:use-optimal-row-height", mPropList["style:use-optimal-row-height"]->getStr()); stylePropertiesOpen.addAttribute("fo:keep-together", "auto"); @@ -255,10 +255,10 @@ pHandler->endElement("style:style"); - int col=1; if (mColumns) { librevenge::RVNGPropertyListVector::Iter j(*mColumns); + int col=1; for (j.rewind(); j.next(); ++col) { TagOpenElement columnStyleOpen("style:style"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/SheetStyle.hxx new/libodfgen-0.1.8/src/SheetStyle.hxx --- old/libodfgen-0.1.7/src/SheetStyle.hxx 2018-04-20 10:54:03.000000000 +0200 +++ new/libodfgen-0.1.8/src/SheetStyle.hxx 2020-12-30 13:41:00.000000000 +0100 @@ -103,7 +103,7 @@ { public: //! constructor - SheetManager(NumberingManager &numberingManager); + explicit SheetManager(NumberingManager &numberingManager); //! destructor virtual ~SheetManager(); //! clean all data diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/TableStyle.cxx new/libodfgen-0.1.8/src/TableStyle.cxx --- old/libodfgen-0.1.7/src/TableStyle.cxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/TableStyle.cxx 2019-12-08 11:43:27.000000000 +0100 @@ -91,10 +91,15 @@ pHandler->endElement("style:graphic-properties"); // HACK to get visible borders - if (mPropList["fo:border"]) + pList.clear(); + char const *borders[] = { "fo:border", "fo:border-bottom", "fo:border-left", "fo:border-right", "fo:border-top" }; + for (auto bo : borders) + { + if (mPropList[bo]) + pList.insert(bo, mPropList[bo]->getStr()); + } + if (!pList.empty()) { - pList.clear(); - pList.insert("fo:border", mPropList["fo:border"]->getStr()); pHandler->startElement("style:paragraph-properties", pList); pHandler->endElement("style:paragraph-properties"); } @@ -147,7 +152,7 @@ return 0; } -librevenge::RVNGString Table::openRow(const librevenge::RVNGPropertyList &propList) +librevenge::RVNGString Table::openRow(const librevenge::RVNGPropertyList &propList, bool compatibleOdp) { if (mbRowOpened) { @@ -155,7 +160,7 @@ return ""; } mbRowOpened=true; - mbRowHeaderOpened=propList["librevenge:is-header-row"] && + mbRowHeaderOpened=!compatibleOdp && propList["librevenge:is-header-row"] && propList["librevenge:is-header-row"]->getInt(); // first remove unused data librevenge::RVNGPropertyList pList; @@ -238,7 +243,7 @@ return true; } -bool Table::insertCoveredCell(const librevenge::RVNGPropertyList &) +bool Table::insertCoveredCell(const librevenge::RVNGPropertyList &) const { if (!mbRowOpened || mbCellOpened) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/src/TableStyle.hxx new/libodfgen-0.1.8/src/TableStyle.hxx --- old/libodfgen-0.1.7/src/TableStyle.hxx 2018-04-20 10:51:38.000000000 +0200 +++ new/libodfgen-0.1.8/src/TableStyle.hxx 2019-12-08 11:43:27.000000000 +0100 @@ -67,7 +67,7 @@ int getNumColumns() const; - librevenge::RVNGString openRow(const librevenge::RVNGPropertyList &propList); + librevenge::RVNGString openRow(const librevenge::RVNGPropertyList &propList, bool compatibleOdp=false); bool closeRow(); bool isRowOpened(bool &inHeaderRow) const { @@ -76,7 +76,7 @@ } librevenge::RVNGString openCell(const librevenge::RVNGPropertyList &propList); bool closeCell(); - bool insertCoveredCell(const librevenge::RVNGPropertyList &propList); + bool insertCoveredCell(const librevenge::RVNGPropertyList &propList) const; bool isCellOpened() const { return mbCellOpened; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' --exclude Makefile.in --exclude configure --exclude config.guess --exclude '*.pot' --exclude mkinstalldirs --exclude aclocal.m4 --exclude config.sub --exclude depcomp --exclude install-sh --exclude ltmain.sh old/libodfgen-0.1.7/test/Makefile.am new/libodfgen-0.1.8/test/Makefile.am --- old/libodfgen-0.1.7/test/Makefile.am 2016-04-10 10:38:03.000000000 +0200 +++ new/libodfgen-0.1.8/test/Makefile.am 2019-04-01 12:41:09.000000000 +0200 @@ -1,13 +1,13 @@ if COMPILE_TEST -AM_CXXFLAGS = $(REVENGE_CFLAGS) -I../inc/ +AM_CXXFLAGS = $(REVENGE_CFLAGS) -I$(top_srcdir)/inc/ targets=testChart1 testGraphic1 testLayer1 testLink1 testList1 testMasterPage1 testPageSpan1 testPara1 testSpan1 testTable1 testTextbox1 noinst_PROGRAMS= $(targets) EXTRA_SRC=StringDocumentHandler.cxx StringDocumentHandler.hxx -EXTRA_LDD=../src/libodfgen-@LIBODFGEN_MAJOR_VERSION@.@LIBODFGEN_MINOR_VERSION@.la \ - $(REVENGE_LIBS) $(REVENGE_STREAM_LIBS) +EXTRA_LDD=$(top_builddir)/src/libodfgen-@LIBODFGEN_MAJOR_VERSION@.@LIBODFGEN_MINOR_VERSION@.la \ + $(REVENGE_LIBS) $(REVENGE_STREAM_LIBS) $(XML_LIBS) testChart1_DEPENDENCIES = testChart1_LDADD = $(EXTRA_LDD)