X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fpage-breaking.cc;h=d81e32d230108ff61bb54979837ffd9e1d121461;hb=b0a0b0da364a2379e3a26a0cd6af87fece1594fb;hp=36ef0a13726d621f9888cd14e854ea5260bd945e;hpb=968e4722ea19df8485b5fec506c3b2dc9a29c664;p=lilypond.git diff --git a/lily/page-breaking.cc b/lily/page-breaking.cc index 36ef0a1372..d81e32d230 100644 --- a/lily/page-breaking.cc +++ b/lily/page-breaking.cc @@ -1,7 +1,7 @@ /* This file is part of LilyPond, the GNU music typesetter. - Copyright (C) 2006--2011 Joe Neeman + Copyright (C) 2006--2012 Joe Neeman LilyPond is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -254,11 +254,11 @@ Page_breaking::Page_breaking (Paper_book *pb, Break_predicate is_break, Prob_bre min_systems_per_page_ = max (0, robust_scm2int (pb->paper_->c_variable ("min-systems-per-page"), 0)); orphan_penalty_ = robust_scm2int (pb->paper_->c_variable ("orphan-penalty"), 100000); - Stencil *footnote_separator = Page_layout_problem::get_footnote_separator_stencil (pb->paper_); + Stencil footnote_separator = Page_layout_problem::get_footnote_separator_stencil (pb->paper_); - if (footnote_separator) + if (!footnote_separator.is_empty ()) { - Interval separator_extent = footnote_separator->extent (Y_AXIS); + Interval separator_extent = footnote_separator.extent (Y_AXIS); Real separator_span = separator_extent.length (); footnote_separator_stencil_height_ = separator_span; @@ -574,14 +574,14 @@ Page_breaking::draw_page (SCM systems, SCM configuration, int page_num, bool las p->set_property ("lines", paper_systems); p->set_property ("configuration", configuration); - Stencil *foot = unsmob_stencil (p->get_property ("foot-stencil")); + Stencil *foot_p = unsmob_stencil (p->get_property ("foot-stencil")); + Stencil foot = foot_p ? *foot_p : Stencil (); SCM footnotes = Page_layout_problem::get_footnotes_from_lines (systems); - Page_layout_problem::add_footnotes_to_footer (footnotes, foot, book_); + foot = Page_layout_problem::add_footnotes_to_footer (footnotes, foot, book_); - if (foot) - p->set_property ("foot-stencil", foot->smobbed_copy ()); + p->set_property ("foot-stencil", foot.smobbed_copy ()); scm_apply_1 (page_stencil, page, SCM_EOL); return page;