]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/lookup.cc
release: 1.0.15
[lilypond.git] / lily / lookup.cc
index 7f09106f3bdf5496f8f1ea4d1be3c28e7cf62d88..8ba88483f5f080c3bf4fdf17d0a2274863318bf8 100644 (file)
@@ -109,6 +109,21 @@ Lookup::bar (String str, Real h) const
   return s;
 }
 
+String
+Lookup::base_output_str () const
+{
+  assert (paper_l_);
+  String str = paper_l_->get_default_output ();
+
+  if (str.empty_b ())
+    {
+      str = default_outname_base_global;
+      int def = paper_l_->get_next_default_count ();
+      if (def)
+       str += "-" + to_str (def);
+    }
+  return str;
+}
 
 Atom 
 Lookup::beam (Real slope, Real width, Real thick) const
@@ -175,7 +190,13 @@ Lookup::print () const
 String
 Lookup::print_dimen (Real r) const
 {
-  return paper_l_->dimension_str (r);
+  String s = to_str (r, "%.3f");
+  if (s.index_i ("NaN") != -1)
+    {
+      warning (_ ("NaN"));
+      s = "0.0";
+    }
+  return s;
 }
 
 Atom