Commit Graph

60 Commits

Author SHA1 Message Date
wp_xxyyzz
64b69c2893 fpspreadsheet: Fix compilation issue due to stupid 64-bit fpc not being able to pick correct overload of MinValue. Less hints on 64 bit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7556 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-07-22 17:55:17 +00:00
wp_xxyyzz
901b92fa72 fpspreadsheet: Some clean-up: Less hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7555 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-07-22 09:07:59 +00:00
wp_xxyyzz
fa4f0c306e fpspreadsheet: Add Worksheet.TabColor support. Update biff8/ooxml/ods readers/writers for it. Add test case for it.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7326 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-02-10 15:23:30 +00:00
wp_xxyyzz
2d29205b57 fpsrpeadsheet: Excel xls format (BIFF8, BIFF5 and BIFF2) supports PageBreaks now.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7071 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-07-24 15:50:43 +00:00
wp_xxyyzz
6fb1f76bc2 fpspreadsheet: Introduce enum field "Options" of TRow and TCol records to replace boolean "Hidden". Prepare for new "PageBreak" option.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7068 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-07-23 14:41:55 +00:00
wp_xxyyzz
47e9e05399 fpspreadsheet: Refactor dialects in formula parser.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7067 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-07-22 17:49:17 +00:00
wp_xxyyzz
347c7328d1 fpspreadsheet: Fix localized AM/PM string appearing in time format strings (https://forum.lazarus.freepascal.org/index.php/topic,46069.msg327309.html#msg327309).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7043 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2019-07-16 22:11:00 +00:00
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
1a0404f2ee fpspreadsheet: Fix reading of shared formulas in xls files (bug introduced by the new calculation engine).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6584 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-10 11:47:33 +00:00
wp_xxyyzz
e908d9ba3b fpspreadsheet: Fix reading of all BIFF formula attributes, also for BIFF2.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6581 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-10 09:41:18 +00:00
wp_xxyyzz
7f09efa7de fpspreadsheet: Fix xls reader rejecting formulas with embedded line-break tokens.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6580 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-10 08:15:18 +00:00
wp_xxyyzz
1da8569c84 fpspreadsheet: Fix reading of IF formulas written by Excel (modified patch by Soner, https://forum.lazarus.freepascal.org/index.php/topic,42168.msg293864.html#msg293864).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6578 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-08-09 22:42:36 +00:00
wp_xxyyzz
b9979977f6 fpspreadsheet: Fix entering new data in existing formula not erasing formula. Add corresponding unit test cases.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6545 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-07-05 12:51:54 +00:00
wp_xxyyzz
8c181f7e62 fpspreadsheet: Install TFileName property editor for Laz < 1.9. Fix compilation of fps packages for Laz >= 1.0 (could not compile Laz 1.2, though).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6471 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-07 08:42:11 +00:00
wp_xxyyzz
ff9deb89c2 fpspreadsheet: Fix pasting of multiselection from clipboard (was related to incorrect recordsize of BIFF SELECTION record).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6468 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-05 23:34:16 +00:00
wp_xxyyzz
8ee5fe1200 fpspreadsheet: Fix reading of shared formulas in xls BIFF5 and BIFF8 (no shared formulas in BIFF2)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6459 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-04 19:05:07 +00:00
wp_xxyyzz
38001d24d7 fpspreadsheet: Less hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6456 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-04 11:03:03 +00:00
wp_xxyyzz
394c8032df fpspreadsheet: Fix 3d formulas not changing when rows/cols are inserted/deleted in referenced sheets.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6454 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-04 09:47:08 +00:00
wp_xxyyzz
6c19ca21cb fpspreadsheet: Fix crash when referenced worksheet does not exist.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6453 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-03 11:07:42 +00:00
wp_xxyyzz
f68c5da31c fpspreadsheet: Fix iterative 3d formula correction terminating prematurely.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6449 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-02 11:46:57 +00:00
wp_xxyyzz
40fabfc201 fpspreadsheet: Redo storage of formulas: formulas now are stored in a separate tree independent of the cells tree. The field FormulaValue of TCell record was removed. All unit tests passed. Demos updated (issues of speedtest due to SST in BIFF8 found - not related).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6446 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-30 22:15:07 +00:00
wp_xxyyzz
d5e5df7485 fpspreadsheet: Rearrange units to better avoid circular unit references. General idea: no unit of the package must "use" fpspreadsheet.pas in the interface section.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6444 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-22 22:21:15 +00:00
wp_xxyyzz
fd2a79771a fpspreadsheet: Update cell flag cf3dFormula after parsing of a formula.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6424 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-16 22:31:30 +00:00
wp_xxyyzz
b94ba1fac6 fpspreadsheet: Simplify handling of 3d references. Fix bug related to 3d reference type 'Sheet1:Sheet2!A1'.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6422 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-16 17:44:02 +00:00
wp_xxyyzz
4ab667eb30 fpspreadsheet: Fix PageLayout. Separate BIFF5 and BIFF8 handling of 3d references.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6412 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-15 07:37:50 +00:00
wp_xxyyzz
d2351b5559 fpspreadsheet: Fix 3d cell references with a single other sheet (Sheet1!A1:C3), except for ODS. 3d references with several sheets prepared (not tested yet). Some more unit tests.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6408 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-13 10:15:13 +00:00
wp_xxyyzz
bc685aaeb8 fpspreadsheet: Write single-sheet 3d references (e.g., 'Sheet1!A1:B6') to BIFF8 (xls). Issues with reading.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6405 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-11 23:18:10 +00:00
wp_xxyyzz
e98bda1717 fpspreadsheet: Add BIFF5 writer for 3d references. Add corresponding unit test. Some related bug fixes. Less hints.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6401 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-10 14:31:37 +00:00
wp_xxyyzz
74c64b7258 fpspreadsheet/formulas with 3d references: Implement BIFF5 reader for 3d references. Some DebugLn insertions for better debugging (triggered by define FPSpreadDebug).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6400 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-09 21:38:24 +00:00
wp_xxyyzz
bfb8cff66e fpspreadsheet/formulas with 3d references: sfExcel8 can read them now. Several bug fixes (e.g. '=Sheet1!A1' was not working). Add testcases.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6399 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-09 17:07:59 +00:00
wp_xxyyzz
e4f6f6e355 fpspreadsheet: Implement simplest 3D cell references (single cells on any sheet within the same workbook). No reading for xls so far, writing is ok. Reading/writing to xlsx and ods ok.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6398 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-08 22:32:09 +00:00
wp_xxyyzz
e47e969aec fpspreadsheet: Add WorkbookOption boAbortReadOnFormulaError. Off by default, i.e. Reader continues after finding an unknown formula.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6207 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-20 17:35:23 +00:00
wp_xxyyzz
9b8e818c3c fpspreadsheet: Fix max string length test.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6056 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-11-03 21:04:07 +00:00
wp_xxyyzz
f20779983f fpspreadsheet: Fix biff8 writer to use CONTINUE records if text in STRING record is too long.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6055 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-11-03 18:43:37 +00:00
wp_xxyyzz
0310e5587e fpspreadsheet: Write biff8 text cells to shared-string-table to overcome string truncation at 255 characters.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6054 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-11-03 13:39:12 +00:00
wp_xxyyzz
d62cd79a4c fpspreadsheet: Fix Excel8 reader crashing if file does not contain a FONT record (reported by Malcolm Buckingham on mailing list, Oct 30 2017)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6047 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-10-30 13:08:55 +00:00
wp_xxyyzz
cc891712d0 fpspreadsheet: Introduce fpspreadsheet exceptions.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6043 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-10-26 08:11:58 +00:00
wp_xxyyzz
709be76b4f fpspreadsheet: Add support for xls one-parameter SUM formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6031 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-10-04 12:36:16 +00:00
wp_xxyyzz
96ffaaa4d2 fpspreadsheet: Fix crash of db_import_export demo in virtual mode.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5993 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-08-09 22:52:49 +00:00
wp_xxyyzz
05bdb8bb88 fpspreadsheet: Fix violated file formation limitations when reading some xls files (http://www.lazarusforum.de/viewtopic.php?f=18&t=10824&start=15)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5987 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-07-24 15:18:13 +00:00
wp_xxyyzz
25da629e34 fpspreadsheet: Allow writing duplicate filler palette entries like in the built-in Excel colors
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5867 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-05-18 15:03:20 +00:00
wp_xxyyzz
078274920d fpspreadsheet: Fill unused BIFF5 and BIFF8 palette entries by default colors to avoid Excel XP show an incomplete color dialog.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5863 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-05-18 10:50:22 +00:00
wp_xxyyzz
5c409068c2 fpspreadsheet: Fix conversion of biff palette colors for fonts in reader.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5860 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-05-17 21:43:30 +00:00
wp_xxyyzz
e1f03daa5c fpspreadsheet: Fix biff format writing non-editable palette indexes to file (Excel cannot edit the cells any more - see http://forum.lazarus.freepascal.org/index.php/topic,36903.0.html)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5859 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-05-17 17:26:48 +00:00