mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
Importing row spans in the row_properties object
This commit is contained in:
parent
db5abec894
commit
3ab49c8af6
|
@ -63,6 +63,13 @@ public:
|
|||
/// The index to the style used by all cells in this row
|
||||
/// </summary>
|
||||
optional<std::size_t> style;
|
||||
|
||||
/// <summary>
|
||||
/// The row column span, used as part of the row block optimisation.
|
||||
/// This used for loading this attribute from existing excel files mainly for inspecting
|
||||
/// and not used when saving, it is calculated in the xlsx_producer.
|
||||
/// </summary>
|
||||
optional<std::string> spans;
|
||||
};
|
||||
|
||||
inline bool operator==(const row_properties &lhs, const row_properties &rhs)
|
||||
|
@ -72,7 +79,8 @@ inline bool operator==(const row_properties &lhs, const row_properties &rhs)
|
|||
&& lhs.custom_height == rhs.custom_height
|
||||
&& lhs.hidden == rhs.hidden
|
||||
&& lhs.custom_format == rhs.custom_format
|
||||
&& lhs.style == rhs.style;
|
||||
&& lhs.style == rhs.style
|
||||
&& lhs.spans == rhs.spans;
|
||||
}
|
||||
|
||||
} // namespace xlnt
|
||||
|
|
|
@ -221,9 +221,13 @@ cell xlsx_consumer::read_cell()
|
|||
row_properties.dy_descent = parser().attribute<double>(qn("x14ac", "dyDescent"));
|
||||
}
|
||||
|
||||
if (parser().attribute_present("spans")) {
|
||||
row_properties.spans = parser().attribute("spans");
|
||||
}
|
||||
|
||||
skip_attributes({"customFormat", "s", "customFont",
|
||||
"outlineLevel", "collapsed", "thickTop", "thickBot",
|
||||
"ph", "spans"});
|
||||
"ph"});
|
||||
}
|
||||
|
||||
if (!in_element(qn("spreadsheetml", "row")))
|
||||
|
@ -713,9 +717,13 @@ void xlsx_consumer::read_worksheet_sheetdata()
|
|||
row_properties.custom_format.set(parser().attribute<bool>("customFormat"));
|
||||
}
|
||||
|
||||
if (parser().attribute_present("spans")) {
|
||||
row_properties.spans = parser().attribute("spans");
|
||||
}
|
||||
|
||||
skip_attributes({"customFont",
|
||||
"outlineLevel", "collapsed", "thickTop", "thickBot",
|
||||
"ph", "spans"});
|
||||
"ph"});
|
||||
|
||||
while (in_element(qn("spreadsheetml", "row")))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user