slightly optimise cell parsing routine, fix formula being incorrectly loaded

This commit is contained in:
JCrawfy 2019-11-16 12:09:03 +13:00
parent 8eda9f226f
commit ec29e227d4

View File

@ -744,7 +744,11 @@ struct Worksheet_Parser
{
for (auto &attr : parser->attribute_map())
{
if (attr.first.name() == "ph")
if (attr.first.name() == "r")
{
ref = Cell_Reference(row_arg, attr.second.value);
}
else if (attr.first.name() == "ph")
{
is_phonetic = is_true(attr.second.value);
}
@ -760,10 +764,6 @@ struct Worksheet_Parser
{
type = from_string(attr.second.value);
}
else if (attr.first.name() == "r")
{
ref = Cell_Reference(row_arg, attr.second.value);
}
}
int level = 1; // nesting level
while (level > 0)