Commit Graph

45 Commits

Author SHA1 Message Date
7e52faa49f fpspreadsheet: In fpspreadsheet.pas, extract cells AVLTree to fpsclasses.pas. Implement enumerator for the avl trees. Add unit tests for cell and comment enumeration.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3988 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-04 17:30:59 +00:00
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
e0ba07f38b fpspreadsheet: Fix compilation errors
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3958 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-24 00:30:26 +00:00
ac387f67e4 fpspreadsheet: Improve codepage handling for biff2 and biff2 files.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3924 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-04 18:15:19 +00:00
0ecf404c0a fpspreadsheet: Fix TsWorksheetGrid showing frozen cells with black border if TitleStyle is not tsNative. Fix TsSpreadsheetInspector and spready demo crashing due to ignoring the cell content type.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3908 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-29 12:39:52 +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
fd627c1fa1 fpspreadsheet: Introduce an include file (fps.inc) with all conditional defines. They are needed to compile the packages with older LCL/FPC versions (tested back to Laz1.0 / FPC2.4). All patched procedures are in fpspatches.pas and turned on/off by these defines.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3884 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-13 19:02:57 +00:00
988c2a3d7a fpspreadsheet: Less warnings. Prepare TsWorksheetGrid to avoid storing of colwidths and rowheights (requires Mantis #0027279 in Lazarus)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3879 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-09 22:25:20 +00:00
0396e0805d fpspreadsheet: Registration of currency symbols. Add currency dialog to spready. Automatic detection of currencies in in worksheet.WriteCellAsNumber. Avoid redundant code in csv reader's currency detection.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3698 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-29 16:39:49 +00:00
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
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
68649b7275 fpspreadsheet: Initial version of worksheet sorting. Add sorting parameters dialog to spready. Basic demonstration of sorting in spready.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3675 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-21 15:12:51 +00:00
7b3795dc03 fpspreadsheet: Less hints. Adapt spready code to differences between trunk and Laz 1.2.6, remove duplicate colorbox unit in spready.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3667 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-20 09:22:06 +00:00
2a61d87225 fpspreadsheet: Add detection of currency values to the csv reader. Spready: add configuration dialogs for csv parameters and formatsettings.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3665 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-19 21:20:57 +00:00
9f014b6875 fpspreadsheet: Add reading/writing of boolean cell values for BIFF formats.
Add test case for boolean cell values for all formats (incl. CSV). 
Extend spready demo to be able to write sfExcel2 and sfExcel5 formats.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3656 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-14 21:44:00 +00:00
1262d95889 fpspreadsheet: Extend CSV reader to allow multi-line quoted text cells. Modify TsWorksheetGrid to display multi-line text in formulabar.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3654 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-14 12:06:11 +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
6f14b93502 fpspreadsheet: Autoadjust column width and row height in TsWorksheetGrid by double-clicking at border between header cells; update demos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3626 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-03 16:09:54 +00:00
2d7b4fc3c6 fpspreadsheet: Extend "inspector" page in "spready" demo to show information on the selected worksheet of the loaded workbook.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3601 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-24 11:17:43 +00:00
10ad6b7a1a fpspreadsheet: Delete columns and rows from Worksheet and WorksheetGrid
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3571 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-16 15:03:17 +00:00
e07e322170 fpspreadsheet: Redo internal structure of merged cells (use MergeBase cell instead of neighbor links).
Suppress TsWorksheetGrid painting of inner grid lines of merged cells.
Fix inserting columns and rows running through merged cells. 
Silence some warnings. 
Fix ods reading merged cells incorrectly.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3569 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-15 20:54:39 +00:00
a3ed071349 fpspreadsheet: Fix cell range selection issue in TsWorksheetGrid if grid is in edit mode. Fix ods reporting an error due to a worksheet with empty name. Fix some bugs added when introducing text overflow cells (frozen cells incorrectly painted, failure to determine row heights correctly)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3564 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-14 20:40:58 +00:00
430d3770e7 fpspreadsheet: TsWorksheetGrid support overflowing cells now (i.e. text longer than a cell is wide is shown in the neighbor cell).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3563 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-14 16:16:23 +00:00
432cfcc6c0 fpspreadsheet: Some improvements of spready in relation to merged cells (improved row height calculation for merged block, lots of clean-up, in main form move "show header/gridlines" checkboxes to menu)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3561 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-13 18:59:18 +00:00
04929ac56f fpspreadsheet: Add a toolbar icon for merge/unmerge cells to spready demo. Combine merge/unmerge actions to this toolbutton.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3559 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-12 21:38:46 +00:00
02a3b17e6e fpspreadsheet: Show info on Merge cell option in XF record by BIFF explorer. Trying to improve with of color box in spready.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3555 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-12 15:16:46 +00:00
84d3ab4fb8 fpspreadsheet: Misc improvements of TsWorksheetGrid, fpsgrid and spready
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3551 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-11 22:57:55 +00:00
abf0e7f2f6 fpspreadsheet: Improved display of background color in spready. (Note: the unit colorbox.pas is borrowed from the LCL folder, it can be removed once patch #0026707 is included in Lazarus).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3550 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-11 15:02:44 +00:00
dcdd530d16 fpspreadsheet: Improved painting of merged cells by TsWorksheetGrid (but: scrolling paints over the fixed rows).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3549 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-11 13:53:45 +00:00
92cfcfb208 fpspreadsheet: Some fixes in fpspreadsheetgrid and spready demo (tabcontrol instead of pagecontrol for spreadsheetgrid, hang of TsWorksheetGrid due to bug in new code related to merged cells, updates of inspector, better handling of the file-not-found situation, improved commandline interface for spready).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3547 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-11 09:49:16 +00:00
e277e09850 fpspreadsheet: Beginning with infrastructure for merging of cells
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3534 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-09 15:51:56 +00:00
3d4c5282fd fpspreadsheet: Allow localized decimal and list separators in formula editor of the spready demo
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3514 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-02 14:04:38 +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
f430301fd8 fpspreadsheet: Add cell inspector to spready demo (shows properties of selected cell).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3489 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-16 17:37:16 +00:00
03913876d3 fpspreadsheet: Implement automatic calculation of existing rpn formulas whenever a cell changes.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3476 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-13 14:05:29 +00:00
f92f0364d9 fpspreadsheet: Show error messages after reading/writing in the "fpsgrid" and "spready" demos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3469 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-11 11:34:46 +00:00
e7f10f498f fpspreadsheet: Add methods InsertRow and InsertCol to TsWorksheet and TsWorksheetGrid. Update demo "spready".
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3381 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-26 17:05:21 +00:00
8a41c46316 fpspreadsheet: Fix compilation issues introduced in last commit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3268 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-02 19:25:37 +00:00
421fb86dcf fpspreadsheet: Improved display of formula result details in BIFFExplorer.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3240 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-25 14:05:07 +00:00
2692b9beb6 fpspreadsheet: Rename TsWorksheetGrid method NewWorksheet to NewWorkbook (because that's what it does). Add doc-o-matic comments to fpspreadsheetgrid.pas.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3229 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-24 11:45:16 +00:00
ebfabd1010 fpspreadsheet / spready demo: Formula edit line now shows unformatted number, like Excel and Calc do. A value edited in the formula edit line is now transferred to the worksheet (ignoring formulas so far).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3226 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-23 14:32:44 +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
979d97ffd0 fpspreadsheet: Simplify fpsgrid demo (only new/load/save functionality). More complex version of the demo is available now as demo program "spready". Add "WriteCellAvalueAsString" to TsWorksheet which guesses from the passed string whether it is a number, percentage, date, or time.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3213 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-06-22 13:49:48 +00:00