]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/spanner.cc
Run `make grand-replace'.
[lilypond.git] / lily / spanner.cc
index 77ee01074e5e1517f1bb8d056ad644a3f7888c9a..476f75d8c26e8da85be44c334e3ca6fd18641149 100644 (file)
@@ -3,7 +3,7 @@
 
   source file of the GNU LilyPond music typesetter
 
-  (c) 1996--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
+  (c) 1996--2008 Han-Wen Nienhuys <hanwen@xs4all.nl>
 */
 
 #include "pointer-group-interface.hh"
@@ -191,7 +191,7 @@ Spanner::set_bound (Direction d, Grob *s)
   Item *i = dynamic_cast<Item *> (s);
   if (!i)
     {
-      programming_error ("must have Item for spanner bound");
+      programming_error ("must have Item for spanner bound of " + name());
       return;
     }
 
@@ -358,11 +358,14 @@ Spanner::set_spacing_rods (SCM smob)
     {
       Rod r;
       Spanner *sp = dynamic_cast<Spanner *> (me);
-      
-
       System *root = get_root_system (me);
-      vector<Item*> cols (root->broken_col_range (sp->get_bound (LEFT)->get_column (),
-                                                 sp->get_bound (RIGHT)->get_column ()));
+      Drul_array<Item*> bounds (sp->get_bound (LEFT),
+                               sp->get_bound (RIGHT));
+      if (!bounds[LEFT] || !bounds[RIGHT])
+       return SCM_UNSPECIFIED;
+      
+      vector<Item*> cols (root->broken_col_range (bounds[LEFT]->get_column (),
+                                                 bounds[RIGHT]->get_column ()));
 
       if (cols.size ())
        {
@@ -421,12 +424,15 @@ Spanner::bounds_width (SCM grob)
 }
 
 ADD_INTERFACE (Spanner,
-              "Some objects are horizontally spanned between objects. For\n"
-              "example, slur, beam, tie, etc. These grobs form a subtype called\n"
-              "@code{Spanner}. All spanners have two span-points (these must be\n"
-              "@code{Item} objects), one on the left and one on the right. The left bound is\n"
-              "also the X-reference point of the spanner.\n",
-
+              "Some objects are horizontally spanned between objects.  For"
+              " example, slurs, beams, ties, etc.  These grobs form a subtype"
+              " called @code{Spanner}.  All spanners have two span points"
+              " (these must be @code{Item} objects), one on the left and one"
+              " on the right.  The left bound is also the X@tie{}reference"
+              " point of the spanner.",
+
+              /* properties */
               "minimum-length "
+              "to-barline "
               );