Mercurial > forge
changeset 12434:9a5985899c46 octave-forge
Updated texinfo headers and some messages about r/w support in OCT interface
author | prnienhuis |
---|---|
date | Mon, 14 Apr 2014 19:22:48 +0000 |
parents | dd5e4fd6446b |
children | 6488f1194a92 |
files | main/io/inst/chk_spreadsheet_support.m main/io/inst/odsopen.m main/io/inst/xlsopen.m main/io/inst/xlsread.m |
diffstat | 4 files changed, 20 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/main/io/inst/chk_spreadsheet_support.m Mon Apr 14 19:22:06 2014 +0000 +++ b/main/io/inst/chk_spreadsheet_support.m Mon Apr 14 19:22:48 2014 +0000 @@ -98,18 +98,18 @@ ## RETVAL will be set to the sum of values for found interfaces: ## @example ## 0 = OCT (Native Octave) -## (only read support for .xlsx, .ods and .gnumeric) -## ---------- XLS (Excel) interfaces: ---------- +## (read/write support for .xlsx and .ods, read support for .gnumeric) +## ----------- XLS (Excel) interfaces: ---------- ## 1 = COM (ActiveX / Excel) (any file format supported by MS-Excel) ## 2 = POI (Java / Apache POI) (Excel 97-2003 = BIFF8) ## 4 = POI+OOXML (Java / Apache POI) (Excel 2007-2010 = OOXML) ## 8 = JXL (Java / JExcelAPI) (Excel 95-read and Excel-97-2003-r/w) ## 16 = OXS (Java / OpenXLS) (Excel 97-2003) -## --- ODS (OpenOffice.org Calc) interfaces ---- +## ---- ODS (OpenOffice.org Calc) interfaces ---- ## 32 = OTK (Java/ ODF Toolkit) (ODS 1.2) ## 64 = JOD (Java / jOpenDocument) (.sxc (old OOo)-read, ODS 1.2) -## ----------------- XLS & ODS: ---------------- -## 0 = OOXML / ODS / gumeric read support (built-in) +## ------------------ XLS & ODS: ---------------- +## 0 = OOXML / ODS read/write-, gnumeric read support (built-in) ## 128 = UNO (Java/UNO bridge - OpenOffice.org) (any format supported by OOo) ## @end example ## @@ -169,6 +169,7 @@ ## '' Return checked interfaces; update texinfo header ## 2014-01-17 Tame messages about COM/ActiveX if dbug = 0 ## 2014-04-06 Skip unojarpath search for UNO entries 4 and up; code style fixes +## 2014-04-14 Updated texinfo header & OCT r/w support messages function [ retval, sinterfaces, loaded_jars ] = chk_spreadsheet_support (path_to_jars, dbug, path_to_ooo) @@ -244,10 +245,10 @@ if (! isempty (winpkgind)) winpkg = pkglist{winpkgind}; if (winpkg.loaded && dbug) - printf ("MS-Excel couldn't be started (maybe because of 64-bit MS-Office?)\n"); + printf ("MS-Excel couldn't be started although OF windows is loaded...\n"); endif elseif (dbug) - printf ("(windows package is required for COM/ActiveX support)\n"); + printf ("(OF windows package is required for COM/ActiveX support)\n"); endif printf ("\n"); end_try_catch @@ -271,7 +272,7 @@ if (jtst) printf ("Apparently no Java JRE installed.\n"); if (! retval) - printf ("Only read support for ODS 1.2 (.ods), OOXML (.xlsx) and .gnumeric present\n"); + printf ("Only ODS 1.2 (.ods) & OOXML (.xlsx) r/w support & .gnumeric read support present\n"); endif return; else @@ -304,14 +305,14 @@ if (! octave_config_info.features.JAVA) if (dbug) printf ("none.\n"); - printf (" (Octave was built without core Java support)\n"); + printf (" (Octave was built without Java support)\n"); endif endif elseif (isfield (octave_config_info, "UGLY_DEFS")) if (isempty (regexp (octave_config_info.UGLY_DEFS, "HAVE_JAVE=1", "match"))) if (dbug) printf ("none.\n"); - printf (" (Octave was built without enabled core Java support)\n"); + printf (" (Octave was built without Java support)\n"); endif endif endif @@ -351,7 +352,7 @@ if (dbug) printf ("No Java support found.\n"); if (! retval) - printf ("Only read support for ODS 1.2 (.ods), OOXML (.xlsx) and .gnumeric\n"); + printf ("Only ODS 1.2 (.ods) & OOXML (.xlsx) r/w support & .gnumeric read support present\n"); endif endif return @@ -532,7 +533,7 @@ return; endif if (dbug && ! isempty (strfind (path_to_ooo, '\'))) - printf ("\n(Hmmm... forward slashes are preferred over backward slashes in path)\n"); + printf ("\n(forward slashes are preferred over backward slashes in path)\n"); endif ## Add missing jars to javaclasspath. First combine all entries targt = sum (missing0);
--- a/main/io/inst/odsopen.m Mon Apr 14 19:22:06 2014 +0000 +++ b/main/io/inst/odsopen.m Mon Apr 14 19:22:48 2014 +0000 @@ -24,9 +24,9 @@ ## Calling odsopen without specifying a return argument is fairly useless! ## ## Octave links to external software for read/write support of spreadsheets; -## these links are "interfaces". For just reading ODS 1.2 and Gnumeric XML -## no external SW is required, yet this "interface" is called 'OCT'. -## To make this function work at all for write support, you need a Java JRE +## these links are "interfaces". For I/O from/to ODS 1.2 and reading Gnumeric +## XML, in principle no external SW is required, this "interface" is called +## 'OCT'. For more flexibility and better performance, you need a Java JRE ## or JDK plus one or more of (ODFtoolkit (version 0.7.5 or 0.8.6 - 0.8.8) & ## xercesImpl v.2.9.1), jOpenDocument, or OpenOffice.org (or clones) installed ## on your computer + proper javaclasspath set. These interfaces are referred @@ -136,6 +136,7 @@ ## 2014-01-01 Add warning that UNO will write ODS f. unsupported file extensions ## '' Copyright string update ## 2014-01-23 OCT ods write support for .ods +## 2014-04-14 Update texinfo header function [ ods ] = odsopen (filename, rw=0, reqinterface=[]) @@ -213,7 +214,7 @@ ## .ods write support is supported if (odsintf_cnt == 1 && odsinterfaces.OCT && ! strcmpi (ext, ".ods")) ## Check if OCT is only interface and writing is requested - error ("OCT interface doesn't support writing files"); + error ("OCT interface doesn't support writing gnumeric files (yet)"); endif rw = 1; endif
--- a/main/io/inst/xlsopen.m Mon Apr 14 19:22:06 2014 +0000 +++ b/main/io/inst/xlsopen.m Mon Apr 14 19:22:48 2014 +0000 @@ -260,10 +260,6 @@ if (ftype == 5) error ("There's only read support for gnumeric files"); endif -% ## Catch attempts to write xlsx if only OCT interface is supported -% if (xlsintf_cnt == 1 && xlsinterfaces.OCT) -% error ("Only the OCT interface is present | requested, but that has only read support"); -% endif fmode = 'r+b'; if (! has_suffix) ## Add .xls suffix to filename (all Excel versions can write this)
--- a/main/io/inst/xlsread.m Mon Apr 14 19:22:06 2014 +0000 +++ b/main/io/inst/xlsread.m Mon Apr 14 19:22:48 2014 +0000 @@ -68,8 +68,8 @@ ## The optional last argument @var{reqintf} can be used to override ## the automatic interface selection by xlsread out of the supported ## ones: COM/Excel, Java/Apache POI, Java/JExcelAPI, Java/OpenXLS, -## Java/UNO (OpenOffice.org), or native Octave (only reading .xlsx) -## (in that -built in- order of preference). +## Java/UNO (OpenOffice.org), or native Octave (in that -built in- +## order of preference). ## For reading from OOXML files a value of 'com', 'poi', 'uno', or 'oct' ## must be specified for @var{reqintf} (see help for xlsopen); for ## Excel'95 files use 'com', or if Excel is not installed use 'jxl',