Mercurial > forge
changeset 12404:a7500b0ccda0 octave-forge
Add some extra delay for OCT writing to give zip a breath
author | prnienhuis |
---|---|
date | Tue, 18 Mar 2014 22:32:42 +0000 |
parents | a8a4133c1823 |
children | 8f8a0e518752 |
files | main/io/inst/io_xls_testscript.m |
diffstat | 1 files changed, 16 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/main/io/inst/io_xls_testscript.m Tue Mar 18 22:31:26 2014 +0000 +++ b/main/io/inst/io_xls_testscript.m Tue Mar 18 22:32:42 2014 +0000 @@ -1,4 +1,4 @@ -## Copyright (C) 2012,2013 Philip Nienhuis +## Copyright (C) 2012,2013,2014 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 @@ -60,20 +60,21 @@ isuno = false; dly = 0.25; - if (strcmpi (intf, 'oct')) - ## FIXME commented out/replaced until UNO & OXS OOXML write support is fixed -## if (isempty (intf2)) - if (isempty (intf2) || ! strcmpi (intf2, "com")) - intf2 = 'poi'; - endif - printf ("OCT interface has no write support enabled - writing is done with %s.\n", intf2); - endif +% if (strcmpi (intf, 'oct')) +% ## FIXME commented out/replaced until UNO & OXS OOXML write support is fixed +%## if (isempty (intf2)) +% if (isempty (intf2) || ! strcmpi (intf2, "com")) +% intf2 = 'poi'; +% endif +% printf ("OCT interface has no write support enabled - writing is done with %s.\n", intf2); +% endif ## If no intf2 is supplied, write with intf1 if (isempty (intf2)) intf2 = intf; endif ## Allow the OS some delay to accomodate for file operations (zipping etc.) - if (strcmpi (intf, "uno") || strcmpi (intf2, "uno")); + if (strcmpi (intf, "uno") || strcmpi (intf2, "uno") || + strcmpi (intf, "oct") || strcmpi (intf2, "oct")); isuno = true; endif @@ -99,6 +100,10 @@ xlswrite (fname, arr2, 'Testsheet', 'd4:z20', intf2); if (isuno) sleep (dly); + if (strcmpi (intf, "oct") || strcmpi (intf2, "oct")) + ## Some more delay to give zip a breath + sleep (dly); sleep (dly); + endif endif ## 4. Insert another sheet @@ -123,7 +128,7 @@ if (strcmpi (crange, "A1:A1")) crange = '' endif - + ## 6. Read data back printf ("\n 6. Read data back.\n"); [num, txt, raw, lims] = xlsread (fname, shnr, crange, intf);