]> git.donarmstrong.com Git - lilypond.git/blobdiff - lily/p-score.cc
release: 1.0.14
[lilypond.git] / lily / p-score.cc
index 0ab995f15c11434d86afdf1a549f0cc6206ac240..25eaac2aa4493a7009fd83715399beb2881aaa37 100644 (file)
@@ -207,8 +207,9 @@ Paper_score::process ()
       line_l_->space_processing ();
 
   Array<Column_x_positions> breaking = calc_breaking ();
-  Paper_stream *paper_stream_p = open_output_stream ();
-  outputter_l_ = open_paper_outputter (paper_stream_p);
+
+  Paper_stream* paper_stream_p = global_lookup_l->paper_stream_p ();
+  outputter_l_ = global_lookup_l->paper_outputter_p (paper_stream_p, paper_l_, header_l_, origin_str_);
 
   Link_array<Line_of_score> lines;
   for (int i=0; i < breaking.size (); i++)
@@ -235,17 +236,12 @@ Paper_score::process ()
        
     }
 
-  if (ps_output_global_b)
-    *paper_stream_p << "\nshowpage\n";
-  else
-    *paper_stream_p << "\n\\EndLilyPondOutput";
-
+  // huh?
   delete outputter_l_;
   delete paper_stream_p;
   outputter_l_ = 0;
 }
 
-
 void
 Paper_score::remove_line (Line_of_score *l)
 {
@@ -276,101 +272,6 @@ Paper_score::remove_line (Line_of_score *l)
     }
 }
 
-Paper_stream *
-Paper_score::open_output_stream ()
-{
-  // output
-  String base_outname=paper_l_->get_default_output ();
-
-  if (base_outname.empty_b ())
-    {
-      base_outname = default_outname_base_global;
-      int def = paper_l_->get_next_default_count ();
-      if (def)
-       {
-         base_outname += "-" + to_str (def);
-       }
-    }
-
-  String outname = base_outname;
-
-  Paper_stream* p;
-  if (ps_output_global_b)
-    {
-      if (outname != "-")
-        outname += ".ps";
-      *mlog << _f ("PostScript output to %s...", 
-                  outname == "-" ? String ("<stdout>") : outname ) << endl;
-      p = new Ps_stream (outname);
-    }
-  else
-    {
-      if (outname != "-")
-        outname += ".tex";
-      *mlog << _f ("TeX output to %s...", 
-                  outname == "-" ? String ("<stdout>") : outname ) << endl;
-      p = new Tex_stream (outname);
-    }
-  target_str_global_array.push (outname);
-  return p;
-}
-
-// urg
-Paper_outputter*
-Paper_score::open_paper_outputter (Paper_stream* paper_stream_p)
-{
-  if (ps_output_global_b)
-    return open_ps_outputter ((Ps_stream*)paper_stream_p);
-  else
-    return open_tex_outputter ((Tex_stream*)paper_stream_p);
-}
-
-// urg urg urg
-Paper_outputter*
-Paper_score::open_ps_outputter (Ps_stream *ps_out_p)
-{
-  Ps_outputter *interfees_p = new Ps_outputter (ps_out_p);
-
-  if (header_global_p)
-    *ps_out_p << header_global_p->ps_string ();
-  
-  *ps_out_p << _ ("% outputting Score, defined at: ") << origin_str_ << '\n';
-
-  // urg
-  if (header_l_)
-    *ps_out_p << header_l_->ps_string ();
-  //aaarg
-  *ps_out_p << paper_l_->ps_output_settings_str ();
-
-  if (experimental_features_global_b)
-    *ps_out_p << "turnOnExperimentalFeatures\n";
-
-  return interfees_p;
-}
-
-Paper_outputter*
-Paper_score::open_tex_outputter (Tex_stream *tex_out_p)
-{
-  Tex_outputter *interfees_p= new Tex_outputter (tex_out_p);
-
-  if (header_global_p)
-    *tex_out_p << header_global_p->tex_string ();
-    
-  
-  *tex_out_p << _ ("% outputting Score, defined at: ") << origin_str_ << '\n';
-
-  if (header_l_)
-    *tex_out_p << header_l_->tex_string();
-  *tex_out_p << paper_l_->tex_output_settings_str ();
-  
-
-  if (experimental_features_global_b)
-    *tex_out_p << "\\turnOnExperimentalFeatures%\n";
-
-  *tex_out_p << "\\turnOnPostScript%\n";
-  return interfees_p;
-}
-
 /** Get all breakable columns between l and r, (not counting l and r).  */
 Link_array<Paper_column>
 Paper_score::breakable_col_range (Paper_column*l, Paper_column*r) const