Commit Graph

122 Commits

Author SHA1 Message Date
390b0539f1 fpspreadsheet: Move some more translatable strings to fpsStrings unit. Some clean-up & cosmetics.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3640 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-08 09:23:34 +00:00
46a94e0abf fpspreadsheet: Fix xlsx reader truncating strings after 255 characters due to missing $H+ directive. Check that all units use the $H+.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3637 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-07 22:53:52 +00:00
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
af452001d4 fpspreadsheet: Greatly reduce hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3632 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-06 10:43:10 +00:00
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
dcbbb0c0a1 fpspreadsheet: Cells for which the OnWriteCellData event handler returns null are skipped in virtual mode if they don't carry a format.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3603 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-24 13:59:51 +00:00
0e97c6bec0 fpspreadsheet: Fix biff8 incorrectly reading non-contiguous shared formulas. Fix biff8 writing only contiguous shared formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3594 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-22 13:35:19 +00:00
d5a1be557d fpspreadsheet: Trying to solve the "insert column / shared formula issue" - not fixed yet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3586 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-21 21:47:08 +00:00
b2888a8042 fpspreadsheet: Lots of cosmetics. Updated version of the chm help file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3583 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-21 00:10:31 +00:00
b43fb99608 fpspreadsheet: Fix reading/writing of cell error values in biff. Insert/delete unit tests with formulas are correct now. Fix crash in BIFFExplorer related to reading of formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3582 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-19 19:44:35 +00:00
b22ab8deba fpspreadsheet: Move rpn stuff from fpspreadsheet.pas to a new unit fpsRPN.pas. Move translatable strings from fpspreadsheet.pas to a new unit fpsStrings.pas. Make sure that all demos still run in the new environment.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3572 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-17 08:38:31 +00:00
430d3770e7 fpspreadsheet: TsWorksheetGrid support overflowing cells now (i.e. text longer than a cell is wide is shown in the neighbor cell).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3563 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-14 16:16:23 +00:00
cfb50bf064 fpspreadsheet: Read default column width and row height from biff and ooxml files
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3532 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-09 11:42:20 +00:00
e9bf681d97 fpspreadsheet: Avoid using column and row records when all column widths and row heights are equal. This fixes Mantis #0026686.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3528 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-07 22:25:11 +00:00
ab50c08bd2 fpspreadsheet: Fix shared formula issues with absolute cell references
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3527 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-05 15:41:44 +00:00
ac149b750d fpspreadsheet: Some cleanup of unused variables.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3526 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-04 18:55:21 +00:00
cbc6beae9a fpspreadsheet: Writing of shared formulas to biff5 and biff8 is working again now.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3525 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-04 15:27:28 +00:00
2d26e91522 fpspreadsheet: Reading of biff5 and biff8 shared formulas (biff2 does not have them).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3524 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-04 13:18:28 +00:00
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
a043b77519 fpspreadsheet: Remove workbook property ReadFormulas, use option boReadFormulas instead. Update all demos affected. Modify most demos to no longer require the fps package.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3505 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-29 15:32:43 +00:00
2e236d1fe7 fpspreadsheet: Fix shared formula incorrectly written assigned to cell row. Add shared formula to demo_write_formula.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3496 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-19 10:15:35 +00:00
f6845282d9 fpspreadsheet: Prevent biff2 writing formulas containing fekCellOffset tokens (needed for shared formulas which are not supported by biff2 internally).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3495 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-19 08:27:46 +00:00
4bafc57020 fpspreadsheet: Add writing of shared formulas for OOXML.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3493 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-18 13:48:46 +00:00
f2338f41bb fpspreadsheet: Functional writing support for shared formulas in BIFF5 and BIFF8.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3492 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-18 09:16:24 +00:00
87283fda5d fpspreadsheet: Initial implementation of writing shared formulas to BIFF files. BIFF2 working (using copies of master formula), BIFF8 faulty file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3491 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-17 22:25:46 +00:00
72ee090ef3 fpspreadsheet: Fix absolute/relative cell reference issues when reading shared formulas. Update BIFFExplorer for shared formulas. Implement reading of shared formulas for biff5 (nothing to be done for biff2 which does not support shared formulas).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3490 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-16 23:01:32 +00:00
62ff8bc2d0 fpspreadsheet: Initial version of reading BIFF8 shared rpn formulas. Reconstruction of string formula from shared rpn formula ok.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3488 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-15 19:29:58 +00:00
5bc25c482e fpspreadsheet: Clean up. Silence some hints.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3473 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-12 14:52:57 +00:00
495499a9e2 fpspreadsheet: Make sure that Excel's system colors are kept when colors are added to a palette. Fix BIFF 2 font color mismatch in unit test. All green again.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3471 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-11 22:39:47 +00:00
eaabdf67c1 fpspreadsheet: Make sure that biff writers do not write colors exceeding the maximum palette count. Add casse to error tests (passed, but the biff2 font color test fails now...)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3470 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-11 15:53:06 +00:00
ad1ae69544 fpspreadsheet: Log warning if BIFF writer tries to write more than 64 colors. More clean-up.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3468 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-11 11:16:43 +00:00
8f666bec13 fpspreadsheet: Fix written oversized worksheets being defective, adapt BIFF writer's WriteDimensions method to be compatible with oversized worksheets.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3455 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-08 14:30:19 +00:00
ff059e3420 fpspreadsheet: Move log list from reader/writer to workbook for easier access. Add unit test for error logging (in internaltests). Improve OOXML writer to begin writing rows only from the first existing row, not from 0. (The ODS writer still does this, therefore, it creates a huge file for the error logging test - this test is currently deactivated for ods).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3446 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-07 22:24:22 +00:00
d0be6284cf fpspreadsheet: OOXML reading/writing support for frozen panes. Simplify OOXML's cell writing strategy by omitting empty cells.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3422 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-04 19:11:17 +00:00
340efa7c8f fpspreadsheet: Implement virtual reading mode for biff2 and ods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3373 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-24 15:56:03 +00:00
5a65855a48 fpspreadsheet: Implement virtual reading mode for biff8 and biff5 (activated by workbook option boVirtualMode when reading). Add demo_virtualmode_read. Update speed test (factor 2 faster than standard mode, main advantage: no significant memory usage)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3372 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-24 11:51:34 +00:00
7f8e8fb312 fpspreadsheet: Rename virtual mode event handler OnNeedCellData to OnWriteCellData. Add another virtual mode event handler for reading, OnReadCellData.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3370 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-23 21:51:06 +00:00
22100c2f16 fpspreadsheet: Possibly fix unit dependence issue forcing to clean rebuilds. Modify project options of fpsgrid and spready to separate compilation platforms.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3358 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-22 22:49:30 +00:00
ba37ace85f fpspreadsheet: Read entire biff record of label and number cells to speed up reading (30% improvement for biff2). Numerous clean-up, mostly debugger settings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3355 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-21 20:33:25 +00:00
7a3a9060e9 fpspreadsheet: Fix memory leak in virtual mode due to incorrectly initialized strings in the cell record.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3352 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-20 18:19:43 +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
4c723b9fc3 fpspreadsheet: Convert some more biff methods such records are written in a single block (biff2: WriteLabel, WriteNumber, all: WriteFormat, WriteBlank, WriteColInfo).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3325 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-15 21:00:49 +00:00
be3e5d16ac fpspreadsheet: Speed up biff writing for number and label cells in woSaveMemory mode by a factor of 4 (writing complete records instead of single bytes and words)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3321 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-15 14:59:48 +00:00
9607fc8e88 fpspreadsheet: Extend the event OnNeedCellData by a template cell which can be used for formatting when saving a file in virtual mode.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3317 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-14 15:04:04 +00:00
e6e961d51f fpspreadsheet: Add WriteBlank to TsSpreadOOXMLWriter to standardize code.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3309 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-11 20:00:49 +00:00
231b127041 fpspreadsheet: Implement virtual mode for all biff file formats. Add record limitations with writer-specific max row and col counts: a file is not written to a particular file format if it exceeds the limitations of the file format.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3307 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-11 13:20:14 +00:00
3020ad9261 fpspreadsheet: Fix reverse order of rpn tokens when reading an xls file. Fix string formula reconstruction routine. Unit test passed again.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3298 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-08 18:58:22 +00:00
4bd85f70fd fpspreadsheet: Overload methods FindCell and GetCell to TsWorksheet to accept an Excel "A1" address string. Update chm help file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3269 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-02 19:38:21 +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