From: <prn...@us...> - 2011-09-18 16:24:21
|
Revision: 8554 http://octave.svn.sourceforge.net/octave/?rev=8554&view=rev Author: prnienhuis Date: 2011-09-18 16:24:15 +0000 (Sun, 18 Sep 2011) Log Message: ----------- Added warning message about experimental status of UNO interface Modified Paths: -------------- trunk/octave-forge/main/io/inst/odsopen.m trunk/octave-forge/main/io/inst/xlsopen.m Modified: trunk/octave-forge/main/io/inst/odsopen.m =================================================================== --- trunk/octave-forge/main/io/inst/odsopen.m 2011-09-18 16:23:11 UTC (rev 8553) +++ trunk/octave-forge/main/io/inst/odsopen.m 2011-09-18 16:24:15 UTC (rev 8554) @@ -90,7 +90,7 @@ ## 2011-09-03 Reset chkintf if no ods support was found to allow full interface rediscovery ## (otherwise javaclasspath additions will never be picked up) ## -## Latest change on subfunction below: 2011-09-03 +## Latest change on subfunctions below: 2011-09-18 function [ ods ] = odsopen (filename, rw=0, reqinterface=[]) @@ -292,7 +292,7 @@ ods.filename = filename; ods.xtype = 'UNO'; ods.app.xComp = xComp; # Needed to be able to close soffice in odsclose() - ods.app.aLoader = aLoader; # Needed to be able to close soffice in odsclose() + ods.app.aLoader = aLoader; # Needed to be able to close soffice in odsclose() ods.odfvsn = 'UNO'; odssupport += 4; catch @@ -387,11 +387,12 @@ ## " Tamed down verbosity ## 2011-09-03 Fixed order of odsinterfaces.<member> statement in Java detection try-catch ## " Reset tmp1 (always allow interface rediscovery) for empty odsinterfaces arg +## 2011-09-18 Added temporary warning about UNO interface - function [odsinterfaces] = getodsinterfaces (odsinterfaces) persistent tmp1 = []; persistent jcp; + persistent uno_1st_time = []; if (isempty (odsinterfaces.OTK) && isempty (odsinterfaces.JOD) && isempty (odsinterfaces.UNO)) # Assume no interface detection has happened yet @@ -519,5 +520,16 @@ # ---- Other interfaces here, similar to the ones above if (deflt), printf ("(* = active interface)\n"); endif + + ## FIXME the below stanza should be dropped once UNO is stable. + # Echo a suitable warning about experimental status: + if (isempty (uno_1st_time) && odsinterfaces.UNO); + uno_1st_time = 1; + printf ("\nPLEASE NOTE: UNO (=OpenOffice.org-behind-the-scenes) is EXPERIMENTAL\n"); + printf ("After you've opened a spreadsheet file using the UNO interface,\n"); + printf ("odsclose on that file will kill ALL OpenOffice.org invocations,\n"); + printf ("also those that were started outside and/or before Octave!\n"); + printf ("Trying to quit Octave w/o invoking odsclose will only hang Octave.\n\n"); + endif endfunction Modified: trunk/octave-forge/main/io/inst/xlsopen.m =================================================================== --- trunk/octave-forge/main/io/inst/xlsopen.m 2011-09-18 16:23:11 UTC (rev 8553) +++ trunk/octave-forge/main/io/inst/xlsopen.m 2011-09-18 16:24:15 UTC (rev 8554) @@ -50,7 +50,7 @@ ## interface that otherwise is automatically selected by xlsopen. Currently ## implemented interfaces (in order of preference) are 'COM' (Excel/COM), ## 'POI' (Java/Apache POI), 'JXL' (Java/JExcelAPI), 'OXS' (Java/OpenXLS), or -## 'UNO' (Java/OpenOffice.org). +## 'UNO' (Java/OpenOffice.org - EXPERIMENTAL!). ## In most situations this parameter is unneeded as xlsopen automatically ## selects the most useful interface present. ## @@ -104,7 +104,7 @@ ## rediscovery of interfaces between xlsopen calls, e.g. javaclasspath changes) ## 2011-09-08 Minor code cleanup ## -## 2011-09-03 Latest subfunction update +## 2011-09-18 Latest subfunction update function [ xls ] = xlsopen (filename, xwrite=0, reqinterface=[]) @@ -447,11 +447,13 @@ ## 2011-09-03 Fixed order of xlsinterfaces.<member> statements in Java detection try-catch ## '' Reset tmp1 (always allow interface rediscovery) for empty xlsinterfaces arg ## 2011-09-08 Minor code cleanup +## 2011-09-18 Added temporary warning about UNO interface function [xlsinterfaces] = getxlsinterfaces (xlsinterfaces) # tmp1 = [] (not initialized), 0 (No Java detected), or 1 (Working Java found) persistent tmp1 = []; persistent jcp; # Java class path + persistent uno_1st_time; if (isempty (xlsinterfaces.COM) && isempty (xlsinterfaces.POI) && isempty (xlsinterfaces.JXL) && isempty (xlsinterfaces.OXS)) printf ("Detected interfaces: "); @@ -602,4 +604,15 @@ if (deflt), printf ("(* = active interface)\n"); endif + ## FIXME the below stanza should be dropped once UNO is stable. + # Echo a suitable warning about experimental status: + if (isempty (uno_1st_time) && xlsinterfaces.UNO); + uno_1st_time = 1; + printf ("\nPLEASE NOTE: UNO (=OpenOffice.org-behind-the-scenes) is EXPERIMENTAL\n"); + printf ("After you've opened a spreadsheet file using the UNO interface,\n"); + printf ("xlsclose on that file will kill ALL OpenOffice.org invocations,\n"); + printf ("also those that were started outside and/or before Octave!\n"); + printf ("Trying to quit Octave w/o invoking xlsclose will only hang Octave.\n\n"); + endif + endfunction \ No newline at end of file This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |