f78d780b5f
fpspreadsheet: Allow number formats with no leading digits. Add corresponding unit test cases.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6218 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2018-02-28 12:14:19 +00:00
515e7437e5
fpspreadsheet: Fix number format test case. Now all tests are passed again.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@6060 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-11-06 08:35:25 +00:00
46863f2097
fpspreadsheet: Fix numberformat fails in csv unit tests. A tests passed now.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5779 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-03-02 12:17:32 +00:00
b9cbc1b174
fpspreadsheet: Fix csv unit test fails of some date/time values.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5778 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2017-03-02 11:18:27 +00:00
cacfb22337
fpspreadsheet: Ignore filler columns added by Calc when reading an Excel file.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5269 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-10-19 09:31:06 +00:00
c3ee25b99e
fpspreadsheet: Write row format to xlsx. Update colwidth test case.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5255 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-10-09 21:19:19 +00:00
863be778f9
fpspreadsheet: Add row height type to row record to distinguish custom from auto-calculated row heights. Add grid property AutoCalcRowHeights to use pre-calculated row height instead of always automatically recalculating row heights.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@5233 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-10-01 12:20:18 +00:00
34025326da
fpspreadsheet: Workaround for ods rows and columns erroneously added by Libre/OpenOffice when importing an xlsx file (see forum http://forum.lazarus.freepascal.org/index.php/topic,32193.0.html )
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4610 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-04-08 18:54:58 +00:00
5b946b751f
fpspreadsheet: Add units (mm, cm, in, pts, lines/chars) for column width and row heights. Update all demos (some issues left).
...
NOTE: This revision breaks existing code if the worksheet's DefaultRowHeight/DefaultColWidth is changed - value must be in millimeters now. Methods for accessing individual row heiths and column widths are fine, but are marked as deprecated, they use the old units. Optionally a unit parameter can be specified.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4568 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-18 19:50:40 +00:00
0d7bdfa06c
fpspreadsheet: Move TsCellFormatList from fpsTypes.pas to fpsClasses.pas. Updated chm help file after proof-reading.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4173 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-06-01 19:58:26 +00:00
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
8adf987bf9
fpspreadsheet: Better detection of fraction format by numberformat action. Some clean-up.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4145 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-19 16:18:01 +00:00
03b7dedde7
fpspreadsheet: Improved number format parser
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4082 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-04-18 14:58:38 +00:00
9f26fd4b79
fpspreadsheet: Fix test suite to pass all tests in Linux
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4009 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-03-08 22:13:15 +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
dd4e66216a
fpspreadsheet: Add background fill styles for cells. Fully implemented for Biff5, Biff8 and OOXML; ODS writes an interpolated solid fill (like Open/LibreOffice); Biff2 supports only the 50% gray black&white fill.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3949 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-17 23:32:00 +00:00
47cb730370
fpspreadsheet: Add test cases for cell comments. Fix some bugs related to comments.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3937 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-08 18:26:47 +00:00
8dc16503cd
fpspreadsheet: Add test case for biff2 file with more than 62 xf records
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3936 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-02-08 13:08:49 +00:00
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
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
794f556efe
fpspreadsheet: Add test case for copy format. Fix default vertical text alignment issue of biff5 and biff8.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3817 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-12-01 16:50:00 +00:00
6d388ffc1a
fpspreadsheet: Improved detection of built-in date/time formats in csv. Test case for date/time in CSV, passed.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3700 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-30 13:04:37 +00:00
a1fe949908
fpspreadsheet: Fix unit test for currencies, pass now for all file format (some kind of tweaking for Excel2 and fpc formatting inconsistencies though).
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3699 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-29 22:36:03 +00:00
ba40d180c4
fpspreadsheet: Fix some UTF8-related bugs in connection with currency formats
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3696 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-25 23:05:26 +00:00
8891b0a90b
fpspreadsheet: Add test case for switched decimal and thousand separators in csv file. Fix bugs related to that.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3674 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-20 23:17:07 +00:00
e8351807cc
fpspreadsheet: Fix integer percentage numbers not being correctly detected by the csv reader. Add csv unit test for writing and reading of numbers.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3673 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-10-20 21:52:53 +00:00
4809b84f2f
fpspreadsheet: Test cases for merged cells in xls, xlsx, ods files. Passed.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3557 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-09-12 19:26:31 +00:00
ad1ae69544
fpspreadsheet: Log warning if BIFF writer tries to write more than 64 colors. More clean-up.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3468 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-11 11:16:43 +00:00
a7c1405be0
fpspreadsheet: Support for column widths and row heights of xlsx reader. Extend unit tests --> passed. Add "debug with heaptrc" build mode to spreadtestgui (--> there is an unfixed memory leak in fpsfunc).
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3418 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-03 21:21:31 +00:00
b824d4854b
fpspreadsheet: Implement text alignment, text rotation and word wrap for xlsx reader. Extend these unit tests for xlsx - passed. Some improvements in formattests (better readability of enum data, trying to guarantee deletion of temp file in case of a mismatch).
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3407 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-08-02 19:21:23 +00:00
ead4186b6e
fpspreadsheet: OOXML reading support for cell borders and diagonals. Unit tests adapted. Passed.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3403 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-31 21:05:01 +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
565df8a3e3
fpspreadsheet: Add test cases for xlsx number and date/time formats. Two fails.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3384 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-26 21:52:59 +00:00
243d3b0c7d
fpspreadsheet: try to fix date/time handling on Linux/Unix by adding clocale. Needs to be tested.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3361 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-23 08:15:28 +00:00
42f55e22d7
fpspreadsheet: tests: get empty temp file just before wrtiing out. Coding style: do begin matches initial style+FPC coding style.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3336 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-07-19 13:13:56 +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
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
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
4dd961b590
fpspreadsheet: Writing and reading of horizontal and vertical text alignments in ods files. Add test cases. Pass.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3116 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-28 20:52:36 +00:00
44072f2629
fpspreadsheet: Reading and writing of text rotation in ods files. Add test case. Passed.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3110 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-28 07:53:50 +00:00
99f6a6f1d1
fpspreadsheet: Add unit tests for writing/reading of borders, borderstyle and wordwrap for ods files. Passed.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3109 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-27 22:12:48 +00:00
d29219fc68
fpspreadsheet: Mark TsSpreadsheet.GetLastColNumber/GetLastRowNumber as deprecated, use GetLastColIndex/GetlastRowIndex instead.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3101 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-26 15:27:35 +00:00
ee1db37c7f
fpspreadsheet: In the unit tests, use the same methods for creating "soll" date/times and test format strings. --> No more biff-related regressions.
...
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@3078 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2014-05-22 12:34:10 +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
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
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