mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
commit
f99cf3bde0
1831
package-lock.json
generated
1831
package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -9,8 +9,8 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@release-it/bumper": "^1.1.0",
|
"@release-it/bumper": "^2.0.0",
|
||||||
"release-it": "^13.1.1"
|
"release-it": "^14.2.2"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"release": "release-it"
|
"release": "release-it"
|
||||||
|
@ -2098,15 +2098,13 @@ void xlsx_consumer::read_shared_string_table()
|
|||||||
{
|
{
|
||||||
expect_start_element(qn("spreadsheetml", "si"), xml::content::complex);
|
expect_start_element(qn("spreadsheetml", "si"), xml::content::complex);
|
||||||
auto rt = read_rich_text(qn("spreadsheetml", "si"));
|
auto rt = read_rich_text(qn("spreadsheetml", "si"));
|
||||||
// by reading in it can happen we have similar strings from modified excel worksheets
|
|
||||||
// so allow to add duplicates
|
|
||||||
target_.add_shared_string(rt, true);
|
target_.add_shared_string(rt, true);
|
||||||
expect_end_element(qn("spreadsheetml", "si"));
|
expect_end_element(qn("spreadsheetml", "si"));
|
||||||
}
|
}
|
||||||
|
|
||||||
expect_end_element(qn("spreadsheetml", "sst"));
|
expect_end_element(qn("spreadsheetml", "sst"));
|
||||||
|
|
||||||
if (has_unique_count && unique_count != target_.shared_strings_by_id().size())
|
if (has_unique_count && unique_count != target_.shared_strings().size())
|
||||||
{
|
{
|
||||||
throw invalid_file("sizes don't match");
|
throw invalid_file("sizes don't match");
|
||||||
}
|
}
|
||||||
|
@ -1398,17 +1398,9 @@ std::size_t workbook::add_shared_string(const rich_text &shared, bool allow_dupl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// it can happen that similar strings are more then onetime in the shared stringtable (Excel bugfix?)
|
auto sz = d_->shared_strings_ids_.size();
|
||||||
// shared_strings_values map should start on position 0
|
|
||||||
auto sz = d_->shared_strings_values_.size();
|
|
||||||
if (d_->shared_strings_values_.count(sz) > 0)
|
|
||||||
{
|
|
||||||
// something went wrong!
|
|
||||||
throw invalid_file("Error in shared string table!");
|
|
||||||
}
|
|
||||||
|
|
||||||
d_->shared_strings_values_[sz] = shared;
|
|
||||||
d_->shared_strings_ids_[shared] = sz;
|
d_->shared_strings_ids_[shared] = sz;
|
||||||
|
d_->shared_strings_values_.push_back(shared);
|
||||||
|
|
||||||
return sz;
|
return sz;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user