call static methods statically

This commit is contained in:
Thomas Fussell 2016-07-19 21:23:11 -04:00
parent 7b558c6857
commit 0b62d1e1d6
2 changed files with 4 additions and 5 deletions

View File

@ -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);
}
};

View File

@ -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\">"