Commit Graph

237 Commits

Author SHA1 Message Date
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
04370d76dc fpspreadsheet: Complete hyperlink form. In examples/visual/fpsctrls, open hyperlink URI when hyperlink cell is activated.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4062 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-21 22:38:54 +00:00
beca637d7c fpspreadsheet: Fix shared formulas incorrectly read from xlsx files. Fix formulas being lost when reading xlsx and ods files where formulas had not been calculated at saving.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4058 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-20 23:24:12 +00:00
3a9150acf3 fpspreadsheet: Add demo hyperlinkdemo which collects the sheets of linked workbooks to a new workbook
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4035 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-15 11:02:15 +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
f94692451c fpspreadsheet: Fix duplicate unit issues for examples requiring installed visual package
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4022 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-13 17:49:33 +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
24b49277c1 fpspreadsheet: Fix incorrect assignment of cell format to hyperlinks when reading ods files (and some more bugs). Extend TsSpreadsheetInspector to display font and cell format lists of the workbook.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4014 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-10 23:48:30 +00:00
d16e0915f5 fpspreadsheet: Fix hyperlink unit tests.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4007 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-08 17:04:25 +00:00
2d76afb541 fpspreadsheet: Unit tests for hyperlinks. Some issues left.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4002 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-08 00:50:10 +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
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
e861651ddf fpspreadsheet: Read hyperlinks from ods files
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3965 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-25 18:18:50 +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
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
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
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
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
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
028681029b fpspreadsheet: Fix ods comment reader crashing for ods files written by OpenOffice from xlsx files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3923 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-03 18:13:13 +00:00
7a0f60f4ea fpspreadsheet: Initial implementation of writing cell comments to xlsx files - not working yet: comments are in file, but do not show up in Excel.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3921 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-02 18:51:13 +00:00
8916945ca1 fpspreadsheet: Fix missing repeated cells when reading ods file (bug #0027389)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3919 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-31 20:37:44 +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
cf5ece6e86 fpspreadsheet: Add writing of cell comments for opendocument files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3914 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-30 17:46:06 +00:00
b267fd7694 fpspreadsheet: Implement reading of cell comments from opendocument files. Fix cell text with manual line break in opendocument files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3913 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-30 16:50:23 +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
bf61320db8 fpspreadsheet: Fix compilation of fpspreadsheet packages back to Laz 1.2.0 / fpc 2.6.2 (Note: some "ignored" unit tests do produce a failure).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3876 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-08 12:14:59 +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
ad1bdb294a fpspreadsheet: Remove ComboboxEx left-over in spready (http://forum.lazarus.freepascal.org/index.php/topic,26299.msg161924.html#msg161924).
Add a note to fpopendocument on difficulties when reading empty formatted cells. 
Add function "CopyCell" to TsWorksheet.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3705 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-11-06 15:19:20 +00:00
791032b964 fpspreadsheet: Initial version of fpspreadsheet controls, a set of visual controls to facilitate creation of a spreadsheet application.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3701 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-11-03 15:34:57 +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
aa666e59e7 fpspreadsheet: Fix ods reader failing to detect "red" currency format (negative numbers in red; ods writer still in error for currency). Cosmetic changes: Formatting
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3697 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-28 23:24:03 +00:00
7b3795dc03 fpspreadsheet: Less hints. Adapt spready code to differences between trunk and Laz 1.2.6, remove duplicate colorbox unit in spready.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3667 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-20 09:22:06 +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
9826c957cf fpspreadsheet: Raise an exception when the ODS and OOXML readers call ReadFromStream (see Mantis 0026830)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3639 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-08 08:13:45 +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
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
2f8c9089ad fpspreadsheet: Fix speed issues in saving large files due to unnecessary calculation of col/row limits.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3615 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-30 22:18:46 +00:00
5b4317a706 fpspreadsheet: Fix writing non-printable characters writing to xml-like formats (xlsx, ods, wikitable). Add test case to error tests. Improve syntaxhighlighter for wikitablemaker demo (still not perfect).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3611 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-29 22:27:03 +00:00
04beab04d1 fpspreadsheet: Fix ODS reader's incorrect usage of cell borders in files written by Excel.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3589 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-22 11:15:55 +00:00
10ad6b7a1a fpspreadsheet: Delete columns and rows from Worksheet and WorksheetGrid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3571 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-16 15:03:17 +00:00
e07e322170 fpspreadsheet: Redo internal structure of merged cells (use MergeBase cell instead of neighbor links).
Suppress TsWorksheetGrid painting of inner grid lines of merged cells.
Fix inserting columns and rows running through merged cells. 
Silence some warnings. 
Fix ods reading merged cells incorrectly.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3569 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-15 20:54:39 +00:00