Merge branch 'master' into issue-504-select-multiple-cells

This commit is contained in:
Thomas Fussell 2021-01-02 15:05:02 -05:00 committed by GitHub
commit 4b91281280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2289,7 +2289,7 @@ void xlsx_consumer::read_stylesheet()
else if (current_style_element == qn("spreadsheetml", "fonts")) else if (current_style_element == qn("spreadsheetml", "fonts"))
{ {
auto &fonts = stylesheet.fonts; auto &fonts = stylesheet.fonts;
auto count = parser().attribute<std::size_t>("count"); auto count = parser().attribute<std::size_t>("count", 0);
if (parser().attribute_present(qn("x14ac", "knownFonts"))) if (parser().attribute_present(qn("x14ac", "knownFonts")))
{ {
@ -2426,7 +2426,7 @@ void xlsx_consumer::read_stylesheet()
if (count != stylesheet.fonts.size()) if (count != stylesheet.fonts.size())
{ {
throw xlnt::exception("counts don't match"); // throw xlnt::exception("counts don't match");
} }
} }
else if (current_style_element == qn("spreadsheetml", "numFmts")) else if (current_style_element == qn("spreadsheetml", "numFmts"))