Commit Graph

137 Commits

Author SHA1 Message Date
wp_xxyyzz
4517d6fc12 fpspreadsheet: Fix sudden fails of test suite (Why did these test cases work earlier?)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6465 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-05 09:33:29 +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
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
f3ae814cc5 fpspreadsheet: Fix reading of shared formulas in XLSX.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6458 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-04 14:54:02 +00:00
wp_xxyyzz
fb9917e10c fpspreadsheet: Fix crash when copying a formula to the clipboard (see https://forum.lazarus.freepascal.org/index.php/topic,41161.msg287786.html#msg287786)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6457 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-04 13:42:36 +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
115a423be5 fpspreadsheet: Fix crash when a row is deleted with a formula and referenced cells of another formula (see discussion in https://forum.lazarus.freepascal.org/index.php/topic,41161.msg287707.html#msg287707).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6452 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-02 16:35:14 +00:00
wp_xxyyzz
c7f9a9e7cb fpspreadsheet: Some clean-up.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6450 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-02 16:15:44 +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
79f14f6143 fpspreadsheet: Fix 3d formulas when worksheets are renamed or deleted. Add corresponding test cases.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6448 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-06-01 17:58:14 +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
b9ac1ebf02 fpspreadsheet: Introduce infrastructure to fix formulas when sheets are added, renamed etc. Not functional at the moment.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6442 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-21 08:28:51 +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
79d7b2dc54 fpspreadsheet: Fix formula cell with 3d reference not updating when referenced cell is deleted.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6423 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-16 20:41:03 +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
613c96821c fpspreadsheet: Ignore the order of indexes in cell ranges when parsing formulas. Add corresponding unit tests.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6420 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-16 08:45:28 +00:00
wp_xxyyzz
8adcbb27cd fpspreadsheet: Fix creation of erratic sheets by XLSX reader if not-yet-existing sheets are referenced in formulas during reading.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6415 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-15 12:05:18 +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
28d6da64fc fpspreadsheet: Fix cell ranges in ods formula parser. --> 3d single-sheet references (Sheet1!A1;B4) working for all ODS now for both reading and writing. PageLayout broken for BIFF5 at the moment.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6409 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-13 23:09:18 +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
4f4c913ac0 fpspreadsheet: Read and write xlsx files with formulas containing internal references to a range of cells within the same sheet (e.g., 'SUM(Sheet2!A1:B5)' ).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6403 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-10 17:58:05 +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
7416450bf4 fpspreadsheet: Avoid creating a blank cell if the row/col indexes passed to Worksheet.ReadAsText(row, col) are those of a non-existing cell (see https://forum.lazarus.freepascal.org/index.php/topic,41132.msg284876.html).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6377 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-04 07:43:48 +00:00
wp_xxyyzz
499efd7b8c fpspreadsheet: Fix compilation with fpc before 3.0
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6363 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-05-01 10:23:42 +00:00
wp_xxyyzz
b6e1a4c495 fpspreadsheet: Fix WorksheetGrid not being able to delete a cell block.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6323 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-04-19 20:30:43 +00:00
wp_xxyyzz
0e4645f9bf fpspreadsheet: Check (and fix) compilation of all demo projects (changed handling of include files in fpc 3.0.4)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6317 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-04-18 11:42:22 +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
2dfd81b11b fpspreadsheet: Comment an unfinished border drawing routine which made it into the previous commit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6286 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-04-01 13:43:02 +00:00
wp_xxyyzz
51c6c2940e fpspreadsheet: Avoid selecting a non-base cell of a merged block (patch by wofs, https://forum.lazarus.freepascal.org/index.php/topic,40726.msg281408.html#msg281408).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6285 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-04-01 13:38:57 +00:00
wp_xxyyzz
bcc69621fb fpspreadsheet: Change default csv encoding back to utf8 without bom, because importing csv into Excel and Calc is probably not the most important application of fpspreadsheet, and many other programs will not expect a bom in a text file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6258 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-03-18 23:03:57 +00:00
wp_xxyyzz
15a617af53 fpspreadsheet: Use UTF8 with BOM as default encoding for CSV reader/writer (better compatibility with Excel/LOCalc, see https://forum.lazarus.freepascal.org/index.php/topic,40527.msg280025.html#msg280025)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6257 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-03-18 22:51:08 +00:00
wp_xxyyzz
a70231ab75 fpspreadsheet: Make sure that the local variable commentcell_rct in TxCustomWorksheetGrid.InternalDrawRow is initialized (issue #33413, patch by Lagunov Aleksey).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6234 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-03-11 21:06:49 +00:00
wp_xxyyzz
24153116a4 fpspreadsheet: Fix reading/writing of milliseconds. Add corresponding test cases. (NOTE: ods cannot display tenths of a second).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6228 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-03-07 22:35:19 +00:00
wp_xxyyzz
72edcdf239 fpspreadsheet: Don't write leading '=' to ods formulas if in ignoreformulas mode.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6220 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-03-04 09:35:40 +00:00
wp_xxyyzz
f78d780b5f fpspreadsheet: Allow number formats with no leading digits. Add corresponding unit test cases.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6218 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-28 12:14:19 +00:00
wp_xxyyzz
022b837553 fpspreadsheet: Fix error in Round function. Add a second unit test for Round.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6217 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-27 22:21:49 +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
659b19e80f fpspreadsheet: Activate boIgnoreFormulas also when reading an ods file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6213 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-25 18:55:47 +00:00
wp_xxyyzz
0282943962 fpspreadsheet: Make ods reader skip the source table of an external reference
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6211 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-22 09:27:34 +00:00
wp_xxyyzz
ef46ccd90d fpspreadsheet: Add workbook option boIgnoreFormulas for writing unsupported formulas (See forum https://forum.lazarus.freepascal.org/index.php/topic,40146.0.html).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6209 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-20 23:02:45 +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
6edaaa7b11 fpspreadsheet: Fix compilation with Laz 1.0/2.6.0
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6182 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-07 00:01:31 +00:00