Commit Graph

442 Commits

Author SHA1 Message Date
7e52faa49f fpspreadsheet: In fpspreadsheet.pas, extract cells AVLTree to fpsclasses.pas. Implement enumerator for the avl trees. Add unit tests for cell and comment enumeration.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3988 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-04 17:30:59 +00:00
23d6bdc557 fpspreadsheet: Fix writing of empty strings to cell. Fix biff8 stream read error of hyperlinks.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3981 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-03 00:06:15 +00:00
135ceb1eef fpspreadsheet: Fix WorksheetGrid to show selection of merged cell range correctly. Fix cell content of blank cells after adding a hyperlink.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3980 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-02 21:20:00 +00:00
a10546d99b fpspreadsheet: Migrate MergeCells tree to fpsClasses
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3979 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-02 16:50:14 +00:00
7ad2d347ea fpspreadsheet: Begin migration of code related to AVLTrees to new unit fpsclasses. Hyperlinks and comments trees already migrated.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3978 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-02 12:23:52 +00:00
f92da238ee fpspreadsheet: Consider hyperlinks when inserting/deleting rows/columns
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3975 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-01 22:20:03 +00:00
5a4bb856f5 fpspreadsheet: Fix TsWorksheet.CopyCell ignoring comments, hyperlinks and merged cells. Fix incorrect handling of trailing zeros of hyperlink strings when reading biff8.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3974 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-01 12:23:14 +00:00
aca6971fe2 fpspreadsheet: Rename TsWorksheet.IsHyperlink to .HasHyperlink to be consistent with .HasComment
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3973 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-01 11:40:04 +00:00
58031aba3a fpspreadsheet: Modify hyperlink infrastructure to support non-label cells as well. Add hyperlinks to biff8 reader. Show hyperlink tooltip in TsWorksheetGrid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3971 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-28 23:46:08 +00:00
d7af16ab5b fpspreadsheet: Fix memory leak in reader. Write hyperlinks to ods file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3966 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-25 22:39:52 +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
1b35aa8bb2 fpspreadsheet: Fix compilation of visual package
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3962 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-24 23:23:15 +00:00
5d939e5821 fpspreadsheet: Write hyperlinks to xlsx files. Some restructuring of the hyperlink record.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3961 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-24 16:57:36 +00:00
20ad9c24f2 fpspreadsheet: read hyperlinks from xlsx files
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3957 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-23 22:51:42 +00:00
70b859530f fpspreadsheet: Improved user interface in TsSpreadsheetGrid for clicks on hyperlink cells.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3956 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-23 18:50:29 +00:00
4f6184f243 fpspreadsheet: Prepare infrastructure for cell hyperlinks
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3955 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-22 23:38:28 +00:00
eddf623803 fpspreadsheet: Restructure merged cells. Info on merged cells is no longer stored in cell, but in separate avltree, FMergedCells. Unit tests ok.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3954 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-22 00:12:16 +00:00
e59ea19149 fpspreadsheet: Remove some duplicate code related to merged cells
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3953 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-20 18:55:38 +00:00
d005a0c3c9 fpspreadsheet: Fix location of cell comments after insert/delete of rows/cols
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3952 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-19 18:09:47 +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
f34b79c6fd fpspreadsheet: Add TCell record helper to access cell comments from the cell
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3946 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-15 22:18:38 +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
d8a3204045 fpspreadsheet: Clean up
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3933 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-07 22:24:08 +00:00
629ac7dd00 fpspreadsheet: Remove workbook parameter from the reader's ReadFromXXXX methods to avoid with conflict by workbook passed at construction.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3925 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-04 19:50:50 +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
cca611b21b fpspreadsheet: Basic support for cell comments in fpspreadsheet.pas, fpspreadsheetgrid.pas and fpsactions.pas. Update chm help file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3912 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-30 14:48:51 +00:00
f4bf29da87 fpspreadsheet: Further improvement of file format detection. Use it in BIFFExplorer as well.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3907 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-29 11:39:01 +00:00
b765956574 fpspreadsheet: Fix comments in TCell declaration
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3906 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-29 11:18:49 +00:00
9ff9bc15b5 fpspreadsheet: Improved file format detection
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3905 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-29 11:01:49 +00:00
8f3d5d471f fpspreadsheet: Fix buffered stream reading speed issues.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3904 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-27 19:31:57 +00:00
e3a0d4a858 fpspreadsheet: Add missing cell record helper for "BorderStyles"
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3902 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-25 23:30:15 +00:00
22a7e50170 fpspreadsheet: Put numerical data of the TCell record into a variant record --> further reduction of memory consumption per cell (now by 70% of original TCell).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3898 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-24 22:52:22 +00:00
3113794fab fpspreadsheet: Fix crash when reading a BIFF5 file written by Excel97 (it has data (the directory) beyound the workbook stream which is not expected by the BIFF5/8 readers).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3897 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-24 22:19:55 +00:00
9d89f1dcf3 fpspreadsheet: Fix missing error to be shown when a sheet containing a formula with circular reference is calculated.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3896 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-24 15:44:54 +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
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
988c2a3d7a fpspreadsheet: Less warnings. Prepare TsWorksheetGrid to avoid storing of colwidths and rowheights (requires Mantis #0027279 in Lazarus)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3879 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-09 22:25:20 +00:00
f1bdde968a fpspreadsheet: Add some forgotten comments on xls format detection
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3878 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-08 17:49:00 +00:00
f1d5a14660 fpspreadsheet: Add demo "workbookchartsource" to "fpschart" folder. Move previous content of fpschart to subfolder "worksheetchartsource". Fix old fpschart demo to show a reasonable chart.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3877 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-08 17:36:41 +00:00
2c81897ffc fpspreadsheet: Avoid duplicate code in TsWorkbookChartSource. Fix crashes of the chartsource when used worksheets are renamed or deleted. More refined notification of visual controls.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3867 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-05 23:32:49 +00:00
98b35354b6 fpspreadsheet: Initial version of TsWorkbookChartSource (will replace TsWorksheetChartSource)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3865 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-03 20:03:55 +00:00
e4762b4fb7 fpspreadsheet: Prepare for next stable release 1.4
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3856 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-12-31 16:50:31 +00:00
98e1c88c1e fpspreadsheet: Initial implementation of a simple clipboard (within appliation only) for TsWorksheetGrid. Not yet fully working.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3843 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-12-17 23:28:41 +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