Commit Graph

307 Commits

Author SHA1 Message Date
d650914a3f fpspreadsheet: Fix crash in the biff8 reader's FreeSharedStringTable when no SST is used.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6912 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-05-13 15:43:06 +00:00
acda1ecd09 fpspreadsheet: Fix memory leak due to rich-text streams in shared string table when reading biff8. Issue #35528, modified patch by Jurijs Romanovs.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6891 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-05-06 15:50:39 +00:00
1dc7fd8705 fpspreadsheet: Less stringent requirements for presence of localSheetID attributes for names ranges in xlsx files. Issue #34381.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6858 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-04-22 18:03:35 +00:00
9369e4d3ef fpspreadsheet: Fix cells being pasted in grid from clipboard when worksheet is protected.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6847 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-04-13 20:21:33 +00:00
7faddb698f fpspreadsheet: Disable DEL key in worksheet grid when a cell is protected from being edited.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6845 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-04-13 08:59:45 +00:00
a52a6a75a8 fpspreadsheet: Fix worksheet crashing when Font #4 is created.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6829 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-03-06 23:23:57 +00:00
ae6b7cc7f1 fpspreadsheet: Enable/disable workbook notifications and formula recalculations in WorksheetGrid.BeginUpdate/EndUpdate. See https://forum.lazarus.freepascal.org/index.php/topic,44547.msg313254.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6825 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-03-05 11:32:48 +00:00
9a4752c2b3 fpspreadsheet: Fix compatibility of WorksheetGrid with Laz 1.8.4
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6823 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-03-02 10:36:20 +00:00
e20a18fd7f fpspreadsheet: Implement spreadsheet functions ROW() and COLUMN()
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6822 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-02-27 22:27:47 +00:00
a6e527d8c1 fpspreadsheet: Add to error log when a file with unknown formula is read.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6821 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-02-27 20:47:33 +00:00
17d4e8186a fpspreadsheet: Avoid format detection pick csv reader when fpsAllFormats is used and the provided xlsx file contains an error.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6820 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-02-27 12:13:19 +00:00
8e86543dde fpspreadsheet: Fix formula parser ignoring errors in binary nodes (see https://forum.lazarus.freepascal.org/index.php/topic,44426.0.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6819 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-02-26 09:03:12 +00:00
748fea48a1 fpspreadsheet: Add method TsWorksheet.GetFormula to return the formula associated with a cell.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6818 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-02-24 11:25:28 +00:00
6858d3da86 fpspreadsheet: Introduce OnCalcWorkbook event to replace the (inefficient) fpspreadsheet workbook calculation strategy by one provided by the user.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6817 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-02-24 10:36:56 +00:00
33d67ebcce fpspreadsheet: Add option to WorksheetGrid to show/hide formulas when AutoCalc is off (see https://forum.lazarus.freepascal.org/index.php/topic,44208.0.html).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6816 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-02-20 11:43:28 +00:00
3f113c63bb fpspreadsheet: Some clean-up
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6769 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-12-25 08:58:16 +00:00
8b3b74de88 fpspreadsheet: Add formula MATCH. Improved error detection on math formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6768 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-12-24 23:02:52 +00:00
495fcb92eb fpspreadsheet: Redo automatic file format detection: Add method CheckFileFormat to each reader for overriding (check file header or whatever).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6764 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-12-18 13:08:58 +00:00
27d77fe114 fpspreadsheet: Make file readers/writers raise EFpSpreadsheetReader/EFpSpreadsheetWriter exceptions instead of EFpSpreadsheet
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6763 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-12-18 09:44:46 +00:00
e65331e881 fpspreadsheet: Improved format detection for user-defined file formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6762 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-12-18 09:43:08 +00:00
02281cd15f fpspreadsheet: Improved auto-format detection (check extension first, check file header when extension test fails). Fix ods reader crashing when extension has been renamed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6760 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-12-18 00:07:16 +00:00
d597266e0d fpspreadsheet: Add basic infrastructure for chart support.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6742 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-12-01 23:02:22 +00:00
d8735a174e fpspreadsheet: Add support for xlsx files written by OpenXML (using namespace x) - see forum https://forum.lazarus.freepascal.org/index.php?topic=43159.msg301884).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6726 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-11-12 23:34:56 +00:00
eba44b8b45 fpspreadsheet: ODS now can read images with hyperlinks. Fix image reading for new ODS format.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6674 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-10-06 11:23:12 +00:00
07991acca5 fpspreadsheet: Read image hyperlinks for ODS (old format). Display image hyperlinks in TsSpreadsheetInspector.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6673 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-10-06 09:19:05 +00:00
693ab2f3eb fpspreadsheet: the xlsx writer now can write an image hyperlink.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6672 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-10-05 16:31:14 +00:00
48d37a6351 fpspreadsheet: Add hyperlink to image. Supported by ODS writer, so far.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6671 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-10-04 14:37:28 +00:00
74f61771c9 fpspreadsheet: Fix reading of repeated columns from ODS files (introduced by r6636).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6645 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-11 21:24:51 +00:00
7ce43cda63 fpspreadsheet: Fix boolean formula failures in unit tests (probably introduced by r6570).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6643 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-11 17:21:40 +00:00
920fae9fe0 fpspreadsheet: Fix the same issue for columns that was fixed in prev commit for rows
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6640 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-10 15:22:41 +00:00
4260c5bd5e fpspreadsheet: Fix file reader deleting row records of hidden rows.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6639 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-10 09:00:48 +00:00
00ea419596 fpspreadsheet: Fix uninitialized hidden row state when reading xls.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6638 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-09 16:46:39 +00:00
119815fd39 fpspreadsheet: Make TsWorksheetGrid respect visibility of rows/columns by setting their width/height to zero.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6637 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-06 11:48:35 +00:00
8a98b1856e fpspreadsheet: Read hidden state of row/column records in ODS format.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6636 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-06 10:06:22 +00:00
014658c6f2 fpspreadsheet: Read hidden state of row/column records for XLSX and XLS (BIFF5 and BIFF8) formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6635 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-06 09:47:01 +00:00
8f9b01368d fpspreadsheet: Show hidden state of rows/columns in TsSpreadsheetInspector
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6634 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-06 09:41:40 +00:00
4ca04aed77 fpspreadsheet: Undo incidental change of fpsworksheetgrid in prev commit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6633 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-06 07:19:26 +00:00
02787a6947 fpspreadsheet: Write row/column hidden flag to XLSX, BIFF8 and BIFF2
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6632 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-05 23:04:49 +00:00
6c92513d96 fpspreadsheet: Add field "Hidden" to TRow and TCol records. Write hidden rows and columns to ODS.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6631 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-09-05 22:40:59 +00:00
72b96f5788 fpspreadsheet: Fix reading/writing of ods files with quoted sheetnames (https://forum.lazarus.freepascal.org/index.php/topic,42396.msg295937.html#msg295937)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6629 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-30 17:43:42 +00:00
02e90b8949 fpspreadsheet: Fix usage of empty cells as numeric value 0 in formulas (https://forum.lazarus.freepascal.org/index.php/topic,42396.msg295893.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6627 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-30 15:06:33 +00:00
7e6025369f fpspreadsheet: Fix formulas not being recalculated when a cell value is deleted in the grid by DEL key (https://forum.lazarus.freepascal.org/index.php/topic,42365.0.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6615 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-27 21:09:21 +00:00
0d87d88c08 fpspreadsheet: Fix range-check-error when reading an xls file with header/footer (issue #34177, patch by Domenico Mammola)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6612 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-24 11:27:21 +00:00
f8f096dcf8 fpspreadsheet: Quote sheet names if they contain illegal characters for the expression parser.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6607 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-17 12:00:02 +00:00
4f1ce39ac9 fpspreadsheet: Improved keyboard navigation in case of merged blocks. Requires Laz-trunk r58711 or later.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6606 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-16 13:49:34 +00:00
f5e6986eb7 fpspreadsheet: New behavior of DEL in WorksheetGrid: deletes only content, not format. Old behavior (delete everything) is CTRL+DEL now.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6605 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-16 13:33:11 +00:00
3767c1a2c9 fpspreadsheet: Fix BIFF to correctly read relative cell address ranges from xls files (https://forum.lazarus.freepascal.org/index.php/topic,42241.msg294536.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6604 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-16 13:19:46 +00:00
f02c683315 fpspreadsheet: Add TsWorksheetGrid property "FixedColWidth" (https://forum.lazarus.freepascal.org/index.php/topic,42216.msg294518.html#msg294518).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6603 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-16 07:32:19 +00:00
e86f39a03c fpspreadsheet: Fix TsCellCombobox not showing a text for items not in list (https://forum.lazarus.freepascal.org/index.php/topic,42216.msg294319.html#msg294319, modified patch by Soner).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6602 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-14 15:26:19 +00:00
2e8c9b626c fpspreadsheet: Fix detection of two-part time format such as 'H:MM;@' in ODS files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6597 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-11 20:54:50 +00:00