Commit Graph

597 Commits

Author SHA1 Message Date
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
Thomas Fussell
e11188ccd1
Merge branch 'dev' into issue378-unicode_title 2019-06-22 10:48:35 -04:00
Thomas Fussell
b1a2f6d0bf
Merge pull request #382 from kostasdizas/issue374-format
Update the format elements when setting the cell style
2019-06-22 10:43:41 -04:00
Kostas Dizas
38afc61219
Update the format elements when setting the cell style. 2019-03-07 00:26:32 +00:00
Kostas Dizas
d4b36b6582
Added support for unicode sheet titles
Fixes #378
2019-02-28 20:29:17 +00:00
Kostas Dizas
38f12ff846
Serialise phonetic runs and properties 2018-11-21 13:43:42 +00:00
Kostas Dizas
e9118cff24
Serialise phonetics visibility for cells 2018-11-21 13:04:07 +00:00
Kostas Dizas
48a865cd66
Added phonetics field visibility option on cells 2018-11-21 13:03:02 +00:00
Kostas Dizas
03198f7e40 Corrected the calculation and formatting of weekdays
and relevant unit tests
2018-10-28 20:32:46 +00:00
Kostas Dizas
dde45fd17f Fixed block calculation in xlsx_producer 2018-10-19 23:19:23 +01:00
Kostas Dizas
3ab49c8af6 Importing row spans in the row_properties object 2018-10-19 20:48:54 +01:00
Kostas Dizas
b6f0d0a7e1 Fixed the uninitialised bool on a rich_text_run 2018-10-13 09:11:26 +01:00
Kostas Dizas
61639c7275 Added write_rich_text method to xlsx_producer
This eliminates some duplicate code as reported in #165
2018-10-12 19:56:09 +01:00
Kostas Dizas
698b40c54c Added basic support for embedded images 2018-10-12 13:52:30 +01:00
Kostas Dizas
23fcfd636b Removed duplicate code in compound document 2018-10-01 13:31:32 +01:00
Crzyrndm
ed05bfeb44 Rename parameter to avoid ambiguous parameter
-- Issue#335
2018-09-15 19:50:59 +12:00
Crzyrndm
875f143d74 fix parameter ordering inconsistency that could cause switching the parameters to give different results 2018-08-25 13:31:16 +12:00
Crzyrndm
4188d35caf Add tests for the other small utilities 2018-08-19 15:11:57 +12:00
Crzyrndm
a28f3fb7a9 zstream implicit conversion warning 2018-08-18 18:37:19 +12:00
Crzyrndm
9e78e55c62 Another missing include 2018-08-18 18:16:39 +12:00
Crzyrndm
61e46c934a resolve float-equals warnings 2018-08-18 18:12:46 +12:00
Crzyrndm
8b30319514 missing include 2018-08-18 17:31:25 +12:00
Crzyrndm
d7603964e9 another compile error 2018-08-18 17:28:31 +12:00
Crzyrndm
3a10e661b8 constexpr concern no longer valid 2018-08-18 17:24:34 +12:00
Crzyrndm
edafcd1bb5 More compile fixes 2018-08-18 17:23:04 +12:00
Crzyrndm
6aa10131a2 Fixing compile errors 2018-08-18 16:51:53 +12:00
Crzyrndm
68589d91eb default float for epsilon
-- Even if both arguments are doubles, they may have been promoted by a previous operation and then the comparison would fail
2018-08-15 18:19:36 +12:00
Crzyrndm
4487b988e7 Define fp equality function
-- Based on checks and defaults used by various testing frameworks (primarily GTest and Catch)
-- Moved the header into detail where it should have been to start with (oops)
2018-08-14 22:48:28 +12:00
Crzyrndm
10c5781e6d
Merge pull request #323 from Crzyrndm/build_system_improvements
Build system improvements + stylesheet optimisations
2018-08-05 14:15:09 +12:00
Crzyrndm
c3296db932 Revert "Another easy 15-20% by not searching with no references"
This reverts commit 3ae31fadc3.
2018-07-30 07:22:45 +12:00
Crzyrndm
3ae31fadc3 Another easy 15-20% by not searching with no references 2018-07-29 23:28:02 +12:00
Crzyrndm
e6a84c0cf0 Optimise modifying a new format to reduce garbage collection runs 2018-07-29 22:10:56 +12:00
Crzyrndm
b4f695b3ea fixing warnings 2018-07-29 17:33:22 +12:00
Crzyrndm
5a5db1a50b use std::find and don't double iterate the list
- ~5% perf improvement in img2xlsx example
2018-07-29 16:48:18 +12:00
Crzyrndm
dd6f338419 Remove memory growth based on row count
- Nested unordered_map was the cause of a significant memory/cell spike.
- added cell_reference hash, lookup by cell_reference to make memory usage proportional to cell count only
2018-07-29 11:43:23 +12:00
Crzyrndm
138c90883b Modify writer benchmark to make comparisons between column and row usage
- Cut time to write a sheet with many rows by not calling highest_row inside a loop over the rows (On^2 -> On)
- Observation: more memory is used / cell as the number of rows increases
2018-07-29 10:11:00 +12:00
Crzyrndm
ade8cf3b6c Ensure <color tint=...> is correctly serialised as an optional double 2018-07-28 14:44:49 +12:00
Thomas Fussell
94faf01b72
Merge pull request #320 from sukoi26/SheetFormatPr
SheetformatPr issue #287
2018-07-24 23:42:51 -04:00
Thomas Fussell
8f39375f4c revert unwise data structure change 2018-07-24 23:08:44 -04:00
Thomas Fussell
cbe50f4681 Fix some issues after merge 2018-07-23 00:13:20 -04:00
Thomas Fussell
0af7ad88e1 Merge branch 'tasmail-master-shared-strings-performance' into dev
remove less than comparators

fix conflicts
2018-07-23 00:10:16 -04:00
sukoi26
8f4248d9c3
change SheetFormatPr
change "defaultRowHeight" not optional
2018-07-22 18:44:31 +02:00
Crzyrndm
ad24d9485d Resolve CI warning about using an uninitialised variable 2018-07-21 12:19:15 +12:00
Crzyrndm
761eee3e5f
Merge pull request #314 from Crzyrndm/dev-CI-build-modifications-PR
Travis CI improvements
Resolves #147
2018-07-21 12:04:56 +12:00
Crzyrndm
4dae88f004
Merge pull request #311 from Crzyrndm/dev-unimplemented-functions-PR
Implementations for unimplemented functions
2018-07-21 11:31:25 +12:00
sukoi26
a2dc4a34f1
update bestFit commit
error compiling  std::vector<std::string>
2018-07-19 13:53:54 +02:00
sukoi26
4f9e8ab37f
bestFit change
remove from skip_attributes list
2018-07-19 12:49:32 +02:00
Crzyrndm
ad759ae4f7 fix for build failure with GCC8{-std=c++17} 2018-07-16 19:08:19 +12:00
Crzyrndm
11573f45e6 Resolve remaining warnings 2018-07-14 20:25:10 +12:00
Crzyrndm
9a33210144 Resolve warnings about global ctors and an unused variable
-- while unlikely to become an issue, ordering of ctors across source files is undefined and debugging issues related to it is not easy so just avoid that issue
2018-07-14 19:54:31 +12:00
Crzyrndm
ddab6551b0 Add tests for functionality added to implement declared functionality 2018-07-13 17:14:07 +12:00
Crzyrndm
03020cc793 improved hyperlink implementation
- hyperlinks to cells and ranges are complete
- hyperlink::display is now set as well as the cell value (in excel these can be different)
-- if a cell is empty, display is equal to value text
-- if a cell has a value, display can be just about anything
- This version copies excel in that display is completely ignored once value is set
- All hyperlink tests are now part of the cell test suite (not the worksheet test suite which the majority were previously located)
2018-07-13 17:14:07 +12:00
Crzyrndm
1ab25fa7fc
Merge branch 'dev' into dev-Issue298 2018-07-13 11:21:13 +12:00
sukoi26
28a71572cf
update #290
suggested by  Crzyrndm
2018-07-10 09:32:34 +02:00
sukoi26
99f20a014a
error what(): xl/sharedStrings.xml: error: duplicate attribute #290 2018-07-09 18:21:01 +02:00
Crzyrndm
a8fa6637fe fix workbook::operator== always returning false, add tests for workbook::load
workbook::operator== was comparing the value of the raw pointer held by two std::unique_ptr's. By definition, this is always false in a well behaved program (if it's true, things go bang...). This then led to adding equality operators to nearly every other struct/class in xlnt to support workbook::operator==

workbook::load and the non-default ctors for loading data from a file are tested using the now functional equality operator

NOTE: a large number of copy ctors need updates/fixing. Many should be defaulted
2018-07-03 14:05:07 +12:00
Crzyrndm
e0d62b0835 Cleanup from review 2018-06-26 20:32:59 +12:00
Crzyrndm
3d3a59012a extLst element round tripped 2018-06-25 23:12:35 +12:00
Crzyrndm
4ff68319b0 Fix CI build warnings 2018-06-25 21:45:40 +12:00
Crzyrndm
8ba7f5b45d default is not a contextual keyword 2018-06-25 21:41:25 +12:00
Crzyrndm
840d1bcefc Serialisation of extLst without namespace support
-- roundtripping namespaces requires modifications of the parser used for the entire worksheet as there does not appear to be a way to track the namespace changes without listening/registering for the event. This (ofcourse) breaks lots of other things...
2018-06-24 23:08:23 +12:00
Crzyrndm
a347d9c05d ext_list parsing for worksheets 2018-06-24 21:25:58 +12:00
Crzyrndm
1c1d63498a Parsing headerFotter block of test sheet correctly 2018-06-24 17:31:05 +12:00
Crzyrndm
d12d2e450b std::to_string is not good fpr serialising doubles
-- it uses fixed 6dp, xlsx wants 15sf
-- stringstream with precision set to 15 serialises correctly
2018-06-24 14:29:56 +12:00
Crzyrndm
e8fcd49c0d Add serialisation of "topLeftCell" sheetView attribute 2018-06-24 14:19:03 +12:00
Crzyrndm
d2d0c2ab55 Serialisation of sheetPr and printOptions elements 2018-06-24 14:02:01 +12:00
Crzyrndm
93323f334d Basic pageSetup persistence
-- NOTE: The struct page_setup doesn't currently reflect the attributes of the pageSetup element
2018-06-24 12:34:56 +12:00
Crzyrndm
7820ac548f re-save custom_heights_widths.xlsx, add defaultColWidth sheet attribute
-- custom_heights was the only test sheet where the integral value was being saved with a trailing ".0"
-- Updated tests to expect the new values
-- added the new property "defaultColWidth"
2018-06-24 11:53:45 +12:00
Crzyrndm
884558fd15 Write numbers using a standard formatter (15sf to match excel) 2018-06-24 11:06:02 +12:00
Crzyrndm
f62e5fe5f7 Fix every 16th row (17, 33, ...) having data dropped 2018-06-24 10:20:30 +12:00
Crzyrndm
d81555dbae Add "bestFit" column attribute serialisation 2018-06-24 10:13:27 +12:00
Crzyrndm
3eb06bac0d serialisation of custom row format property added 2018-06-23 22:29:57 +12:00
Crzyrndm
07ea740d11 Add the ext_list class for parsing extLst xml elements to/from
-- no tests as yet
2018-06-23 19:08:39 +12:00
Crzyrndm
5817ef5cf0 Add serialisation of worksheet phonetic properties 2018-06-23 12:15:15 +12:00
Crzyrndm
5a14d7b9d1 suppress conversion warnings
-- tolower takes chars and returns chars, types are int because C only deals with ints
-- format parameter is size_t but there is no std parsing function that returns size_t. stoull is used instead as the widest alternative, and then the cast is applied to suppress the conversion warnings
2018-06-18 23:24:13 +12:00
Thomas Fussell
e350a7734d implement abspath and archid flags, fixes some serialization problems 2018-05-28 23:13:57 -04:00
Thomas Fussell
6eb16243ca work on round-tripping for #230 2018-04-24 19:43:34 -04:00
Thomas Fussell
ec1584240c specify relationship member namespace to fix compiler error, closes #268 2018-04-24 18:03:55 -04:00
Thomas Fussell
50850ffb8a work on round-tripping for #230 2018-04-24 17:58:17 -04:00
Thomas Fussell
617f7a2525 improve hyperlinks and style round tripping 2018-03-21 09:03:37 -04:00
Thomas Fussell
410e73d594 work on hyperlinks, x14 extentions, other round tripping silliness 2018-03-16 21:21:16 -04:00
Thomas Fussell
2426215801 implement sheet view serialization 2018-03-14 20:12:07 -04:00
Andrii Tkachenko
403605a536 xLnt. shared string performance optimization. 2018-02-08 09:52:10 +01:00
Thomas Fussell
0f0d3de75f implement sheetFormatPr, x14ac:dyDescent, reordering workbook rels so sheets come first after insertions 2018-01-26 14:32:00 -05:00
Thomas Fussell
90633d0e8e copyright year bump (2018) 2018-01-22 09:38:48 -05:00
Thomas Fussell
44a8c8e79e minor reformatting 2017-12-09 16:04:44 -05:00
Thomas Fussell
1c85188ec6 Merge branch 'dev' of https://github.com/sukoi26/xlnt into sukoi26-dev 2017-12-09 15:45:49 -05:00
Thomas Fussell
a653a39544 reformat a little 2017-12-08 15:31:25 -05:00
Thomas Fussell
182dea155b Merge branch 'dev' of github.com:tfussell/xlnt into dev 2017-12-08 15:20:36 -05:00
Thomas Fussell
20c7d3437c
Merge pull request #248 from tlanc007/cellPropertyColors
custom_value_traits.hpp: pattern_fill from_string() ignores case
2017-12-08 14:37:24 -05:00
tal
b008eacd89 custom_value_traits.hpp: pattern_fill from_string() ignores case
Values like lightGray will match with lightgray.  Unexpected inputs will
be ignored and return none.

Needs prama to clang to be happy.
2017-11-22 12:44:49 -07:00
TataMata
d0bacf548c
Reformatted source
Reformatted pull request to match the library formatting style.
2017-11-12 10:34:51 +01:00
sukoi26
4f07495abb
optimize latest commit missing a test 2017-11-06 14:12:08 +01:00
TataMata
b899c9db5c
Fix bug in cell style assingment
There was a bug introduced in version 1.2 in reading styles. As from the Office Open XML documentation:
2017-11-06 11:55:06 +01:00
sukoi26
caeadfc83c optimize code empty row cell 2017-11-04 23:41:48 +01:00
sukoi26
4a3e711a1b bug introduce by the commit continue work on #230, improves style/xf handling
as the style exist it is rewritten in cellStyleXfs and cellXfs,
with  the fillId test for format and style. remove the test and use only the format.
2017-11-04 18:12:38 +01:00
Aaron Bishop
0201f22237 fix const correctness error 2017-11-02 17:07:01 -04:00
Thomas Fussell
29abdfa702 Merge branch 'master' into dev 2017-10-30 19:44:32 -04:00
Thomas Fussell
470c655df6 fix empty row height/cell width, #235 2017-10-30 19:36:24 -04:00
Thomas Fussell
0e0bf0f8a1 continue work on #230, improves style/xf handling 2017-10-26 12:54:54 -04:00
Alexandros Naskos
7f08c77a90 Empty row properties are now written correctly. Setting a row's height now also causes customHeight to be emitted. 2017-10-25 15:04:51 +03:00
Thomas Fussell
75de03745b start fixing serialization for #230 2017-09-28 08:55:16 -04:00
Thomas Fussell
34270f2333 specify return type of lambda to prevent compiler error 2017-09-27 17:39:59 -04:00
Thomas Fussell
4c2c7a5859 add missing header for std::tolower 2017-09-13 11:03:18 -04:00
Thomas Fussell
b2adee9fd3 implement upper case date/time handling, closes #221, closes #222, related to #220 2017-09-13 10:47:18 -04:00
Thomas Fussell
81812d6e29 implement sheet view selection consumption, closes #164 2017-09-13 09:36:42 -04:00
Thomas Fussell
9d71dda531 ensure only exceptions derived from xlnt::exception are thrown by library code plus some minor code cleanup, closes #163 2017-09-13 08:48:22 -04:00
Thomas Fussell
bc1e3656c7 Merge branch 'master' into dev 2017-09-12 16:22:36 -04:00
Henrique Santiago
ea5c741bfe Parse readingOrder 2017-09-12 17:04:52 -03:00
Thomas Fussell
954f4b84cd prevent exception on unhandled attributes 2017-09-10 09:36:53 -04:00
Thomas Fussell
bf3e278ea1 change two missed long double literals into doubles 2017-09-10 09:36:04 -04:00
Thomas Fussell
299fc7d572 Merge branch 'dev' into dev 2017-09-08 23:15:06 -04:00
Thomas Fussell
396e6eb948 fix clang warnings 2017-09-08 22:59:19 -04:00
Thomas Fussell
12007fe2d8 change cell numeric value type from long double to double, closes #201 2017-09-08 21:05:34 -04:00
Thomas Fussell
0d125b1534 encapsulate stateful stringstream string to float conversion into a separate struct 2017-09-08 20:10:46 -04:00
Thomas Fussell
fcd68dba8f optimize cell memory usage. big improvement! 2017-09-08 19:41:34 -04:00
Thomas Fussell
716a81a19f optimize hot code paths 2017-09-08 19:08:38 -04:00
Thomas Fussell
bbdace8b44 use memoization to replace cached static qnames 2017-09-08 18:03:56 -04:00
Thomas Fussell
85010f9f11 memoize calls to xml::qname builder 2017-09-08 17:39:59 -04:00
Thomas Fussell
fff2feccd2 update licenses 2017-09-08 15:26:47 -04:00
Thomas Fussell
50280ba2ab don't define THROW_ON_INVALID_XML by default on NDEBUG builds, fixes #179 2017-09-08 10:36:49 -04:00
tal
46a10cfb7b Issue #216-cleanup for Clang 5.0 build
switched to nullptr instead of NULL or 0.
Switch some expressions using ',' to multiple statements separated by ';'
Removed unused template function
Used override keyword for some overridden virtual functions.
2017-09-04 13:43:30 -06:00
sukoi26
8d85ed917f Merge branch 'dev' into dev 2017-09-02 22:07:07 +02:00
Thomas Fussell
f174dd825d Merge pull request #209 from pebble2015/master
fix #204 #205
2017-09-02 10:10:35 -04:00
sukoi26
b21b856e68 code optimized for s attribut cell / row format
improve the performance
2017-08-29 13:01:47 +02:00
pebble2015
f3d5d18035 fix xwindow bug
fix xwindow bug
2017-08-27 13:44:06 +08:00
Chris
e5d6a26e17 fixup formatting 2017-08-26 11:04:23 -05:00
Chris
5cc24fda39 PERF: optimize read_cell 2017-08-26 10:49:48 -05:00
Thomas Fussell
4e2c0c0ffb use column width adjustment as specified in standard so that width in Excel on Windows matches value in xlnt, #193 2017-08-18 21:38:10 -04:00
Thomas Fussell
3257274057 use utfcpp on all platforms since codecvt has been deprecated in c++17, closes #197 2017-08-15 18:23:28 -04:00
Thomas Fussell
de0e010056 use pybind11 instead of raw C Python API, python_streambuffer is broken for now 2017-07-30 09:48:57 -07:00
Thomas Fussell
eaaa310cef start implementing xlsx2arrow params 2017-07-19 17:21:55 -07:00
Thomas Fussell
8d051e36e5 fix remaining clang warnings. so many static_casts... 2017-07-17 22:24:00 +00:00
Thomas Fussell
7da9187808 fix some clang warnings 2017-07-16 22:32:35 +00:00
Thomas Fussell
b98f8c4fe7 don't cast integral long double to ptrdiff_t before writing to xml, fixes #188 2017-07-16 11:16:09 -07:00
Thomas Fussell
5b95b3d463 begin implementing xlsx2arrow, fix msvc warnings, other stuff 2017-07-14 22:18:11 -07:00
Thomas Fussell
e38b1cdd69 fix gcc warnings 2017-07-09 16:44:00 +00:00
Thomas Fussell
f97ad6c1bd start working on streaming write 2017-07-04 17:52:46 -07:00
Thomas Fussell
6777982f08 clarify target_mode namespace 2017-07-02 19:17:14 -07:00
Thomas Fussell
9f95894372 use unique_ptr constructor instead of make_unique (C++14+ only) 2017-07-02 19:10:22 -07:00
Thomas Fussell
456b9bbd80 specify hash to use (scoped_enum_hash) for variant::type hash table 2017-07-02 19:00:37 -07:00
Thomas Fussell
7fb9df97be ifdef out codecvt 2017-07-02 18:56:16 -07:00
Thomas Fussell
245f5117d3 don't use string_literal for now 2017-07-02 18:56:00 -07:00
Thomas Fussell
e104c6a9b6 specify namespace in friend declaration 2017-07-02 18:54:32 -07:00
Thomas Fussell
0ee0817757 include utfcpp for now to allow GCC <5.0 to build xlnt 2017-07-02 18:33:53 -07:00
Thomas Fussell
56d744b6f9 start cleaning up code 2017-06-25 09:29:45 -04:00