Commit Graph

91 Commits

Author SHA1 Message Date
8f666bec13 fpspreadsheet: Fix written oversized worksheets being defective, adapt BIFF writer's WriteDimensions method to be compatible with oversized worksheets.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3455 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-08 14:30:19 +00:00
ff059e3420 fpspreadsheet: Move log list from reader/writer to workbook for easier access. Add unit test for error logging (in internaltests). Improve OOXML writer to begin writing rows only from the first existing row, not from 0. (The ODS writer still does this, therefore, it creates a huge file for the error logging test - this test is currently deactivated for ods).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3446 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-07 22:24:22 +00:00
d0be6284cf fpspreadsheet: OOXML reading/writing support for frozen panes. Simplify OOXML's cell writing strategy by omitting empty cells.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3422 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-04 19:11:17 +00:00
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
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
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
22100c2f16 fpspreadsheet: Possibly fix unit dependence issue forcing to clean rebuilds. Modify project options of fpsgrid and spready to separate compilation platforms.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3358 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-22 22:49:30 +00:00
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
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
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
4c723b9fc3 fpspreadsheet: Convert some more biff methods such records are written in a single block (biff2: WriteLabel, WriteNumber, all: WriteFormat, WriteBlank, WriteColInfo).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3325 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-15 21:00:49 +00:00
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
9607fc8e88 fpspreadsheet: Extend the event OnNeedCellData by a template cell which can be used for formatting when saving a file in virtual mode.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3317 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-14 15:04:04 +00:00
e6e961d51f fpspreadsheet: Add WriteBlank to TsSpreadOOXMLWriter to standardize code.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3309 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-11 20:00:49 +00:00
231b127041 fpspreadsheet: Implement virtual mode for all biff file formats. Add record limitations with writer-specific max row and col counts: a file is not written to a particular file format if it exceeds the limitations of the file format.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3307 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-11 13:20:14 +00:00
3020ad9261 fpspreadsheet: Fix reverse order of rpn tokens when reading an xls file. Fix string formula reconstruction routine. Unit test passed again.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3298 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-08 18:58:22 +00:00
4bd85f70fd fpspreadsheet: Overload methods FindCell and GetCell to TsWorksheet to accept an Excel "A1" address string. Update chm help file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3269 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-02 19:38:21 +00:00
c82e915262 fpspreadsheet: Fix remaining utf8 issues when reading/writing rpn string formulas. Fix BIFFExplorer issues when displaying biff2 formulas. Excel complains about data loss when reading a biff2 file containing a calculated formula having a string result - not fixed yet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3266 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-02 11:51:59 +00:00
9dc234ae22 fpspreadsheet: Unified writing code for rpn formulas. Calculation results of rpn formulas are now stored correctly for all biff versions.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3265 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-01 22:47:10 +00:00
b76ff60882 fpspreadsheet: Beginning to generalize writing of rpn formulas for biff
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3264 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-01 15:31:11 +00:00
cd9e686804 fpspreadsheet: More calculation of rpn formulas, add TestCalcRPNFormulas cases to formulatests. Boolean results not working yet. And implementation only for BIFF8, so far.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3249 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-28 19:40:28 +00:00
9eefbdaa06 fpspreadsheet: Fix bug 0026386 (in Excel, all sheets must be "active" and "selected"). New chm help file. Fix some issues with spready and fpsgrid due to range check errors. BiffExplorer shows detail info on SHEETPR record.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3236 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-24 22:47:15 +00:00
897ad1d9d2 fpspreadsheet: In TsWorksheetGrid, draw a borderline along frozen panes. Fix black background color appearing when re-saving an fpspreadsheet-created workbook in Excel. Some more extended comments for doc-o-matic.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3224 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-23 13:49:12 +00:00
13a9fb2603 fpspreadsheet: Remove built-in number formats nfSci (not suppored by ods and fpc) and nfAccounting/nfAccountingRed (too much display-oriented, too cumbersome to implement for reading and displaying in the grid). If needed in Excel they can still be written using nfCustom. Update all files and tests for these now no longer existing formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3222 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-23 09:15:56 +00:00
d75755c1ff fpspreadsheet: Read frozen panes from ods files. Add test case for writing/reading of ods panes, passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3210 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-21 16:09:08 +00:00
d0927d2d03 fpspreadsheet: Further reduction of hints and warnings
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3206 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-20 15:58:22 +00:00
a85adcb61a fpspreadsheet: Reducing hints and warnings, still a lot...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3203 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-19 19:25:40 +00:00
1e5fa19f94 fpspreadsheet: add support for writing currency formats to ods files. Fix "red" option for negative numbers.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3186 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-17 09:06:34 +00:00
f4f860abc2 fpspreadsheet: Cleaning up
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3167 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-13 20:32:58 +00:00
36765d4f9b fpspreadsheet: Fix issues related to biff2 expecting localized formatting strings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3164 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-13 13:33:02 +00:00
a4ee00f870 fpspreadsheet: Major reconstruction of numberformat parser to facilitate creation of xml formats for ods. Some minor regressions in unit tests and fpsgrid demo to be fixed. Removed elements "Decimals" and "CurrencySymbol" from TCell (this information is taken from the format string now). Removed the built-in format nfFmtDateTime (makes life easier, use nfCustom instead).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3156 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-12 22:20:45 +00:00
c275de3947 fpspreadsheet: Fix BIFF currency bug of previous commit. Fix UTF8 bug when reading currency symbol. No more errors in number test.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3143 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-05 19:57:00 +00:00
33a8fdcb43 fpspreadsheet: Row height and column width reading/writing code for ods files complete. Test cases ok, but extremely slow speed of test application for numbertest and datetimetests. Changed units of row heights in worksheet: used to be points, is "lines" now (more consistent user interface - column width is in "standard characters", I prefer these units over centimeters because row heights/column widths become independent of screen pixels per inch this way)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3118 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-31 21:04:53 +00:00
97ded8dfab fpspreadsheet: Beginning to apply .ods formatting styles to cells
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3103 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-26 22:27:07 +00:00
89f2f4bb57 fpspreadsheet: Extend formula reading test case to biff5 and biff2 and generalize it such that the test results are not affected by locale settings and rounding errors.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3096 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-25 16:49:45 +00:00
934e210a4f fpspreadsheet: Fix incorrect dection of cell ranges when reading biff rpn formulas
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3090 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-24 18:20:30 +00:00
81093f647f fpspreadsheet: Improved reading of rpn formulas: replace "monster case instruction" for function parameter count by lookup table.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3088 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-24 17:11:05 +00:00
4271ace593 fpspreadsheet: Construct Excel-like formula string out of an RPN formula and display it in fpsgrid demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3085 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-23 23:13:49 +00:00
49e99a74b5 fpspreadsheet: Add reading of rpn formulas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3082 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-23 13:16:01 +00:00
239633cb51 fpspreadsheet: Rename number format codes "nfCurrencyDash"/"nfCurrencyDashRed" to "nfAccounting"/"nfAccountingRed" and implement alignment of currency symbols as in Excel. Fix number format parser bug causing a failure in the corresponding test case.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3080 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-22 21:54:24 +00:00
fb92d5a906 fpspreadsheet: Bug fixes for biff2 reading/writing for number formats
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3075 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-21 23:01:07 +00:00
52faebc69e fpspreadsheet: Improvements in biff5/8 reading of number formats, a few date/time relatived issues left. biff2 not yet touched.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3073 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-21 16:23:38 +00:00
a9df011859 fpspreadsheet: More logical writing strategy for biff number formats. Still issues with reading.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3072 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-21 12:12:16 +00:00
00ed56d1ef fpspreadsheet: Integrate number format parser into fpspreadsheet. Some regressions in format detection...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3068 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-20 16:13:48 +00:00
cb9d07d0dd fpspreadsheet: Initial implementation of a number format parser. Not complete yet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3061 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-19 22:26:42 +00:00
f638eb928a fpspreadsheet: Write currency format codes for BIFF5 and BIFF8 (incl. "red" for negatives and "-" for zero).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3053 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-17 15:13:08 +00:00
47d624ab46 fpspreadsheet: Improved reading of results of functions returning strings, booleans, or errors. Optional tests in test suite producing an error when Excel reads the test file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3050 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-16 08:17:49 +00:00
e21231de03 fpspreadsheet: Add controls to change number format to the fpsgrid demo program. Also, add the "brush" button to copy a format to another cell.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3049 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-15 22:41:14 +00:00
dae7caff9c fpspreadsheet: Improved format detection when reading biff files. Unit test without errors due to biff now again. Fix compilation error of other formats due to new NumFormatList.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3048 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-15 12:53:56 +00:00
283a28fabd fpspreadsheet: Fix crash of unit test. Still some number format detection issues.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3046 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-14 23:17:46 +00:00