mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix bad commit
This commit is contained in:
parent
d30e705f83
commit
556d3358e9
|
@ -1567,7 +1567,16 @@ std::string number_formatter::fill_placeholders(const format_placeholders &p, do
|
||||||
if (p.type == format_placeholders::placeholders_type::general
|
if (p.type == format_placeholders::placeholders_type::general
|
||||||
|| p.type == format_placeholders::placeholders_type::text)
|
|| p.type == format_placeholders::placeholders_type::text)
|
||||||
{
|
{
|
||||||
return serialiser_.serialise_short(number);
|
auto s = serialiser_.serialise_short(number);
|
||||||
|
while (s.size() > 1 && s.back() == '0')
|
||||||
|
{
|
||||||
|
s.pop_back();
|
||||||
|
}
|
||||||
|
if (s.back() == '.')
|
||||||
|
{
|
||||||
|
s.pop_back();
|
||||||
|
}
|
||||||
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p.percentage)
|
if (p.percentage)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user