Commit Graph

52 Commits

Author SHA1 Message Date
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
3189f58ee5 fpspreadsheet: Camelcase some unit names.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@7525 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2020-07-04 10:32:38 +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
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
wp_xxyyzz
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
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
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
92f59fbfd1 fpspreadsheet: Prepare for release 1.10
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6547 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-07-06 16:15:51 +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
f4154f2265 fpspreadsheet: Write cell strings to BIFF8 SST only if strings are longer than 255 characters --> speed-up
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6464 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-05 08:43:41 +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
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
a6900014cf fpspreadsheet: Use a StringHashTable for the SST needed when writing BIFF8 (significant speed-up of files with many strings, but still considerably slower than BIFF5 and BIFF2).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6447 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-31 16:22:41 +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
56f7814556 fpspreadsheet: Fix xls format using incorrect font index in SST (see https://forum.lazarus.freepascal.org/index.php/topic,40784.0.html).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6292 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-04-05 10:42:01 +00:00
wp_xxyyzz
6aedb395f4 fpspreadsheet: Fix xls reader crashing if comment has record sequence OBJ-CONTINUE-TX0-CONTINUE instead of OBJ-TX0-CONTINUE.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6214 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-26 22:20:06 +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
1e3da067f2 fpspreadsheet: Less hints and warnings
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6168 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-02 14:43:37 +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
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
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
wp_xxyyzz
59f0da6d91 fpspreadsheet: Fix Excel readers updating the workbook's default font.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5838 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-04-21 10:38:54 +00:00
wp_xxyyzz
d25851c07f fpspreadsheet: Initial commit of experimental xlsx decryption support (xlsx decryptor written by forum user shobits1).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5806 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-03-14 21:48:29 +00:00
wp_xxyyzz
a4457a850e fpspreadsheet: Add writing support for xls password hashes. Add test case for it.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5799 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-03-07 22:02:09 +00:00
wp_xxyyzz
87ecb8241c fpspreadsheet: Add uffProtection to UsedFormattingFields to simplify reading cell protection.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5798 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-03-07 10:47:28 +00:00
wp_xxyyzz
4505fb76cd fpspreadsheet: Add writing support for cell, sheet and workbook protection in xls files (biff2, biff5, biff8), opendocument and Excel XML files. Not complete, yet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5795 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-03-06 23:30:59 +00:00
wp_xxyyzz
b04fd3f0b5 fpspreadsheet: Add reading of cell, sheet and workbook protection to biff2 and biff5.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5790 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-03-05 17:29:20 +00:00
wp_xxyyzz
2f54a9bfca fpspreadsheet: Add reading of cell/sheet/workbook protection for xls biff8.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5789 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-03-05 16:52:17 +00:00
wp_xxyyzz
4ce25109a8 fpspreadsheet: Read/write worksheet hidden state for biff8 and biff5.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5775 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-03-01 20:01:14 +00:00