Commit Graph

1041 Commits

Author SHA1 Message Date
Thomas Fussell
c31b2aa51d
Merge branch 'master' into issue-494-shared-string 2021-01-02 15:01:41 -05:00
Thomas Fussell
08e51ccdc0
Merge branch 'master' into feature/hidden-sheet 2021-01-02 14:58:47 -05:00
Thomas Fussell
f6e43a312d
Merge branch 'master' into feature/hidden-sheet 2021-01-02 14:57:12 -05:00
Thomas Fussell
dd215794db
Merge branch 'master' into issue_503_external_link 2021-01-02 14:54:31 -05:00
Thomas Fussell
4bd0f4df56
Merge pull request #501 from softmarch/issue-498-extlist
Fixed an exception that was thrown when the property's namespace is a web address.
2021-01-02 14:46:43 -05:00
Thomas Fussell
566d83d447
Merge branch 'master' into master 2021-01-02 14:41:10 -05:00
Thomas Fussell
b6d566f1f7
Merge branch 'master' into time-struct-warning 2021-01-02 14:39:00 -05:00
Thomas Fussell
3127e9c016
Merge branch 'master' into issue-492-stream-empty-row 2021-01-02 10:46:19 -05:00
Thomas Fussell
a96c288036 fix time struct warning on gcc 2021-01-02 10:42:21 -05:00
Emmanuel Pescosta
3225f357dd
workbook: Throw if index in (const) sheet_by_index is out of range
The documentation of (const) sheet_by_index already mentions that
invalid_parameter exception will be thrown if the index is out of
range, but the implementation was missing.
2020-12-02 11:06:56 +01:00
Emmanuel Pescosta
9df7c83ca6
worksheet: Add method to check if the worksheet is empty
A worksheet is considered empty if it doesn't have any cells.
2020-12-02 10:59:29 +01:00
kira
687af90735 Memory leaks fix 2020-11-20 15:24:47 +03:00
胡剑波
e9a9946856 Fixed multiple cell throw exception. 2020-08-25 19:57:07 +08:00
胡剑波
dc9f550429 Fix the missing count of fonts and throw an exception. 2020-08-25 16:40:33 +08:00
胡剑波
e8dd38d0d6 Fix throwing exception when duplicate shared strings occur. 2020-08-25 15:08:20 +08:00
胡剑波
dafdfa3ebb Add the function of getting table hidden attributes. 2020-08-25 13:32:21 +08:00
胡剑波
0ecad78c1d Fixed an exception thrown when parsing external links. 2020-08-25 09:00:22 +08:00
胡剑波
4da7183b1c Fixed an exception that was thrown when the namespace in the external link is a web address. 2020-08-12 16:36:30 +08:00
Adam Hooper
319c4197c1
Streaming: skip empty rows in has_cell()/read_cell()
Previously, an empty row would mess with the parser: if we're in an
empty row, our helper methods don't detect us as being in the "row" _or_
in the "sheetData". So `has_cell()` would return false when it
shouldn't. Similarly, `read_cell()` wouldn't skip rows; so `read_cell()`
would return an invalid cell when placed in an empty row, causing a
segfault when the caller tried to use the cell.

Callers must take care to call `has_next()` before `read_next()`. In
the future, perhaps we can make `read_next()` return a `std::optional`
and nix `has_next()` altogether?

[Closes #492]
2020-07-28 15:29:12 -04:00
Stefan Rommel
cdb50bbd6b
Fix XLNT_INCLUDE_INSTALL_DIR
Otherwise, XLNT_INCLUDE_INSTALL_DIR is not set correctly and find_package(Xlnt) results to an error:
 ```
CMake Error at /usr/lib64/cmake/xlnt/XlntConfig.cmake:23 (message):
  File or directory include referenced by variable XLNT_INCLUDE_DIR does not
  exist !
Call Stack (most recent call first):
  /usr/lib64/cmake/xlnt/XlntConfig.cmake:41 (set_and_check)
  CMakeLists.txt:4 (find_package)
```
The content of the line 41 of /usr/lib64/cmake/xlnt/XlntConfig.cmake is: `set_and_check(XLNT_INCLUDE_DIR "include")`. 

I'm using the Arch Linux user repository package https://aur.archlinux.org/packages/xlnt/.
The used build manual is described here: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=xlnt.
2020-07-16 21:29:06 +02:00
JCrawfy
06801f7d36 derp, need typename too 2020-04-26 15:54:49 +12:00
JCrawfy
6c5a5a5dae and same issue with is_convertible 2020-04-26 15:49:05 +12:00
JCrawfy
f1042c5119 enable_if_t isn't a thing in C++11 2020-04-26 15:47:53 +12:00
JCrawfy
504fed3585 another missing header 2020-04-26 15:40:56 +12:00
JCrawfy
556d3358e9 fix bad commit 2020-04-26 14:53:15 +12:00
JCrawfy
d30e705f83 fix most (all?) the places where string<->double conversions are performed
strod / stod / to_string and all related friends are dependant on current locale for how they format a number
2020-04-25 14:00:58 +12:00
JCrawfy
dfb8f1518e Revert "redo serialisation by using a sorted vector instead of a lookup for each possible row/column combination"
This reverts commit 63484f8b8f.
2020-04-25 11:15:23 +12:00
JCrawfy
63484f8b8f redo serialisation by using a sorted vector instead of a lookup for each possible row/column combination
Not tested, definitely not as correct as previous implementation
2020-04-25 11:00:39 +12:00
JCrawfy
9136d21845 move the simplified cell_reference and cell structs out to a header
the standard xlnt::cell and xlnt::cell_reference have plenty of extra functionality that just slows things down during (de)serialisation
These intermediate structs can be used to minimise overhead before transforming to the final type
2020-04-25 11:00:39 +12:00
JCrawfy
1069c17fbe fixup comment in parser 2020-04-25 11:00:39 +12:00
JCrawfy
e8e29e9c18 resolve some warnings (unintialised variables), remove warning suppression 2020-04-25 11:00:39 +12:00
Thomas Fussell
568ac85346
release v1.5.0 2020-03-21 15:19:37 -04:00
Thomas Fussell
05fb0ceaf6
revert version bump 2020-03-21 15:18:59 -04:00
Thomas Fussell
b118d8f1f2
bump version to 1.5.0 2020-03-21 15:13:22 -04:00
Thomas Fussell
5602edbd2d
add packaging and release deployment workflow 2020-03-21 14:25:39 -04:00
Thomas Fussell
2f5934f60e
Merge pull request #447 from Crzyrndm/feature/benchmark
microbenchmarks for double<->string conversion, serialisation improvements
2020-03-20 18:02:37 -04:00
amiremohamadi
3af9567946 fix-bug: set absolute flags correctly 2020-03-20 23:08:27 +03:30
JCrawfy
f4d00acb9f resolve warnings 2020-03-02 13:32:39 +13:00
JCrawfy
0ea054026f speedup worksheet::calculate dimension by only looping the cell map once 2020-03-01 23:20:44 +13:00
JCrawfy
c418c13010 remove a double lookup in the cell map during serialisation 2020-03-01 23:18:13 +13:00
JCrawfy
932fc4596f remove declarations of copy/assignment operators that only do default work
user defined copy operators suppress compiler creation of move operations, and not having all of copy/move/dtor
defined (rule of 0/5) is suspicious. Also happens to be very slightly slower
2020-03-01 23:16:57 +13:00
JCrawfy
39f498f401 use the new faster serialisation everywhere in xlsx_producer 2020-03-01 22:01:53 +13:00
JCrawfy
0915fde090 add saving to the spreadsheet-load test, fix a bug in the serialiser 2020-03-01 20:43:56 +13:00
Adam Hooper
ac18fc6dde Parse inlineStr values
inlineStr XML structure is <c><is><t>. This was being parsed incorrectly
when streaming (because has_value wasn't being set to true) and when
reading the whole file (because the <t> was ignored).

[closes #445]
2020-02-25 14:32:14 -05:00
Thomas Fussell
e8ee585897
bump copyright year to 2020 2020-02-08 12:12:59 -05:00
Thomas Fussell
5a2498c229
fix windows build 2020-02-08 12:09:22 -05:00
Thomas Fussell
53b2853ae3
Merge branch 'master' into format 2020-02-08 12:03:40 -05:00
Thomas Fussell
85e6878cc4
bump version to 1.4 to match latest release, for #334 2020-02-08 11:48:50 -05:00
Thomas Fussell
39503e8bf0 fix warnings and other minor issues 2019-12-26 12:52:14 -05:00
Thomas Fussell
8014e2fe19 update miniz to 2.1, move to third-party 2019-12-26 12:51:02 -05:00
Thomas Fussell
fcc2f0dddf bump version to 1.4 2019-12-26 12:13:29 -05:00
Thomas Fussell
a560756b35 use clang-format, fix some small warnings 2019-12-26 12:03:12 -05:00
Thomas Fussell
dbc0ddd9bf
Merge pull request #413 from mattparks/patch-1
Check for existing uninstall target before creating.
2019-12-19 17:07:00 -05:00
Thomas Fussell
e2262a0c65
Merge pull request #421 from Crzyrndm/experimental/sheet-data-parser
Accelerated worksheet parsing
2019-12-19 16:24:51 -05:00
Thomas Fussell
edb27e84f8
Merge pull request #425 from yschungmr/hotfix/gcc-5-build-bug
Fixed gcc 5 build bug
2019-12-19 16:13:48 -05:00
Johann1994
d6262df555
Shared strings
It can happen that some strings are not unique in sharedstring table
2019-12-18 13:53:23 +01:00
Johann1994
49663bc483
Sharedstringtable
Same strings in shared stringtable makes it not possible to open a xlsx file.
2019-12-18 13:50:34 +01:00
Youngsuk Chung
8e2f197f70 Fix indentation 2019-12-09 14:52:07 +09:00
Youngsuk Chung
c8bda73f01 Fix g++-5 build bug (Fix #385)
Tested on g++ (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609

Note: Actually,it is not a BUG. It is compiler related issue. The issue #385 is not shown in g++-6 and clang.
2019-12-09 14:46:12 +09:00
JCrawfy
f2ad495326 resolve warnings, remove failing test (CI doesn't know what locale "de-DE" is?) 2019-11-18 21:45:46 +13:00
JCrawfy
97841413fa fixed more parsing errors, added test for ',' locale serialisation (it fails...) 2019-11-18 21:12:21 +13:00
JCrawfy
a25187f788 fix using attribute<double> (causes bugs when '.' is not the decimal separator 2019-11-18 20:46:34 +13:00
JCrawfy
d69a5dea75 scan and replace '.' with ',' when decimal separator is comma 2019-11-18 19:55:13 +13:00
JCrawfy
2eb88c23d6 move numeric utils into the public headers
resolves #398
2019-11-18 19:25:02 +13:00
JCrawfy
a6fd7cc2b8 skip the user facing types, deal direct with the impls
this was being done already in most cases, and allows some simplification
e.g. no need to check if something is already present, since we're starting with a blank
2019-11-17 13:15:00 +13:00
JCrawfy
2b61cac3dc move helper functions and types to top of file ( namespace {} ) 2019-11-17 11:55:49 +13:00
JCrawfy
600cc9d000 specialised string equality template for literals strings
1-2% improvement seen locally
2019-11-17 11:11:33 +13:00
JCrawfy
001606a77c cleanup and comments 2019-11-17 10:41:05 +13:00
JCrawfy
2307ed4edf exceptions, not asserts 2019-11-16 19:49:17 +13:00
JCrawfy
a580079702 and more warnings suppressed 2019-11-16 15:03:28 +13:00
JCrawfy
96beae421f matchup integer types 2019-11-16 14:49:58 +13:00
JCrawfy
9d687eaf49 remove all usages of strtod_c 2019-11-16 14:30:40 +13:00
JCrawfy
e059d259c7 specialise number_converter when strtod_l is available
in load benchmark, not using the specialisation adds ~10% to execution time
2019-11-16 14:18:33 +13:00
JCrawfy
ea532c5c46 resolve some warnings 2019-11-16 14:16:45 +13:00
JCrawfy
c26a59f32e fix compile error due to reference to r-value that MSVC silently lifetime extended 2019-11-16 12:49:26 +13:00
JCrawfy
ec29e227d4 slightly optimise cell parsing routine, fix formula being incorrectly loaded 2019-11-16 12:17:07 +13:00
JCrawfy
8eda9f226f parse height as a double 2019-11-16 11:54:55 +13:00
JCrawfy
d83ed0b200 handle whitespace in xml (e.g. '\n' because sheet was pretty printed) 2019-11-16 11:40:43 +13:00
JCrawfy
b27e7fe07e rewrite the sheet data xml parse logic
a few hacks still, but a very noticeable speed up (2.2 -> 1.1 seconds on large.xlsx)
2019-11-16 11:28:00 +13:00
Matthew Albrecht
9eee8ec0bb
Check for existing uninstall target before creating. 2019-09-20 15:13:09 -05:00
Thomas Fussell
a978e73354 change orientation name in default case 2019-09-15 11:26:39 -04:00
Thomas Fussell
a1d46694c1 Merge branch 'add-all-locales' into dev 2019-09-15 11:25:39 -04:00
Thomas Fussell
90ddaedc81 Merge branch 'master' into dev 2019-09-07 21:10:11 -04:00
Alessandro Bettarini
2b221fec81 Prevent throwing exception when encountering country code 10485 2019-09-07 11:32:49 +02:00
Thomas Fussell
df0626579b add all windows locales as a workaround for #407 2019-09-05 15:37:55 -04:00
Thomas Fussell
cc88c4829b fix frozen first rows/columns for #369 2019-07-07 11:17:00 -04:00
Thomas Fussell
be7a91f7be try default password on read failure, closes #161 2019-07-06 15:29:04 -04:00
Thomas Fussell
ba01de47a7
Merge pull request #345 from kostasdizas/issue165-compound-document
Removed duplicate code in compound document
2019-07-06 12:23:09 -06:00
Thomas Fussell
9f1b2ed4c8 Merge branch 'dev' of github.com:tfussell/xlnt into dev 2019-07-06 14:21:13 -04:00
Thomas Fussell
90b672cf6b Merge branch 'Issue#318_fp-equality' of https://github.com/Crzyrndm/xlnt into Crzyrndm-Issue#318_fp-equality 2019-07-06 14:20:53 -04:00
Thomas Fussell
01cd2a3e3f
Merge pull request #346 from Crzyrndm/Issue#335
GCC5 compatibility + CI
2019-07-06 12:03:53 -06:00
Thomas Fussell
1e52c06376 Merge branch 'dev' of github.com:tfussell/xlnt into dev 2019-07-06 14:02:50 -04:00
Thomas Fussell
40baecdf02 Merge branch 'images' of https://github.com/kostasdizas/xlnt into kostasdizas-images 2019-07-06 14:02:24 -04:00
Thomas Fussell
076c421a1f
Merge pull request #332 from Erroneous1/master
Export xlnt::xlnt target when installed.
2019-07-05 06:21:40 -06:00
Thomas Fussell
d5172d8bcd implement writing of rich text phonetic properties and phonetic runs 2019-07-03 17:47:28 -04:00
Thomas Fussell
7c9443dca9
Merge branch 'dev' into issue165-xlsx-producer 2019-07-03 13:36:25 -06:00
Thomas Fussell
123ecc95fe
Merge branch 'dev' into issue378-unicode_title 2019-06-22 10:54:20 -04:00
Thomas Fussell
1c22e9781e
Merge pull request #364 from kostasdizas/phonetics
Added support for phonetic fields
2019-06-22 10:53:09 -04:00
Thomas Fussell
b6455ff6d1
Merge pull request #356 from kostasdizas/issue353
Fixed block calculation in xlsx_producer
2019-06-22 10:52:14 -04:00
Thomas Fussell
f54a150589
Merge branch 'dev' into phonetics 2019-06-22 10:51:30 -04:00