Commit Graph

76 Commits

Author SHA1 Message Date
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
c5f6cbe82d fpspreadsheet: Replace for-to loops by for-in loops if possible. Update example demos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3991 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-05 10:35:32 +00:00
b267fd7694 fpspreadsheet: Implement reading of cell comments from opendocument files. Fix cell text with manual line break in opendocument files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3913 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-30 16:50:23 +00:00
8f3d5d471f fpspreadsheet: Fix buffered stream reading speed issues.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3904 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-27 19:31:57 +00:00
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
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
af452001d4 fpspreadsheet: Greatly reduce hints and warnings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3632 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-06 10:43:10 +00:00
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
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
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
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
6fa634e0a2 fpspreadsheet: Extend BIFFExplorer to display Rich-Text information attached to wide strings
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3504 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-29 15:02:00 +00:00
e96b16b993 fpspreadsheet: Add support for diagonal border lines. Implemented for BIFF8 and ods (BIFF2 and 5 do not support diagonal borders, OOXML reader currently does not have border support). Test cases adapted. "spready" adapted to show diagonal borders.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3400 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-30 22:51:59 +00:00
fce1ea9409 fpspreadsheet: In fpolebasic manually delete an existing file before writing; this seems to fix a crash with Linux.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3367 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-23 21:09:47 +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
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
aad8798b82 fpspreadsheet: Remove unused unit from excel8read project
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3286 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-05 21:51:04 +00:00
bab574b3b4 fpspreadsheet: rename the Create* funtions needed for for formula calculation to Create*Arg
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3282 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 21:17:15 +00:00
30569b00c0 fpspreadsheet:
- laz_fpspreadsheet packages does not need to be designtime, so do not register it
- cosmetic: example projects are .lpr not .dpr; reflect in comments



git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3242 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-26 07:15:51 +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
24fac70d0c * fpspreadsheet: add readme.txt files for demos
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3223 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-23 11:56: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
34bfc55a37 fpspreadsheet: Experimenting with doc-o-matic (nice tool). Beginning to standardize comments for usage by doc-o-matic. Update chm help file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3208 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-20 23:06:29 +00:00
5bc0898317 fpspreadsheet: Add note to examples\*read to run the *write program if input file does not exist. Activate all commented code in the examples.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3192 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-18 08:07:00 +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
8aee090396 fpspreadsheet: Remove testing code from excel8write.lpr
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3157 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-12 22:22:56 +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
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
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
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
c3f5600c0d fpspreadsheet: Read results of formulas that return strings
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3045 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-14 16:30:33 +00:00
c36a5e80ce fpspreadsheet: Building a number format list which allows to drop most of the restrictions of the previous versions like number of decimal places. New number format "nfCustom" which passes the format string directly to the file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3044 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-14 15:24:02 +00:00
e00fedff8b fpspreadsheet: Add reading support for MULBLANK records (BIFF5 and BIFF8)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3034 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-09 22:37:05 +00:00
f0928db9f5 fpspreadsheet: Row heights now can be saved to all biff versions. Add unit test case for row heights, ok. Bug fixed in BIFFExplorer with format detection.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3019 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-07 18:31:27 +00:00
482eac242a fpspreadsheet: Add support for frozen panes in BIFF5/BIFF8 (BIFF2 not working at the moment), fpSpreadsheetGrid, and BIFFExplorer.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3005 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-04 18:07:54 +00:00
44c55efdbd fpspreadsheet: Add properties ShowGridLines, ShowHeaders, Selected to Worksheet to interface with fpSpreadsheetGrid. Read/write to xls file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3002 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-03 19:07:55 +00:00
b93d9eae0c fpspreadsheet: Add linestyle and linecolor as attributes to cell borders. Works in BIFF8 and BIFF5 (BIFF2 does not support this). Add corresponding unit test cases -> passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2999 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-03 17:00:00 +00:00
c174566e55 fpspreadsheet: Some refinements with color handling:
- Add some more colors to the default palette, remove the duplicate base colors
- Introduce type TsColorvalue for the rgb color values
- At init, automatically convert big-endian color values to little-endian
- Add TsWorkbook.SetColorValue to replace a palette color
- Add testing of random palette to colortests
- Add color test for BIFF2 (font only, because background color cannot be changed by design)

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2962 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-24 21:27:57 +00:00
f69a47c902 fpspreadsheet: Add/complete color support for biff2 and biff8, reading and writing. Display colors in fpspreadsheetgrid.
Remove parameter AData in several methods of the readers/writers and replace it by FWorkbook passed at creation.
Add unit tests for font and color support. No issues.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2960 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-23 22:29:32 +00:00
c61e4418b7 fpspreadsheet: Add reading and writing of font support to biff8, biff2, and fpspreadsheetgrid. Font colors in biff2 not yet working. No test cases yet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2959 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-22 23:10:32 +00:00
f7f1b0f12a fpspreadsheet: Add support for empty cells to all BIFF formats (needed for formatting of empty cells).
Fix painting error of cell borders in fpspreadsheetgrid.
Add/complete reading/writing support for horizontal alignment, cell background and cell borders to BIFF2.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2958 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-21 21:43:43 +00:00