multiple footers

This commit is contained in:
PgBiel 2025-03-03 19:59:41 -03:00
parent 74b1b10986
commit cce5fe739a

View File

@ -678,8 +678,8 @@ pub struct CellGrid<'a> {
pub hlines: Vec<Vec<Line>>,
/// The repeatable headers of this grid.
pub headers: Vec<Repeatable<Header>>,
/// The repeatable footer of this grid.
pub footer: Option<Repeatable<Footer>>,
/// The repeatable footers of this grid.
pub footers: Vec<Repeatable<Footer>>,
/// Whether this grid has gutters.
pub has_gutter: bool,
}
@ -756,7 +756,7 @@ impl<'a> CellGrid<'a> {
vlines,
hlines,
headers,
footer,
footers: footer.into_iter().collect(),
has_gutter,
}
}
@ -895,6 +895,11 @@ impl<'a> CellGrid<'a> {
pub fn has_repeated_headers(&self) -> bool {
self.headers.iter().any(|h| h.repeated)
}
#[inline]
pub fn has_repeated_footers(&self) -> bool {
self.footers.iter().any(|f| f.repeated)
}
}
/// Resolves and positions all cells in the grid before creating it.