Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package liborigin for openSUSE:Factory checked in at 2021-05-19 17:49:52 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/liborigin (Old) and /work/SRC/openSUSE:Factory/.liborigin.new.2988 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "liborigin" Wed May 19 17:49:52 2021 rev:6 rq:894396 version:3.0.1 Changes: -------- --- /work/SRC/openSUSE:Factory/liborigin/liborigin.changes 2019-05-02 19:21:19.085781480 +0200 +++ /work/SRC/openSUSE:Factory/.liborigin.new.2988/liborigin.changes 2021-05-19 17:50:16.949307595 +0200 @@ -1,0 +2,9 @@ +Tue May 18 10:26:22 UTC 2021 - Andreas Stieger <andreas.stie...@gmx.de> + +- update to 3.0.1: + * support 2021bSR0 + * drop liborigin-link-opj2dat-against-sharedlib.patch, included + * drop liborigin-remove-exit-calls.patch, included upstream +- silence packaging warning for liborigin-tools via rpmlintrc + +------------------------------------------------------------------- Old: ---- liborigin-3.0.0.tar.gz liborigin-link-opj2dat-against-sharedlib.patch liborigin-remove-exit-calls.patch New: ---- liborigin-3.0.1.tar.gz liborigin-rpmlintrc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ liborigin.spec ++++++ --- /var/tmp/diff_new_pack.F3rhje/_old 2021-05-19 17:50:17.529305163 +0200 +++ /var/tmp/diff_new_pack.F3rhje/_new 2021-05-19 17:50:17.533305146 +0200 @@ -1,7 +1,7 @@ # # spec file for package liborigin # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# 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 @@ -12,23 +12,20 @@ # 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 shlib %{name}3 Name: liborigin -Version: 3.0.0 +Version: 3.0.1 Release: 0 Summary: A library for reading OriginLab OPJ project files License: GPL-2.0-or-later Group: Development/Libraries/C and C++ -URL: http://sourceforge.net/projects/liborigin/ +URL: https://sourceforge.net/projects/liborigin/ Source: http://downloads.sourceforge.net/liborigin/%{name}-%{version}.tar.gz -# PATCH-FIX-UPSTREAM liborigin-link-opj2dat-against-sharedlib.patch badshah...@gmail.com -- Link opj2dat against the shared library so we avoid generating and installing the static lib (https://sourceforge.net/p/liborigin/bugs/24) -Patch1: liborigin-link-opj2dat-against-sharedlib.patch -# PATCH-FIX-UPSTREAM liborigin-remove-exit-calls.patch badshah...@gmail.com -- Remove exit calls from library; patch taken from upstream commit -Patch2: liborigin-remove-exit-calls.patch +Source2: liborigin-rpmlintrc BuildRequires: cmake BuildRequires: doxygen BuildRequires: gcc-c++ @@ -83,11 +80,10 @@ %prep %autosetup -p1 -# fix documentation directory -sed -i "s|DESTINATION share/doc/liborigin|DESTINATION %{_docdir}/%{name}|" CMakeLists.txt - %build -%cmake +%cmake \ + -DBUILD_STATIC_LIBS=off \ + -DCMAKE_INSTALL_DOCDIR=%{_docdir}/%{name} %cmake_build origin opj2dat doc %install ++++++ liborigin-3.0.0.tar.gz -> liborigin-3.0.1.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/CMakeLists.txt new/liborigin-3.0.1/CMakeLists.txt --- old/liborigin-3.0.0/CMakeLists.txt 2018-10-03 00:06:41.258113188 +0200 +++ new/liborigin-3.0.1/CMakeLists.txt 2021-05-11 20:26:25.981845069 +0200 @@ -1,13 +1,32 @@ # CMakeLists.txt for liborigin -cmake_minimum_required(VERSION 2.8) +cmake_minimum_required(VERSION 3.16.3) -# c++11 standard -add_compile_options(-std=c++11) - -# library version -set(LIBORIGIN_VERSION_MAJOR 3) -set(LIBORIGIN_VERSION_MINOR 0) -set(LIBORIGIN_VERSION_BUGFIX 0) +project( liborigin + VERSION 3.0.1 + LANGUAGES CXX +) + +set( CMAKE_CXX_STANDARD 17 ) +set( CMAKE_CXX_STANDARD_REQUIRED TRUE ) +set( CMAKE_CXX_EXTENSIONS OFF ) + +option(BUILD_SHARED_LIBS "Build shared library" ON) +option(BUILD_STATIC_LIBS "Build static library" ON) + +if( MSVC ) + # /wd4456 /wd4458 Silent "declaration of %1 hides %2 ..." + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /W4 /permissive- /wd4456 /wd4458" ) + add_compile_definitions( _CRT_SECURE_NO_WARNINGS + _SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING ) + if( CMAKE_CXX_COMPILER_ID STREQUAL "Clang" ) + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-nonportable-include-path" ) + else() + add_compile_options( "/MP" ) + endif() +else() + set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fexceptions -Wall -Wextra -pedantic" ) + set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -pedantic" ) +endif() # compile-time configuration variables to be linked in configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h) @@ -15,80 +34,94 @@ # source files set (sources - OriginFile.cpp - OriginParser.cpp - OriginAnyParser.cpp - ) + OriginFile.cpp + OriginParser.cpp + OriginAnyParser.cpp +) # header files for development set (devel-headers - OriginObj.h - OriginFile.h - OriginParser.h - tree.hh - ) - -# LIB_SUFFIX can either be defined at cmake command line: cmake -DLIB_SUFFIX:STRING=64 ... -if (NOT (LIB_SUFFIX STREQUAL "${LIB_SUFFIX}")) - message("LIB_SUFFIX not defined.") - # ... or deduced from size of void ptr - if (CMAKE_SIZEOF_VOID_P EQUAL 8) - set( LIB_SUFFIX "64") - else () - set( LIB_SUFFIX "") - endif () - message("LIB_SUFFIX set to '${LIB_SUFFIX}'") -endif() - -# Generate a pkg-config file matching this config -configure_file("${CMAKE_CURRENT_SOURCE_DIR}/liborigin.pc.in" - "${CMAKE_CURRENT_BINARY_DIR}/liborigin.pc" @ONLY) - -# allow for installation of individual targets -set(CMAKE_SKIP_INSTALL_ALL_DEPENDENCY true) - -# dynamic library -add_library (origin SHARED ${sources}) -set_target_properties(origin PROPERTIES - VERSION ${LIBORIGIN_VERSION_MAJOR}.${LIBORIGIN_VERSION_MINOR}.${LIBORIGIN_VERSION_BUGFIX} - SOVERSION ${LIBORIGIN_VERSION_MAJOR} ) - -# static library -add_library (origin-static STATIC ${sources}) -set_target_properties(origin-static PROPERTIES OUTPUT_NAME "origin" POSITION_INDEPENDENT_CODE ON) + OriginObj.h + OriginFile.h + OriginParser.h + tree.hh +) + +# object library +add_library (origin OBJECT ${sources}) +set_target_properties(origin PROPERTIES POSITION_INDEPENDENT_CODE ON) # inform on log setting if (DEFINED GENERATE_CODE_FOR_LOG) message("File parsing will be logged.") target_compile_definitions(origin PRIVATE GENERATE_CODE_FOR_LOG=${GENERATE_CODE_FOR_LOG}) - target_compile_definitions(origin-static PRIVATE GENERATE_CODE_FOR_LOG=${GENERATE_CODE_FOR_LOG}) else() message("File parsing will NOT be logged. Define GENERATE_CODE_FOR_LOG to activate logging.") endif () -# install libraries -install(TARGETS origin DESTINATION lib${LIB_SUFFIX} OPTIONAL) -install(TARGETS origin-static DESTINATION lib${LIB_SUFFIX} OPTIONAL) +include(GNUInstallDirs) -# install headers -install(FILES ${devel-headers} DESTINATION include/liborigin) +# Static library +if (BUILD_STATIC_LIBS) + add_library (origin_static STATIC $<TARGET_OBJECTS:origin>) + set_target_properties(origin_static PROPERTIES OUTPUT_NAME "origin" ) -# install pkg-config file -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liborigin.pc DESTINATION lib${LIB_SUFFIX}/pkgconfig) + + install( TARGETS origin_static + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +endif () + +# Shared library +if (BUILD_SHARED_LIBS) + add_library( origin_shared SHARED $<TARGET_OBJECTS:origin>) + set_target_properties(origin_shared PROPERTIES + OUTPUT_NAME "origin" + VERSION ${PROJECT_VERSION} + SOVERSION ${PROJECT_VERSION_MAJOR} + ) + install( TARGETS origin_shared + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + ) +endif () # command line util -add_executable(opj2dat opj2dat.cpp) -target_link_libraries (opj2dat origin-static) +if (BUILD_STATIC_LIBS) + add_executable(opj2dat opj2dat.cpp) + target_link_libraries (opj2dat origin_static) +elseif (BUILD_SHARED_LIBS) + add_executable(opj2dat opj2dat.cpp) + target_link_libraries (opj2dat origin_shared) +endif () -install(TARGETS opj2dat DESTINATION bin OPTIONAL) +# Generate a pkg-config file matching this config +configure_file("liborigin.pc.in" "liborigin.pc" @ONLY) + +# install headers +install(FILES ${devel-headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/liborigin) +# install pkg-config file +if (BUILD_STATIC_LIBS OR BUILD_SHARED_LIBS) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/liborigin.pc DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig) + install(TARGETS opj2dat DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL) +endif () # documentation -install(FILES COPYING FORMAT README DESTINATION share/doc/liborigin OPTIONAL) +install(FILES COPYING FORMAT README + DESTINATION ${CMAKE_INSTALL_DOCDIR} + OPTIONAL +) + +# Doxygen configure_file(doc/Doxyfile.in ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile) find_package(Doxygen) -if(DOXYGEN_FOUND) - add_custom_target(doc ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile - WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) - set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_BINARY_DIR}/html) - install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION share/doc/liborigin OPTIONAL) -endif(DOXYGEN_FOUND) +if (DOXYGEN_FOUND) + MESSAGE (STATUS "Building Doxygen docu") + add_custom_target(doc ALL ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile + WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) + set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${CMAKE_CURRENT_BINARY_DIR}/html) + install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html + DESTINATION ${CMAKE_INSTALL_DOCDIR} + OPTIONAL + ) +endif () diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/OriginAnyParser.cpp new/liborigin-3.0.1/OriginAnyParser.cpp --- old/liborigin-3.0.0/OriginAnyParser.cpp 2018-09-29 11:13:14.175611311 +0200 +++ new/liborigin-3.0.1/OriginAnyParser.cpp 2021-05-08 14:55:16.011539508 +0200 @@ -539,7 +539,7 @@ if (angroup_size > 0) { LOG_PRINT(logfile, " ... group end at %" PRId64 " [0x%" PRIx64 "]. Annotations: %d\n", curpos, curpos, angroup_size) } - andt2_data = string(""); + andt2_data = string(); } else { andt2_data = readObjectAsString(ane_data_2_size); // TODO: get known info @@ -743,7 +743,10 @@ string pte_pre2 = readObjectAsString(pte_pre2_size); // root element and children - unsigned int rootfolder = readFolderTree(projectTree.begin(), pte_depth); + unsigned int rootfolder = readFolderTree( + projectTree.insert(projectTree.begin(), ProjectNode("", ProjectNode::Folder)), + pte_depth + ); if (rootfolder > 0) { LOG_PRINT(logfile, "Number of files at root: %d\n", rootfolder) } @@ -756,7 +759,7 @@ // log info on project tree #ifdef GENERATE_CODE_FOR_LOG - outputProjectTree(); + outputProjectTree(cout); #endif // GENERATE_CODE_FOR_LOG return; @@ -1543,6 +1546,7 @@ GET_SHORT(stmp, r.bottom) unsigned char attach = anhd[0x28]; + if (attach >= (unsigned char)Attach::End_) attach = Attach::Frame; unsigned char border = anhd[0x29]; Color color = getColor(anhd.substr(0x33,4)); @@ -2166,7 +2170,7 @@ GET_SHORT(stmp, w) column = findDataByIndex(w-1); if (column.first.size() > 0) { - curve.xDataName = (curve.dataName != column.first) ? column.first : ""; + curve.xDataName = (curve.dataName != column.first) ? column.first : string(); if (glayer.is3D() || (curve.type == GraphCurve::XYZContour)) { curve.yColumnName = column.second; } else if (glayer.isXYY3D){ @@ -2751,13 +2755,13 @@ unsigned int coord; stmp.str(nwehd); GET_INT(stmp, coord) - rect.left = coord; + rect.left = static_cast<short>(coord); GET_INT(stmp, coord) - rect.top = coord; + rect.top = static_cast<short>(coord); GET_INT(stmp, coord) - rect.right = coord; + rect.right = static_cast<short>(coord); GET_INT(stmp, coord) - rect.bottom = coord; + rect.bottom = static_cast<short>(coord); string name = nwelb.c_str(); @@ -2835,7 +2839,6 @@ // check we have enough data to fill the map unsigned int minDataSize = cmoffset + 0x114 + (colorMapSize+2)*0x38; if (minDataSize > cmapdatasz) { - cerr << "WARNING: Too few data while getting ColorMap. Needed: at least " << minDataSize << " bytes. Have: " << cmapdatasz << " bytes." << endl; LOG_PRINT(logfile, "WARNING: Too few data while getting ColorMap. Needed: at least %d bytes. Have: %d bytes.\n", minDataSize, cmapdatasz) return; } @@ -2988,15 +2991,15 @@ (*current_folder).modificationDate = doubleToPosixTime(modificationDate); } -void OriginAnyParser::outputProjectTree() { +void OriginAnyParser::outputProjectTree(std::ostream & out) { size_t windowsCount = spreadSheets.size()+matrixes.size()+excels.size()+graphs.size()+notes.size(); - cout << "Project has " << windowsCount << " windows." << endl; - cout << "Origin project Tree" << endl; + out << "Project has " << windowsCount << " windows." << endl; + out << "Origin project Tree" << endl; char cdsz[21]; for (tree<ProjectNode>::iterator it = projectTree.begin(projectTree.begin()); it != projectTree.end(projectTree.begin()); ++it) { strftime(cdsz, sizeof(cdsz), "%F %T", gmtime(&(*it).creationDate)); - cout << string(projectTree.depth(it) - 1, ' ') << (*it).name.c_str() << "\t" << cdsz << endl; + out << string(projectTree.depth(it) - 1, ' ') << (*it).name.c_str() << "\t" << cdsz << endl; } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/OriginAnyParser.h new/liborigin-3.0.1/OriginAnyParser.h --- old/liborigin-3.0.0/OriginAnyParser.h 2018-09-30 09:33:58.965419624 +0200 +++ new/liborigin-3.0.1/OriginAnyParser.h 2019-05-15 23:13:08.968626057 +0200 @@ -68,7 +68,7 @@ void getZcolorsMap(ColorMap&, const string&, unsigned int); void getProjectLeafProperties(tree<ProjectNode>::iterator, const string&, unsigned int); void getProjectFolderProperties(tree<ProjectNode>::iterator, const string&, unsigned int); - void outputProjectTree(); + void outputProjectTree(std::ostream &); inline time_t doubleToPosixTime(double jdt) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/OriginFile.cpp new/liborigin-3.0.1/OriginFile.cpp --- old/liborigin-3.0.0/OriginFile.cpp 2018-10-03 00:06:41.258113188 +0200 +++ new/liborigin-3.0.1/OriginFile.cpp 2021-05-11 13:10:56.384426286 +0200 @@ -33,14 +33,14 @@ #include <string> OriginFile::OriginFile(const string& fileName) -: fileVersion(0) +: fileVersion(0), buildVersion(0), ioError(0) { ifstream file(fileName.c_str(), ios_base::binary); if (!file.is_open()) { - cerr << "Could not open " << fileName.c_str() << "!" << endl; - exit(EXIT_FAILURE); + ioError = errno; + return; } #ifdef GENERATE_CODE_FOR_LOG @@ -48,8 +48,8 @@ logfile = fopen("./opjfile.log", "w"); if (logfile == nullptr) { - cerr << "Could not open opjfile.log !" << endl; - exit(EXIT_FAILURE); + ioError = errno; + return; } #endif // GENERATE_CODE_FOR_LOG @@ -64,6 +64,7 @@ LOG_PRINT(logfile, "File: %s\n", fileName.c_str()) // translate version + // see https://www.originlab.com/index.aspx?go=SUPPORT&pid=3325 unsigned int newFileVersion = 0; if (majorVersion == 3) { if (buildVersion < 830) @@ -131,11 +132,32 @@ } else if (buildVersion < 3296) { // 2018b.0 (9.5.5.409) SR0, SR1 3295 fileVersion = 955; newFileVersion = 20185; + } else if (buildVersion < 3331) { // 2019.0 (9.6.0.172) SR0 3330 + fileVersion = 960; + newFileVersion = 20190; + } else if (buildVersion < 3360) { // 2019b.0 (9.6.5.169) SR0 3359 + fileVersion = 965; + newFileVersion = 20195; + } else if (buildVersion < 3380) { // 2020.0 (9.7.0.185) SR0 ???? + fileVersion = 970; + newFileVersion = 20200; + } else if (buildVersion < 3381) { // 2020.1 (9.7.0.188) SR1 3380 + fileVersion = 971; + newFileVersion = 20201; + } else if (buildVersion < 3426) { // 2020b.0 (9.7.5.184) SR0 3425 + fileVersion = 975; + newFileVersion = 20205; + } else if (buildVersion < 3446) { // 2021.0 (9.8.0.200) SR0 3445 + fileVersion = 980; + newFileVersion = 20210; + } else if (buildVersion < 3479) { // 2021b.0 (9.8.5.201) SR0 3478 + fileVersion = 985; + newFileVersion = 20215; } else { - // > 2018bSR0 - fileVersion = 956; - newFileVersion = 20186; - LOG_PRINT(logfile, "Found project version 2018b.1 (9.5.6) or newer\n") + // > 2021bSR0 + fileVersion = 986; + newFileVersion = 20216; + LOG_PRINT(logfile, "Found project version 2021bSR1 (9.8.6) or newer\n") } if (newFileVersion == 0) { @@ -152,10 +174,13 @@ fclose(logfile); #endif // GENERATE_CODE_FOR_LOG parser.reset(createOriginAnyParser(fileName)); + ioError=0; } bool OriginFile::parse() { + if (ioError != 0) + return false; parser->buildVersion = buildVersion; parser->fileVersion = fileVersion; return parser->parse(); @@ -259,4 +284,4 @@ unsigned int liboriginVersionMinor() { return LIBORIGIN_VERSION_MINOR; } -unsigned int liboriginVersionBugfix() { return LIBORIGIN_VERSION_BUGFIX; } +unsigned int liboriginVersionPatch() { return LIBORIGIN_VERSION_PATCH; } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/OriginFile.h new/liborigin-3.0.1/OriginFile.h --- old/liborigin-3.0.0/OriginFile.h 2018-10-03 00:06:41.258113188 +0200 +++ new/liborigin-3.0.1/OriginFile.h 2018-11-27 20:37:51.381482904 +0100 @@ -70,7 +70,7 @@ string resultsLogString() const; //!< get Results Log private: - unsigned int fileVersion, buildVersion; + unsigned int fileVersion, buildVersion, ioError; unique_ptr<OriginParser> parser; }; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/OriginObj.h new/liborigin-3.0.1/OriginObj.h --- old/liborigin-3.0.0/OriginObj.h 2018-09-29 11:07:21.134773128 +0200 +++ new/liborigin-3.0.1/OriginObj.h 2021-05-08 14:58:40.642052539 +0200 @@ -67,7 +67,7 @@ enum DayOfWeekFormat {DAY_DDD = 0, DAY_DDDD = 1, DAY_LETTER = 2}; enum NumericDisplayType {DefaultDecimalDigits = 0, DecimalPlaces = 1, SignificantDigits = 2}; - enum Attach {Frame = 0, Page = 1, Scale = 2}; + enum Attach {Frame = 0, Page = 1, Scale = 2, End_}; enum BorderType {BlackLine = 0, Shadow = 1, DarkMarble = 2, WhiteOut = 3, BlackOut = 4, None = -1}; enum FillPattern {NoFill = 0, BDiagDense = 1, BDiagMedium = 2, BDiagSparse = 3, FDiagDense = 4, FDiagMedium = 5, FDiagSparse = 6, DiagCrossDense = 7, DiagCrossMedium = 8, DiagCrossSparse = 9, HorizontalDense = 10, HorizontalMedium = 11, HorizontalSparse = 12, @@ -163,7 +163,7 @@ Color windowBackgroundColorBase; Color windowBackgroundColorEnd; - Window(const string& _name= "", const string& _label = "", bool _hidden = false) + Window(const string& _name = string(), const string& _label = string(), bool _hidden = false) : name(_name) , label(_label) , objectID(-1) @@ -265,7 +265,7 @@ unsigned int endRow; vector<variant> data; - SpreadColumn(const string& _name = "", unsigned int _index = 0) + SpreadColumn(const string& _name = string(), unsigned int _index = 0) : name(_name) , type(ColumnType::Y) , valueType(Numeric) @@ -273,8 +273,6 @@ , significantDigits(6) , decimalPlaces(6) , numericDisplayType(DefaultDecimalDigits) - , command("") - , comment("") , width(8) , index(_index) , colIndex(0) @@ -292,7 +290,7 @@ unsigned int sheets; vector<SpreadColumn> columns; - SpreadSheet(const string& _name = "") + SpreadSheet(const string& _name = string()) : Window(_name) , maxRows(30) , loose(true) @@ -306,7 +304,7 @@ bool loose; vector<SpreadSheet> sheets; - Excel(const string& _name = "", const string& _label = "", int _maxRows = 0, bool _hidden = false, bool _loose = true) + Excel(const string& _name = string(), const string& _label = string(), int _maxRows = 0, bool _hidden = false, bool _loose = true) : Window(_name, _label, _hidden) , maxRows(_maxRows) , loose(_loose) @@ -333,7 +331,7 @@ vector<double> data; vector<double> coordinates; - MatrixSheet(const string& _name = "", unsigned int _index = 0) + MatrixSheet(const string& _name = string(), unsigned int _index = 0) : name(_name) , rowCount(8) , columnCount(8) @@ -341,10 +339,10 @@ , significantDigits(6) , decimalPlaces(6) , numericDisplayType(DefaultDecimalDigits) - , command("") , width(8) , index(_index) , view(DataView) + , colorMap() {coordinates.push_back(10.0);coordinates.push_back(10.0);coordinates.push_back(1.0);coordinates.push_back(1.0);}; }; @@ -356,7 +354,7 @@ HeaderViewType header; vector<MatrixSheet> sheets; - Matrix(const string& _name = "") + Matrix(const string& _name = string()) : Window(_name) , activeSheet(0) , header(ColumnRow) @@ -375,10 +373,9 @@ int totalPoints; unsigned int index; - Function(const string& _name = "", unsigned int _index = 0) + Function(const string& _name = string(), unsigned int _index = 0) : name(_name) , type(Normal) - , formula("") , begin(0.0) , end(0.0) , totalPoints(0) @@ -398,7 +395,7 @@ BorderType borderType; Attach attach; - TextBox(const string& _text = "") + TextBox(const string& _text = string()) : text(_text) , color({Color::Regular, {Color::Black}}) , fontSize(20) @@ -794,7 +791,7 @@ BorderType borderType; unsigned char* data; - Bitmap(const string& _name = "") + Bitmap(const string& _name = string()) : attach(Frame) , size(0) , windowName(_name) @@ -821,7 +818,7 @@ ~Bitmap() { if(size > 0) - delete data; + delete[] data; }; }; @@ -895,9 +892,11 @@ GraphLayer() : backgroundColor({Color::Regular, {Color::White}}) , borderType(BlackLine) + , xAxis(), yAxis(), zAxis() , histogramBin(0.5) , histogramBegin(0.0) , histogramEnd(10.0) + , colorMap() , xAngle(0) , yAngle(0) , zAngle(0) @@ -964,21 +963,20 @@ bool connectMissingData; string templateName; - Graph(const string& _name = "") + Graph(const string& _name = string()) : Window(_name) , width(400) , height(300) , is3D(false) , isLayout(false) , connectMissingData(false) - , templateName("") {}; }; struct Note : public Window { string text; - Note(const string& _name = "") + Note(const string& _name = string()) : Window(_name) {}; }; @@ -993,7 +991,7 @@ time_t modificationDate; bool active; - ProjectNode(const string& _name = "", NodeType _type = Folder, const time_t _creationDate = time(nullptr), const time_t _modificationDate = time(nullptr), bool _active = false) + ProjectNode(const string& _name = string(), NodeType _type = Folder, const time_t _creationDate = time(nullptr), const time_t _modificationDate = time(nullptr), bool _active = false) : type(_type) , name(_name) , creationDate(_creationDate) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/README new/liborigin-3.0.1/README --- old/liborigin-3.0.0/README 2017-10-22 08:27:57.929352581 +0200 +++ new/liborigin-3.0.1/README 2021-05-11 16:25:31.958798043 +0200 @@ -4,10 +4,20 @@ This code is a standalone library for reading OriginLab project files. It is based on the code at - http://sourceforge.net/projects/liborigin - http://soft.proindependent.com/liborigin2 - -AUTHORS: Knut Franke, Miquel Garriga, Stefan Gerlach, Alex Kargovsky, Russell Standish, Ion Vasilief + http://sourceforge.net/projects/liborigin (upstream) + https://github.com/SciDAVis/liborigin + http://soft.proindependent.com/liborigin2 (not available anymore) + +Additionally, some fixes were applied to silence UBSan warnings caused by +uninitialised POD struct members. + +AUTHORS: + Stefan Gerlach 2005-2021 + Miquel Garriga 2014-2018 + Knut Franke 2010 + Ion Vasilief 2006-2010 + Alex Kargovsky 2007-2009 + Russell Standish DEPENDENCIES: tree.hh (included) http://tree.phi-sci.com/ @@ -28,19 +38,14 @@ liborigin.pc a pkg-config metadata file to get compiler and linker flags c++ devel headers -Individual components (origin-static, origin, opj2dat, or doc) can be generated and installed by requesting -a specific target on the make command line. -For example: - $ make origin-static -builds the static liborigin.a library only. Then: - $ make install -installs the c++ devel headers, liborigin.pc, and liborigin.a +To disable shared or static libraries you can also specify the cmake options +-DBUILD_SHARED_LIBS=off or -DBUILD_STATIC_LIBS=off. opj2dat will be build if one of them is enabled. Doc generation requires doxygen (http://doxygen.org) To include liborigin in a project using cmake add find_package(PkgConfig) - pkg_check_modules(liborigin liborigin=>3.0.0) + pkg_check_modules(liborigin liborigin>=3.0.0) target_link_libraries( my_target ${liborigin_LIBRARIES} ) target_include_directories( my_target PUBLIC ${liborigin_INCLUDE_DIRS} ) to the project CMakeLists.txt file. @@ -56,7 +61,7 @@ --------------------------------------------------------------------------- FEATURES: - * supports the import of any project from version 3.5 to latest (2017) + * supports the import of any project from version 3.5 to latest (2021bSR0) * includes a pkg-config metadata file --------------------------------------------------------------------------- diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/config.h.in new/liborigin-3.0.1/config.h.in --- old/liborigin-3.0.0/config.h.in 2017-06-01 21:10:27.557247416 +0200 +++ new/liborigin-3.0.1/config.h.in 2021-05-11 13:10:13.040713253 +0200 @@ -29,12 +29,12 @@ #ifndef CONFIG_H #define CONFIG_H -#define LIBORIGIN_VERSION_MAJOR ${LIBORIGIN_VERSION_MAJOR} -#define LIBORIGIN_VERSION_MINOR ${LIBORIGIN_VERSION_MINOR} -#define LIBORIGIN_VERSION_BUGFIX ${LIBORIGIN_VERSION_BUGFIX} +#define LIBORIGIN_VERSION_MAJOR ${PROJECT_VERSION_MAJOR} +#define LIBORIGIN_VERSION_MINOR ${PROJECT_VERSION_MINOR} +#define LIBORIGIN_VERSION_PATCH ${PROJECT_VERSION_PATCH} #define LIBORIGIN_VERSION ((LIBORIGIN_VERSION_MAJOR << 24) | \ (LIBORIGIN_VERSION_MINOR << 16) | \ - (LIBORIGIN_VERSION_BUGFIX << 8) ) -#define LIBORIGIN_VERSION_STRING "${LIBORIGIN_VERSION_MAJOR}.${LIBORIGIN_VERSION_MINOR}.${LIBORIGIN_VERSION_BUGFIX}" + (LIBORIGIN_VERSION_PATCH << 8) ) +#define LIBORIGIN_VERSION_STRING "${PROJECT_VERSION}" #endif // ifndef CONFIG_H diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/liborigin.pc.in new/liborigin-3.0.1/liborigin.pc.in --- old/liborigin-3.0.0/liborigin.pc.in 2017-10-22 08:27:57.929352581 +0200 +++ new/liborigin-3.0.1/liborigin.pc.in 2021-05-11 13:09:04.217168942 +0200 @@ -1,11 +1,11 @@ prefix=@CMAKE_INSTALL_PREFIX@ -exec_prefix=@CMAKE_INSTALL_PREFIX@ -libdir=@CMAKE_INSTALL_PREFIX@/lib@LIB_SUFFIX@ -includedir=@CMAKE_INSTALL_PREFIX@/include +exec_prefix=${prefix} +libdir=${prefix}/@CMAKE_INSTALL_LIBDIR@ +includedir=${prefix}/@CMAKE_INSTALL_INCLUDEDIR@ Name: liborigin Description: Library for reading OriginLab files -Version: @LIBORIGIN_VERSION_MAJOR@.@LIBORIGIN_VERSION_MINOR@.@LIBORIGIN_VERSION_BUGFIX@ +Version: @PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@ Requires: Libs: -L${libdir} -lorigin diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/opj2dat.cpp new/liborigin-3.0.1/opj2dat.cpp --- old/liborigin-3.0.0/opj2dat.cpp 2018-10-03 00:06:41.258113188 +0200 +++ new/liborigin-3.0.1/opj2dat.cpp 2021-05-08 14:56:23.203051258 +0200 @@ -54,6 +54,8 @@ OriginFile opj(inputfile); int status = opj.parse(); cout << "Parsing status = " << status << endl; + if (! status) + return -1; cout << "OPJ PROJECT \"" << inputfile.c_str() << "\" VERSION = " << opj.version() << endl; cout << "number of datasets = " << opj.datasetCount() << endl; @@ -66,12 +68,12 @@ for (unsigned int s=0;s<opj.spreadCount();s++) { Origin::SpreadSheet spread = opj.spread(s); - int columnCount=spread.columns.size(); + size_t columnCount = spread.columns.size(); cout << "Spreadsheet " << (s+1) << endl; cout << " Name: " << spread.name.c_str() << endl; cout << " Label: " << spread.label.c_str() << endl; cout << " Columns: " << columnCount << endl; - for (int j=0;j<columnCount;j++) { + for (size_t j=0;j<columnCount;j++) { Origin::SpreadColumn column = spread.columns[j]; cout << " Column " << (j+1) << " : " << column.name.c_str() << " / type : " << column.type << ", rows : " << spread.maxRows << endl; } @@ -88,7 +90,7 @@ return -1; } // header - for (int j=0;j<columnCount;j++) { + for (size_t j=0;j<columnCount;j++) { outf << spread.columns[j].name.c_str() << "; "; cout << spread.columns[j].name.c_str(); } @@ -96,7 +98,7 @@ cout << endl << " Data: " << endl; // data for (int i=0;i<(int)spread.maxRows;i++) { - for (int j=0;j<columnCount;j++) { + for (size_t j=0;j<columnCount;j++) { if (i<(int)spread.columns[j].data.size()) { Origin::variant value(spread.columns[j].data[i]); double v=0.; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/liborigin-3.0.0/tree.hh new/liborigin-3.0.1/tree.hh --- old/liborigin-3.0.0/tree.hh 2018-09-29 11:12:33.283511247 +0200 +++ new/liborigin-3.0.1/tree.hh 2021-05-08 14:56:36.170957027 +0200 @@ -92,7 +92,7 @@ p->~T1(); } -}; +} /// A node in the tree, combining links to other nodes as well as the actual data. template<class T> ++++++ liborigin-rpmlintrc ++++++ addFilter("liborigin-tools.*shlib-policy-missing-lib")