Commit Graph

1066 Commits

Author SHA1 Message Date
Thomas Fussell
6010912582 use coveralls' official badge embed markdown 2016-06-18 09:17:28 +01:00
Thomas Fussell
bc410d8835 uncomment test_reverse_column_major_iterators 2016-06-15 13:36:03 +01:00
Thomas Fussell
e8c2dd37c3 Merge pull request #53 from xpol/fixes-reference-type-for-iterators
Fixes type for all iterator::reference.
2016-06-15 08:24:20 -04:00
Thomas Fussell
fbbd984779 Merge pull request #51 from xpol/refactor-index-types
Refactor index types
2016-06-15 08:23:35 -04:00
Thomas Fussell
f521974edc Merge pull request #52 from xpol/fix-linkage-for-utf8string
Add XLNT_CLASS to utf8string to fixes the linking error.
2016-06-15 08:22:56 -04:00
Thomas Fussell
5d2c75014b improve range iterators and their tests 2016-06-15 12:45:05 +01:00
Xpol Wan
5f7a76f6bd Its std::ptrdiff_t in <cstddef>. 2016-06-15 12:18:06 +08:00
Xpol Wan
a0b8b8f5e2 Fixes type for all iterator::reference.
1. we have overloaded operator*() for all iterators, returning a value type T (not a reference).
2. we use the std::reverse_iterator, its operator*() returns a reference type, by default the reference type is T&.

follow implement  std::reverse_iterator::operator*() const are taken form VS2015:

```C++
// in class reverse_iterator

 reference operator*() const
  { // return designated value
  _RanIt _Tmp = current;
  return (*--_Tmp);
  }
```

The `_RanIt` is our base non reverse iterators, the type of `(*--_Tmp)` is `T`. and the `reference` is `T&`. This cause

> warning C4172: returning address of local variable or temporary

And it is bug.

This commit specifies explicitly the 5th template argument for all our iterators base class like `std::iterator<tag,T, ptrdiff_t, T*, T>`.
It make the `reference` to be actually `T` (the value type) and fixes the issue.
2016-06-15 12:05:16 +08:00
Xpol Wan
86002b5338 Add XLNT_CLASS to utf8string to fixes the linking error. 2016-06-15 11:30:51 +08:00
Xpol Wan
eead279c58 compound assignments should implement the operation themself.
rather than depends on binary arithmetic operators, instead, binary arithmetic operators should reuse compound assignments.
2016-06-14 17:46:24 +08:00
Xpol Wan
da59c4a121 Remove doc comments in index_types.cpp.
They are duplicated with comments in index_types.hpp.
2016-06-14 17:24:24 +08:00
Xpol Wan
211cd7a363 make binary arithmetic operators for column_t non-member. 2016-06-14 17:20:49 +08:00
Thomas Fussell
23f65602de revert coverage calculation and work on coverage 2016-06-13 23:36:26 -04:00
Thomas Fussell
cf72ea5d5d revert coverage calculation for now 2016-06-12 23:06:43 -04:00
Thomas Fussell
0efd097617 add hash for enum class for gcc 2016-06-12 20:15:00 -04:00
Thomas Fussell
3d29186d6a improve enum serialization, closes #50 2016-06-12 19:59:59 -04:00
Thomas Fussell
7dafd2f3a3 clean up xlnt.hpp, closes #39 2016-06-11 15:50:03 -04:00
Thomas Fussell
049c2b4f5d use ppa for cmake3 and clean up coverage calculation 2016-06-11 15:29:15 -04:00
Thomas Fussell
8361bcad74 clean up xlnt_config.hpp and fix visual studio warnings 2016-06-12 01:07:07 +08:00
Thomas Fussell
8a22245e25 Merge pull request #46 from xpol/fixes-vs-static-compile-warnings
Fixes visual studio static compile warings about dll interface.
2016-06-11 11:12:26 -04:00
Thomas Fussell
d9124a2b23 add missing header 2016-06-11 10:17:58 -04:00
Thomas Fussell
6b56a75c9c add missing header 2016-06-11 10:09:29 -04:00
Thomas Fussell
2d28cd93e5 add missing header 2016-06-11 10:03:58 -04:00
Thomas Fussell
e3632da830 remove clang from travis build for now https://github.com/travis-ci/travis-ci/issues/6120#issue-157861834 2016-06-11 10:02:05 -04:00
Thomas Fussell
8c7a7f7a6f Merge branch 'master' of github.com:tfussell/xlnt 2016-06-11 01:12:30 -04:00
Thomas Fussell
85e1b4a333 refactor styles... again 2016-06-10 13:40:50 -04:00
Thomas Fussell
32ce55347c Update AUTHORS.md 2016-06-04 09:08:03 -06:00
Thomas Fussell
30275476c1 Merge pull request #48 from xpol/add-missing-member-for-workbook
Add implement const version of workbook::get_sheet_by_name().
2016-06-04 08:53:34 -06:00
Thomas Fussell
7c047c70f8 Merge pull request #49 from xpol/add-missing-overload-for-worksheet-rows
Add  range worksheet::rows(int row_offset, int column_offset) const.
2016-06-04 08:53:09 -06:00
Xpol Wan
9f1edce3bc Add range worksheet::rows(int row_offset, int column_offset) const. 2016-05-26 10:55:50 +08:00
Xpol Wan
aaabfe546a Add tests for const version of get_sheet_by_name(). 2016-05-26 10:44:35 +08:00
Xpol Wan
ba2d4743a6 Add implement const version of workbook::get_sheet_by_name().
and non const version are based on const version.
2016-05-26 10:05:30 +08:00
Xpol Wan
7290051f8e Fixes visual studio static compile warings about dll interface. 2016-05-24 11:41:54 +08:00
Thomas Fussell
4e9c48eba9 add missing header to main include file 2016-05-16 20:59:45 -04:00
Thomas Fussell
40b0f9908a remove misplaced text and text_run sources 2016-05-16 19:33:32 -04:00
Thomas Fussell
3a589fe8ef define some built-in rgb colors, missing fill method 2016-05-16 19:31:44 -04:00
Thomas Fussell
b8e7931b10 remove accidental commit of temporary test 2016-05-15 15:06:55 -04:00
Thomas Fussell
135af6e6c9 fix styles -- Excel wanted to repair saved workbooks 2016-05-15 15:03:02 -04:00
Thomas Fussell
365e2f93fc fix round-tripping of text runs with formatting 2016-05-15 11:51:32 -04:00
Thomas Fussell
760d044f7d add utf8 bom to number_format source to resolve encoding issues in VS2015, closes 43 2016-05-15 10:24:34 -04:00
Thomas Fussell
3d4941e61d wire up text and text run serialization 2016-05-14 15:19:08 -04:00
Thomas Fussell
74cc503215 clarify naming of styles and formats 2016-05-14 13:57:07 -04:00
Thomas Fussell
916883e427 fix last few tests 2016-05-14 12:42:34 -04:00
Thomas Fussell
e1e29e1f30 Merge remote-tracking branch 'xpol/shared-string-with-different-formatted-parts' into styles-refactoring 2016-05-14 09:30:05 -04:00
Xpol Wan
6500f71f70 Remove log code. 2016-05-14 16:36:14 +08:00
Xpol Wan
c18110e282 add support for one cell with different formatted text nodes.
Eg, In one cell the text is abcdef, where abc and def have different format (e.g., different colours or fonts).
The the sharedString.xml in xlsx have multiple r node in si node:

```xml
    <si>
        <r>
            <t>abc</t>
        </r>
        <r>
            <rPr><sz val="10"/><color rgb="FFFF0000"/><rFont val="微软雅黑"/><charset val="134"/></rPr>
            <t>def</t>
        </r>
    </si>
```

Currently `shared_strings_serializer::read_shared_strings()` only reads the first r node, and should consider as a bug.

This commit fixes this bug by read all `r.t.text` values in one `si` node and concat the text into one single string.
2016-05-14 16:24:21 +08:00
Thomas Fussell
d2d53dfc6d only a few failing tests remain 2016-05-13 14:40:17 -04:00
Thomas Fussell
739be9d850 merge changes from other computer 2016-05-13 12:32:44 -04:00
Thomas Fussell
31b546b1d5 general API improvements 2016-05-11 19:24:53 -04:00
Thomas Fussell
713bd1ea12 almost done finally. still need to figure out the interaction between styles and named styles, maybe improve naming 2016-05-03 15:37:34 -04:00