Commit Graph

158 Commits

Author SHA1 Message Date
545bd7ed0f fpspreadsheet: Major reconstructor of color management: no more palettes now, use direct rgb colors instead. May break existing code - sorry! Update all demos and unit tests (passed).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4156 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-28 20:08:24 +00:00
400ffe6431 fpspreadsheet: Fix writing of header/footer fonts to ods files. Some cleanup.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4127 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-12 20:51:18 +00:00
4e420fa876 fpspreadsheet: Add unit tests for some more page layout properties (Fit width/height to pages, start page number) (completing the first 1000 test cases...)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4113 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-04 17:38:56 +00:00
607585d146 fpspreadsheet: some more unit tests for page layout (paper size, page orientation, scaling factor)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4112 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-04 11:01:06 +00:00
dfa4df2c1e fpspreadsheet: Write page layout to ods. Fix some page-layout-related bugs for ooxml.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4109 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-02 23:04:59 +00:00
080efbf542 fpspreadsheet: Fix format in predefined test files (test*_1899*.* and test*_1904*.*); fix biff8 ignoring cell format in shared formula range.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4108 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-02 14:25:39 +00:00
e66caefbe0 fpspreadsheet: Add headers and footers to the pagelayout record, implemented for all Excel formats (reading & writing).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4104 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-01 15:14:25 +00:00
82117326a4 fpspreadsheet: Add some more page layout properties (page size, orientation etc) for all Excel and ods formats (ods implementation, however, not correct at the moment).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4103 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-04-30 21:55:55 +00:00
cd397b64d5 fpspreadsheet: Remove TsNumberFormatDialect, not needed by number format parser any more. Fix some issues in visual demos related to number formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4089 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-04-19 22:03:33 +00:00
03b7dedde7 fpspreadsheet: Improved number format parser
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4082 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-04-18 14:58:38 +00:00
5c2b844bb7 fpspreadsheet: Add formatting of numbers as fractions
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4073 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-31 19:01:16 +00:00
eab9c797ef fpspreadsheet: Add method AddCell to worksheet which does not check if cell already exists. --> some speed-up of reading.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4031 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-14 22:48:38 +00:00
c7c8d73179 fpspreadsheet: optimize workbook font infrastructure to avoid that missing font 4 dictated by Excel. Remove UsedFormattingField uffBold (obsolete since supporting fonts).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4015 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-11 22:28:07 +00:00
9365a1dff2 fpspreadsheet: Reduce support for shared formulas (too many problems...), only reading from xls and xlsx files supported.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3998 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-06 12:12:45 +00:00
c5f6cbe82d fpspreadsheet: Replace for-to loops by for-in loops if possible. Update example demos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3991 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-05 10:35:32 +00:00
0bfcd5c4f8 fpspreadsheet: Introduce "settings" records for each file format to define parameters needed for reading/writing. This fixes two unit test fails in Ubuntu (only 1 fail left).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3964 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-25 10:55:46 +00:00
ea36d2e089 fpspreadsheet: Shorten fpspreadsheet.pas by putting NumFormatList and CustomReader/Writer to separate units
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3963 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-25 09:43:37 +00:00
dd4e66216a fpspreadsheet: Add background fill styles for cells. Fully implemented for Biff5, Biff8 and OOXML; ODS writes an interpolated solid fill (like Open/LibreOffice); Biff2 supports only the 50% gray black&white fill.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3949 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-17 23:32:00 +00:00
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