]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/word-wrap.cc
patch::: 1.2.12.jcn2
[lilypond.git] / lily / word-wrap.cc
index d6f6cbf7ceb763ea867cdf20190adcf3baa99253..cf6a95e9febcba39e3280f8608ce2b27a1a7ed6b 100644 (file)
@@ -11,7 +11,7 @@
 #include "paper-score.hh"
 #include "debug.hh"
 #include "paper-column.hh"
-#include "spring-spacer.hh"
+#include "line-spacer.hh"
 
 
 /** El stupido.  Add a measure until we're past the optimum.
@@ -43,7 +43,7 @@ Word_wrap::do_solve () const
 
       // do  another line
 
-      Item *post = breakpoints[break_idx]->find_prebroken_piece (RIGHT);
+      Item *post = breakpoints[break_idx]->find_broken_piece (RIGHT);
       Paper_column *postcol =dynamic_cast<Paper_column*>(post);
       
       int start_break_idx = break_idx;
@@ -60,7 +60,7 @@ Word_wrap::do_solve () const
              curcol_idx++;
            }
 
-         Item * pre = breakpoints[break_idx]->find_prebroken_piece (LEFT);
+         Item * pre = breakpoints[break_idx]->find_broken_piece (LEFT);
          Paper_column* precol = dynamic_cast<Paper_column*>(pre);
          current.add_paper_column (precol);
 
@@ -72,9 +72,9 @@ Word_wrap::do_solve () const
            {
              if (!minimum.cols_.size ())
                {
-                 warning (_ ("ugh, this measure is too long") 
-                   + ", " + _f ("breakpoint: %d", break_idx) 
-                   + "(" + _ ("generating stupido solution") + ")");
+                 warning (_f ("Ugh, this measure is too long, breakpoint: %d",
+                   break_idx));
+                 warning (_ ("Generating stupido solution"));
                  current.stupid_solution ();
                  current.energy_f_ = - 1; // make sure we break out.
                }
@@ -122,10 +122,7 @@ Word_wrap::do_solve () const
       *mlog << "[" << break_idx << "]" << flush;
       breaking.push (minimum);
     }
+  *mlog << endl;
   return breaking;
 }
 
-Word_wrap::Word_wrap ()
-{
-  get_line_spacer = Spring_spacer::constructor;
-}