mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
variant read, bool change take in account number(0,1) or text(false, true)
This commit is contained in:
parent
e14e595b6a
commit
b83dcd6a1f
|
@ -2507,8 +2507,11 @@ variant xlsx_consumer::read_variant()
|
|||
}
|
||||
if (element == qn("vt", "bool"))
|
||||
{
|
||||
bool bvalue = std::stoi(text);
|
||||
value = variant(bvalue);
|
||||
// bool could be "0" or "false"
|
||||
bool bvalue;
|
||||
if (text[0] == '0' or text[0] == 'f' or text[0]=='F') bvalue = false;
|
||||
else bvalue = true;
|
||||
value = variant(bvalue);
|
||||
}
|
||||
else if (element == qn("vt", "vector"))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user