Commit Graph

441 Commits

Author SHA1 Message Date
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
94fd22f492
Merge pull request #321 from Crzyrndm/Issue#282
Don't set comment size on explicit comment overload
2018-08-05 13:05:54 +12:00
Crzyrndm
ca8c93c696
Merge pull request #324 from Crzyrndm/iterator-default-ctors
Default ctors for iterators
2018-08-05 13:04:09 +12:00
Crzyrndm
4124dd78e0 Add tests, fix compile error (missing include) 2018-07-29 14:27:49 +12:00
Crzyrndm
9aff73747d range_iterator default ctor 2018-07-29 14:22:35 +12:00
Crzyrndm
475f9f35d0 default ctor for cell iterator 2018-07-29 14:20:29 +12:00
Crzyrndm
6fb90ecf57 default ctor for workbook iterator 2018-07-29 14:12:47 +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
ade8cf3b6c Ensure <color tint=...> is correctly serialised as an optional double 2018-07-28 14:44:49 +12:00
Crzyrndm
e1daff535c Better idea, set the defaults 2018-07-28 14:04:22 +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
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
7be7172ff5
update attribute required
required attribute default_row_height
2018-07-22 16:35:41 +02:00
Crzyrndm
9e981abe05 Only add diagnostics to GCC, Clang doesn't know the warning 2018-07-21 13:30:52 +12:00
Crzyrndm
fede2d3168 fix Clang CI warnings 2018-07-21 12:33:58 +12:00
Crzyrndm
ad24d9485d Resolve CI warning about using an uninitialised variable 2018-07-21 12:19:15 +12:00
Crzyrndm
b004d0863c address CI build failure
Issue #300
Previous CI fix didn't work, try with type aliasing instead

Issue #300
This reverts commit c87c0e3975.
gcc 6 ok, msvc 14 choked

Issue #300
noexcept(condition) doesn't seem to work on msvs 2015

Issue #300
Merge remote-tracking branch 'origin/dev-optional-no-default-ctor' into dev-resolve-simple-issues
ensure uniqueness (uglify) and undefine compatibility macro
2018-07-21 12:19:15 +12:00
Crzyrndm
07d648fe8b Implementation of optional using std::aligned_storage
Issue #300
-- test for no default constructor required enabled
-- Passes all tests locally
2018-07-21 12:19:15 +12:00
Crzyrndm
34e8f274de optional exception check, primarily adding noexcept to signatures
-- also reordered the assignments in set/clear to ensure "has_value_" doesn't change if the assignment operator of T throws
2018-07-21 12:19:15 +12:00
Crzyrndm
eda102ee9d testing current optional implementation against target behaviour
Issue #300
-- NOTE: construction from no_default currently wont compile so is commented out (L:113)
-- NOTE: dll import/export of template classes is probably unnecessary (the header is already required) and doesn't work in the general case (explicit instantiations are required for at least MSVC)
2018-07-21 12:19:14 +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
Crzyrndm
11573f45e6 Resolve remaining warnings 2018-07-14 20:25:10 +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
650bfeb7dd unimplemented functions under worksheet
-- NOTE: ctor was removed because it can't have been in use, and is duplicated by the overload below it. A pair parameter is only optimal in a very limited number of use cases, and then only slightly over the begin/end overload
2018-07-13 17:14:06 +12:00
Crzyrndm
f9b2ca5929 unimplemented functions under workbook/ 2018-07-13 17:14:06 +12:00
Crzyrndm
3d9e887d4a unimplemented functions under utils/ 2018-07-13 17:14:05 +12:00
Crzyrndm
49c4e725dc All unimplemented functions under cell/ 2018-07-13 17:14:05 +12:00
Crzyrndm
7458426111 return by const ref 2018-07-13 12:43:21 +12:00
Crzyrndm
dcf50cb4cd return by const reference when possible 2018-07-13 12:43:20 +12:00
Crzyrndm
1ab25fa7fc
Merge branch 'dev' into dev-Issue298 2018-07-13 11:21:13 +12:00
Crzyrndm
399b5e3775 Resolve CI build failure 2018-07-10 14:43:22 +12:00
Crzyrndm
9a82c4fab7 Comment fixes and clarifications 2018-07-10 12:40:58 +12:00
Crzyrndm
b95919323d add more tests for worksheet iterator, add operator--
* operator-- completes the naive bidirectional iterator requirements
* tests for various construction and assignment behaviours
* tests for iteration and dereferencing behaviours
2018-07-10 12:40:56 +12:00
Crzyrndm
04b50d9b8e worksheet_iterator - operator* const overloads
Users may still want to dereference a const iterator (note: not a const_iterator).
Also use the "reference" typedef to ensure there is only 1 source of information
2018-07-10 12:40:54 +12:00
Crzyrndm
a47985b2db worksheet_iterator - rule of 5/0
For rule of 5/0, where no implementation is required, all 5 operations have been declared as defaulted. This is less likely to forget definitions for all 5 if required
- removed forwarding of copy ctor to assignment (which was defaulted already) in favour of defaulted copy ctor
- added defaulted move assignment/ctor and destructor

Changed workbook reference to a pointer to allow tests to compile (reference isn't rebindable so defaulted assignment is equivalent to deleted)
2018-07-10 12:40:52 +12:00
Crzyrndm
eaf3c2a773 Remove double definition 2018-07-10 12:40:50 +12:00
Crzyrndm
62e0a7dd17 Revert "cell iterator - add operator->"
This reverts commit 1b705ae043ae1b43d0ecbc93da04c944383bb296.
2018-07-10 12:40:48 +12:00
Crzyrndm
bc8cd21d67 range_iterator - operator* const overloads
Users may still want to dereference a const iterator (note: not a const_iterator).
Also use the "reference" typedef to ensure there is only 1 source of information
2018-07-10 12:40:46 +12:00
Crzyrndm
1e66824af0 range_iterator - rule of 5/0
For rule of 5/0, where no implementation is required, all 5 operations have been declared as defaulted. This is less likely to forget definitions for all 5 if required
- removed forwarding of copy ctor to assignment (which was defaulted already) in favour of defaulted copy ctor
- added defaulted move assignment/ctor and destructor
2018-07-10 12:40:44 +12:00
Crzyrndm
dc020622c0 cell iterator - move parameters aren't const
copy/paste error
2018-07-10 12:40:42 +12:00
Crzyrndm
1c4f9c7ed2 cell iterator - add operator->
Implementation just forwards to operator*, but this is a typical operator in the iterator API and is suprising and inconvenient that it is not present
2018-07-10 12:40:40 +12:00
Crzyrndm
20e72d69e5 cell_iterator - operator* const overloads
Users may still want to derederence a const iterator (note: not a const_iterator).
Also use the "reference" typedef to ensure there is only 1 source of information
2018-07-10 12:40:38 +12:00
Crzyrndm
92ac3a2a2e cell_iterator - rule of 5/0
For rule of 5/0, where no implementation is required, all 5 operations have been declared as defaulted. This is less likely to forget definitions for all 5 if required
- removed forwarding of copy to assignment (which was defaulted already) in favour of defaulted copy ctor
- added defaulted move assignment/ctor and destructor
2018-07-10 12:40:36 +12:00
Joshua
744dd0afbb Remove uses of std::iterator (deprecated in C++17)
Detailed reasoning for the deprecation is provided by the paper proposing deprecation (http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2016/p0174r2.html) and a related LWG issue (https://cplusplus.github.io/LWG/issue2438).

This was the only issue preventing a clean compile with VS 15.7.2 with c++17/c++latest set as the target language

The issue could be resolved in two ways. Providing a custom replacement to std::iterator (a very simple structure) or by providing the 5 required typedefs. The only functional difference from my reading is that the typedefs are not immediately available to the implementer with the inheritance. I find the inline typedefs to be clearer hence the selection in this commit
2018-07-10 12:40:34 +12: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
688c8c7f33 add column_index to cell to be consistent with cell_reference
Issue #298
The consistency argument is a good one in my opinion
2018-07-03 11:10:47 +12:00
Crzyrndm
fb195e2777 fix accidentally copied ctor declaration 2018-07-03 11:09:33 +12:00
Crzyrndm
bb04205dac workbook parameterised constructors
Issue #298
- all 4 are simply duplicating existing behaviour, but perhaps we can get a more optimal version in future
- istream ctor is intended as an extension point that can then be used to create free/static functions to work with any future data source (vector), while the path ctor is a convenience function for the common case (from file)
2018-07-02 21:33:27 +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
8ba7f5b45d default is not a contextual keyword 2018-06-25 21:41:25 +12:00
Crzyrndm
fa19d8fccc Providing an explicit default value disables aggregate initialisation 2018-06-25 21:35:02 +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
1c1d63498a Parsing headerFotter block of test sheet correctly 2018-06-24 17:31:05 +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
d81555dbae Add "bestFit" column attribute serialisation 2018-06-24 10:13:27 +12:00
Crzyrndm
4cfb74443c fixing build warnings 2018-06-23 22:43:11 +12:00
Crzyrndm
3eb06bac0d serialisation of custom row format property added 2018-06-23 22:29:57 +12:00
Crzyrndm
fe90c9d488 Fix build errors and warnings 2018-06-23 21:08:12 +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
fc7c69a724 Base selection on Excel behaviour
-- sqref is a block of selected cells containing the active_cell (normally is just == active_cell)
-- active cell is the selected vell in this selection/view/pane
-- inactive selections use the top-left cell as the active_cell
2018-06-18 22:40:24 +12:00
Thomas Fussell
e350a7734d implement abspath and archid flags, fixes some serialization problems 2018-05-28 23:13:57 -04:00
Thomas Fussell
78ae9bbb89 specify path return value namespace to fix compiler error, closes #269 2018-04-24 18:06:30 -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
074b176d33 workbook.hpp extra qualification typo fixed. 2018-02-17 06:06:39 +01:00
Andrii Tkachenko
403605a536 xLnt. shared string performance optimization. 2018-02-08 09:52:10 +01:00
Andrii Tkachenko
3246d602c2 xLnt. Implemented operator less for: rich_text, rich_text_run, color, font, optional. 2018-02-08 08:05:41 +01:00
Andrii Tkachenko
55cf7a2bed xlnt. rich_text copy constructor. 2018-02-08 07:24:58 +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
470c655df6 fix empty row height/cell width, #235 2017-10-30 19:36:24 -04:00
Thomas Fussell
06b315b352 add interface to worksheet and range for clearing cells entirely, not just their values, for #232 2017-10-26 13:45:56 -04:00
Thomas Fussell
81812d6e29 implement sheet view selection consumption, closes #164 2017-09-13 09:36:42 -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
pebble2015
f3d5d18035 fix xwindow bug
fix xwindow bug
2017-08-27 13:44:06 +08:00
Thomas Fussell
8801a0e352 figured out the problem 2017-07-30 20:32:37 -07:00
Thomas Fussell
eaaa310cef start implementing xlsx2arrow params 2017-07-19 17:21:55 -07:00
Thomas Fussell
abdd1be7c8 move arrow logic to xlntpyarrow for now 2017-07-18 14:20:46 -07:00
Thomas Fussell
33399a5390 now we're getting somewhere! xlntpyarrow.xlsx2arrow returns an Arrow table that can be converted to a pandas DataFrame now 2017-07-15 10:39:36 -07:00
Thomas Fussell
5b95b3d463 begin implementing xlsx2arrow, fix msvc warnings, other stuff 2017-07-14 22:18:11 -07:00
Thomas Fussell
0be7563f8b ignore arrow warnings and foward declare arrow 2017-07-12 00:03:26 -07:00
Thomas Fussell
5c033905fb I see no good reason to make the arrow interface a separate lib. Let's just make it optionally compiled in the main target. 2017-07-11 20:55:08 -07:00
Thomas Fussell
22325a2836 try to make windows and linux builds both work 2017-07-05 15:04:57 -07:00
Thomas Fussell
f97ad6c1bd start working on streaming write 2017-07-04 17:52:46 -07:00
Thomas Fussell
cf2dc9d7fb include streaming reader in xlnt.hpp 2017-06-25 13:14:29 -04:00
Thomas Fussell
6f716c6e89 work on streaming cell reading, using ugly copy-pasted code for now [ci
skip]
2017-06-24 11:39:48 -04:00
Thomas Fussell
72b8bd6b67 work out how to handle worksheet rels during streaming parsing 2017-06-21 09:17:06 -04:00
Thomas Fussell
a9fd6b064e minor fixes to get it to compile. lots of failing tests for now... 2017-06-20 13:29:50 -04:00
Thomas Fussell
d7e7526beb add failing tests and begin restructuring worksheet reading [ci skip] 2017-06-17 10:53:37 -04:00