(c) 2003--2004 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
-#include <math.h>
+#include "lyric-hyphen.hh"
+
+#include <cmath>
-#include "box.hh"
#include "lookup.hh"
-#include "stencil.hh"
-#include "paper-def.hh"
+#include "output-def.hh"
#include "paper-column.hh"
-#include "spanner.hh"
-#include "item.hh"
-#include "lyric-hyphen.hh"
#include "moment.hh"
MAKE_SCHEME_CALLBACK (Hyphen_spanner,print,1)
me->get_bound (RIGHT));
if (bounds[LEFT]->break_status_dir ()
- && Paper_column::when_mom (bounds[LEFT]) == Paper_column::when_mom (bounds[RIGHT]->get_column()))
+ && Paper_column::when_mom (bounds[LEFT]) == Paper_column::when_mom (bounds[RIGHT]->get_column ()))
return SCM_EOL;
Grob * common = bounds[LEFT]->common_refpoint (bounds[RIGHT], X_AXIS);
}
while (flip (&d) != LEFT);
- Real lt = me->get_paper ()->get_realvar (ly_symbol2scm ("linethickness"));
+ Real lt = me->get_layout ()->get_dimension (ly_symbol2scm ("linethickness"));
Real th = robust_scm2double (me->get_property ("thickness"), 1) * lt ;
Real h = robust_scm2double (me->get_property ("height"), 0.5);
do
{
r.item_l_drul_[d] = sp->get_bound (d);
- r.distance_ += r.item_l_drul_[d]->extent (r.item_l_drul_[d], X_AXIS)[-d];
+ if (r.item_l_drul_[d])
+ r.distance_ += r.item_l_drul_[d]->extent (r.item_l_drul_[d], X_AXIS)[-d];
}
while (flip (&d) != LEFT);
- r.add_to_cols ();
+ if (r.item_l_drul_[LEFT]
+ && r.item_l_drul_[RIGHT])
+ r.add_to_cols ();
+
return SCM_UNSPECIFIED;
}