| #
f13410cf
|
| 22-Jul-2024 |
Damjan Jovanovic <damjan@apache.org> |
Allow reading lines longer than 64 KiB in SvStream, and reading CSV rows and cells longer than 64 KiB in OpenOffice Base. (They are now limited to ~2 GiB).
- New member functions were added to the m
Allow reading lines longer than 64 KiB in SvStream, and reading CSV rows and cells longer than 64 KiB in OpenOffice Base. (They are now limited to ~2 GiB).
- New member functions were added to the main/tools SvStream class to work with 32 bit ::rtl::OUString and ::rtl::OStringBuilder when reading lines. - The helper class QuotedString had to be upgraded from using the 16 bit String to the 32 bit ::rtl::OUString. - The CSV database driver was patched to use ::rtl::OUString and 32 bit indexes in various places. - Luckily, little other work was needed, as the ORowSetValue class already uses 32 bit ::rtl::OUString, and was previously converting 16 bit String to 32 bit ::rtl::OUString internally anyway.
Also simplified some of the line parsing logic, and translated some German comments to English.
Patch by: me
(cherry picked from commit 7b2bc0e6bba2fbc38d078306fe10d875115d6c86)
show more ...
|
| #
2cbc43e9
|
| 17-Apr-2016 |
damjan <damjan@13f79535-47bb-0310-9956-ffa450edef68> |
Make CSV line parsers consistent with CSV field parsers.
Our CSV field parsing algorithms treats fields starting with a quote (immediately at the beginning of the row, or after the field delimiter)
Make CSV line parsers consistent with CSV field parsers.
Our CSV field parsing algorithms treats fields starting with a quote (immediately at the beginning of the row, or after the field delimiter) as quoted. A quoted field ends at the corresponding closing quote, and any remaining text between the closing quote and the next field delimeter or end of line is appended to the text already extracted from the field, but not processed further. Any quotes in this extra text are taken verbatim - they do not quote anything.
Our CSV line parsers were big hacks - they essentially read and concatenate lines until an even number of quote characters is found, and then feed this through the CSV field parsers.
This patch rewrites the line parsers to work exactly how the field parsers work. Text such as: "another" ",something else is now correctly parsed by both Calc and Base as: [another "],[something else] instead of breaking all further parsing.
Patch by: me
git-svn-id: https://svn.apache.org/repos/asf/openoffice/trunk@1739628 13f79535-47bb-0310-9956-ffa450edef68 (cherry picked from commit bc1fc15f4dddfc075a011a1203c162b446e72868)
show more ...
|