- // FIXME: It might be better to move this in another method
- // specially tailored for the main text.
- // Top and bottom margin of the document (only at top-level)
- if (text_->isMainText()) {
- if (pit == 0) {
- pm.rows().front().top_padding += bv_->topMargin();
- pm.dim().asc += bv_->topMargin();
- }
- ParagraphList const & pars = text_->paragraphs();
- if (pit + 1 == pit_type(pars.size())) {
- pm.rows().back().bottom_padding += bv_->bottomMargin();
- pm.dim().des += bv_->bottomMargin();
- }
- }
-