Commit Graph

1290 Commits

Author SHA1 Message Date
Crzyrndm
9bbebe5fdd Add __LINE__ to test assert failed messages 2018-06-18 22:40:25 +12:00
Crzyrndm
bd90cc4786 add brackets to macro expressions to ensure expected expansion results 2018-06-18 22:40:25 +12:00
Crzyrndm
6d16ffaddf Final test report now includes the test failure message 2018-06-18 22:40:25 +12:00
Crzyrndm
cfef764ab9 Add exception message and test name to std::cout when a test fails
-- '*' doesn't help much when debugging
2018-06-18 22:40:25 +12:00
Crzyrndm
92ae444791 round trip unicode test had the same embedded encoding issue 2018-06-18 22:40:25 +12:00
Crzyrndm
fa2b20da99 fix encoding issues with unicode file test
-- unicode string literals don't seem to work in an obvious way. Embedding the encoding using the \u escape sequences (https://en.wikibooks.org/wiki/Unicode/Character_reference/0000-0FFF)
2018-06-18 22:40:24 +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
Crzyrndm
6f13002ac6 set selection::sqref in freeze_panes
-- NOTE: It doesn't seem likely that these should be 'A1' in all cases (set to 'A1' because current tests demanded it). Purpose of this parameter needs clarification
-- NOTE: [xlnt::selection] needs appropriate ctor's once the purpose of the parameters can be clarified
2018-06-18 22:40:24 +12:00
Crzyrndm
4592b86746 Fix clear_row not clearing the row properties
-- worksheet_dimensions include rows with properties
2018-06-18 22:40:24 +12:00
Crzyrndm
b4e7832419 Fixes to cell hyper links
-- additional tests to cover both variants of the set function
-- additional tests to cover hyper links on cells with non-string data
-- modified hyper link set function to handle cells with non-string data
-- fixed test behaviour for a cell with no value (value is set to the string form of the link. Behaviour copied from Excel 2010)
2018-06-18 22:40:24 +12:00
Crzyrndm
04c0b4a1ca Fix issues with the worksheet "title" setter.
-- Resolves two test failures caused by a crash when setting the title to the existing value removing the sheet from the 'sheet_title_rel_id_map_'
-- added empty title check
2018-06-18 22:40:23 +12:00
Crzyrndm
85d00a0f58 modify examples to write to file instaed of std::clog
Example output is extra noise when testing
2018-06-18 22:39:41 +12:00
Crzyrndm
cd30af7649 Add tests for examples
readme + docs currently have 6 simple examples.
Since most users will start with the given examples, it is of high importance that, at minimum, these compile and execute without crashing.
2018-06-18 22:39:41 +12:00
Crzyrndm
8140c98e92 Merge pull request #1 from Crzyrndm/dev-iterator-improvements
Dev: iterator improvements
2018-06-18 22:38:43 +12:00
Crzyrndm
e8d57908d7 add post (in/de)crement tests 2018-06-18 22:38:42 +12:00
Crzyrndm
665d6a1c41 Comment fixes and clarifications 2018-06-18 22:38:41 +12:00
Crzyrndm
dc8ab8dce6 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-06-18 22:38:40 +12:00
Crzyrndm
8b885c6a8d 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-06-18 22:38:38 +12:00
Crzyrndm
91d298abd4 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-06-18 22:38:37 +12:00
Crzyrndm
62f7eecf65 Remove double definition 2018-06-18 22:38:36 +12:00
Crzyrndm
b6e44f1faa Revert "cell iterator - add operator->"
This reverts commit 1b705ae043ae1b43d0ecbc93da04c944383bb296.
2018-06-18 22:38:34 +12:00
Crzyrndm
2169d24714 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-06-18 22:38:33 +12:00
Crzyrndm
89e44f20c8 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-06-18 22:38:32 +12:00
Crzyrndm
266016b685 cell iterator - move parameters aren't const
copy/paste error
2018-06-18 22:38:31 +12:00
Crzyrndm
fcca46012e 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-06-18 22:38:30 +12:00
Crzyrndm
45acf665e3 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-06-18 22:38:28 +12:00
Crzyrndm
098b0d8044 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-06-18 22:38:27 +12:00
Joshua
e9071432e1 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-06-18 22:38:26 +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
78ae9bbb89 specify path return value namespace to fix compiler error, closes #269 2018-04-24 18:06:30 -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
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
c960453ff4 prevent supression of failing round-trip tests 2017-12-10 15:03:03 -05:00
Thomas Fussell
44a8c8e79e minor reformatting 2017-12-09 16:04:44 -05:00
Thomas Fussell
675a8fad8a Merge branch 'sukoi26-dev' into dev 2017-12-09 15:46:10 -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
842eedae8c Merge branch 'TataMata-master' into dev 2017-12-08 15:13:49 -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
Thomas Fussell
e261743032
Merge pull request #243 from Erroneous1/bug/miniz_const
fix -Wcast-qual in miniz
2017-12-08 13:59:32 -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
TataMata
8f9722686b
Delete CMakeLists.txt.user 2017-11-06 16:50:18 +01:00