mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
call static methods statically
This commit is contained in:
parent
7b558c6857
commit
0b62d1e1d6
|
@ -523,9 +523,8 @@ public:
|
|||
pugi::xml_document xml;
|
||||
xml.load(source.c_str());
|
||||
|
||||
xlnt::shared_strings_serializer serializer;
|
||||
std::vector<xlnt::text> strings;
|
||||
serializer.read_shared_strings(xml, strings);
|
||||
xlnt::shared_strings_serializer::read_shared_strings(xml, strings);
|
||||
|
||||
TS_ASSERT_EQUALS(strings.size(), 1);
|
||||
TS_ASSERT_EQUALS(strings.front().get_runs().size(), 1);
|
||||
|
@ -553,6 +552,6 @@ public:
|
|||
pugi::xml_document xml_bad;
|
||||
xml_bad.load(source_bad.c_str());
|
||||
|
||||
TS_ASSERT_THROWS(serializer.read_shared_strings(xml_bad, strings), std::runtime_error);
|
||||
TS_ASSERT_THROWS(xlnt::shared_strings_serializer::read_shared_strings(xml_bad, strings), std::runtime_error);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -201,9 +201,9 @@ public:
|
|||
xlnt::text text;
|
||||
text.add_run(run);
|
||||
cell.set_value(text);
|
||||
xlnt::shared_strings_serializer serializer;
|
||||
|
||||
pugi::xml_document xml;
|
||||
serializer.write_shared_strings(wb.get_shared_strings(), xml);
|
||||
xlnt::shared_strings_serializer::write_shared_strings(wb.get_shared_strings(), xml);
|
||||
|
||||
std::string expected =
|
||||
"<sst xmlns=\"http://schemas.openxmlformats.org/spreadsheetml/2006/main\" count=\"1\" uniqueCount=\"1\">"
|
||||
|
|
Loading…
Reference in New Issue
Block a user