Mercurial > forge
changeset 12069:0bb773b19abf octave-forge
OCT (native Octave) interface added
author | prnienhuis |
---|---|
date | Fri, 27 Sep 2013 18:03:58 +0000 |
parents | 04518dae1bbd |
children | 86693dfd7277 |
files | main/io/inst/ods2oct.m main/io/inst/odsfinfo.m |
diffstat | 2 files changed, 20 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/main/io/inst/ods2oct.m Fri Sep 27 18:03:12 2013 +0000 +++ b/main/io/inst/ods2oct.m Fri Sep 27 18:03:58 2013 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2009,2010,2011,2012 Philip Nienhuis <pr.nienhuis at users.sf.net> +## Copyright (C) 2009,2010,2011,2012,2013 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 the Free Software @@ -100,7 +100,7 @@ ## ## @end deftypefn -## Author: Philip Nienhuis +## Author: Philip Nienhuis <pr.nienhuis at users.sf.net> ## Created: 2009-12-13 ## Updates: ## 2009-12-30 First working version @@ -125,6 +125,8 @@ ## '' Replaced tabs by double space ## 2012-10-12 Moved all interface-specific subfubcs into ./private ## 2012-10-24 Style fixes +## 2013-09-09 Native Octave interface ("OCT") for reading +## 2013-09-23 Updated copyright messages ## ## Latest subfunc update: 2012-10-12 @@ -183,7 +185,10 @@ elseif (strcmp (ods.xtype, "UNO")) ## Read ods file tru Java & UNO [rawarr, ods] = __UNO_spsh2oct__ (ods, wsh, datrange, spsh_opts); - ##elseif + elseif (strcmp (ods.xtype, "OCT")) + ## Read ods file tru native Octave + [rawarr, ods] = __OCT_ods2oct__ (ods, wsh, datrange, spsh_opts); + ##elseif ## ---- < Other interfaces here > else error (sprintf ("ods2oct: unknown OpenOffice.org .ods interface - %s.", ods.xtype));
--- a/main/io/inst/odsfinfo.m Fri Sep 27 18:03:12 2013 +0000 +++ b/main/io/inst/odsfinfo.m Fri Sep 27 18:03:58 2013 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2009,2010,2011,2012 Philip Nienhuis <prnienhuis at users.sf.net> +## Copyright (C) 2009,2010,2011,2012,2013 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 the Free Software @@ -37,9 +37,9 @@ ## spreadsheet has to be parsed to get the sheet names, let alone exploring ## used data ranges. ## -## By specifying a value of 'jod', 'otk' or 'uno' for @var{reqintf} the automatic -## selection of the java interface is bypassed and the specified interface -## will be used (if at all present). +## By specifying a value of 'jod', 'otk', 'uno' or 'oct' for @var{reqintf} the +## automatic selection of the java interface is bypassed and the specified +## interface will be used (if at all present). ## ## Examples: ## @@ -79,6 +79,8 @@ ## 2012-06-08 Support for odfdom-0.8.8-incubator ## 2012-10-12 Moved all interface-specific code into ./private subfuncs ## 2012-10-24 Style fixes +## 2013-09-09 Native Octave interface ("OCT") for reading +## 2013-09-23 Header updated to OCT interface function [ filetype, sh_names ] = odsfinfo (filename, reqintf=[]) @@ -102,9 +104,12 @@ elseif (strcmp (ods.xtype, "JOD")) [sh_names] = __JOD_spsh_info__ (ods); - elseif (strcmp (ods.xtype, "UNO")) - [sh_names] = __UNO_spsh_info__ (ods); - + elseif (strcmp (ods.xtype, "UNO")) + [sh_names] = __UNO_spsh_info__ (ods); + + elseif (strcmp (ods.xtype, "OCT")) + [sh_names] = __OCT_spsh_info__ (ods); + else ## Below error will have been catched in odsopen() above ##error (sprintf ("odsfinfo: unknown OpenOffice.org .ods interface - %s.",...