Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(587)

Unified Diff: lily/page-spacing.cc

Issue 5293053: Sketch for in-notes. (Closed)
Patch Set: Updates after Neil's comments. Created 12 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lily/page-layout-problem.cc ('k') | lily/system.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lily/page-spacing.cc
diff --git a/lily/page-spacing.cc b/lily/page-spacing.cc
index 32550066334e33ce22ea42cb1ebf88c805e17de8..7e20f8416c5aa534983068a7987cfab5a85ec78e 100644
--- a/lily/page-spacing.cc
+++ b/lily/page-spacing.cc
@@ -72,7 +72,18 @@ Real
Page_spacing::account_for_footnotes (Line_details const &line)
{
Real footnote_height = 0.0;
- for (vsize i = 0; i < line.footnotes_.size (); i++)
+ Real in_note_height = 0.0;
+ bool has_in_notes = false;
+ for (vsize i = 0; i < line.in_note_heights_.size (); i++)
+ {
+ in_note_height += (has_in_notes
+ ? 0.0
+ : breaker_->in_note_padding ());
+ has_in_notes = true;
+ in_note_height += line.in_note_heights_[i];
+ }
+
+ for (vsize i = 0; i < line.footnote_heights_.size (); i++)
{
footnote_height += (has_footnotes_
? 0.0
@@ -81,12 +92,16 @@ Page_spacing::account_for_footnotes (Line_details const &line)
+ breaker_->footnote_number_raise ()));
has_footnotes_ = true;
- Interval extent = line.footnotes_[i]->extent (Y_AXIS);
- footnote_height += extent[UP] - extent[DOWN];
+ footnote_height += line.footnote_heights_[i];
footnote_height += breaker_->footnote_padding ();
}
- return (footnote_height
+ return (in_note_height
+ - (has_in_notes
+ ? breaker_->in_note_padding ()
+ : 0.0))
+ +
+ (footnote_height
- (has_footnotes_
? breaker_->footnote_padding () + breaker_->footnote_footer_padding ()
: 0.0));
« no previous file with comments | « lily/page-layout-problem.cc ('k') | lily/system.cc » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b