Commit Graph

264 Commits

Author SHA1 Message Date
08987b52c8 fpspreadsheet: Use TBufStream as general-purpose stream if woBufStream is set in Worksheet.WritingOptions. woBufStream replaces woSaveMemory. Results in a significant speed enhancement for biff2 (64000x100 cells -> 31 sec without, 1.7 sec with woBufStream).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3337 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 13:23:12 +00:00
42f55e22d7 fpspreadsheet: tests: get empty temp file just before wrtiing out. Coding style: do begin matches initial style+FPC coding style.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3336 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 13:13:56 +00:00
18ae11e3e8 fpspreadsheet: Relax error margin for date/time tests to 10 nsec in order to get success in tests back.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3335 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 10:45:17 +00:00
752b1c95e7 fpspreadsheet: allow margin for error testing writing reading date/time. Test failures from 29 to 6
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3334 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 09:53:48 +00:00
49aa26354e fpspreadsheet: improve temp file handling in tests
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3333 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 09:20:47 +00:00
7f6277ca08 fpspreadsheet: Add unit fpsstreams containing a buffered stream for speed-up of writing in virtual mode.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3331 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-18 22:48:38 +00:00
ed197af6c1 fpspreadsheet: Add another set of unit tests for virtual mode, now with SaveMemory options.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3326 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-15 21:31:59 +00:00
7db78ca670 fpspreadsheet: Add first unit test cases for virtual mode (all biff, ooxml /writing only)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3323 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-15 15:49:58 +00:00
ddd6902edf fpspreadsheet: Significantly improve speed of the ooxml writer, by rvk (see discussion in http://forum.lazarus.freepascal.org/index.php/topic,25110.0.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3305 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-10 15:55:40 +00:00
7e22f0e6ad fpspreadsheet: Complete rpn calculations (COUNTA). Remaining missing function probably will not be implemented because calculation is beyond units (math, strutils, dateutils; if needed they can still be implemented at application level by registering the corresponding function).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3296 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-07 21:29:00 +00:00
827734cabe fpspreadsheet: Extend compare functions (=, <, etc) to cell values (for calculation of formulas)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3283 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 22:11:34 +00:00
bab574b3b4 fpspreadsheet: rename the Create* funtions needed for for formula calculation to Create*Arg
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3282 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 21:17:15 +00:00
4967d9a233 fpspreadsheet: Calculate the formula SUMIF.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3281 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 20:41:07 +00:00
ad1bf2a46a fpspreadsheet: Fix manualtest crashing if started a second time from the same gui session.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3280 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 15:19:35 +00:00
336a1cf581 fpspreadsheet: Implement calculation of COUNTIF, several test cases passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3279 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 14:38:20 +00:00
5718a5c120 fpspreadsheet: Some more extreme test cases for column name bug (#26447)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3278 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 09:17:31 +00:00
0b6819fe83 fpspreadsheet: Some more rpn functions calculated (info, lookup/reference category)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3277 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 09:03:49 +00:00
fb2b3159ea fpspreadsheet:
- test for bug 26447: fpspreadsheet columns >26 wrong with ooxml (patch) as fixed in r3273
- fix typo in documentation rfRow=>rfRelRow
- cosmetic changes



git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3276 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 08:48:12 +00:00
78af234614 fpspreadsheet: Implement calculation of COUNTBLANK formula. Some formatting cosmetics.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3275 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-03 21:04:58 +00:00
359ddca7b8 fpspreadsheet: Support cell ranges in calculation of rpn formulas. Tune fpfunc unit. Update test cases.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3272 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-03 15:38:15 +00:00
2f338a50a8 fpspreadsheet: Beginning to add cells to calculation of rpn formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3267 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-02 15:14:58 +00:00
c82e915262 fpspreadsheet: Fix remaining utf8 issues when reading/writing rpn string formulas. Fix BIFFExplorer issues when displaying biff2 formulas. Excel complains about data loss when reading a biff2 file containing a calculated formula having a string result - not fixed yet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3266 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-02 11:51:59 +00:00
9dc234ae22 fpspreadsheet: Unified writing code for rpn formulas. Calculation results of rpn formulas are now stored correctly for all biff versions.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3265 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-01 22:47:10 +00:00
0aaff39316 fpspreadsheet: Implement calculation of rnp date/time and info formulas. Partial implementation of SUBSTITUTE calculation is back. Add corresponding unit tests, passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3262 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-01 12:55:02 +00:00
688eab0099 fpspreadsheet: Remove rpn calculation support for the Excel functions PROPER and SUBSTITUTE - there are no adequate function available in Lazarus.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3259 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-01 07:51:52 +00:00
f1223bfea4 fpspreadsheet: Rename unit fpsMath to fpsFunc
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3258 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-01 07:39:06 +00:00
734c816bd1 fpspreadsheet: (Almost) complete calculation of built-in rpn string function of fpspreadsheet (PROPER and SUBSTITUTE missing)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3257 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-30 22:30:23 +00:00
57036aa680 fpspreadsheet: Calculate most statistical and some string functions in rpn formulas. Beginning to handle missing arguments correctly.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3256 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-30 15:49:49 +00:00
c2a5a2dd5d fpspreadsheet: Implement fpn formula calculation of all math functions available in fps. Test cases passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3255 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-30 13:21:04 +00:00
7b9110ba74 fpspreadsheet: Complete calculation of logical function for rpn formulas, incl unit tests (passed)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3254 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-30 10:39:49 +00:00
2621b0d028 fpspreadsheet: Calculation of rpn formulas with variable parameter count works.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3253 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-30 08:41:29 +00:00
b5f465ac84 fpspreadsheet: Fix compare operations when calculating rpn formula
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3250 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-29 09:55:47 +00:00
cd9e686804 fpspreadsheet: More calculation of rpn formulas, add TestCalcRPNFormulas cases to formulatests. Boolean results not working yet. And implementation only for BIFF8, so far.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3249 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-28 19:40:28 +00:00
13a9fb2603 fpspreadsheet: Remove built-in number formats nfSci (not suppored by ods and fpc) and nfAccounting/nfAccountingRed (too much display-oriented, too cumbersome to implement for reading and displaying in the grid). If needed in Excel they can still be written using nfCustom. Update all files and tests for these now no longer existing formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3222 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-23 09:15:56 +00:00
d75755c1ff fpspreadsheet: Read frozen panes from ods files. Add test case for writing/reading of ods panes, passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3210 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-21 16:09:08 +00:00
9b59ab3006 fpspreadsheet: Show/hide sheet grid lines and col/row headers for ods reading and writing. Incl test case (passed)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3207 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-20 19:07:35 +00:00
a85adcb61a fpspreadsheet: Reducing hints and warnings, still a lot...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3203 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-19 19:25:40 +00:00
26d5923673 fpspreadsheet: Add currency test cases to ReadString tests for biff8 and ods. Rename ReadDate tests to always show the datemode in the test name. Rename test files "testbiff8.xls" and "testodf.ods" to show datemode (1904) in file name (--> testbiff8_1904.xls, testodf_1904.ods)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3198 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-18 15:44:28 +00:00
4672d474a7 fpspreadsheet: Add write/read numbers test case for ods
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3194 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-18 09:11:42 +00:00
0083c7c510 fpspreadsheet: Add to the numformatparser test some more complicated formatting strings found in Excel files -> passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3165 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-13 14:35:36 +00:00
a4ee00f870 fpspreadsheet: Major reconstruction of numberformat parser to facilitate creation of xml formats for ods. Some minor regressions in unit tests and fpsgrid demo to be fixed. Removed elements "Decimals" and "CurrencySymbol" from TCell (this information is taken from the format string now). Removed the built-in format nfFmtDateTime (makes life easier, use nfCustom instead).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3156 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-12 22:20:45 +00:00
12c4a4a2a2 fpspreadsheet: Read ods formula and display it in TsWorksheetGrid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3152 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-06 15:48:02 +00:00
712e0f9f27 fpspreadsheet: Add font writing support to ods. Add font ods test cases. Passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3151 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-06 13:09:14 +00:00
20567b639c fpspreadsheet: some cosmetics to better show the file format tested in a test case
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3150 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-06 12:17:45 +00:00
0e675ba97d fpspreadsheet: Add units tests for ods font colors
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3149 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-06 12:08:04 +00:00
c335deb56c fpspreadsheet: Add currency test cases to numbertests. 1 fail for biff to be fixed, ods ok. Remove experimental code from opendocread.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3142 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-05 09:14:13 +00:00
5542b1ac56 fpspreadsheet: Activate all disabled ods date tests & fix some more issues related to inconsistent formats by Open/LibreOffice -> done to 6 errors for 1904 datemode, that's probably the best we can get.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3138 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-04 22:11:17 +00:00
b73779e82e fpspreadsheet: Repeat testodf*.ods test files, previous one were broken.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3137 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-04 19:30:49 +00:00
f34a8e9c4f fpspreadsheet: Fix some formatting bugs in testodf*.ods test files. Add a column showing the number value of the date/time value.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3136 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-04 18:51:33 +00:00
73dc71627b fpspreadsheet: Add code for detection of date/time cells which are incorrectly written as float by Open/LibreOffice. Implement conditional number formats for all number types (sometimes falsely assigned). Reactivate ignored date test cases for ods-1899, pass. 1904 date mode still faulty, not clear if this will ever pass the test.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3133 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-03 22:04:11 +00:00