- {
- vector<Grob*> cols = system_specs_[i].pscore_->root_system ()->used_columns ();
- vector<Grob*> forced_line_break_cols;
-
- SCM system_count = system_specs_[i].pscore_->layout ()->c_variable ("system-count");
- if (scm_is_number (system_count))
- {
- // With system-count given, the line configuration for
- // this score is fixed. We need to ensure that chunk
- // boundaries only occur at line breaks.
- Constrained_breaking breaking (system_specs_[i].pscore_);
- vector<Line_details> details = breaking.line_details (0, VPOS, scm_to_int (system_count));
-
- for (vsize j = 0; j < details.size (); j++)
- forced_line_break_cols.push_back (details[j].last_column_);
- }
-
- int last_forced_line_break_idx = 0;
- vsize forced_line_break_idx = 0;
- vector<vsize> line_breaker_columns;
- line_breaker_columns.push_back (0);
-
- for (vsize j = 1; j < cols.size (); j++)
- {
- if (forced_line_break_cols.size ())
- {
- if (forced_line_break_idx >= forced_line_break_cols.size ()
- || forced_line_break_cols[forced_line_break_idx] != cols[j])
- continue;
- else
- forced_line_break_idx++;
- }
-
- bool last = (j == cols.size () - 1);
- bool break_point = is_break && is_break (cols[j]);
- bool chunk_end = cols[j]->get_property ("page-break-permission") == force_sym;
- Break_position cur_pos = Break_position (i,
- line_breaker_columns.size (),
- cols[j],
- last);
-
- // NOTE: even in the breaks_ list, forced_line_count_
- // refers to the number of lines between a
- // Break_position and the start of that /chunk/. This
- // is needed for system_count_bounds to work correctly,
- // since it mixes Break_positions from breaks_ and
- // chunks_.
- if (scm_is_number (system_count))
- cur_pos.forced_line_count_ = forced_line_break_idx - last_forced_line_break_idx;
-
- if (break_point || (i == system_specs_.size () - 1 && last))
- breaks_.push_back (cur_pos);
- if (chunk_end || last)
- {
- chunks_.push_back (cur_pos);
- last_forced_line_break_idx = forced_line_break_idx;
- }
-
- if ((break_point || chunk_end) && !last)
- line_breaker_columns.push_back (j);
- }
- line_breaking_.push_back (Constrained_breaking (system_specs_[i].pscore_, line_breaker_columns));
- }
+ {
+ vector<Grob *> cols = system_specs_[i].pscore_->root_system ()->used_columns ();
+ vector<Grob *> forced_line_break_cols;
+
+ SCM system_count = system_specs_[i].pscore_->layout ()->c_variable ("system-count");
+ if (scm_is_number (system_count))
+ {
+ // With system-count given, the line configuration for
+ // this score is fixed. We need to ensure that chunk
+ // boundaries only occur at line breaks.
+ Constrained_breaking breaking (system_specs_[i].pscore_);
+ vector<Line_details> details = breaking.line_details (0, VPOS, scm_to_int (system_count));
+
+ for (vsize j = 0; j < details.size (); j++)
+ forced_line_break_cols.push_back (details[j].last_column_);
+ }
+
+ int last_forced_line_break_idx = 0;
+ vsize forced_line_break_idx = 0;
+ vector<vsize> line_breaker_columns;
+ line_breaker_columns.push_back (0);
+
+ for (vsize j = 0; j < cols.size (); j++)
+ {
+ if (forced_line_break_cols.size ())
+ {
+ if (forced_line_break_idx >= forced_line_break_cols.size ()
+ || forced_line_break_cols[forced_line_break_idx] != cols[j])
+ continue;
+ else
+ forced_line_break_idx++;
+ }
+
+ bool last = (j == cols.size () - 1);
+ bool break_point = is_break && is_break (cols[j]);
+ bool chunk_end = scm_is_eq (cols[j]->get_property ("page-break-permission"), force_sym);
+ Break_position cur_pos = Break_position (i,
+ line_breaker_columns.size (),
+ cols[j],
+ last);
+
+ // NOTE: even in the breaks_ list, forced_line_count_
+ // refers to the number of lines between a
+ // Break_position and the start of that /chunk/. This
+ // is needed for system_count_bounds to work correctly,
+ // since it mixes Break_positions from breaks_ and
+ // chunks_.
+ if (scm_is_number (system_count))
+ cur_pos.forced_line_count_ = forced_line_break_idx - last_forced_line_break_idx;
+
+ if (break_point || (i == system_specs_.size () - 1 && last))
+ breaks_.push_back (cur_pos);
+ if (chunk_end || last)
+ {
+ chunks_.push_back (cur_pos);
+ last_forced_line_break_idx = forced_line_break_idx;
+ }
+
+ if ((break_point || chunk_end) && !last)
+ line_breaker_columns.push_back (j);
+ }
+ line_breaking_.push_back (Constrained_breaking (system_specs_[i].pscore_, line_breaker_columns));
+ }