]> git.donarmstrong.com Git - lilypond.git/commitdiff
Merge http://git.sv.gnu.org/r/lilypond
authorNicolas Sceaux <nicolas.sceaux@free.fr>
Mon, 28 May 2007 17:38:44 +0000 (19:38 +0200)
committerNicolas Sceaux <nicolas.sceaux@free.fr>
Mon, 28 May 2007 17:38:44 +0000 (19:38 +0200)
1  2 
lily/page-breaking.cc

index a972e3e904162d0aa2366deb5622f46bd7435af8,d03c486c8b144807ee82cd348699394a51334e62..2c137e36842f108b22da3b7583a4a0f67bf38611
@@@ -233,9 -237,9 +237,10 @@@ Page_breaking::make_pages (vector<vsize
    page_stencil = scm_variable_ref (page_stencil);
  
    SCM book = book_->self_scm ();
-   int first_page_number = robust_scm2int (book_->paper_->c_variable ("first-page-number"), 1);
+   int first_page_number
+     = robust_scm2int (book_->paper_->c_variable ("first-page-number"), 1);
    SCM ret = SCM_EOL;
 +  SCM label_page_table = SCM_EOL;
  
    for (vsize i = 0; i < lines_per_page.size (); i++)
      {
        SCM line_count = scm_from_int (lines_per_page[i]);
        SCM lines = scm_list_head (systems, line_count);
        SCM page = scm_apply_0 (make_page,
-                             scm_list_n (book, lines, page_num, rag, last, SCM_UNDEFINED));
+                             scm_list_n (book, lines, page_num,
+                                         rag, last, SCM_UNDEFINED));
  
 +      /* collect labels */
 +      for (SCM l = lines ; scm_is_pair (l)  ; l = scm_cdr (l))
 +      {
 +        SCM labels = SCM_EOL;
 +        if (Grob * line = unsmob_grob (scm_car (l)))
 +          {
 +            System *system = dynamic_cast<System*> (line);
 +            labels = system->get_property ("labels");
 +          }
 +        else if (Prob *prob = unsmob_prob (scm_car (l)))
 +          labels = prob->get_property ("labels");
 +
 +        for (SCM lbls = labels ; scm_is_pair (lbls) ; lbls = scm_cdr (lbls))
 +          label_page_table = scm_cons (scm_cons (scm_car (lbls), page_num),
 +                                       label_page_table);
 +      }
 +
        scm_apply_1 (page_stencil, page, SCM_EOL);
        ret = scm_cons (page, ret);
        systems = scm_list_tail (systems, line_count);