mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Merge pull request #510 from softmarch/issue-509-count-missing
Fix the missing count of fonts and throw an exception.
This commit is contained in:
commit
7e40e73601
|
@ -2289,7 +2289,7 @@ void xlsx_consumer::read_stylesheet()
|
|||
else if (current_style_element == qn("spreadsheetml", "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")))
|
||||
{
|
||||
|
@ -2426,7 +2426,7 @@ void xlsx_consumer::read_stylesheet()
|
|||
|
||||
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"))
|
||||
|
|
Loading…
Reference in New Issue
Block a user