Commit Graph

20 Commits

Author SHA1 Message Date
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
d9343190a4 fpspreadsheet: Add mission routines of the cell record helper. Some cosmetics. Clean up commented lines from previous commit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3895 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-01-24 00:36:10 +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
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
ed409c445a Fix using correct locale settings in Ubuntu.
Workaround for crash of test suite in Ubuntu due to not deleting existing xls file.



git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3365 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-23 16:00:01 +00:00
wp_xxyyzz
ad1bf2a46a fpspreadsheet: Fix manualtest crashing if started a second time from the same gui session.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3280 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-04 15:19:35 +00:00
wp_xxyyzz
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
wp_xxyyzz
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
wp_xxyyzz
08d7ed126e fpspreadsheet: Add unit test for reading rpn formulas
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3093 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-24 20:28:05 +00:00
wp_xxyyzz
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
wp_xxyyzz
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
bigchimp
f32fa5b568 * Tests: clarify background color test only applies to BIFF8 XLS
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2935 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-09 10:49:05 +00:00
bigchimp
38f1612dbf * Fix inadvertent change BIFF8=>BIFF5 tests
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2934 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-08 10:27:50 +00:00
bigchimp
617ba13515 * Tests: fix not writing testmanual.xls
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2933 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-08 10:26:21 +00:00
bigchimp
27498ff548 + Add support for more/easier RPN formulas in XLS
- Allow relative cell references in RPN formulas
- Simplify generation of RPN formulas by using nested function calls
- Add writing of cell ranges for formulas in BIFF2/BIFF5
- Simplification of code e.g. by replacing the huge case instruction in TsSpreadBiffWriter.FormulaElementKindToExcelTokenID by a look-up table.
Fixes mantis issue #25718; patch by wp; thanks a lot!



git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2931 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-08 09:48:30 +00:00
bigchimp
b7eb5352c0 * Tests updated to work with current code (i.e. no new RPN support yet).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2930 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-08 09:33:13 +00:00
bigchimp
d8c10d8668 * Tests part of patch referenced issue 25718 (actual patch on forum) for RPN formulas. Thanks wp.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2929 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-04-07 16:42:19 +00:00
bigchimp
7f7d07f151 + Add support for text/number/date formats in BIFF8/xls.
+ Add support for writing out date/time to non-BIFF8 xls (though as text only for now)
  Slightly modified patch by wp, thanks a lot. 
  See
  http://forum.lazarus.freepascal.org/index.php/topic,22940.msg136761.html#msg136761

Still to do: add test cases for invalid format strings



git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2863 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-12-22 14:02:04 +00:00
bigchimp
abd8d0bea8 + Add date/time/datetime read/write support for BIFF8 xls format. No plans for earlier formats though the code could be adapted
+ XLS BIFF8: added DATE and TIME worksheet functions to RPN formula
* Allow writing formulas,numbers etc using cardinals increasing row/column limits for formats that support it.
* Add checks for text cell size limits when writing xls, xml. If exceeded, cell text will be truncated (better than corrupting the xls file - e.g. try to open it with Excel 2002 - as happens now with xls format)
* Formats that use fpspreadsheet zip have extra checks to prevent crashes for invalid zip dates
+ Use FPC built-in zip format when using FPC 2.7.1+ as it has fixes/improvements (e.g. zip64 support)
+ Added FPCUnit test suite to test reading and reading writing files. For now uses BIFF8 xls; contributions for other formats and more tests welcome. See the tests subdirectory.
+ Add link to msodumper tool for reference/debugging/troubleshooting .xls output

Fixes Mantis bugtracker issue #25388



git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@2857 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2013-12-07 13:42:22 +00:00