Commit Graph

462 Commits

Author SHA1 Message Date
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
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
705a7956ce fpspreadsheet: Pass visibility of gridlines and sheet headers from TsWorksheetGrid to underlying Worksheet for saving.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3041 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-11 16:22:48 +00:00
07824c46c1 fpspreadsheet: Add properties for direct cell font access by TsWorksheetGrid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3040 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-11 16:16:59 +00:00
a954d389c0 fpspreadsheet: Add properties BackgroundColor(s) to TsWorksheetGrid and show usage in fpsgrid demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3039 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-11 11:56:20 +00:00
afe1013755 fpspreadsheet: Add properties TextRotation(s) to TsWorksheetGrid and use in fpsgrid demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3038 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-11 10:39:14 +00:00
0fe1742400 fpspreadsheet: Add properties for setting cell borders to TsWorksheetGrid. Redo border and selection painting again. Fix issues due to adjacent cells having different borders.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3037 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-11 09:20:52 +00:00
ee011598e4 fpspreadsheet: Introduce HorAlignment(s) and VertAlignment(s) properties to tsWorksheetGrid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3035 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-10 12:32:05 +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
e1ddf966a7 fpspreadsheet: Improved painting of the selection rectangle and cell borders in TsWorksheetGrid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3032 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-09 22:00:53 +00:00
9d68a4809d fpspreadsheet: Improved painting of range-selected cells in TsWorksheetGrid, not perfect yet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3030 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-08 22:44:52 +00:00
72bcfc3a5b fpspreadsheet: TsWorksheetGrid transfers row height and col width changes to underlying Worksheet. Automatic adjustment of row height if font changes in a chell.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3029 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-08 21:52:04 +00:00
666f399fb1 fpspreadsheet: ESC cancels the current edit in the TsWorksheetGrid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3028 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-08 15:54:29 +00:00
79a4dd708f fpspreadsheet: Add some cell border buttons to the fpsgrid demo of TsWorksheetGrid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3027 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-08 15:33:25 +00:00
8c95f13bc8 fpspreadsheet: Add vertical alignment buttons to fpsgrid demo of TsWorksheetGrid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3026 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-08 14:53:16 +00:00
8656e66511 fpspreadsheet: Call a font dialog in the fpsgrid demo to interactively change the font of a cell.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3022 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-08 12:12:06 +00:00
27e00db9c0 fpspreadsheet: Add font style buttons to fpsgrid demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3021 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-08 08:08:37 +00:00
6626099d71 fpspreadsheet: the worksheetgrid can be edited again. Beginning to add some cell formatting to the demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3020 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-07 22:44:00 +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
2b601f687c fpspreadsheet: Write SELECTION records (but does not fix BIFF2 frozen col/row issue). Fix issue of BIFFExplorer with BIFF2 PANE records.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3011 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-05 23:05:08 +00:00
707f64e511 fpspreadsheet: Fix show/hide gridlines/headers issue of BIFF2 by adding WINDOW1 record. Move WINDOW1 record of BIFF5-BIFF8 to xlscommon. Add test cases for BIFF2. ok.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3008 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-04 20:01:21 +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
211fdb666f fpspreadsheet: property DisplayFixedColRow of fpSpreadsheetGrid renamed to ShowHeaders. Respects the value read from the xls file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3004 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-03 21:27:31 +00:00
e3446c2964 fpspreadsheet: improve auto row height behavior of fpspreadsheetGrid (remove property AutoRowHeights introduced a few revisions earlier, this is now determined from the value in the file).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3003 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-03 20:12:44 +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
1676d31702 fpspreadsheet: Add date/time reading/writing support to BIFF2 and the corresponding "write-read" unit test cases. Passed.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2988 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-02 18:49:05 +00:00
70f1d5c5e8 fpspreadsheet: Implement number/datetime format support for BIFF5 reading/writing (like BIFF8)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2979 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-30 21:07:41 +00:00
317175e312 fpspreadsheet: Introduce new property AutoRowHeights for fpspreadsheetgrid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2977 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-30 19:09:54 +00:00
5e1e29aef8 fpspreadsheet: Show rotated text in fpspreadsheetgrid.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2976 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-29 21:58:48 +00:00
34db575967 fpspreadsheet: Implement text rotation for BIFF5. Add text rotation test cases for BIIF5 and BIFF8 (no text rotation in BIFF2 by design). Pass.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2974 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-27 15:59:16 +00:00
712e5fb61b fpspreadsheet: Update sample projects
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2973 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-25 22:50:29 +00:00
4a16f9bb90 fpspreadsheet: Add unit test for "bold" attribute in BIFF2 and BIFF8. Fix "bold" being incorrectly restored by reading of both formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2966 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-25 09:32:34 +00:00
988b80b4a4 fpspreadsheet: Add column width support (reading & writing) to biff2. Add column width test cases for BIFF2 and BIFF8 -> pass.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2964 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-24 23:05:00 +00:00
887b34383a fpspreadsheet: Add font unit test for BIFF2. Currently fails. Need to investigate...
Fix occasional floating point conversion error in fpsopendocument because of non-initialized format settings.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2963 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-24 22:31:01 +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
4f85834153 fpspreadsheet: Restructure reader/writer declarations to have in "public" only methods needed by the application
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2957 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-21 11:30:22 +00:00
be497cb19e fpspreadsheet: Add support for horizontal and vertical text alignment in cells for biff8 and fpspreadsheetgrid.
Fix failure to reckognize file format in case of uppercase filename.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2955 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-20 20:31:36 +00:00
313daa2eaf fpspreadsheet: Complete prepared read/write support for cell wordwrap in biff8 and fpspreadsheetgrid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2954 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-20 16:07:53 +00:00
d617abccca fpspreadsheet: Major re-write of fpspreadsheetgrid:
- persistent storage of workbook
- inherits from TCustomDrawGrid instead of from TCustomStringGrid
- use FixedRow/Col for row/column headers 
- displays cell borders as read from the file
- uses column widths as read from the file (approximate only)
- numbers are right-aligned by default.
- demo extended to display worksheets in tabs
- some visual improvements of demo
- saving not yet working in demo
More to follow...

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2951 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-19 19:29:13 +00:00
0f73aed718 fpspreadsheet: Implement reading of cell borders. Delete test.xls in examples/excel8demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2950 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-19 16:58:44 +00:00
36cc7d1f4e fpspreadsheet: Add support for reading/writing of column widths in biff8 (specified as multiples of the width of the character "0"). Add test case. No regressions
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2945 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-18 13:17:22 +00:00
8b688de40b fpspreadsheet: Fix crash when destroying columns and rows.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2942 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-17 20:59:00 +00:00
400bf62aba * OpenDocument/OpenOffice/LibreOffice date/time read fix; code adapted from curtisnewton, thanks a lot! Fixes mantis issue #25585
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2890 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-01-24 10:32:23 +00:00