summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-04-27tdf#90133 Extend ODF: exponent sign of scientific formatLaurent Balland-Poirier5-4/+30
Scientific Format without sign in exponent, such as 0.00E0, are managed by LibO, and can be saved in XLS format This commit allows to save in ODF Change-Id: Ia0c4589e2af942543ea296f970d163bc1d1d6f05 Reviewed-on: https://gerrit.libreoffice.org/14955 Reviewed-by: Eike Rathke <erack@redhat.com> Tested-by: Eike Rathke <erack@redhat.com>
2015-04-15fix crash on export of fdo68639-2.ods to xls with invalid mnLastIdxCaolán McNamara1-4/+8
mnLastIdx doesn't get reset when the color list is reset, the code already acknowledges that mnLastIdx is the last set index but that it may not be a valid position, so only set rnIndex if mnLastIdx is valid and the data at that pos is the desired data. Change-Id: I57ce32fd1a13bfe9049ed94be34229c8c2808b8e
2015-04-07fix crash on re-export of fdo64646-4.xls back to xlsCaolán McNamara1-5/+7
Change-Id: Ic6d6e7d7d8d42af0fc739d964a1190d40f9dba2e
2015-03-26Revert "tdf#89319 remove redundant file seekings in XLS export"Eike Rathke1-4/+1
As the crash tests have shown, the assert introduced with 71b630e5b683b3761af9d6bdce56f13f20da84c1 to force verification of the assumption made in 8e2293e06adba3f22e824acad99983fb5b997e4d was hit in 120 documents. Citing from https://gerrit.libreoffice.org/#/c/14427/ comment: "The assumptions behind this patch are wrong. This only works if every single part of the export goes through StartRecord/EndRecord calls. We have some features that don't use that and need the STREAM_SEEK_TO_END in the beginning of the StartRecord." Revert "replace an OSL_ENSURE() with assert(), tdf#89319 related" This reverts commit 71b630e5b683b3761af9d6bdce56f13f20da84c1. Revert "tdf#89319 remove redundant file seekings in XLS export" This reverts commit 8e2293e06adba3f22e824acad99983fb5b997e4d.
2015-03-10Fix issue in re-use of ScTokenArray objects from a TokenPoolTor Lillqvist3-1/+8
The TokenPool::operator[] is used to initialise and take into use an object from the pool. Which is a fascinating thing as such and probably not entirely in good style. Anyway, the objects in the pool are of type ScTokenArray, a class derived from FormulaTokenArray. The operator[] called the FormulaTokenArray::Clear() function to initialise the object. This left the fields added in ScTokenArray uninitialised, having whatever value the previous use of the object had set. Which of course is bad. In practice, this showed up in the handling of formulas in the .xls input filter. If an earlier (or the first?) formula had happened to be one for which we don't want to use OpenCL, the meVectorState of its ScTokenArray object in the pool had been set to FormulaVectorDisabled. When the same pool object was later re-used for another formula, it kept that same meVectorState, even if there was no reason to. Thus formula groups that should have been OpenCL accelerated weren't. This can have a significant impact on performance of document loading and recalculation for large documents. I added a function to ScTokenArray to clear (initialise) such an object, both the FormulaTokenArray part and the ScTokenArray-specific part, and call that instead. This fixes the issue. I named the added function ClearScTokenArray() to make it clear that it is a separate function. Sure, possibly Clear() should be made into a virtual of FormulaTokenArry and overridden in ScTokenArray, and the overriding Clear() would first call the base class's Clear(). But I can't be sure that there aren't other calls of FormulaTokenArray::Clear() that *must* mean the base class one. Better safe than sorry. And of course, I did *not* want to name the function in ScTokenArray also "Clear()", like in the base class, without it being virtual. That is horrible style in my opinion, even if there certainly is precedence for such even in the very same classes, i.e. the Clone() function... Change-Id: I0e0e13e5ca705603005a1e0a46866f095cd2ac4d
2015-02-12tdf#89281 fix performance regression of XLS import - cleanupLászló Németh3-33/+49
Change-Id: I6d7f279732d9992d584aab96c3a747d6e6130147
2015-02-11tdf#89319 remove redundant file seekings in XLS exportLászló Németh1-1/+4
Normally StartRecord() is called with closed records and with end position of the stream set by EndRecord(), so the mrStrm.Seek( STREAM_SEEK_TO_END ) in the InitRecord() is a redundant call. The patch removes this call, and sets it only for the non redundant cases: when there is an unclosed record in StartRecord() or a continue record in StartContinue(). Change-Id: Iecbcaf01cbfe6094fa73d5ed41dba5f01417edb3
2015-02-10tdf#89281 fix performance regression of XLS importLászló Németh3-13/+38
The fix for Bug 76611 caused ~20% performance loss in XLS import. With optional cloning of ScTokenArray of the shared XLS formulas depending on the need of address wrapping, it is possible to gain back near the original performance. Note: The original patch for Bug 76611 has already got an unit test, too (see wrapped-refs.xls), and that unit test works with this improved patch, too. Change-Id: Ibfb59d1543ef9c4b8a075d5c4e37f77ab451aaa0
2014-12-29handle relative refs correctly in xls import, fdo#80091Markus Mohrhard1-2/+5
Change-Id: Ia70f96e1d31e71c56f03c828be0a4e49fff4b198
2014-11-30don't call XLSX methods in XLS export, related fdo#59762Markus Mohrhard1-8/+14
This should fix a huge number of our xls export crashes. I just picked my test document for the commit message. I suppose that nearly all reported XLS export crashes are the same issue. At the same time this should improve the performance of our XLS and XLSX export a bit. Change-Id: Id19e2515e75e10527d3af62d671377bec23f99e8
2014-11-20No need to start listening in CalcAfterLoad for xls import.Kohei Yoshida9-16/+21
We do that prior to it, and in fact, doing it here would unregister all group area listeners and re-register non-group ones, which is massively slower with huge documents. Change-Id: I693f681df05f036eb1aa53554e601066c469f49a
2014-10-25bnc#893791 XLS export: external sheet references on Linux/OSXAndras Timar3-0/+32
The commit solves two problems. 1. Make sure we save absolute paths on Linux/OSX 2. Make sure we don't save invalid XLS (VirtualPath longer than 255 chars) The first problem has always been there, so after a few load/save cycles an XLS with reference to other XLS on a Unix-like file system became invalid, and only LibreOffice could open it, Excel could not. These broken XLS files can be repaired by saving after this patch, however, the original reference will remain broken. Change-Id: I8f575acb1d560d539c1da61a1afdaac3f0c13977
2014-07-18bnc#885548: Add test for import / export of revisions for xlsx.Kohei Yoshida2-5/+23
It's the same test as with the xls variant. Change-Id: Ice3d3c34213cc521e2782ef0f98d28d135c72fbe
2014-07-14Preserve the "end of list" flag for xls round-tripping.Kohei Yoshida6-38/+69
This "end of list" flag determines whether the row insertion was an automatic insertion at the bottom. Calc doesn't use this at the moment but Excel uses it to differentiate a normal row insertion from an automatic one. Change-Id: I6b28669d816c54d1dc1e4c106918ba688415788d
2014-07-14Write test for change track round-tripping for xls file format.Kohei Yoshida2-1/+161
Change-Id: I127879c4f1b6d3605ff800c3f3aa3929a098fead
2014-07-08avoid problems detecting HTML files with .xls ext.David Tardon3-4/+38
Change-Id: I9955223aac20f3f640fde51bb7231666c269ca70
2014-07-07fdo#80955 make calc_MS_Excel_97 filter default for xls ext.David Tardon1-1/+1
Change-Id: I8fa095b45ea2fe1a07c1660d2efc24c73f7082da
2014-05-23sw: Properly embed .xls sheets in .docx documentsJacobo Aragunde Pérez1-1/+7
Word requires exactly the right relationship and content types to open embedded documents properly. The case of xls sheets is different from xlsx so we added it to the exporter. We know if the file is a xls or xlsx using the ProgID field: ProgID="Excel.Sheet.8" -> Excel version 8 -> xls ProgID="Excel.Sheet.12" -> Excel version 12 -> xlsx Change-Id: I80bae0eadd4af2fb9793c8f6581b3f288fb42c09
2014-04-25added .xlsx .xls .ods export/reimport tests for new spreadsheet functionsEike Rathke3-114/+159
Change-Id: I71baaf27a16e60eb11f80f61664fc09dcf047cf1
2014-04-14fdo#76294: Properly intern string literals in formula on xls import.Kohei Yoshida26-61/+114
Change-Id: Ib3a442cbb68c23294762561f2911101a087a795e
2014-04-11corrected copy&paste errorEike Rathke1-2/+2
WORKDAY.INTL was erroneously saved as NETWORKDAYS.INTL in .xls BIFF Change-Id: I23d7b4fb7382cfd640d1a0a19a81c4839488c1ce
2014-03-25added unit test for .xls BIFF enhanced protectionEike Rathke2-0/+20
Change-Id: I8f218f8f8ce12525b4c9995567d2864baa610c0b
2014-03-21write enhanced protection to .xls BIFF8 0x0868 Feat recordsEike Rathke5-14/+85
We now have a roundtrip of the EnhancedProtection feature. Change-Id: Ib13b4d23a10dd51d9328de872e076bf58ee3127d
2014-03-18MS-XLS documentation uses big-endian bit diagramsEike Rathke1-1/+1
... so if it says leftmost bit 0 then test for high bit. Change-Id: I260ff09fff66918da887742b5d177715e59548c2
2014-02-20fdo#75130: Export cell borders to xls and xlsx correctly.Kohei Yoshida1-4/+4
Change-Id: Ic629fb4852d2ada9724dfee7618e2436c0fa28a8
2014-02-10fix crash during xls import, related fdo#36580Markus Mohrhard1-2/+2
Looks like a possibly invalid xls file but let us just do the right thing and not crash. Change-Id: Id96db06798cd19d96938ca84956046e5a5e5b529
2014-01-18sc/qa/unit/data/xls/border.xls was removedMatúš Kukan3-3/+0
..in commit a96b6f4708d587ddddd93101e51e52dec4e87b7e Change-Id: I94ea246df8fabee9b0bda579be7698c964958e16
2014-01-17Add border test file for XLSX import.Kohei Yoshida1-0/+0
This is an exactly the same file as the XLS counterpart, only saved as XLSX. Change-Id: I05adcdf26eb031324daf810218e770bdc4dc496c
2013-12-30Resolves: #i123910# reference in validation condition changed...Steve Yin3-0/+22
to #REF! in exported xls file (cherry picked from commit 81912caea58b89f9490ba4b9e3a3127071e23190) Change-Id: Iab560847f4528ffdcc68b365951cc6c55ca9075c
2013-12-02store internal CONVERT to .xlsx/.xls and distinguish from CONVERT_ADDEike Rathke3-3/+19
Change-Id: Ie9b5f6ade1c25618aa990ce17bd7b2a2b46a250a
2013-11-26Test trendline properties using an emport -> ixport cycleTomaž Vajngerl2-0/+161
Added a test which checks the preservation of properties for trendlines / regression curves in an export -> import cycle using different file formats - ODS, XLS and XLSX. Change-Id: I59fe6c045f7f503ee074e6a2741fa017756b3018
2013-11-24Support regression curve name in old binary XLS XP/2k/2k3 format.Tomaž Vajngerl5-2/+30
Change-Id: Ie6f2fd3cce70e4789805e788846d3beb64620a4b
2013-11-24Fix detection of force intercept in XLS 97/2000/XP format.Tomaž Vajngerl1-8/+1
NaN value indicates if the force intercept is enabled or not. Change-Id: I51d33a6e04a4b5832f241e7ae7ee6d2fbb32ea9b
2013-11-02resolved fdo#67536 export internal equivalents as add-in to .xlsEike Rathke3-6/+47
For BIFF .xls export the internal functions that are equivalents of known add-in functions as those add-in functions. Change-Id: If37f616a34fdabb3fa971fddad01da3dc1f28ee9
2013-10-29Test 3 in min_max_avg_recursive_RPN_tests.xls failsI-Jui (Ray) Sung2-1/+4
Testing some fancier nested function invocation involving min() Change-Id: Ia1f6a14ba285d2a5e082dbf4c96f6e5b83cb3654
2013-10-29Testcase for nested function invocation.I-Jui (Ray) Sung2-2/+10
Test 2 in min_max_avg_recursive_RPN_tests.xls fails. Created a small testcase in the tab 1 of sum_ex.xls and adjusted opencl_test.cxx accordingly. Change-Id: I2f98a99bc4c60b2d3a7536dff84dad86b55f7845
2013-10-29Need support of nested function invocationI-Jui (Ray) Sung2-0/+8
Test 1 in min_max_avg_recursive_RPN_tests.xls fails. Extracted to the second tab in sum_ex.xls Change-Id: If87b2edce9bb383d67b56bfcb5c723c57c98e641
2013-10-29Testcase for SumOfProductI-Jui (Ray) Sung1-0/+0
Added a testcase in sum_ex.xls on sum of products of two vectors, one fixed, and the other sliding. This represents a case in column J in stock-history.xls.
2013-10-29Compiler crashed when given ground-water-daily.xlsI-Jui (Ray) Sung1-7/+6
Added the test xls in sc/qa/unit/data/xls/ground-water-daily.xls, also added back a unit test in opencl-test CUT. Looks like the implementation of ocSub is missing. Change-Id: I7599cab9c72d65f5821a9500b5ae25d5b925814f
2013-10-28fdo#68903 Import .tsv and .xls plain text files in Calc by defaultMaxim Monastirsky1-0/+4
Change-Id: I14115542d7f0401f4fa8face9f255b4512fc0ac3 Reviewed-on: https://gerrit.libreoffice.org/6448 Reviewed-by: Kohei Yoshida <libreoffice@kohei.us> Tested-by: Kohei Yoshida <libreoffice@kohei.us>
2013-09-11Use ScDocumentImport to populate cell storage during xls import.Kohei Yoshida12-61/+72
Change-Id: I205c5b7c1202862ea7129fbd61d54e48cd37b06e
2013-09-11Handle import of shared formula from xls more gracefully.Kohei Yoshida2-20/+20
Many xls documents contain shared formula entries that don't follow the spec. We still need to be able to handle them. Change-Id: Ia7d01101a6759967d9ebb27b6540dcb67607d13f
2013-08-14Avoid wholesale rebuilding of formula groups at re-calc time.Kohei Yoshida10-22/+31
And do it once when importing xls, xlsx, and ods documents. Although xls(x) file formats support shared formula natively, it's still beneficial to re-group it as some old xls documents limit the length of shared formula span to only 64, or some don't use shared formulas at all even though they could. And re-grouping just once is not terribly expensive. Change-Id: Iff9c605d19baa187553ddab6af8b9fbd4c366d7d
2013-08-14import/export WEBSERVICE and FILTERXML from/to .xls BIFFEike Rathke1-2/+2
Change-Id: I8bf6cf93a2f9b5daee77f3dd75b0366caa9ec25d
2013-08-12Map shared formula from xls to formula groups, and share the tokens as well.Kohei Yoshida16-118/+159
No more mapping to range names. Change-Id: Ic43b6ef35a91fe4d6fff748ebc22969ba4e036db
2013-07-30Add test for exporting and importing of formula refs from xls format.Kohei Yoshida4-42/+96
Change-Id: I98f17889c8ad19114c055e87f9ab5dc4e864c817
2013-07-30New xls file to write import/export test on. Test not written yet.Kohei Yoshida1-0/+0
Change-Id: Icdb3a0f6b9bfcf327598f52620a35ab423f9be14
2013-07-30Add test for exporting of chart to xls format.Kohei Yoshida9-53/+180
Change-Id: I49adfcabec4b8bafa8f1b25e7771acca9ccf0ead
2013-07-30Add export test for exporting inline arrays to xls format.Kohei Yoshida3-1/+54
Change-Id: I8f6e32adcbd33362f20eca3ce329633bf9fbf039
2013-07-24Work on remving direct access to ScSingleRefData's data members.Kohei Yoshida15-160/+171
This broke the shared formula import from xls and xlsx. Disabling the tests for now. Change-Id: I75d802b00947b21083db19b5c07204a0c3d4f369