Commit Graph

140 Commits

Author SHA1 Message Date
54c2af0154 fpspreadsheet: reformatting, cosmetic changes
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3945 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-15 22:05:20 +00:00
03efde6cab fpspreadsheet: Rearrange cell comment architecture: to save memory cell comments are now stored in the worksheet's avltree "Comments". Replace cell's "CalcState" by more general "Flags" which signals that a cell contains a comment (to be extended...)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3943 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-15 11:45:08 +00:00
8e7a3b741a fpspreadsheet: Add unit xlsEscher for writing Microsoft Office shapes needed for cell comments in BIFF8. Writing of comments not yet working. Lots of additions to BIFFExplorer.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3942 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-14 22:27:49 +00:00
47cb730370 fpspreadsheet: Add test cases for cell comments. Fix some bugs related to comments.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3937 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-08 18:26:47 +00:00
39d652bf60 fpspreadsheet: Read cell comments from BIFF8 files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3928 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-05 11:23:06 +00:00
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
71c6eea0fa fpspreadsheet: Implement cell comments for biff2 and biff5 (reading and writing). Complete cell comments for ods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3915 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-30 22:47:13 +00:00
d9343190a4 fpspreadsheet: Add mission routines of the cell record helper. Some cosmetics. Clean up commented lines from previous commit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3895 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-24 00:36:10 +00:00
133bf09eb4 fpspreadsheet: Massive reconstruction: remove formatting attributes of TCell record and collect in TCellFormatList. TCell only has index into this list. Introduce record helpers to keep the old syntax. Reduction of memory consumption per cell by 50%.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3894 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-23 21:54:23 +00:00
2bf5464fc6 fpspreadsheet: Move type declarations from fpspreadsheet.pas to new unit fpstypes.pas. Update all examples.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3887 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-17 22:57:23 +00:00
80c2ec255c fpspreadsheet: Some improvements in Laz 1.0 compatibility, still issues. Fix style error in wikitable writer.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3885 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-14 15:34:20 +00:00
fd627c1fa1 fpspreadsheet: Introduce an include file (fps.inc) with all conditional defines. They are needed to compile the packages with older LCL/FPC versions (tested back to Laz1.0 / FPC2.4). All patched procedures are in fpspatches.pas and turned on/off by these defines.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3884 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-13 19:02:57 +00:00
fdd9b88f43 fpspreadsheet: Set package versions 1.3 in order to follow the convention of giving the trunk version an odd number. Silence some compiler hints.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3826 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-12-06 18:09:15 +00:00
794f556efe fpspreadsheet: Add test case for copy format. Fix default vertical text alignment issue of biff5 and biff8.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3817 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-12-01 16:50:00 +00:00
a1fe949908 fpspreadsheet: Fix unit test for currencies, pass now for all file format (some kind of tweaking for Excel2 and fpc formatting inconsistencies though).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3699 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-29 22:36:03 +00:00
ba40d180c4 fpspreadsheet: Fix some UTF8-related bugs in connection with currency formats
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3696 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-25 23:05:26 +00:00
9f014b6875 fpspreadsheet: Add reading/writing of boolean cell values for BIFF formats.
Add test case for boolean cell values for all formats (incl. CSV). 
Extend spready demo to be able to write sfExcel2 and sfExcel5 formats.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3656 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-14 21:44:00 +00:00
a4c5667dc9 fpspreadsheet: Reading/writing of boolean cell values for all file formats (BIFF not complete, yet).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3655 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-14 15:56:08 +00:00
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