Commit Graph

37 Commits

Author SHA1 Message Date
wp_xxyyzz
95cc2da283 fpspreadsheet: Fix incorrect handling of cell reference by new forumula INDIRECT(). Add test cases for formula ADDRESS().
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7862 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-11-11 23:43:44 +00:00
wp_xxyyzz
6e2cc3fe7e fpspreadsheet: Fix reading of ods files containing formulas with several arguments (separator semicolon). Update unit tests. (Still issues with files posted at https://forum.lazarus.freepascal.org/index.php/topic,42168.msg293792.html).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6574 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-09 14:28:17 +00:00
wp_xxyyzz
03d8694142 fpspreadsheet: Add unit tests for some of the recently fixed formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6541 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-26 23:08:01 +00:00
wp_xxyyzz
4517d6fc12 fpspreadsheet: Fix sudden fails of test suite (Why did these test cases work earlier?)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6465 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-05 09:33:29 +00:00
wp_xxyyzz
40fabfc201 fpspreadsheet: Redo storage of formulas: formulas now are stored in a separate tree independent of the cells tree. The field FormulaValue of TCell record was removed. All unit tests passed. Demos updated (issues of speedtest due to SST in BIFF8 found - not related).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6446 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-30 22:15:07 +00:00
wp_xxyyzz
28d6da64fc fpspreadsheet: Fix cell ranges in ods formula parser. --> 3d single-sheet references (Sheet1!A1;B4) working for all ODS now for both reading and writing. PageLayout broken for BIFF5 at the moment.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6409 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-13 23:09:18 +00:00
wp_xxyyzz
d2351b5559 fpspreadsheet: Fix 3d cell references with a single other sheet (Sheet1!A1:C3), except for ODS. 3d references with several sheets prepared (not tested yet). Some more unit tests.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6408 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-13 10:15:13 +00:00
wp_xxyyzz
022b837553 fpspreadsheet: Fix error in Round function. Add a second unit test for Round.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6217 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-27 22:21:49 +00:00
wp_xxyyzz
773295ba3e fpspreadsheet: Another exotic formula test case: multiple application of % operator.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4187 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-06-08 17:11:46 +00:00
wp_xxyyzz
e121751361 fpspreadsheet: Reactivate the expression parser test cases which were commented (and forgotten) some time ago. Activate missing argument tests. Add some "exotic" formulas. All passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4186 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-06-08 17:03:55 +00:00
wp_xxyyzz
ac387f67e4 fpspreadsheet: Improve codepage handling for biff2 and biff2 files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3924 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-04 18:15:19 +00:00
wp_xxyyzz
4dfa60673d fpspreadsheet: Remove some unnecessary calls to lo() (no idea why I introduced them...). Fix range check errors in the test suite.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3633 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-06 12:55:28 +00:00
wp_xxyyzz
93da62030e fpspreadsheet: Less hints & warnings
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3630 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-03 22:02:09 +00:00
wp_xxyyzz
e40683ea83 fpspreadsheet: Fix ods formula issues, seems to be ok now.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3513 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-02 12:58:06 +00:00
wp_xxyyzz
c03833de40 fpspreadsheet: Add some more formulas
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3511 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-01 22:37:14 +00:00
wp_xxyyzz
c87afdcdec fpspreadsheet: Redo handling for formulas:
- Allow processing of string formulas (conversion to/from rpn formulas, calculation). 
- Drop cell ContentType cctRPNFormula. 
- Drop field RPNFormulaValue of TCell record. 
- Remove all fekXXXX declarations for sheet functions. Function is specified by name now.
- Complete registration mechanism for user-defined formulas.
Adapt all demos
Test cases working
This commit does not yet support: shared formulas, formulas in ods.


git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3506 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-30 18:03:22 +00:00
wp_xxyyzz
03b690d834 fpspreadsheet: Fix floating point formula tests cases to give matching results even without tolerance value. Fix BIFFExplorer to show all digits of floating point cell values.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3343 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 23:14:53 +00:00
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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