Commit Graph

429 Commits

Author SHA1 Message Date
e76a0394d3 fpspreadsheet: User-provided registration of image formats. Automatic detection of image format from file header.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4552 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-14 22:04:00 +00:00
44b8adf293 fpspreadsheet: Activate scaling factor for embedded images.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4546 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-13 22:28:59 +00:00
a5e8d60e81 fpspreadsheet: Add writing of header/footer images to ods.
Reorganize ods header/footer code. 
Fix writing of page margings for ods. 
Fix Excel failing to load file with footer image.
Add header/footer image and image demos.

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4545 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-13 18:15:40 +00:00
c8d5e0f95a fpspreadsheet: Add text format. Allow leading apostrophe to prevent conversion of a cell text to numbers.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4538 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-09 21:17:53 +00:00
e17429c92c fpspreadsheet: Load images for header/footer into workbook's embedded streams list.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4531 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-04 23:43:40 +00:00
f1c07951dd fpspreadsheet: Move PageLayout to separate unit (fpsPageLayout). Move PrintRanges and RepeatedRows/Cols to PageLayout. Some simplifiations because TsPageLayout is a class now. Prepare for images in header/footer.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4530 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-04 23:01:21 +00:00
58547464d3 fpspreadsheet: Initial support for embedded images. Writer for xlsx. Avoid writing relationship for non-existing files to xlsx. Add "numFmtId=0" to xlsx styles (seems to be mandatory for import to Access).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4528 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-03-03 19:12:58 +00:00
1504384e79 fpspreadsheet: Add reading of print ranges and repeated print cols/rows for xlsx. xlsx unit test for print ranges. Fix reading/writing of worksheets with spaces and special xml entities in the sheet name.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4503 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-02-15 21:12:17 +00:00
4ecc8681b3 fpspreadsheet: Add methods DeleteRichTextParams, HasRepeatedPrintCols and HasRepeatedPrintRows to TsWorksheet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4497 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-02-14 11:15:23 +00:00
22c42622a2 fpspreadsheet: Add printranges and repeated header cols/rows (for printing) to worksheet. Implement writing to xlsx and ods. (Request from the forum http://forum.lazarus.freepascal.org/index.php/topic,31496.0.html).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4496 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-02-13 17:45:36 +00:00
ef7c595cf7 fpspreadsheet: Fix several painting issues of TWorksheetGrid related to merged cells. Add diagonal borders to fpsActions and demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4482 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-01-29 09:59:37 +00:00
590c9d8a47 fpspreadsheet: More combinations of source and destination cells for copy/paste to clipboard.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4477 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-01-26 23:37:08 +00:00
aa29b42ebc fpspreadsheet: Add worksheet-BiDiMode. Read/write for Excel5, Excel8, xlsx, ods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4474 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-01-26 11:26:57 +00:00
9e0db3722b fpspreadsheet: Fix incoomplete saving of merged cell borders if borders are assigned only to merge base cell.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4470 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-01-25 22:29:13 +00:00
8184c4b609 fpspreadsheet: Add cell-based BiDiMode. Read/write to/from biff8, xlsx, ods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4469 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-01-25 18:55:33 +00:00
7d731629e1 fpspreadsheet: Add method LoadFromWorkbook to WorksheetGrid and WorkbookSource. Remove "deprecated" from some overloaded workbook file access methods.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4448 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-01-21 10:55:55 +00:00
a433fc3fce fpspreadsheet: Fix mssing transfer of ColWidths, RowHeights, DefaulColWidth and DefaultRowHeight set by the WorksheetGrid to the worksheet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4438 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2016-01-19 00:06:29 +00:00
b3ee66fb2f fpspreadsheet: Some cleanup
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4402 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-12-12 10:17:03 +00:00
a0ee8b8933 fpspreadsheet:
- Move BasicReader/Writer from fpspreadsheet.pas to fpsReaderWriter.pas in order to fix circular unit dependence introduced in prev commit. 
- Remove usage of temp file in xlsx and ods stream writers (see forum forum.lazarus.freepascal.org/index.php/topic,30606.msg194818.html).

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4398 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-12-02 22:16:55 +00:00
93c48a5b99 fpspreadsheet: Fix memory leak if writing an empty string to a worksheet by calling WriteUTF8Text
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4388 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-11-13 20:23:03 +00:00
48c33e0c1c fpspreadsheet: Massive reconstruction of file format registration: it is now possible to add user-defined readers and writers without modifying the fpsspreadsheet sources (--> new unit fpsregfileformats). Add (incomplete) unit for the SYLK file format (---> new unit fpssylk) to show this in the demo project visual/fpsctrls/demo_ctrls. Update all visual demos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4373 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-10-09 13:27:04 +00:00
535273462f fpspreadsheet: Simpler access to clipboard.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4372 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-10-06 12:01:35 +00:00
6fb4bb9c9b fpspreadsheet: Introduce additional parameter ("AParam") when saving workbooks.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4367 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-10-04 13:12:46 +00:00
95704110ce fpspreadsheet: Improved cooperation of visual controls with clipboard.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4363 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-28 20:23:28 +00:00
69c34e5687 fpspreadsheet: CutToClipboard using system clipboard now
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4361 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-25 11:28:44 +00:00
86b7e99ac9 fpspreadsheet: Paste cell, value, format or formula from clipboard
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4356 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-24 17:35:38 +00:00
39b73bcfec fpspreadsheet: Add "Paste from clipboard" (for biff8 format)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4355 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-24 15:27:28 +00:00
ad8daec47c fpspreadsheet: Add code for copying to clipboard (fpsCtrls), initial version only handles biff8 and biff5 formats.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4354 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-23 21:40:32 +00:00
6a82944c1c fpspreadsheet: biff writers store selected ranges now.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4353 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-23 13:28:24 +00:00
f2f4ce227a fpspreadsheet: Fix formulas in ExcelXMLWriter. Fix excelxmlwrite demo.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4346 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-20 21:01:57 +00:00
bf2d6f4417 fpspreadsheet: Readers/writers now use memory streams by default. Add workbook option boFileStream to enforce usage of file streams. Improve fpsSpeadtest, add csv speed test.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4327 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-11 17:19:26 +00:00
a5cbacff27 fpspreadsheet: Add "replace" to search engine.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4316 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-08 21:43:02 +00:00
49dea52ee1 fpspreadsheet: Redo searching (better OO code), some identifiers renamed with respect to initial commit.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4313 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-09-07 15:48:43 +00:00
9bcaed5b25 fpspreadsheet: Fix reading error in ods related to rich-text fonts
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4309 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-31 21:32:59 +00:00
9720221878 fpspreadsheet: Fix CopyCell to make sure that fonts used in RichTextParams exist for destination cell.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4308 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-31 13:13:22 +00:00
f4cb9c14a7 fpspreadsheet: Use HTML conversion to enter rich-text in the visual TsCellEdit control
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4271 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-14 12:44:22 +00:00
4f741ca06d fpspreadsheet: Add new worksheet method "WriteTextAsHTML" which can contain embedded html codes translated to "rich-text" sections. The method for normal text, "WriteUTF8Text", has been renamed to "WriteText"; the old one is deprecated. Same with "ReadAsUTF8Text" (which is now "ReadText").
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4267 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-12 20:07:24 +00:00
62355e2d51 fpspreadsheet: Re-do rich-text format (easier, less code). Fix rich-text issues with utf8 characters.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4257 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-08 16:23:49 +00:00
bfd19235c6 fpspreadsheet: Add stream version of TsWorkbook.GetFormatFromFileHeader (patch by Craig Peterson, issue #28465)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4241 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-03 19:34:46 +00:00
6a6f290fda fpspreadsheet: Read/write name of active worksheet (biff5, biff8, xlsx, ods, visual controls)
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4240 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-03 19:04:40 +00:00
acaacf81d4 fpspreadsheet: New demo htmlread_http (reading html table from the internet). HTML reader now detects hyperlinks (only one per cell, though - like in xls).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4239 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-08-03 15:21:33 +00:00
9f775a09d6 fpspreadsheet: Fix worksheetGrid to expand itself if new cells are created beyout the current grid extent.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4234 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-07-31 16:23:59 +00:00
ef69632cea fpspreadsheet: Initial version of searching in workbook/worksheet, not perfect yet.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4214 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-07-27 23:01:52 +00:00
a838fe2707 fpspreadsheet: A bunch of updates have run up...
- Activate ReadFromStream from xls5/8, xlsx, and ods readers (issue #0028389)
- Fix ods using correct hyperlink font
- Rich text formatting runs for xls5/8, xlsx, ods (both reading and writing)
- BIFFExplorer: show details of rich-text formatting runs for SST and RSTRING records

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4211 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-07-26 12:40:51 +00:00
9b89738158 fpspreadsheet: Extend TsFont for sub-/superscripts. Initial implementation of "rich-text" cell format: display in WorksheetGrid and SpreadsheetInspector, read from xlsx, extend TsWorksheet.WriteUTF8Text() for rich-text formatting runs.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4203 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-07-09 11:10:15 +00:00
7312852637 fpspreadsheet: Fix speed drop when writing a single column only (reported and fixed by alex80, see http://forum.lazarus.freepascal.org/index.php/topic,28692.msg179682).
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4184 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-06-08 10:19:34 +00:00
b8f0d3572e fpspreadsheet: Erase formula if a new value is entered into cell
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4183 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-06-07 17:52:38 +00:00
272db02859 fpspreadsheet: Change package version numbers to 1.6 for next release. Update chm help file.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4175 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-06-03 11:07:39 +00:00
6eacf13d99 fpspreadsheet: Move all numberformat-related procedures/functions to unit fpsnumformat.pas. Check all demos.
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4170 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-31 20:28:25 +00:00
a63c9ad4a5 fpspreadsheet: Make unit fpsnumformat.pas independent of fpspreadsheet.pas
git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@4169 8e941d3f-bd1b-0410-a28a-d453659cc2b4
2015-05-31 16:41:34 +00:00