From: <prn...@us...> - 2012-09-03 19:51:38
|
Revision: 10955 http://octave.svn.sourceforge.net/octave/?rev=10955&view=rev Author: prnienhuis Date: 2012-09-03 19:51:31 +0000 (Mon, 03 Sep 2012) Log Message: ----------- Replaced canonicalize_file_name() calls for *nix systems by make_absolute_filename (bug #36677); 2 rather than 3 slashes for web addresses in UNO sections; code cleanup Modified Paths: -------------- trunk/octave-forge/main/io/inst/odsclose.m trunk/octave-forge/main/io/inst/odsopen.m trunk/octave-forge/main/io/inst/xlsclose.m trunk/octave-forge/main/io/inst/xlsopen.m Modified: trunk/octave-forge/main/io/inst/odsclose.m =================================================================== --- trunk/octave-forge/main/io/inst/odsclose.m 2012-09-02 22:39:41 UTC (rev 10954) +++ trunk/octave-forge/main/io/inst/odsclose.m 2012-09-03 19:51:31 UTC (rev 10955) @@ -65,6 +65,7 @@ ## 2011-09-08 FIXME - closing OOo kills all other OOo invocations (known Java-UNO issue) ## 2012-01-26 Fixed "seealso" help string ## 2012-06-08 tabs replaced by double space +## 2012-09-03 Extended file renaming section to xlsclose equivalent function [ ods ] = odsclose (ods, varargs) @@ -78,17 +79,39 @@ if (strcmp (lower (varargin{ii}), "force")) # Close .ods anyway even if write errors occur force = 1; - elseif (~isempty (strfind (tolower (varargin{ii}), '.ods')) || ... - ~isempty (strfind (tolower (varargin{ii}), '.sxc'))) - # Apparently a file name + elseif (~isempty (strfind (tolower (varargin{ii}), '.'))) + # Apparently a file name. First some checks.... if (ods.changed == 0 || ods.changed > 2) warning ("File %s wasn't changed, new filename ignored.", ods.filename); + elseif (~strcmp (xls.xtype, 'UNO') && isempty (strfind ( lower (filename), '.ods'))) + # UNO will write any file type, all other interfaces only .ods + error ('.ods suffix lacking in filename %s', filename); else - if (strfind (tolower (filename), '.sxc') || strfind (tolower (filename), '.ods')) - ods.filename = filename; - else - error ('No .sxc or .ods filename extension specified'); + # All checks passed + if (strcmp (xls.xtype, 'UNO')) + # For UNO, turn filename into URL + if (~isempty (strmatch ("file:///", filename)) || ~isempty (strmatch ("http://", filename))... + || ~isempty (strmatch ("ftp://", filename)) || ~isempty (strmatch ("www://", filename))) + # Seems in proper shape for OOo (at first sight) + else + # Transform into URL form + if (ispc) + fname = canonicalize_file_name (strsplit (filename, filesep){end}); + else + fname = make_absolute_filename (strsplit (filename, filesep){end}); + endif + # On Windows, change backslash file separator into forward slash + if (strcmp (filesep, "\\")) + tmp = strsplit (fname, filesep); + flen = numel (tmp); + tmp(2:2:2*flen) = tmp; + tmp(1:2:2*flen) = '/'; + filename = [ 'file://' tmp{:} ]; + endif + endif endif + # Preprocessing / -checking ready. Assign filename arg to file ptr struct + ods.filename = filename; endif endif endfor Modified: trunk/octave-forge/main/io/inst/odsopen.m =================================================================== --- trunk/octave-forge/main/io/inst/odsopen.m 2012-09-02 22:39:41 UTC (rev 10954) +++ trunk/octave-forge/main/io/inst/odsopen.m 2012-09-03 19:51:31 UTC (rev 10955) @@ -93,6 +93,9 @@ ## 2012-02-26 Added ";" to suppress echo of filename f UNO ## 2012-06-06 Made interface checking routine less verbose when same requested interface ## was used consecutively +## 2012-09-03 (in UNO section) replace canonicalize_file_name on non-Windows to +## make_absolute_filename (see bug #36677) +## '' (in UNO section) web adresses need only two consecutive slashes ## ## Latest change on subfunctions below: 2012-06-08 @@ -263,12 +266,18 @@ if (odsinterfaces.UNO && ~odssupport) # First the file name must be transformed into a URL - if (~isempty (strmatch ("file:///", filename)) || ~isempty (strmatch ("http:///", filename))... - || ~isempty (strmatch ("ftp:///", filename)) || ~isempty (strmatch ("www:///", filename))) + if (~isempty (strmatch ("file:///", filename)) || ~isempty (strmatch ("http://", filename))... + || ~isempty (strmatch ("ftp://", filename)) || ~isempty (strmatch ("www://", filename))) # Seems in proper shape for OOO (at first sight) else # Transform into URL form - fname = canonicalize_file_name (strsplit (filename, filesep){end}); + ## FIXME make_absolute_filename() doesn't work across drive(-letters) so + ## until it is fixed we'll fall back on canonicalize_file_name() there + if (ispc) + fname = canonicalize_file_name (strsplit (filename, filesep){end}); + else + fname = make_absolute_filename (strsplit (filename, filesep){end}); + endif # On Windows, change backslash file separator into forward slash if (strcmp (filesep, "\\")) tmp = strsplit (fname, filesep); Modified: trunk/octave-forge/main/io/inst/xlsclose.m =================================================================== --- trunk/octave-forge/main/io/inst/xlsclose.m 2012-09-02 22:39:41 UTC (rev 10954) +++ trunk/octave-forge/main/io/inst/xlsclose.m 2012-09-03 19:51:31 UTC (rev 10955) @@ -71,208 +71,216 @@ ## 2011-05-18 Added experimental UNO support, incl. saving newly created files ## 2011-09-08 Bug fix in check for filename input arg ## 2012-01-26 Fixed "seealso" help string +## 2012-09-03 (in UNO section) replace canonicalize_file_name on non-Windows to +## make_absolute_filename (see bug #36677) +## '' (in UNO section) web adresses need only two consecutive slashes function [ xls ] = xlsclose (xls, varargs) - force = 0; + force = 0; - if (nargin > 1) - for ii=2:nargin - if (strcmp (lower (varargin{ii}), "force")) - # Close .ods anyway even if write errors occur - force = 1; - elseif (~isempty (strfind (tolower (varargin{ii}), '.'))) - # Apparently a file name - if (xls.changed == 0 || xls.changed > 2) - printf ("File %s wasn't changed, new filename ignored.", xls.filename); - elseif (strcmp (xls.xtype, 'JXL')) - error ("JXL doesn't support changing filename, new filename ignored."); - elseif ~((strcmp (xls.xtype, 'COM') || strcmp (xls.xtype, 'UNO')) && isempty (strfind ( lower (filename), '.xls'))) - # Excel/ActiveX && OOo (UNO bridge) will write any valid filetype; POI/JXL/OXS need .xls[x] - error ('.xls or .xlsx extension lacking in filename %s', filename); - else - ### For multi-user environments, uncomment below AND relevant stanza in xlsopen - # In case of COM, be sure to first close the open workbook - #if (strcmp (xls.xtype, 'COM')) - # xls.app.Application.DisplayAlerts = 0; - # xls.workbook.close(); - # xls.app.Application.DisplayAlerts = 0; - #endif - if (strcmp (xls.xtype, 'UNO')) - # If needed, turn filename into URL - if (~isempty (strmatch ("file:///", filename)) || ~isempty (strmatch ("http:///", filename))... - || ~isempty (strmatch ("ftp:///", filename)) || ~isempty (strmatch ("www:///", filename))) - # Seems in proper shape for OOo (at first sight) - else - # Transform into URL form - fname = canonicalize_file_name (strsplit (filename, filesep){end}); - # On Windows, change backslash file separator into forward slash - if (strcmp (filesep, "\\")) - tmp = strsplit (fname, filesep); - flen = numel (tmp); - tmp(2:2:2*flen) = tmp; - tmp(1:2:2*flen) = '/'; - filename = [ 'file://' tmp{:} ]; - endif - endif - endif + if (nargin > 1) + for ii=2:nargin + if (strcmp (lower (varargin{ii}), "force")) + # Close .ods anyway even if write errors occur + force = 1; + elseif (~isempty (strfind (tolower (varargin{ii}), '.'))) + # Apparently a file name. First some checks.... + if (xls.changed == 0 || xls.changed > 2) + warning ("File %s wasn't changed, new filename ignored.", xls.filename); + elseif (strcmp (xls.xtype, 'JXL')) + error ("JXL doesn't support changing filename, new filename ignored."); + elseif ~((strcmp (xls.xtype, 'COM') || strcmp (xls.xtype, 'UNO')) && isempty (strfind ( lower (filename), '.xls'))) + # Excel/ActiveX && OOo (UNO bridge) will write any valid filetype; POI/JXL/OXS need .xls[x] + error ('.xls or .xlsx suffix lacking in filename %s', filename); + else + ### For multi-user environments, uncomment below AND relevant stanza in xlsopen + # In case of COM, be sure to first close the open workbook + #if (strcmp (xls.xtype, 'COM')) + # xls.app.Application.DisplayAlerts = 0; + # xls.workbook.close(); + # xls.app.Application.DisplayAlerts = 0; + #endif + # All checks passed + if (strcmp (xls.xtype, 'UNO')) + # If needed, turn filename into URL + if (~isempty (strmatch ("file:///", filename)) || ~isempty (strmatch ("http://", filename))... + || ~isempty (strmatch ("ftp://", filename)) || ~isempty (strmatch ("www://", filename))) + # Seems in proper shape for OOo (at first sight) + else + # Transform into URL form + if (ispc) + fname = canonicalize_file_name (strsplit (filename, filesep){end}); + else + fname = make_absolute_filename (strsplit (filename, filesep){end}); + endif + # On Windows, change backslash file separator into forward slash + if (strcmp (filesep, "\\")) + tmp = strsplit (fname, filesep); + flen = numel (tmp); + tmp(2:2:2*flen) = tmp; + tmp(1:2:2*flen) = '/'; + filename = [ 'file://' tmp{:} ]; + endif + endif + endif # Preprocessing / -checking ready. Assign filename arg to file ptr struct - xls.filename = filename; - endif - endif - endfor - endif + xls.filename = filename; + endif + endif + endfor + endif - if (strcmp (xls.xtype, 'COM')) - # If file has been changed, write it out to disk. - # - # Note: COM / VB supports other Excel file formats as FileFormatNum: - # 4 = .wks - Lotus 1-2-3 / Microsoft Works - # 6 = .csv - # -4158 = .txt - # 36 = .prn - # 50 = .xlsb - xlExcel12 (Excel Binary Workbook in 2007 with or without macro's) - # 51 = .xlsx - xlOpenXMLWorkbook (without macro's in 2007) - # 52 = .xlsm - xlOpenXMLWorkbookMacroEnabled (with or without macro's in 2007) - # 56 = .xls - xlExcel8 (97-2003 format in Excel 2007) - # (see Excel Help, VB reference, Enumerations, xlFileType) - - # xls.changed = 0: no changes: just close; - # 1: existing file with changes: save, close. - # 2: new file with data added: save, close - # 3: new file, no added added (empty): close & delete on disk + if (strcmp (xls.xtype, 'COM')) + # If file has been changed, write it out to disk. + # + # Note: COM / VB supports other Excel file formats as FileFormatNum: + # 4 = .wks - Lotus 1-2-3 / Microsoft Works + # 6 = .csv + # -4158 = .txt + # 36 = .prn + # 50 = .xlsb - xlExcel12 (Excel Binary Workbook in 2007 with or without macro's) + # 51 = .xlsx - xlOpenXMLWorkbook (without macro's in 2007) + # 52 = .xlsm - xlOpenXMLWorkbookMacroEnabled (with or without macro's in 2007) + # 56 = .xls - xlExcel8 (97-2003 format in Excel 2007) + # (see Excel Help, VB reference, Enumerations, xlFileType) + + # xls.changed = 0: no changes: just close; + # 1: existing file with changes: save, close. + # 2: new file with data added: save, close + # 3: new file, no added added (empty): close & delete on disk - xls.app.Application.DisplayAlerts = 0; - try - if (xls.changed > 0 && xls.changed < 3) - if (xls.changed == 2) - # Probably a newly created, or renamed, Excel file - printf ("Saving file %s ...\n", xls.filename); - xls.workbook.SaveAs (canonicalize_file_name (xls.filename)); - elseif (xls.changed == 1) - # Just updated existing Excel file - xls.workbook.Save (); - endif - xls.changed = 0; - xls.workbook.Close (canonicalize_file_name (xls.filename)); - endif - xls.app.Quit (); - delete (xls.workbook); # This statement actually closes the workbook - delete (xls.app); # This statement actually closes down Excel - catch - xls.app.Application.DisplayAlerts = 1; - end_try_catch - - elseif (strcmp (xls.xtype, 'POI')) - if (xls.changed > 0 && xls.changed < 3) - try - xlsout = java_new ("java.io.FileOutputStream", xls.filename); - bufout = java_new ("java.io.BufferedOutputStream", xlsout); - if (xls.changed == 2) printf ("Saving file %s...\n", xls.filename); endif - xls.workbook.write (bufout); - bufout.flush (); - bufout.close (); - xlsout.close (); - xls.changed = 0; - catch -# xlsout.close (); - end_try_catch - endif + xls.app.Application.DisplayAlerts = 0; + try + if (xls.changed > 0 && xls.changed < 3) + if (xls.changed == 2) + # Probably a newly created, or renamed, Excel file + printf ("Saving file %s ...\n", xls.filename); + xls.workbook.SaveAs (canonicalize_file_name (xls.filename)); + elseif (xls.changed == 1) + # Just updated existing Excel file + xls.workbook.Save (); + endif + xls.changed = 0; + xls.workbook.Close (canonicalize_file_name (xls.filename)); + endif + xls.app.Quit (); + delete (xls.workbook); # This statement actually closes the workbook + delete (xls.app); # This statement actually closes down Excel + catch + xls.app.Application.DisplayAlerts = 1; + end_try_catch + + elseif (strcmp (xls.xtype, 'POI')) + if (xls.changed > 0 && xls.changed < 3) + try + xlsout = java_new ("java.io.FileOutputStream", xls.filename); + bufout = java_new ("java.io.BufferedOutputStream", xlsout); + if (xls.changed == 2) printf ("Saving file %s...\n", xls.filename); endif + xls.workbook.write (bufout); + bufout.flush (); + bufout.close (); + xlsout.close (); + xls.changed = 0; + catch +# xlsout.close (); + end_try_catch + endif - elseif (strcmp (xls.xtype, 'JXL')) - if (xls.changed > 0 && xls.changed < 3) - try - if (xls.changed == 2) printf ("Saving file %s...\n", xls.filename); endif - xls.workbook.write (); - xls.workbook.close (); - if (xls.changed == 3) - # Upon entering write mode, JExcelAPI always makes a disk file - # Incomplete new files (no data added) had better be deleted. - xls.workbook.close (); - delete (xls.filename); - endif - xls.changed = 0; - catch - end_try_catch - endif + elseif (strcmp (xls.xtype, 'JXL')) + if (xls.changed > 0 && xls.changed < 3) + try + if (xls.changed == 2) printf ("Saving file %s...\n", xls.filename); endif + xls.workbook.write (); + xls.workbook.close (); + if (xls.changed == 3) + # Upon entering write mode, JExcelAPI always makes a disk file + # Incomplete new files (no data added) had better be deleted. + xls.workbook.close (); + delete (xls.filename); + endif + xls.changed = 0; + catch + end_try_catch + endif - elseif (strcmp (xls.xtype, 'OXS')) - if (xls.changed > 0 && xls.changed < 3) - try - xlsout = java_new ("java.io.FileOutputStream", xls.filename); - bufout = java_new ("java.io.BufferedOutputStream", xlsout); - if (xls.changed == 2) printf ("Saving file %s...\n", xls.filename); endif - xls.workbook.writeBytes (bufout); - xls.workbook.close (); - bufout.flush (); - bufout.close (); - xlsout.close (); - xls.changed = 0; - catch -# xlsout.close (); - end_try_catch - else - xls.workbook.close (); - endif + elseif (strcmp (xls.xtype, 'OXS')) + if (xls.changed > 0 && xls.changed < 3) + try + xlsout = java_new ("java.io.FileOutputStream", xls.filename); + bufout = java_new ("java.io.BufferedOutputStream", xlsout); + if (xls.changed == 2) printf ("Saving file %s...\n", xls.filename); endif + xls.workbook.writeBytes (bufout); + xls.workbook.close (); + bufout.flush (); + bufout.close (); + xlsout.close (); + xls.changed = 0; + catch +# xlsout.close (); + end_try_catch + else + xls.workbook.close (); + endif - elseif (strcmp (xls.xtype, 'UNO')) - # Java & UNO bridge - try - if (xls.changed && xls.changed < 3) - # Workaround: - unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.frame.XModel'); - xModel = xls.workbook.queryInterface (unotmp); - unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.util.XModifiable'); - xModified = xModel.queryInterface (unotmp); - if (xModified.isModified ()) - unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.frame.XStorable'); # isReadonly() ? - xStore = xls.app.xComp.queryInterface (unotmp); - if (xls.changed == 2) - # Some trickery as Octave Java cannot create non-numeric arrays - lProps = javaArray ('com.sun.star.beans.PropertyValue', 1); - lProp = java_new ('com.sun.star.beans.PropertyValue', "Overwrite", 0, true, []); - lProps(1) = lProp; - # OK, store file - xStore.storeAsURL (xls.filename, lProps); - else - xStore.store (); - endif - endif - endif - xls.changed = -1; # Needed for check on properly shutting down OOo - # Workaround: - unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.frame.XModel'); - xModel = xls.app.xComp.queryInterface (unotmp); - unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.util.XCloseable'); - xClosbl = xModel.queryInterface (unotmp); - xClosbl.close (true); - unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.frame.XDesktop'); - xDesk = xls.app.aLoader.queryInterface (unotmp); - xDesk.terminate(); - xls.changed = 0; - catch - if (force) - # Force closing OOo - unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.frame.XDesktop'); - xDesk = xls.app.aLoader.queryInterface (unotmp); - xDesk.terminate(); - else - warning ("Error closing xls pointer (UNO)"); - endif - return - end_try_catch + elseif (strcmp (xls.xtype, 'UNO')) + # Java & UNO bridge + try + if (xls.changed && xls.changed < 3) + # Workaround: + unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.frame.XModel'); + xModel = xls.workbook.queryInterface (unotmp); + unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.util.XModifiable'); + xModified = xModel.queryInterface (unotmp); + if (xModified.isModified ()) + unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.frame.XStorable'); # isReadonly() ? + xStore = xls.app.xComp.queryInterface (unotmp); + if (xls.changed == 2) + # Some trickery as Octave Java cannot create non-numeric arrays + lProps = javaArray ('com.sun.star.beans.PropertyValue', 1); + lProp = java_new ('com.sun.star.beans.PropertyValue', "Overwrite", 0, true, []); + lProps(1) = lProp; + # OK, store file + xStore.storeAsURL (xls.filename, lProps); + else + xStore.store (); + endif + endif + endif + xls.changed = -1; # Needed for check on properly shutting down OOo + # Workaround: + unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.frame.XModel'); + xModel = xls.app.xComp.queryInterface (unotmp); + unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.util.XCloseable'); + xClosbl = xModel.queryInterface (unotmp); + xClosbl.close (true); + unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.frame.XDesktop'); + xDesk = xls.app.aLoader.queryInterface (unotmp); + xDesk.terminate(); + xls.changed = 0; + catch + if (force) + # Force closing OOo + unotmp = java_new ('com.sun.star.uno.Type', 'com.sun.star.frame.XDesktop'); + xDesk = xls.app.aLoader.queryInterface (unotmp); + xDesk.terminate(); + else + warning ("Error closing xls pointer (UNO)"); + endif + return + end_try_catch -# elseif <other interfaces here> - - endif +# elseif <other interfaces here> + + endif - if (xls.changed && xls.changed < 3) - warning (sprintf ("File %s could not be saved. Read-only or in use elsewhere?\nFile pointer preserved.", xls.filename)); - if (force) - xls = []; - endif - else - xls = []; - endif + if (xls.changed && xls.changed < 3) + warning (sprintf ("File %s could not be saved. Read-only or in use elsewhere?\nFile pointer preserved.", xls.filename)); + if (force) + xls = []; + endif + else + xls = []; + endif endfunction Modified: trunk/octave-forge/main/io/inst/xlsopen.m =================================================================== --- trunk/octave-forge/main/io/inst/xlsopen.m 2012-09-02 22:39:41 UTC (rev 10954) +++ trunk/octave-forge/main/io/inst/xlsopen.m 2012-09-03 19:51:31 UTC (rev 10955) @@ -108,8 +108,11 @@ ## 2012-06-06 Improved interface detection logic. No more messages if same interface is ## requested & used consecutively ## 2012-06-07 Fixed mixed-up lastintf assignments for POI and JXL +## 2012-09-02 (in UNO section) web adresses need only two consecutive slashes +## 2012-09-03 (in UNO section) replace canonicalize_file_name on non-Windows to +## make_absolute_filename (see bug #36677) ## -## Latest subfunction update: 2012-06-06 +## Latest subfunction update: 2012-09-03 function [ xls ] = xlsopen (filename, xwrite=0, reqinterface=[]) @@ -327,12 +330,18 @@ if (xlsinterfaces.UNO && ~xlssupport) # First, the file name must be transformed into a URL - if (~isempty (strmatch ("file:///", filename)) || ~isempty (strmatch ("http:///", filename))... - || ~isempty (strmatch ("ftp:///", filename)) || ~isempty (strmatch ("www:///", filename))) + if (~isempty (strmatch ("file:///", filename)) || ~isempty (strmatch ("http://", filename))... + || ~isempty (strmatch ("ftp://", filename)) || ~isempty (strmatch ("www://", filename))) # Seems in proper shape for OOo (at first sight) else - # Transform into URL form - fname = canonicalize_file_name (strsplit (filename, filesep){end}); + # Transform into URL form. + ## FIXME make_absolute_filename() doesn't work across drive(-letters) so + ## until it is fixed we'll fall back on canonicalize_file_name() there + if (ispc) + fname = canonicalize_file_name (strsplit (filename, filesep){end}); + else + fname = make_absolute_filename (strsplit (filename, filesep){end}); + endif # On Windows, change backslash file separator into forward slash if (strcmp (filesep, "\\")) tmp = strsplit (fname, filesep); @@ -468,6 +477,7 @@ ## '' Improved logic for finding out what interfaces to check ## '' Fixed bugs with Java interface checking (tmp1 initialization) ## 2012-06-06 Improved & simplified Java check code +## 2012-09-03 Check for matching .jar names & javaclasspath was reversed (oops) function [xlsinterfaces] = getxlsinterfaces (xlsinterfaces) @@ -558,7 +568,7 @@ # under Windows we need the following more subtle, platform-independent approach: for ii=1:length (jcp) for jj=1:length (entries1) - if (isempty (strfind (tolower (jcp{ii}), entries1{jj}))), ++jpchk1; endif + if (~isempty (strfind (tolower (jcp{ii}), entries1{jj}))), ++jpchk1; endif endfor endfor if (jpchk1 > 1) @@ -569,7 +579,7 @@ jpchk2 = 0; entries2 = {"xbean", "poi-ooxml-schemas", "dom4j"}; for ii=1:length (jcp) for jj=1:length (entries2) - if (isempty (strfind (lower (jcp{ii}), entries2{jj}))), ++jpchk2; endif + if (~isempty (strfind (lower (jcp{ii}), entries2{jj}))), ++jpchk2; endif endfor endfor if (jpchk2 > 2), printf (" (& OOXML)"); endif @@ -584,7 +594,7 @@ jpchk = 0; entries = {"jxl"}; for ii=1:length (jcp) for jj=1:length (entries) - if (isempty (strfind (lower (jcp{ii}), entries{jj}))), ++jpchk; endif + if (~isempty (strfind (lower (jcp{ii}), entries{jj}))), ++jpchk; endif endfor endfor if (jpchk > 0) @@ -600,7 +610,7 @@ jpchk = 0; entries = {"openxls"}; for ii=1:length (jcp) for jj=1:length (entries) - if (isempty (strfind (lower (jcp{ii}), entries{jj}))), ++jpchk; endif + if (~isempty (strfind (lower (jcp{ii}), entries{jj}))), ++jpchk; endif endfor endfor if (jpchk > 0) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |