X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=lily%2Fminimal-page-breaking.cc;h=968c4bf9b705858e6f1afafb583674c8c8fff054;hb=47db9a3883d726ca53e2133a3b2298f78dd6a32e;hp=870340f83d352aab22e54e1d1a5a62a9738d41fe;hpb=0ab2bcc4e2d86ca0d26d1c724b28f6911b96188d;p=lilypond.git diff --git a/lily/minimal-page-breaking.cc b/lily/minimal-page-breaking.cc index 870340f83d..968c4bf9b7 100644 --- a/lily/minimal-page-breaking.cc +++ b/lily/minimal-page-breaking.cc @@ -1,11 +1,20 @@ /* - minimal-page-breaking.cc -- implement a page-breaker that stacks as - many systems on a page before moving to the next one. Specialized - for books with many pages, or a lot of text. + This file is part of LilyPond, the GNU music typesetter. - source file of the GNU LilyPond music typesetter + Copyright (C) 2007--2015 Nicolas Sceaux - (c) 2007 Nicolas Sceaux + LilyPond is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + LilyPond is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with LilyPond. If not, see . */ #include "international.hh" @@ -14,15 +23,8 @@ #include "page-spacing.hh" #include "paper-book.hh" -static bool -is_break (Grob *g) -{ - (void) g; /* shutup warning */ - return false; -} - Minimal_page_breaking::Minimal_page_breaking (Paper_book *pb) - : Page_breaking (pb, is_break) + : Page_breaking (pb, 0, 0) { } @@ -35,11 +37,11 @@ Minimal_page_breaking::solve () { vsize end = last_break_position (); - message ("Computing line breaks..."); + message (_ ("Calculating line breaks...")); set_to_ideal_line_configuration (0, end); break_into_pieces (0, end, current_configuration (0)); - message (_ ("Computing page breaks...")); + message (_ ("Calculating page breaks...")); vsize first_page_num = robust_scm2int (book_->paper_->c_variable ("first-page-number"), 1); Page_spacing_result res = pack_systems_on_least_pages (0, first_page_num); SCM lines = systems ();