]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/text-spanner-engraver.cc
Update source file headers. Fixes using standard GNU package conventions.
[lilypond.git] / lily / text-spanner-engraver.cc
index 7d789b29735d6f1a0109fb21dcdd67274dabccd2..8a66fa62f34f04aa9488d51351ad6c1de7ad0698 100644 (file)
@@ -1,9 +1,20 @@
 /*
-  text-spanner-engraver.cc -- implement Text_spanner_engraver
+  This file is part of LilyPond, the GNU music typesetter.
 
-  source file of the GNU LilyPond music typesetter
+  Copyright (C) 2000--2009 Jan Nieuwenhuizen <janneke@gnu.org>
 
-  (c) 2000--2007 Jan Nieuwenhuizen <janneke@gnu.org>
+  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 <http://www.gnu.org/licenses/>.
 */
 
 #include "engraver.hh"
@@ -63,6 +74,7 @@ Text_spanner_engraver::process_music ()
       else
        {
          finished_ = span_;
+         announce_end_grob (finished_, SCM_EOL);
          span_ = 0;
          current_event_ = 0;
        }
@@ -127,13 +139,16 @@ Text_spanner_engraver::finalize ()
 void
 Text_spanner_engraver::acknowledge_note_column (Grob_info info)
 {
-  if (!span_)
-    return;
-
-  Pointer_group_interface::add_grob (span_,
-                                    ly_symbol2scm ("note-columns"),
-                                    info.grob());
-  add_bound_item (span_, info.grob ());
+  if (span_) {
+    Pointer_group_interface::add_grob (span_,
+                                      ly_symbol2scm ("note-columns"),
+                                      info.grob());
+    add_bound_item (span_, info.grob ());
+  } else if (finished_) {
+    Pointer_group_interface::add_grob (finished_, ly_symbol2scm ("note-columns"),
+                                      info.grob());
+    add_bound_item (finished_, info.grob ());
+  }
 }
 
 ADD_ACKNOWLEDGER (Text_spanner_engraver, note_column);
@@ -141,10 +156,13 @@ ADD_ACKNOWLEDGER (Text_spanner_engraver, note_column);
 ADD_TRANSLATOR (Text_spanner_engraver,
                /* doc */
                "Create text spanner from an event.",
+
                /* create */
                "TextSpanner ",
+
                /* read */
                "",
+
                /* write */
                ""
                );