Hello community, here is the log from the commit of package octave-forge-io for openSUSE:Factory checked in at 2015-08-23 15:42:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/octave-forge-io (Old) and /work/SRC/openSUSE:Factory/.octave-forge-io.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "octave-forge-io" Changes: -------- --- /work/SRC/openSUSE:Factory/octave-forge-io/octave-forge-io.changes 2015-06-23 12:00:59.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.octave-forge-io.new/octave-forge-io.changes 2015-08-23 15:42:47.000000000 +0200 @@ -1,0 +2,6 @@ +Tue Jul 14 19:51:38 UTC 2015 - [email protected] + +- Update to version 2.2.9 + * Bug fixes + +------------------------------------------------------------------- Old: ---- io-2.2.8.tar.gz New: ---- io-2.2.9.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ octave-forge-io.spec ++++++ --- /var/tmp/diff_new_pack.1qvpmb/_old 2015-08-23 15:42:48.000000000 +0200 +++ /var/tmp/diff_new_pack.1qvpmb/_new 2015-08-23 15:42:48.000000000 +0200 @@ -18,7 +18,7 @@ %define octpkg io Name: octave-forge-%{octpkg} -Version: 2.2.8 +Version: 2.2.9 Release: 0 Summary: Input/Output in external formats from Octave License: GPL-3.0+ and BSD-2-Clause ++++++ io-2.2.8.tar.gz -> io-2.2.9.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/io/DESCRIPTION new/io/DESCRIPTION --- old/io/DESCRIPTION 2015-06-19 14:38:19.000000000 +0200 +++ new/io/DESCRIPTION 2015-07-10 13:48:36.000000000 +0200 @@ -1,6 +1,6 @@ Name: io -Version: 2.2.8 -Date: 2015-06-21 +Version: 2.2.9 +Date: 2015-07-10 Author: various authors Maintainer: Philip Nienhuis <[email protected]> Title: Input/Output diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/io/NEWS new/io/NEWS --- old/io/NEWS 2015-06-19 14:41:03.000000000 +0200 +++ new/io/NEWS 2015-07-10 13:50:16.000000000 +0200 @@ -1,6 +1,25 @@ Summary of important user-visible changes for releases of the io package =============================================================================== +io-2.2.9 Release Date: 2015-07-10 Release Manager: Philip Nienhuis +=============================================================================== + +This is a bug fix release. + +*** Bug fixes: + - Fix typo in duplicate sheet names check code (bug #45498) + - For the OCT interface, increase numeric write precision to 15 digits + (used to be just 6) and ensure that very large and small numbers can be + written (bug #45498) + - Fix wrong indexing when writing a new gnumeric file with wsh pointer > 1 + - xlsopen.m (xlswrite): fix type preventing writing to ods + +*** Reminder: + This will be (one of) the last io package release(s) before the spreadsheet + I/O is moved into core Octave, so this version will only install in + Octave < 4.2.x (override using the -nodeps option with pkg.m) + +=============================================================================== io-2.2.8 Release Date: 2015-06-21 Release Manager: Philip Nienhuis =============================================================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/io/inst/private/__OCT_oct2gnm__.m new/io/inst/private/__OCT_oct2gnm__.m --- old/io/inst/private/__OCT_oct2gnm__.m 2015-03-07 14:17:07.000000000 +0100 +++ new/io/inst/private/__OCT_oct2gnm__.m 2015-07-10 12:55:27.000000000 +0200 @@ -1,4 +1,4 @@ -## Copyright (C) 2014 Philip Nienhuis +## Copyright (C) 2014,2015 Philip Nienhuis ## ## This program is free software; you can redistribute it and/or modify it ## under the terms of the GNU General Public License as published by @@ -26,7 +26,10 @@ ## 2014-04-30 First working version ## 2014-01-05 Fix mixing up rows and colums in range to write ## 2014-10-04 Make sure searched worksheet names matches exactly (bug # 43353) -## Replace deprecated strmatch +## 2015-03-06 Replace deprecated strmatch +## 2015-07-10 Allow 15 digits precision when writing; ensure small nrs can be +## written (bug #45498) +## '' Fix erroneous indexing for new file if sheet index > 1 function [xls, status] = __OCT_oct2gnm__ (obj, xls, wsh, crange, spsh_opts=0, obj_dims) @@ -57,9 +60,9 @@ if (strcmpi (xls.sheets.sh_names{1}, " ") && numel (xls.sheets.sh_names) == 2 && new_sh) ## Completely new file. Clean up and copy a few things xls.sheets.sh_names(1) = []; - wsh--; - idx_s = xls.sheets.shtidx(wsh); - idx_e = xls.sheets.shtidx(wsh+1) - 1; + wsh = 1; + idx_s = xls.sheets.shtidx(1); + idx_e = xls.sheets.shtidx(2) - 1; xls.changed = 2; lims = [obj_dims.tr, obj_dims.br; obj_dims.lc, obj_dims.rc]; rawarr = obj; @@ -103,7 +106,7 @@ ## F. Optionally update SheetName Index node if (new_sh) if (wsh == 1) - ## New file,existing sheet. Find then (only) gnm:SheetName node + ## New file, existing sheet. Find then (only) gnm:SheetName node [shtnmnode, ss, ee] = getxmlnode (gnm_xml, "gnm:SheetName"); ipos = index (shtnmnode, "> </gnm:SheetName>"); shtnmnode = [ shtnmnode(1:ipos) xls.sheets.sh_names{1} shtnmnode(ipos+2:end) ]; @@ -194,7 +197,7 @@ elseif (isnumeric (raw{ii, jj})) ## Any numeric value; gnumeric only has FLOAT type - fprintf (fid, '<gnm:Cell Row="%d" Col="%d" ValueType="40">%f</gnm:Cell>', ... + fprintf (fid, '<gnm:Cell Row="%d" Col="%d" ValueType="40">%0.15g</gnm:Cell>', ... irow, icol, raw{ii, jj}); elseif (ischar (raw{ii, jj})) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/io/inst/private/__OCT_oct2ods__.m new/io/inst/private/__OCT_oct2ods__.m --- old/io/inst/private/__OCT_oct2ods__.m 2015-03-07 14:18:10.000000000 +0100 +++ new/io/inst/private/__OCT_oct2ods__.m 2015-07-10 12:39:12.000000000 +0200 @@ -32,6 +32,8 @@ ## 2014-09-29 Fix creating new sheet if no sheet was specified (bug #43321) ## 2014-10-04 Make sure searched worksheet names matches exactly (bug # 43353) ## 2015-03-07 Replace deprecated strmatch +## 2015-07-10 Allow 15 digits precision when writing; ensure small nrs can be +## written (bug #45498) function [ ods, status ] = __OCT_oct2ods__ (obj, ods, wsh, crange, spsh_opts=0, obj_dims) @@ -249,7 +251,7 @@ val = sprintf ("%.4f", rawarr{ii, jj}); txt = sprintf ('<text:p>%s</text:p>', val); ## Convert to attribute - val = sprintf (' office:value="%.10f"', rawarr{ii, jj}); + val = sprintf (' office:value="%0.15g"', rawarr{ii, jj}); case {"int64", "int32", "int16", "int8", "uint64", "uint32", "uint16", "uint8"} ovt = ' office:value-type="integer"'; val = strtrim (sprintf ("%d15", rawarr{ii, jj})); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/io/inst/private/__OCT_oct2xlsx__.m new/io/inst/private/__OCT_oct2xlsx__.m --- old/io/inst/private/__OCT_oct2xlsx__.m 2015-03-07 14:22:43.000000000 +0100 +++ new/io/inst/private/__OCT_oct2xlsx__.m 2015-07-10 12:00:27.000000000 +0200 @@ -83,6 +83,10 @@ ## 2014-10-29 - more _rels bookkeepin improvements. ## - Ignore writing empty text cells to worksheet ## 2015-03-07 - Replace deprecated strmatch +## 2015-07-10 - Fix typo in duplicate worksheet names check (bug #45498) +## '' - Change numeric write format to %0.15g (MS-Excel accepts that) +## to ensure 15 digits precision. Along the way aliminate +## expensive call to strtrim() function [xls, rstatus] = __OCT_oct2xlsx__ (arrdat, xls, wsh=1, crange="", spsh_opts, obj_dims) @@ -124,7 +128,7 @@ length (wsh_string <= 31)) wsh_string = strrep (wsh_string, "Sheet", "Sheet_"); endwhile - if (length (string) > 31) + if (length (wsh_string) > 31) error ("oct2xls: cannot add worksheet with a unique name\n"); endif ## The sheet index number can't leave a gap in the stack, so: @@ -449,7 +453,7 @@ lims(1, 1), lims(1, 2)); for c = 1:columns (arrdat) if (0 == isnan (arrdat{r, c})) - fprintf (fid, sprintf ('<c r="%s%d" t="n"><v>%f</v></c>', ... + fprintf (fid, sprintf ('<c r="%s%d" t="n"><v>%0.15g</v></c>', ... num2col (c+lims(1, 1)-1), r+lims(2, 1)-1, arrdat{r, c})); endif endfor @@ -505,7 +509,7 @@ case 1 ## Numeric ## t tag ("type") is omitted for numeric data ??? ttag = ' t="n"'; - val = ["<v>" strtrim(sprintf ("%25.10f", arrdat{ii, jj})) "</v>"]; + val = ["<v>" (sprintf ("%0.15g", arrdat{ii, jj})) "</v>"]; case 2 ## Boolean ttag = ' t="b"'; if (arrdat{ii, jj}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/io/inst/xlsopen.m new/io/inst/xlsopen.m --- old/io/inst/xlsopen.m 2015-04-24 22:29:05.000000000 +0200 +++ new/io/inst/xlsopen.m 2015-07-10 13:36:14.000000000 +0200 @@ -149,6 +149,7 @@ ## '' Be silent when creating new file ## 2015-04-24 Depending on supported interfaces, use .xls or .xlsx (OOXML) ## if no suffix was specified +## 2015-07-10 Fix typo preventing writing to .ods function [ xls ] = xlsopen (filename, xwrite=0, reqinterface=[]) @@ -246,7 +247,7 @@ ftype = 1; case {".xlsx", ".xlsm", ".xlsb"} ## Zipped XML / OOXML. Catches xlsx, xlsb, xlsm ftype = 2; - case "ods" ## ODS 1.2 (Excel 2007+ & OOo/LO can read ODS) + case ".ods" ## ODS 1.2 (Excel 2007+ & OOo/LO can read ODS) ftype = 3; case ".gnumeric" ## Zipped XML / gnumeric ftype = 5;
