Hello community, here is the log from the commit of package libstaroffice for openSUSE:Factory checked in at 2020-06-22 17:43:02 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/libstaroffice (Old) and /work/SRC/openSUSE:Factory/.libstaroffice.new.2956 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libstaroffice" Mon Jun 22 17:43:02 2020 rev:7 rq:815735 version:0.0.7 Changes: -------- --- /work/SRC/openSUSE:Factory/libstaroffice/libstaroffice.changes 2018-06-03 12:28:53.512254220 +0200 +++ /work/SRC/openSUSE:Factory/.libstaroffice.new.2956/libstaroffice.changes 2020-06-22 17:43:20.113352229 +0200 @@ -1,0 +2,7 @@ +Thu Jun 18 11:37:28 UTC 2020 - Tomáš Chvátal <[email protected]> + +- Update to 0.0.7: + * fix various compilation's warnings + * fix text:sender-lastname when creating meta-data + +------------------------------------------------------------------- Old: ---- libstaroffice-0.0.6.tar.xz New: ---- libstaroffice-0.0.7.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libstaroffice.spec ++++++ --- /var/tmp/diff_new_pack.sC10rH/_old 2020-06-22 17:43:22.409359598 +0200 +++ /var/tmp/diff_new_pack.sC10rH/_new 2020-06-22 17:43:22.409359598 +0200 @@ -1,7 +1,7 @@ # # spec file for package libstaroffice # -# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,18 +12,17 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # %define libname libstaroffice-0_0-0 Name: libstaroffice -Version: 0.0.6 +Version: 0.0.7 Release: 0 Summary: A library for import of StarOffice documents License: LGPL-2.1-or-later AND MPL-2.0+ -Group: Productivity/Publishing/Word -Url: https://github.com/fosnola/libstaroffice/wiki +URL: https://github.com/fosnola/libstaroffice/wiki Source: https://github.com/fosnola/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz BuildRequires: doxygen BuildRequires: fdupes @@ -38,14 +37,12 @@ %package -n %{libname} Summary: A library for import of StarOffice documents -Group: System/Libraries %description -n %{libname} %{name} is a library for import of StarOffice documents. %package devel Summary: A library for import of StarOffice documents -Group: Development/Libraries/C and C++ Requires: %{libname} = %{version} Requires: libstdc++-devel @@ -54,7 +51,6 @@ %package devel-doc Summary: Documentation for the libstaroffice API -Group: Documentation/HTML BuildArch: noarch %description devel-doc @@ -62,7 +58,6 @@ %package tools Summary: Tools to work with documents in StarOffice formats -Group: Productivity/Publishing/Word %description tools This package contains tools to work with documents in StarOffice file-format. @@ -83,7 +78,7 @@ --docdir=%{_docdir}/%{name}-devel/html \ --with-sharedptr=c++11 -make %{?_smp_mflags} +%make_build %install %make_install @@ -97,8 +92,8 @@ %files -n %{libname} %{_libdir}/*.so.* %doc ChangeLog -%doc COPYING.LGPL -%doc COPYING.MPL +%license COPYING.LGPL +%license COPYING.MPL %doc NEWS %files devel ++++++ libstaroffice-0.0.6.tar.xz -> libstaroffice-0.0.7.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/ChangeLog new/libstaroffice-0.0.7/ChangeLog --- old/libstaroffice-0.0.6/ChangeLog 2018-04-25 14:13:20.000000000 +0200 +++ new/libstaroffice-0.0.7/ChangeLog 2020-04-04 21:46:28.000000000 +0200 @@ -1,3 +1,66 @@ +2020-04-04 Laurent Alonso(fr) <[email protected]> [406467372b14d367ab87f85f15a2caa458db0b15] + +tprepare a release... + + +2020-04-04 Laurent Alonso(fr) <[email protected]> [710bcf9804afeb45bcf464ddf51486751157cf0f] + +tcoverity: fix some warnings... + + +2020-04-04 Laurent Alonso(fr) <[email protected]> [08cebb49730e23bf9f986e33db13ccd2530a3601] + +tcppcheck: remove some warnings... + + +2020-03-12 fosnola <[email protected]> [20c5a2c0b748b51082aa8ec391c2657c96dd8b5c] + +tMerge pull request #8 from lwhsu/clang10 + +tFix build with clang 10.0.0 +2020-03-12 Li-Wen Hsu <[email protected]> [d833a108dbb759137878722b3892bea91d36972e] + +tFix build with clang 10.0.0 + +tObtained from: https://bugs.freebsd.org/244402 + +2020-01-14 Caolán McNamara <[email protected]> [de598dd92dcc19c969e9f28648762aeee1806b63] + +ttext:send-lastname should be text:sender-lastname + +tas detected by LibreOffice crashtesting + +2019-10-23 Stephan Bergmann <[email protected]> [75c43a0ff17609d1b4065a1a12a2c2735f33a758] + +tSubject: [PATCH] Fix equality operator arguments to avoid overload resolution ambiguities in C++20... + + +2019-02-12 Miklos Vajna <[email protected]> [93be374b1077e028df2c59f01ce6f91f1ab8d0fd] + +tFix too small loop variables + +tThese loop variables had narrower type than the iteration's upper bound. + +2018-09-14 osnola <[email protected]> [009037d20522187ce40afeb6fcd8650f7750e26a] + +tuse explicit unsigned char to read/store record's type... + + +2018-05-05 David Tardon <[email protected]> [6cf476b7449831d340ec54bd87d653d53209a0cf] + +tdisable werror by default + + +2018-04-26 David Tardon <[email protected]> [d6c34e98a6adb060ad42b9f1c60a1e8036bc27ff] + +tadd missing include for std::max + + +2018-04-25 osnola <[email protected]> [5eac7e4d37c7ebd75ca7a477611c42f442e3ca06] + +tcppcheck: correct some warnings... + + 2018-04-25 osnola <[email protected]> [a321ca69c34729f4a0d0599ac1da09f0d53f6602] tconfigure.ac: change minor version to prepare a release... diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/NEWS new/libstaroffice-0.0.7/NEWS --- old/libstaroffice-0.0.6/NEWS 2017-12-17 17:20:55.000000000 +0100 +++ new/libstaroffice-0.0.7/NEWS 2020-04-04 21:45:08.000000000 +0200 @@ -1,3 +1,7 @@ +0.0.7: +- 04/04/2020: + - fix various warnings. + 0.0.6: - 12/17/2017: - all: retrieve formula and charts(as graphic) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/configure new/libstaroffice-0.0.7/configure --- old/libstaroffice-0.0.6/configure 2018-04-25 10:50:04.000000000 +0200 +++ new/libstaroffice-0.0.7/configure 2020-04-04 21:46:10.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for libstaroffice 0.0.6. +# Generated by GNU Autoconf 2.69 for libstaroffice 0.0.7. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -587,8 +587,8 @@ # Identity of this package. PACKAGE_NAME='libstaroffice' PACKAGE_TARNAME='libstaroffice' -PACKAGE_VERSION='0.0.6' -PACKAGE_STRING='libstaroffice 0.0.6' +PACKAGE_VERSION='0.0.7' +PACKAGE_STRING='libstaroffice 0.0.7' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1385,7 +1385,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 libstaroffice 0.0.6 to adapt to many kinds of systems. +\`configure' configures libstaroffice 0.0.7 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1455,7 +1455,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of libstaroffice 0.0.6:";; + short | recursive ) echo "Configuration of libstaroffice 0.0.7:";; esac cat <<\_ACEOF @@ -1474,7 +1474,7 @@ --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) - --disable-werror Treat all warnings as errors, usefull for + --enable-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 @@ -1599,7 +1599,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -libstaroffice configure 0.0.6 +libstaroffice configure 0.0.7 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1998,7 +1998,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by libstaroffice $as_me 0.0.6, which was +It was created by libstaroffice $as_me 0.0.7, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2864,7 +2864,7 @@ # Define the identity of the package. PACKAGE='libstaroffice' - VERSION='0.0.6' + VERSION='0.0.7' cat >>confdefs.h <<_ACEOF @@ -18319,16 +18319,16 @@ STAROFFICE_MINOR_VERSION=0 -STAROFFICE_MICRO_VERSION=6 +STAROFFICE_MICRO_VERSION=7 -STAROFFICE_VERSION=0.0.6 +STAROFFICE_VERSION=0.0.7 # AC_SUBST(LT_RELEASE, [libstaroffice_version_major.libstaroffice_version_minor]) LT_CURRENT=`expr 100 '*' 0 + 0` # For 1.0.0 comment the first line and uncomment the second LT_AGE=0 -LT_REVISION=6 +LT_REVISION=7 @@ -18466,7 +18466,7 @@ if test "${enable_werror+set}" = set; then : enableval=$enable_werror; enable_werror="$enableval" else - enable_werror=yes + enable_werror=no fi @@ -19912,7 +19912,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by libstaroffice $as_me 0.0.6, which was +This file was extended by libstaroffice $as_me 0.0.7, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -19978,7 +19978,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -libstaroffice config.status 0.0.6 +libstaroffice config.status 0.0.7 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/configure.ac new/libstaroffice-0.0.7/configure.ac --- old/libstaroffice-0.0.6/configure.ac 2018-04-25 10:42:34.000000000 +0200 +++ new/libstaroffice-0.0.7/configure.ac 2020-04-04 21:42:05.000000000 +0200 @@ -7,7 +7,7 @@ # ==================== m4_define([libstaroffice_version_major],[0]) m4_define([libstaroffice_version_minor],[0]) -m4_define([libstaroffice_version_micro],[6]) +m4_define([libstaroffice_version_micro],[7]) m4_define([libstaroffice_version],[libstaroffice_version_major.libstaroffice_version_minor.libstaroffice_version_micro]) # ============= @@ -130,9 +130,9 @@ # Check for cflags # ================ AC_ARG_ENABLE([werror], - [AS_HELP_STRING([--disable-werror], [Treat all warnings as errors, usefull for development])], + [AS_HELP_STRING([--enable-werror], [Treat all warnings as errors, usefull for development])], [enable_werror="$enableval"], - [enable_werror=yes] + [enable_werror=no] ) AS_IF([test x"$enable_werror" != "xno"], [ CFLAGS="$CFLAGS -Werror" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/STOFFChart.cxx new/libstaroffice-0.0.7/src/lib/STOFFChart.cxx --- old/libstaroffice-0.0.6/src/lib/STOFFChart.cxx 2018-03-15 11:21:35.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/STOFFChart.cxx 2020-04-03 17:55:32.000000000 +0200 @@ -37,6 +37,7 @@ * */ +#include <algorithm> #include <iomanip> #include <iostream> #include <map> @@ -226,7 +227,7 @@ // legend if (m_legend.m_show) { - bool autoPlace=m_legendPosition==STOFFBox2f()||m_dimension==STOFFVec2i(); + bool autoPlace=m_legendPosition==STOFFBox2f()||m_dimension==STOFFVec2f(); style=librevenge::RVNGPropertyList(); m_legend.addStyleTo(style); style.insert("librevenge:chart-id", styleId); @@ -266,7 +267,7 @@ } // plot area style=librevenge::RVNGPropertyList(); - bool autoPlace=m_plotAreaPosition==STOFFBox2f()||m_dimension==STOFFVec2i(); + bool autoPlace=m_plotAreaPosition==STOFFBox2f()||m_dimension==STOFFVec2f(); m_plotAreaStyle.addTo(style); style.insert("librevenge:chart-id", styleId); style.insert("chart:include-hidden-cells","false"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/STOFFChart.hxx new/libstaroffice-0.0.7/src/lib/STOFFChart.hxx --- old/libstaroffice-0.0.6/src/lib/STOFFChart.hxx 2018-04-25 11:20:18.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/STOFFChart.hxx 2020-04-04 18:21:01.000000000 +0200 @@ -176,6 +176,10 @@ }; //! constructor Serie(); + Serie(Serie const &)=default; + Serie(Serie &&)=default; + Serie &operator=(Serie const &)=default; + Serie &operator=(Serie &&)=default; //! destructor virtual ~Serie(); //! return true if the serie style is 1D diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/STOFFFont.hxx new/libstaroffice-0.0.7/src/lib/STOFFFont.hxx --- old/libstaroffice-0.0.6/src/lib/STOFFFont.hxx 2017-12-05 15:27:25.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/STOFFFont.hxx 2020-04-04 18:24:55.000000000 +0200 @@ -54,6 +54,10 @@ , m_lineBreak(false) { } + STOFFFont(STOFFFont const &)=default; + STOFFFont(STOFFFont &&)=default; + STOFFFont &operator=(STOFFFont const &)=default; + STOFFFont &operator=(STOFFFont &&)=default; /** destructor */ ~STOFFFont(); //! add to the propList diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/STOFFGraphicListener.cxx new/libstaroffice-0.0.7/src/lib/STOFFGraphicListener.cxx --- old/libstaroffice-0.0.6/src/lib/STOFFGraphicListener.cxx 2017-12-16 11:02:15.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/STOFFGraphicListener.cxx 2020-04-04 18:26:50.000000000 +0200 @@ -83,6 +83,10 @@ , m_section() { } + GraphicState(GraphicState const &)=default; + GraphicState(GraphicState &&)=default; + GraphicState &operator=(GraphicState const &)=default; + GraphicState &operator=(GraphicState &&)=default; //! destructor ~GraphicState() { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/STOFFList.hxx new/libstaroffice-0.0.7/src/lib/STOFFList.hxx --- old/libstaroffice-0.0.6/src/lib/STOFFList.hxx 2017-08-02 20:03:38.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/STOFFList.hxx 2020-04-04 18:25:51.000000000 +0200 @@ -57,6 +57,10 @@ , m_startValue(0) { } + STOFFListLevel(STOFFListLevel const &)=default; + STOFFListLevel(STOFFListLevel &&)=default; + STOFFListLevel &operator=(STOFFListLevel const &)=default; + STOFFListLevel &operator=(STOFFListLevel &&)=default; /** destructor */ ~STOFFListLevel(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/STOFFOLEParser.cxx new/libstaroffice-0.0.7/src/lib/STOFFOLEParser.cxx --- old/libstaroffice-0.0.6/src/lib/STOFFOLEParser.cxx 2018-01-30 10:10:08.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/STOFFOLEParser.cxx 2020-04-03 17:55:32.000000000 +0200 @@ -506,7 +506,7 @@ ascii.addPos(pos); ascii.addNote(f.str().c_str()); - for (auto const posToType : posToTypeMap) { + for (auto const &posToType : posToTypeMap) { pos=posToType.first; input->seek(pos, librevenge::RVNG_SEEK_SET); f.str(""); @@ -628,7 +628,7 @@ st = f.str(); } else { - for (int i = 0; i < sz; i++) + for (long i = 0; i < sz; i++) st += char(ip->readULong(1)); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/STOFFPageSpan.hxx new/libstaroffice-0.0.7/src/lib/STOFFPageSpan.hxx --- old/libstaroffice-0.0.6/src/lib/STOFFPageSpan.hxx 2017-07-26 10:52:02.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/STOFFPageSpan.hxx 2020-04-04 18:27:52.000000000 +0200 @@ -80,6 +80,10 @@ public: //! constructor STOFFPageSpan(); + STOFFPageSpan(STOFFPageSpan const &)=default; + STOFFPageSpan(STOFFPageSpan &&)=default; + STOFFPageSpan &operator=(STOFFPageSpan const &)=default; + STOFFPageSpan &operator=(STOFFPageSpan &&)=default; //! destructor ~STOFFPageSpan(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/STOFFSection.cxx new/libstaroffice-0.0.7/src/lib/STOFFSection.cxx --- old/libstaroffice-0.0.6/src/lib/STOFFSection.cxx 2016-07-17 15:52:06.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/STOFFSection.cxx 2020-04-04 16:05:34.000000000 +0200 @@ -68,6 +68,6 @@ int STOFFSection::numColumns() const { librevenge::RVNGPropertyListVector const *columns=m_propertyList.child("style:columns"); - return (!columns || columns->count()<=0) ? 1 : int(columns->count()); + return (!columns || columns->count()==0) ? 1 : int(columns->count()); } // vim: set filetype=cpp tabstop=2 shiftwidth=2 cindent autoindent smartindent noexpandtab: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/STOFFSection.hxx new/libstaroffice-0.0.7/src/lib/STOFFSection.hxx --- old/libstaroffice-0.0.6/src/lib/STOFFSection.hxx 2017-08-03 11:03:37.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/STOFFSection.hxx 2020-04-04 19:34:30.000000000 +0200 @@ -51,6 +51,11 @@ : m_propertyList() { } + STOFFSection(STOFFSection const &)=default; + STOFFSection(STOFFSection &&)=default; + STOFFSection &operator=(STOFFSection const &)=default; + STOFFSection &operator=(STOFFSection &&)=default; + //! destructor ~STOFFSection(); //! returns the number of columns diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/STOFFSpreadsheetListener.hxx new/libstaroffice-0.0.7/src/lib/STOFFSpreadsheetListener.hxx --- old/libstaroffice-0.0.6/src/lib/STOFFSpreadsheetListener.hxx 2018-04-25 11:25:45.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/STOFFSpreadsheetListener.hxx 2020-04-03 17:55:32.000000000 +0200 @@ -61,7 +61,7 @@ } /** This class contents the main functions needed to create a spreadsheet processing Document */ -class STOFFSpreadsheetListener : public STOFFListener +class STOFFSpreadsheetListener final : public STOFFListener { public: /** constructor */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/SWFieldManager.cxx new/libstaroffice-0.0.7/src/lib/SWFieldManager.cxx --- old/libstaroffice-0.0.6/src/lib/SWFieldManager.cxx 2018-04-25 11:59:22.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/SWFieldManager.cxx 2020-04-03 17:55:32.000000000 +0200 @@ -293,7 +293,7 @@ else if (m_type==30) { if (m_subType>=0 && m_subType<=16) { char const *wh[]= { - "text:sender-company", "text:sender-firstname", "text:send-lastname", "text:sender-initials", "text:sender-street", + "text:sender-company", "text:sender-firstname", "text:sender-lastname", "text:sender-initials", "text:sender-street", "text:sender-country", "text:sender-postal-code", "text:sender-city", "text:sender-title", "text:sender-position", "text:sender-phone-private", "text:sender-phone-work", "text:sender-fax", "text:sender-email", "text:sender-state-or-province", "text:sender-lastname" /*father name*/, "text:sender-street" /* appartement*/ @@ -1022,11 +1022,11 @@ { } -std::shared_ptr<SWFieldManagerInternal::Field> SWFieldManager::readField(StarZone &zone, char cKind) +std::shared_ptr<SWFieldManagerInternal::Field> SWFieldManager::readField(StarZone &zone, unsigned char cKind) { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); std::shared_ptr<SWFieldManagerInternal::Field> field; if (cKind!='_' && (input->peek()!=cKind || !zone.openSWRecord(type))) { @@ -1839,7 +1839,7 @@ long actPos=input->tell(); input->seek(actPos, librevenge::RVNG_SEEK_SET); - char authType; + unsigned char authType; libstoff::DebugStream f2; f2<<"SWFieldType[auth-A" << i << "]:"; if (input->peek()!='E' || !zone.openSWRecord(authType)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/SWFieldManager.hxx new/libstaroffice-0.0.7/src/lib/SWFieldManager.hxx --- old/libstaroffice-0.0.6/src/lib/SWFieldManager.hxx 2018-04-25 10:57:26.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/SWFieldManager.hxx 2018-09-13 19:25:39.000000000 +0200 @@ -116,7 +116,7 @@ //! try to read a field type - std::shared_ptr<SWFieldManagerInternal::Field> readField(StarZone &zone, char cKind='_'); + std::shared_ptr<SWFieldManagerInternal::Field> readField(StarZone &zone, unsigned char cKind='_'); //! try to read a persist field type std::shared_ptr<SWFieldManagerInternal::Field> readPersistField(StarZone &zone, long lastPos); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarFileManager.cxx new/libstaroffice-0.0.7/src/lib/StarFileManager.cxx --- old/libstaroffice-0.0.6/src/lib/StarFileManager.cxx 2018-04-25 12:07:27.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/StarFileManager.cxx 2020-04-04 16:09:39.000000000 +0200 @@ -102,7 +102,7 @@ input->seek(pos, librevenge::RVNG_SEEK_SET); return false; } - if (m_zoneType==char(0xff)) { + if (m_zoneType==static_cast<unsigned char>(0xff)) { STOFF_DEBUG_MSG(("StarFileManagerInternal::SfxMultiRecord: oops end header\n")); m_extra="###emptyZone,"; return true; /* empty zone*/ @@ -247,7 +247,7 @@ //! the main zone StarZone &m_zone; //! the zone type - char m_zoneType; + unsigned char m_zoneType; //! true if a SfxRecord has been opened bool m_zoneOpened; //! the record type @@ -684,7 +684,6 @@ dataType=graphic.m_object.m_typeList.empty() ? "image/pict" : graphic.m_object.m_typeList[0]; if (!graphic.m_object.m_dataList.empty()) data=graphic.m_object.m_dataList[0]; - extension="pict"; return true; } dataType="image/pict"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarFormatManager.cxx new/libstaroffice-0.0.7/src/lib/StarFormatManager.cxx --- old/libstaroffice-0.0.6/src/lib/StarFormatManager.cxx 2018-04-25 12:07:07.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/StarFormatManager.cxx 2018-09-13 19:19:02.000000000 +0200 @@ -592,11 +592,11 @@ STOFF_DEBUG_MSG(("StarFormatManager::getSWFormatDef: can not find any format corresponding to %s\n", name.cstr())); return std::shared_ptr<StarFormatManagerInternal::FormatDef>(); } -bool StarFormatManager::readSWFormatDef(StarZone &zone, char kind, std::shared_ptr<StarFormatManagerInternal::FormatDef> &format, StarObject &doc) +bool StarFormatManager::readSWFormatDef(StarZone &zone, unsigned char kind, std::shared_ptr<StarFormatManagerInternal::FormatDef> &format, StarObject &doc) { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!=kind || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -686,7 +686,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='q' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -1020,7 +1020,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='F' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -1036,7 +1036,7 @@ pos=input->tell(); int rType=input->peek(); std::shared_ptr<StarFormatManagerInternal::FormatDef> format; - if ((rType=='o' || rType=='l') && readSWFormatDef(zone, char(rType), format, doc)) { + if ((rType=='o' || rType=='l') && readSWFormatDef(zone, static_cast<unsigned char>(rType), format, doc)) { if (format) listFormats.push_back(format); continue; } @@ -1052,7 +1052,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='P' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarFormatManager.hxx new/libstaroffice-0.0.7/src/lib/StarFormatManager.hxx --- old/libstaroffice-0.0.6/src/lib/StarFormatManager.hxx 2017-12-07 10:17:01.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/StarFormatManager.hxx 2018-09-13 19:18:13.000000000 +0200 @@ -96,7 +96,7 @@ virtual ~StarFormatManager(); //! try to read a format zone : 'f' or 'l' or 'o' or 'r' or 's'(in TOCX) - bool readSWFormatDef(StarZone &zone, char kind, std::shared_ptr<StarFormatManagerInternal::FormatDef> &format, StarObject &doc); + bool readSWFormatDef(StarZone &zone, unsigned char kind, std::shared_ptr<StarFormatManagerInternal::FormatDef> &format, StarObject &doc); //! store a named format zone void storeSWFormatDef(librevenge::RVNGString const &name, std::shared_ptr<StarFormatManagerInternal::FormatDef> &format); //! try to return a named format zone(if possible) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarFrameAttribute.cxx new/libstaroffice-0.0.7/src/lib/StarFrameAttribute.cxx --- old/libstaroffice-0.0.6/src/lib/StarFrameAttribute.cxx 2018-03-15 11:21:35.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/StarFrameAttribute.cxx 2020-04-04 16:11:42.000000000 +0200 @@ -1315,7 +1315,6 @@ long pos=input->tell(); libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; - bool ok=true; f << "Entries(StarAttribute)[" << zone.getRecordLevel() << "]:"; m_surround = int(input->readULong(1)); if (vers<5) // ideal @@ -1329,7 +1328,7 @@ printData(f); ascFile.addPos(pos); ascFile.addNote(f.str().c_str()); - return ok && input->tell()<=endPos; + return input->tell()<=endPos; } bool StarFAttributeULSpace::read(StarZone &zone, int vers, long endPos, StarObject &/*object*/) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarGraphicStruct.cxx new/libstaroffice-0.0.7/src/lib/StarGraphicStruct.cxx --- old/libstaroffice-0.0.6/src/lib/StarGraphicStruct.cxx 2018-04-20 14:54:15.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/StarGraphicStruct.cxx 2020-04-03 17:55:32.000000000 +0200 @@ -283,7 +283,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; std::string action=path[k]["librevenge:path-action"]->getStr().cstr(); @@ -367,7 +367,7 @@ static librevenge::RVNGString convertPath(const librevenge::RVNGPropertyListVector &path) { 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; std::string action=path[i]["librevenge:path-action"]->getStr().cstr(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarItemPool.cxx new/libstaroffice-0.0.7/src/lib/StarItemPool.cxx --- old/libstaroffice-0.0.6/src/lib/StarItemPool.cxx 2018-03-15 16:29:47.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/StarItemPool.cxx 2018-09-13 19:16:22.000000000 +0200 @@ -109,7 +109,7 @@ input->seek(pos, librevenge::RVNG_SEEK_SET); return false; } - if (m_zoneType==char(0xff)) { + if (m_zoneType==static_cast<unsigned char>(0xff)) { STOFF_DEBUG_MSG(("StarItemPoolInternal::SfxMultiRecord: oops end header\n")); m_extra="###emptyZone,"; return true; /* empty zone*/ @@ -253,7 +253,7 @@ //! the main zone StarZone *m_zone; //! the zone type - char m_zoneType; + unsigned char m_zoneType; //! true if a SfxRecord has been opened bool m_zoneOpened; //! the record type @@ -1255,7 +1255,7 @@ if (m_state->m_minorVersion) f << "vers[minor]=" << m_state->m_minorVersion << ","; input->seek(4, librevenge::RVNG_SEEK_CUR); // 0,0 } - char type; // always 1 + unsigned char type; // always 1 if (input->peek()!=1 || !zone.openSfxRecord(type)) { STOFF_DEBUG_MSG(("StarItemPool::readV2: can not open the sfx record\n")); m_state->m_majorVersion=0; @@ -1271,7 +1271,7 @@ return true; } // string part - char type1; + unsigned char type1; if (input->peek()!=16 || !zone.openSfxRecord(type1)) { STOFF_DEBUG_MSG(("StarItemPool::readV2: can not open the string sfx record\n")); f << "###openString"; @@ -1800,7 +1800,7 @@ libstoff::DebugStream f; int poolVersion=input->peek()==3 ? 2 : 1; f << "Entries(SfxStylePool)[" << zone.getRecordLevel() << "]:pool[vers]=" << poolVersion << ","; - char type=3; // to make clang analyzer happy + unsigned char type=3; // to make clang analyzer happy uint16_t charSet=0, nCount; bool helpIdSize32=true, ok=true; @@ -1834,7 +1834,7 @@ pos=input->tell(); f.str(""); f << "SfxStylePool[header]:"; - char type1; + unsigned char type1; if (!zone.openSfxRecord(type1)) { STOFF_DEBUG_MSG(("StarItemPool::readStyles: can not open the header zone\n")); f << "###"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarLayout.cxx new/libstaroffice-0.0.7/src/lib/StarLayout.cxx --- old/libstaroffice-0.0.6/src/lib/StarLayout.cxx 2017-11-15 13:01:10.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/StarLayout.cxx 2018-09-13 19:20:35.000000000 +0200 @@ -84,7 +84,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='U' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarLayout::read: can not read a layout\n")); @@ -129,7 +129,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; int mainType=input->peek(); if ((mainType!=0xc1 && mainType!=0xcc && mainType!=0xcd) || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -210,7 +210,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; int mainType=input->peek(); if ((mainType!=0xc2 && mainType!=0xc3 && mainType!=0xc6 && mainType!=0xc8 && mainType!=0xc9 && mainType!=0xce && mainType!=0xd2 && mainType!=0xd3 && mainType!=0xd4 && mainType!=0xd7 && mainType!=0xe3 && mainType!=0xf2) @@ -313,7 +313,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; int mainType=input->peek(); if ((mainType!=0xc4 && mainType!=0xc7) || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -356,7 +356,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!=0xd0 || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarLayout::readD0: can not read a layout\n")); @@ -372,7 +372,7 @@ f << "###"; ascFile.addPos(pos); ascFile.addNote(f.str().c_str()); - zone.closeSWRecord(char(0xd0), "StarLayout"); + zone.closeSWRecord(static_cast<unsigned char>(0xd0), "StarLayout"); return true; } f << "g0=" << input->readULong(m_version<0xa ? 1 : 2) << ","; @@ -428,7 +428,7 @@ ascFile.addNote("StarLayout[D0]:###extra"); input->seek(lastPos, librevenge::RVNG_SEEK_SET); } - zone.closeSWRecord(char(0xd0), "StarLayout"); + zone.closeSWRecord(static_cast<unsigned char>(0xd0), "StarLayout"); return true; } @@ -438,7 +438,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!=0xd8 || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarLayout::readD8: can not read a layout\n")); @@ -488,7 +488,7 @@ ascFile.addPos(pos); ascFile.addNote(f.str().c_str()); - zone.closeSWRecord(char(0xd8), "StarLayout"); + zone.closeSWRecord(static_cast<unsigned char>(0xd8), "StarLayout"); return true; } @@ -605,7 +605,7 @@ break; } if (done && input->tell()>pos && input->tell()<=zone.getRecordLastPosition()) return true; - char type; + unsigned char type; if ((input->peek()&0xE0)!=0xc0 || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); return false; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarObjectChart.cxx new/libstaroffice-0.0.7/src/lib/StarObjectChart.cxx --- old/libstaroffice-0.0.6/src/lib/StarObjectChart.cxx 2018-03-15 11:21:35.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/StarObjectChart.cxx 2020-04-04 16:14:23.000000000 +0200 @@ -208,7 +208,6 @@ libstoff::DebugFile &ascFile=zone.ascii(); ascFile.open(name); - auto chart=std::make_shared<StarObjectChartInternal::Chart>(); libstoff::DebugStream f; f << "Entries(SCChartDocument):"; // sch_docshell.cxx: SchChartDocShell::Load diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarObjectNumericRuler.cxx new/libstaroffice-0.0.7/src/lib/StarObjectNumericRuler.cxx --- old/libstaroffice-0.0.6/src/lib/StarObjectNumericRuler.cxx 2018-03-15 11:21:35.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/StarObjectNumericRuler.cxx 2018-09-13 19:21:46.000000000 +0200 @@ -147,7 +147,7 @@ } if (done && input->tell()>pos) continue; - char type; + unsigned char type; input->seek(pos, librevenge::RVNG_SEEK_SET); if (!zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -210,7 +210,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='n' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -357,7 +357,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if ((input->peek()!='0' && input->peek()!='R') || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarObjectPageStyle.cxx new/libstaroffice-0.0.7/src/lib/StarObjectPageStyle.cxx --- old/libstaroffice-0.0.6/src/lib/StarObjectPageStyle.cxx 2018-03-15 11:21:35.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/StarObjectPageStyle.cxx 2018-09-13 19:22:22.000000000 +0200 @@ -92,7 +92,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!=(m_isFootnote ? '1' : '2') || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarObjectPageStyleInternal::NoteDesc::read: can not read a noteDesc\n")); @@ -216,7 +216,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='p' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarObjectPageStyleInternal::PageDesc::read: can not read a pageDesc\n")); @@ -472,7 +472,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); while (!input->isEnd()) { long pos=input->tell(); - char type; + unsigned char type; if (!zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarObjectSmallGraphic.cxx new/libstaroffice-0.0.7/src/lib/StarObjectSmallGraphic.cxx --- old/libstaroffice-0.0.6/src/lib/StarObjectSmallGraphic.cxx 2018-04-25 13:44:09.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/StarObjectSmallGraphic.cxx 2020-04-04 16:19:27.000000000 +0200 @@ -484,7 +484,7 @@ STOFFFrameStyle finalPos(pos); StarState state(getState(object, listener, finalPos)); finalPos.m_position.m_offset=state.m_global->m_offset; - finalPos.m_position.m_offset=true; + //finalPos.m_position.m_offset=true; listener->openGroup(pos); for (auto &child : m_child) { if (child) @@ -1389,7 +1389,7 @@ else { shape.m_command=STOFFGraphicShape::C_Path; librevenge::RVNGPropertyListVector path; - for (auto const poly : m_pathPolygons) + for (auto const &poly : m_pathPolygons) poly.addToPath(path, isClosed, state.m_global->m_relativeUnit, state.m_global->m_offset); shape.m_propertyList.insert("svg:d", path); } @@ -1402,7 +1402,7 @@ //////////////////////////////////////// //! Internal: virtual class to store a Sdr graphic uno -class SdrGraphicUno : public SdrGraphicRect +class SdrGraphicUno final : public SdrGraphicRect { public: //! constructor @@ -2760,7 +2760,7 @@ } long lastPos=zone.getRecordLastPosition(); bool ok=true; - auto pool=findItemPool(StarItemPool::T_XOutdevPool, false); + findItemPool(StarItemPool::T_XOutdevPool, false); // useme ? if (vers<=6 && (id==2 || id==8 || id==9)) { int nPoly=id==2 ? 2 : id==8 ? 1 : int(input->readULong(2)); for (int poly=0; poly<nPoly; ++poly) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarObjectSpreadsheet.cxx new/libstaroffice-0.0.7/src/lib/StarObjectSpreadsheet.cxx --- old/libstaroffice-0.0.6/src/lib/StarObjectSpreadsheet.cxx 2018-03-15 11:21:35.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/StarObjectSpreadsheet.cxx 2020-04-04 16:21:28.000000000 +0200 @@ -2424,7 +2424,7 @@ if (delta) f << "delta=" << delta << ","; long endData=zone.getRecordLastPosition(); std::vector<uint32_t> string; - for (int16_t i=0; i<count; ++i) { + for (uint16_t i=0; i<count; ++i) { if (!zone.readString(string) || input->tell() > endData) { STOFF_DEBUG_MSG(("StarObjectSpreadsheet::readSCChangeTrack: can not open some string\n")); f << "###string"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarObjectText.cxx new/libstaroffice-0.0.7/src/lib/StarObjectText.cxx --- old/libstaroffice-0.0.6/src/lib/StarObjectText.cxx 2018-04-25 12:25:26.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/StarObjectText.cxx 2020-04-04 16:23:07.000000000 +0200 @@ -959,7 +959,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='N' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -1043,7 +1043,7 @@ case 'l': // related to link case 'o': { // format: safe to ignore std::shared_ptr<StarFormatManagerInternal::FormatDef> format; - done=getFormatManager()->readSWFormatDef(zone,char(cType),format, *this); + done=getFormatManager()->readSWFormatDef(zone,static_cast<unsigned char>(cType),format, *this); if (done && format) { std::shared_ptr<StarObjectTextInternal::FormatZone> formatZone; formatZone.reset(new StarObjectTextInternal::FormatZone(format)); @@ -1089,7 +1089,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='G' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -1206,7 +1206,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='X' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -1290,7 +1290,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='J' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -1318,7 +1318,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='O' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -1367,7 +1367,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='I' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -1398,7 +1398,7 @@ if (fl&0x10) f << "hidden,"; if (fl&0x20) f << "protect,"; if (fl&0x40) f << "condHidden,"; - if (fl&0x40) f << "connectFlag,"; + if (fl&0x80) f << "connectFlag,"; section->m_type=int(input->readULong(2)); if (section->m_type) f << "nType=" << section->m_type << ","; zone.closeFlagZone(); @@ -1446,7 +1446,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='T' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -1490,8 +1490,6 @@ ascFile.addNote(f.str().c_str()); long lastPos=zone.getRecordLastPosition(); - std::vector<std::shared_ptr<StarAttribute> > attributeList; - std::vector<STOFFVec2i> limitsList; while (input->tell()<lastPos) { pos=input->tell(); @@ -1815,7 +1813,7 @@ continue; input->seek(pos, librevenge::RVNG_SEEK_SET); - char type; + unsigned char type; if (!zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); break; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarTable.cxx new/libstaroffice-0.0.7/src/lib/StarTable.cxx --- old/libstaroffice-0.0.6/src/lib/StarTable.cxx 2017-12-07 17:47:21.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/StarTable.cxx 2018-09-13 19:24:27.000000000 +0200 @@ -236,7 +236,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='t' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -368,7 +368,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='L' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -508,7 +508,7 @@ { STOFFInputStreamPtr input=zone.input(); libstoff::DebugFile &ascFile=zone.ascii(); - char type; + unsigned char type; long pos=input->tell(); if (input->peek()!='E' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarWriterStruct.cxx new/libstaroffice-0.0.7/src/lib/StarWriterStruct.cxx --- old/libstaroffice-0.0.6/src/lib/StarWriterStruct.cxx 2018-03-15 11:21:35.000000000 +0100 +++ new/libstaroffice-0.0.7/src/lib/StarWriterStruct.cxx 2018-09-13 19:28:06.000000000 +0200 @@ -60,7 +60,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='A' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::Attribute::read: can not read a attribute\n")); @@ -110,7 +110,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='S') return false; if (!zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -156,7 +156,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='B' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::Bookmark::read: can not read a mark\n")); @@ -210,7 +210,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='a') return false; if (!zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -258,7 +258,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='D' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::DatabaseName::read: can not read a databaseName\n")); @@ -366,7 +366,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='j' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::Dictionary::read: can not read a dictionary\n")); @@ -418,7 +418,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='d' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::DocStats::read: can not read a docStats\n")); @@ -463,7 +463,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='m' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::Macro::read: can not read a macro\n")); @@ -498,7 +498,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='u') return false; if (!zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -543,7 +543,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='K' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::Mark::read: can not read a mark\n")); @@ -578,7 +578,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='v' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::NodeRedline::read: can not read a nodeRedline\n")); @@ -615,7 +615,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!=(m_isFootnote ? '1' : '4') || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::NoteInfo::read: can not read a noteInfo\n")); @@ -722,7 +722,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='8' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::PrintData::read: can not read a printData\n")); @@ -763,7 +763,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='D' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::Redline::read: can not read a redline\n")); @@ -797,7 +797,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='R') return false; if (!zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -832,7 +832,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='V') return false; if (!zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -881,7 +881,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='x' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::TOX::read::read: can not read a nodeRedline\n")); @@ -1011,7 +1011,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='u') return false; if (!zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); @@ -1086,7 +1086,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='x' || !zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); STOFF_DEBUG_MSG(("StarWriterStruct::TOX51::read: can not read a tox51\n")); @@ -1163,7 +1163,7 @@ libstoff::DebugFile &ascFile=zone.ascii(); libstoff::DebugStream f; long pos=input->tell(); - char type; + unsigned char type; if (input->peek()!='y') return false; if (!zone.openSWRecord(type)) { input->seek(pos, librevenge::RVNG_SEEK_SET); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarZone.cxx new/libstaroffice-0.0.7/src/lib/StarZone.cxx --- old/libstaroffice-0.0.6/src/lib/StarZone.cxx 2018-04-25 12:27:04.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/StarZone.cxx 2018-09-13 18:59:32.000000000 +0200 @@ -103,7 +103,7 @@ bool StarZone::readStringsPool() { long pos=m_input->tell(); - char type; + unsigned char type; if (m_input->peek()!='!' || !openSWRecord(type)) { m_input->seek(pos, librevenge::RVNG_SEEK_SET); return false; @@ -504,12 +504,12 @@ return true; } -bool StarZone::openSWRecord(char &type) +bool StarZone::openSWRecord(unsigned char &type) { long pos=m_input->tell(); if (!m_input->checkPosition(pos+4)) return false; unsigned long val=m_input->readULong(4); - type=char(val&0xff); + type=static_cast<unsigned char>(val&0xff); if (!type) { STOFF_DEBUG_MSG(("StarZone::openSWRecord: type can not be null\n")); return false; @@ -547,13 +547,13 @@ return true; } -bool StarZone::openSfxRecord(char &type) +bool StarZone::openSfxRecord(unsigned char &type) { long pos=m_input->tell(); if (!m_input->checkPosition(pos+4)) return false; // filerec.cxx SfxMiniRecordReader::SfxMiniRecordReader unsigned long val=m_input->readULong(4); - type=char(val&0xff); + type=static_cast<unsigned char>(val&0xff); // checkme: can type be null unsigned long sz=(val>>8); long endPos=0; @@ -575,11 +575,11 @@ return true; } -bool StarZone::closeRecord(char type, std::string const &debugName) +bool StarZone::closeRecord(unsigned char type, std::string const &debugName) { m_flagEndZone=0; while (!m_typeStack.empty()) { - char typ=m_typeStack.top(); + unsigned char typ=m_typeStack.top(); long pos=m_positionStack.top(); m_typeStack.pop(); @@ -644,7 +644,7 @@ m_input->seek(pos, librevenge::RVNG_SEEK_SET); libstoff::DebugStream f; f << m_zoneName << "[RecSize]:"; - char type; + unsigned char type; bool ok=openSWRecord(type); if (!ok || type!='%') { STOFF_DEBUG_MSG(("StarZone::readRecordSizes: can not open the record(recsize)\n")); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/StarZone.hxx new/libstaroffice-0.0.7/src/lib/StarZone.hxx --- old/libstaroffice-0.0.6/src/lib/StarZone.hxx 2018-04-25 12:27:16.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/StarZone.hxx 2018-09-13 18:57:37.000000000 +0200 @@ -172,9 +172,9 @@ // //! try to open a SW record: type + size (24 bytes) - bool openSWRecord(char &type); + bool openSWRecord(unsigned char &type); //! try to close a record - bool closeSWRecord(char type, std::string const &debugName) + bool closeSWRecord(unsigned char type, std::string const &debugName) { return closeRecord(type, debugName); } @@ -184,9 +184,9 @@ // //! try to open a Sfx record: type + size (24 bytes) - bool openSfxRecord(char &type); + bool openSfxRecord(unsigned char &type); //! try to close a record - bool closeSfxRecord(char type, std::string const &debugName) + bool closeSfxRecord(unsigned char type, std::string const &debugName) { return closeRecord(type, debugName); } @@ -268,7 +268,7 @@ //! try to read the record sizes bool readRecordSizes(long pos); //! try to close a record - bool closeRecord(char type, std::string const &debugName); + bool closeRecord(unsigned char type, std::string const &debugName); // // data @@ -296,7 +296,7 @@ std::string m_zoneName; //! the type stack - std::stack<char> m_typeStack; + std::stack<unsigned char> m_typeStack; //! the position stack std::stack<long> m_positionStack; //! other position to end position zone diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libstaroffice-0.0.6/src/lib/libstaroffice_internal.hxx new/libstaroffice-0.0.7/src/lib/libstaroffice_internal.hxx --- old/libstaroffice-0.0.6/src/lib/libstaroffice_internal.hxx 2018-04-25 10:45:21.000000000 +0200 +++ new/libstaroffice-0.0.7/src/lib/libstaroffice_internal.hxx 2020-04-04 18:22:20.000000000 +0200 @@ -416,6 +416,10 @@ { add(binaryData, type); } + STOFFEmbeddedObject(STOFFEmbeddedObject const &)=default; + STOFFEmbeddedObject(STOFFEmbeddedObject &&)=default; + STOFFEmbeddedObject &operator=(STOFFEmbeddedObject const &)=default; + STOFFEmbeddedObject &operator=(STOFFEmbeddedObject &&)=default; //! destructor ~STOFFEmbeddedObject(); //! return true if the picture contains no data
