Commit Graph

73 Commits

Author SHA1 Message Date
wp_xxyyzz
3e6dd484f7 fpspreadsheet: Fix compilation issues when fpc version is changed: separate package units into different folders, incorporate code of fpsnumformatparser in unit fpsnumformat and code of fpsregfileformats in units fpsreaderwriter. Check and fix all demos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5282 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-10-22 20:59:00 +00:00
wp_xxyyzz
c639d3f13d fpspreadsheet: Modified virtual mode (VirtualColCount, VirtualRowCount and OnWriteCellData were moved from workbook to worksheet). NOTE: THIS BREAKS EXISTING CODE USING VIRTUAL MODE.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4968 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-07-14 19:43:15 +00:00
wp_xxyyzz
9280718d44 fpspreadsheet: Fix xlsx image distortion introduced with new workbook units.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4569 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-18 20:27:17 +00:00
wp_xxyyzz
5b946b751f fpspreadsheet: Add units (mm, cm, in, pts, lines/chars) for column width and row heights. Update all demos (some issues left).
NOTE: This revision breaks existing code if the worksheet's DefaultRowHeight/DefaultColWidth is changed - value must be in millimeters now. Methods for accessing individual row heiths and column widths are fine, but are marked as deprecated, they use the old units. Optionally a unit parameter can be specified.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4568 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-18 19:50:40 +00:00
wp_xxyyzz
998c8b0dfc fpspreadsheet: Replace workbook's EmbeddedStream by a more general EmbeddedObj storing image width, height and format as well.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4556 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-15 12:29:58 +00:00
wp_xxyyzz
2a026867ca fpspreadsheet: Finalize image and headerfooter_image demos. Update readme in other demos folder.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4547 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-13 23:01:12 +00:00
wp_xxyyzz
44b8adf293 fpspreadsheet: Activate scaling factor for embedded images.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4546 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-13 22:28:59 +00:00
wp_xxyyzz
a5e8d60e81 fpspreadsheet: Add writing of header/footer images to ods.
Reorganize ods header/footer code. 
Fix writing of page margings for ods. 
Fix Excel failing to load file with footer image.
Add header/footer image and image demos.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4545 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-13 18:15:40 +00:00
wp_xxyyzz
3eeefd11eb fpspreadsheet: Update readme file in examples/other/.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4171 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-31 20:50:07 +00:00
wp_xxyyzz
cb6433ad15 fpspreadsheet: Add demo how to write all Excel8 colors.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4157 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-28 21:54:05 +00:00
wp_xxyyzz
545bd7ed0f fpspreadsheet: Major reconstructor of color management: no more palettes now, use direct rgb colors instead. May break existing code - sorry! Update all demos and unit tests (passed).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4156 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-28 20:08:24 +00:00
wp_xxyyzz
03b7dedde7 fpspreadsheet: Improved number format parser
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4082 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-04-18 14:58:38 +00:00
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
f9dc0c3370 fpspreadsheet: More sorting criteria: case-senstivity, numbers first or text first in case of mixed ranges. Update spready.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3680 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-23 13:38:41 +00:00
wp_xxyyzz
fb8faab20b fpspreadsheet: Fix compilation error introduced yesterday. Fix multi-key sorting which now passes all tests.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3679 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-23 09:07:20 +00:00
wp_xxyyzz
4a1a99044b fpspreadsheet: Fix circular unit reference bug (thanks, Michael). Add demo_sorting.pas unit missing from last commit. Some improvements with multi-key sorting, but still in error sometimes (--> sorting code is still experimental).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3678 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-22 23:25:26 +00:00
wp_xxyyzz
233c735db6 fpspreadsheet: Improved sorting parameters (individual sort direction for sort keys). Fix some bugs. Begin to write a sorting test case. Add a demo on sorting.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3676 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-21 22:57:02 +00:00
wp_xxyyzz
dcbbb0c0a1 fpspreadsheet: Cells for which the OnWriteCellData event handler returns null are skipped in virtual mode if they don't carry a format.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3603 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-24 13:59:51 +00:00
wp_xxyyzz
4ed3b47628 fpspreadsheet: Add test cases for insert/delete rows into worksheets containing formulas. Issues remaining when cells referred to by the formula are deleted. Add detection of error values to the formula scanner.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3581 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-19 14:22:18 +00:00
wp_xxyyzz
b22ab8deba fpspreadsheet: Move rpn stuff from fpspreadsheet.pas to a new unit fpsRPN.pas. Move translatable strings from fpspreadsheet.pas to a new unit fpsStrings.pas. Make sure that all demos still run in the new environment.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3572 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-17 08:38:31 +00:00
wp_xxyyzz
eb4dbd80e5 fpspreadsheet: Modify demos to write compiled units to the common directory "lib" within the examples folder as far as possible.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3570 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-15 21:27:57 +00:00
wp_xxyyzz
c03833de40 fpspreadsheet: Add some more formulas
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3511 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-01 22:37:14 +00:00
wp_xxyyzz
c3becffe34 fpspreadsheet: Modify expression parser to accept decimal and list separators different from the default point and comma.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3509 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-01 08:17:35 +00:00
wp_xxyyzz
c87afdcdec fpspreadsheet: Redo handling for formulas:
- Allow processing of string formulas (conversion to/from rpn formulas, calculation). 
- Drop cell ContentType cctRPNFormula. 
- Drop field RPNFormulaValue of TCell record. 
- Remove all fekXXXX declarations for sheet functions. Function is specified by name now.
- Complete registration mechanism for user-defined formulas.
Adapt all demos
Test cases working
This commit does not yet support: shared formulas, formulas in ods.


git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3506 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-30 18:03:22 +00:00
wp_xxyyzz
a043b77519 fpspreadsheet: Remove workbook property ReadFormulas, use option boReadFormulas instead. Update all demos affected. Modify most demos to no longer require the fps package.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3505 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-29 15:32:43 +00:00
wp_xxyyzz
5e5eccef12 fpspreadsheet: In expression parser, use double quotes (instead of single quots) to identify strings (Excel/OO/LO standard)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3502 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-22 11:16:00 +00:00
wp_xxyyzz
5257052685 fpspreadsheet: Add string concatenation operation & to expression parser; remove string concatenation by means of "+"
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3501 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-22 10:54:55 +00:00
wp_xxyyzz
e122d42652 fpspreadsheet: Add modified version of fpexprpars.pp as formula expression parser. Demo_expression_parser (in examples/other) runs fine. Currently only basic functionality, no function support yet. Not yet integratated into the framework.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3500 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-22 07:27:54 +00:00
wp_xxyyzz
2e236d1fe7 fpspreadsheet: Fix shared formula incorrectly written assigned to cell row. Add shared formula to demo_write_formula.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3496 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-19 10:15:35 +00:00
wp_xxyyzz
67186349be fpspreadsheet: make sure that formulas are only recalculated when needed (in particalar only once after loading a file). Rename worksheet option soCalcAfterSaving to boCalcAfterSaving and assign it to the Workbook. (Add section "Incompatible changes" to wiki).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3478 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-13 19:23:59 +00:00
wp_xxyyzz
c575126fa0 fpspreadsheet: Implement writing of ODS files in virtual mode. Adapt demo_virtualmode_write, speed test, and unit test (--> passed).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3443 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-07 08:43:11 +00:00
wp_xxyyzz
de5e05ec86 fpspreadsheet: Clean-up of demos (sometimes the default built mode was lost). Add some more overloaded methods to TsWorksheet having the cell as an argument instead of row/col index.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3411 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-02 22:31:19 +00:00
wp_xxyyzz
340efa7c8f fpspreadsheet: Implement virtual reading mode for biff2 and ods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3373 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-24 15:56:03 +00:00
wp_xxyyzz
5a65855a48 fpspreadsheet: Implement virtual reading mode for biff8 and biff5 (activated by workbook option boVirtualMode when reading). Add demo_virtualmode_read. Update speed test (factor 2 faster than standard mode, main advantage: no significant memory usage)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3372 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-24 11:51:34 +00:00
wp_xxyyzz
7f8e8fb312 fpspreadsheet: Rename virtual mode event handler OnNeedCellData to OnWriteCellData. Add another virtual mode event handler for reading, OnReadCellData.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3370 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-23 21:51:06 +00:00
wp_xxyyzz
6959ebb070 fpspreadsheet: Rename test_* projects in folder examples/other to demo_*. Remove dependence on laz_fpspreadsheet package for easier testing, use unit directory for compiled files. Add readme.txt for this folder.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3366 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-23 20:52:35 +00:00
bigchimp
40e2a85bd1 fpspreadsheet: clean up examples: progress messages; remove win32 gui for console applications etc
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3362 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-23 10:47:38 +00:00
bigchimp
667e36f420 fpspreadsheet: harmonize debug & release modes for examples; e.g. don't generate debug info and then issue strip option
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3360 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-23 07:01:57 +00:00
wp_xxyyzz
064dd6aba2 fpspreadsheet: Extend TBufStream for reading. Rename workbook's WritingOptions to Options, and the option flags from woXXXX to boXXXX. Use boBufStream (former woBufStream) to activate TBufStream for reading of xls and ods. Speed up reading of biff2 by factor 3 (rel to commit before prev one). Fix pile-up of temporary files when saving ods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3357 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-22 15:59:29 +00:00
wp_xxyyzz
ba37ace85f fpspreadsheet: Read entire biff record of label and number cells to speed up reading (30% improvement for biff2). Numerous clean-up, mostly debugger settings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3355 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-21 20:33:25 +00:00
wp_xxyyzz
7a3a9060e9 fpspreadsheet: Fix memory leak in virtual mode due to incorrectly initialized strings in the cell record.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3352 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-20 18:19:43 +00:00
wp_xxyyzz
08987b52c8 fpspreadsheet: Use TBufStream as general-purpose stream if woBufStream is set in Worksheet.WritingOptions. woBufStream replaces woSaveMemory. Results in a significant speed enhancement for biff2 (64000x100 cells -> 31 sec without, 1.7 sec with woBufStream).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3337 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 13:23:12 +00:00
wp_xxyyzz
7f6277ca08 fpspreadsheet: Add unit fpsstreams containing a buffered stream for speed-up of writing in virtual mode.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3331 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-18 22:48:38 +00:00
wp_xxyyzz
be3e5d16ac fpspreadsheet: Speed up biff writing for number and label cells in woSaveMemory mode by a factor of 4 (writing complete records instead of single bytes and words)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3321 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-15 14:59:48 +00:00
wp_xxyyzz
e3c0eb2dc0 fpspreadsheet: Write custom row heights and column widths to xlsx files. Works in virtual mode also.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3320 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-15 13:31:45 +00:00