skip codeName attribute for #83

This commit is contained in:
Thomas Fussell 2016-11-20 18:36:52 -05:00
parent ec6a010f8a
commit 2bfd909684
5 changed files with 18 additions and 23 deletions

View File

@ -1032,7 +1032,7 @@ void cell::comment(const class comment &new_comment)
// todo: make this cell_position.first += get_width() instead
if (get_worksheet().has_column_properties(get_column()))
{
cell_position.first += get_worksheet().get_column_properties(get_column()).width;
cell_position.first += static_cast<int>(get_worksheet().get_column_properties(get_column()).width);
}
else
{

View File

@ -792,26 +792,11 @@ void xlsx_consumer::read_workbook()
}
}
if (parser().attribute_present("defaultThemeVersion"))
{
parser().attribute("defaultThemeVersion");
}
// todo: turn these structures into a method like skip_attribute(string name, bool optional)
if (parser().attribute_present("backupFile"))
{
parser().attribute("backupFile");
}
if (parser().attribute_present("showObjects"))
{
parser().attribute("showObjects");
}
if (parser().attribute_present("filterPrivacy"))
{
parser().attribute("filterPrivacy");
}
skip_attribute("codeName");
skip_attribute("defaultThemeVersion");
skip_attribute("backupFile");
skip_attribute("showObjects");
skip_attribute("filterPrivacy");
parser().next_expect(xml::parser::event_type::end_element, xmlns, "workbookPr");
}
@ -2403,5 +2388,13 @@ void xlsx_consumer::read_block(const std::unordered_map<xml::qname, std::functio
parser().next_expect(xml::parser::event_type::end_element, parent_block);
}
void xlsx_consumer::skip_attribute(const std::string &name)
{
if (parser().attribute_present(name))
{
parser().attribute(name);
}
}
} // namespace detail
} // namepsace xlnt

View File

@ -226,6 +226,8 @@ private:
void read_part(const std::vector<relationship> &rel_chain);
void skip_attribute(const std::string &name);
/// <summary>
/// The ZIP file containing the files that make up the OOXML package.
/// </summary>

View File

@ -28,7 +28,7 @@
#include <functional>
#include <set>
#ifdef WIN32
#ifdef _MSC_VER
#include <codecvt> // utf-8 -> utf-16 conversion
#endif

2
third-party/botan vendored

@ -1 +1 @@
Subproject commit 923a95d546df5b6d31f39b0af900d0361fb2e6a6
Subproject commit 523b2a4ca48fa5cf04ea371aabe7167ce2e5cd13