Merge pull request #127 from sukoi26/master

minor changes border style name upper letter ,  comment skip mc:Ignorable , alternativContent
This commit is contained in:
Thomas Fussell 2017-03-09 21:06:10 -05:00 committed by GitHub
commit 689bbee098
3 changed files with 19 additions and 12 deletions

View File

@ -144,17 +144,17 @@ std::string to_string(border_style style)
{
switch (style)
{
case border_style::dashdot: return "dashdot";
case border_style::dashdotdot: return "dashdotdot";
case border_style::dashdot: return "dashDot";
case border_style::dashdotdot: return "dashDotDot";
case border_style::dashed: return "dashed";
case border_style::dotted: return "dotted";
case border_style::double_: return "double";
case border_style::hair: return "hair";
case border_style::medium: return "medium";
case border_style::mediumdashdot: return "mediumdashdot";
case border_style::mediumdashdotdot: return "mediumdashdotdot";
case border_style::mediumdashed: return "mediumdashed";
case border_style::slantdashdot: return "slantdashdot";
case border_style::mediumdashdot: return "mediumDashDot";
case border_style::mediumdashdotdot: return "mediumDashDotDot";
case border_style::mediumdashed: return "mediumDashed";
case border_style::slantdashdot: return "slantDashDot";
case border_style::thick: return "thick";
case border_style::thin: return "thin";
case border_style::none: return "none";

View File

@ -179,18 +179,18 @@ gradient_fill_type from_string(const std::string &string)
template<>
border_style from_string(const std::string &string)
{
if (string == "dashdot") return border_style::dashdot;
else if (string == "dashdotdot") return border_style::dashdotdot;
if (string == "dashDot") return border_style::dashdot;
else if (string == "dashDotDot") return border_style::dashdotdot;
else if (string == "dashed") return border_style::dashed;
else if (string == "dotted") return border_style::dotted;
else if (string == "double") return border_style::double_;
else if (string == "hair") return border_style::hair;
else if (string == "medium") return border_style::medium;
else if (string == "mediumdashdot") return border_style::mediumdashdot;
else if (string == "mediumdashdotdot") return border_style::mediumdashdotdot;
else if (string == "mediumdashed") return border_style::mediumdashed;
else if (string == "mediumDashdot") return border_style::mediumdashdot;
else if (string == "mediumDashDotDot") return border_style::mediumdashdotdot;
else if (string == "mediumDashed") return border_style::mediumdashed;
else if (string == "none") return border_style::none;
else if (string == "slantdashdot") return border_style::slantdashdot;
else if (string == "slantDashDot") return border_style::slantdashdot;
else if (string == "thick") return border_style::thick;
else if (string == "thin") return border_style::thin;

View File

@ -2453,6 +2453,8 @@ void xlsx_consumer::read_comments(worksheet ws)
std::vector<std::string> authors;
expect_start_element(qn("spreadsheetml", "comments"), xml::content::complex);
// name space can be ignored
skip_attribute(qn("mc","Ignorable"));
expect_start_element(qn("spreadsheetml", "authors"), xml::content::complex);
while (in_element(qn("spreadsheetml", "authors")))
@ -2478,6 +2480,11 @@ void xlsx_consumer::read_comments(worksheet ws)
ws.cell(cell_ref).comment(comment(read_rich_text(qn("spreadsheetml", "text")), authors.at(author_id)));
expect_end_element(qn("spreadsheetml", "text"));
// specifc name space mc alternateContent element
expect_start_element(qn("mc", "AlternateContent"),xml::content::complex);
skip_remaining_content(qn("mc", "AlternateContent"));
expect_end_element(qn("mc", "AlternateContent"));
expect_end_element(qn("spreadsheetml", "comment"));
}