]> git.lyx.org Git - lyx.git/blobdiff - src/output_latex.cpp
More related to #7224: It's OK for layouts not to provide a ListCommand
[lyx.git] / src / output_latex.cpp
index 0bf0ad8d4ed974c01bc3d84d991ccda7874019bb..a5473bf4813d5684a00479d1570d3670de9810d2 100644 (file)
@@ -77,7 +77,7 @@ struct TeXEnvironementData
 
 
 static TeXEnvironementData prepareEnvironement(Buffer const & buf, Text const & text,
-               ParagraphList::const_iterator pit, odocstream & os, TexRow & texrow,
+               ParagraphList::const_iterator pit, otexstream & os, TexRow & texrow,
                OutputParams const & runparams)
 {
        TeXEnvironementData data;
@@ -202,7 +202,7 @@ static TeXEnvironementData prepareEnvironement(Buffer const & buf, Text const &
 }
 
 
-static void finishEnvironement(odocstream & os, TexRow & texrow,
+static void finishEnvironement(otexstream & os, TexRow & texrow,
                OutputParams const & runparams, TeXEnvironementData const & data)
 {
        if (open_encoding_ == CJK && data.cjk_nested) {
@@ -239,7 +239,7 @@ static void finishEnvironement(odocstream & os, TexRow & texrow,
 
 void TeXEnvironment(Buffer const & buf,
               Text const & text, OutputParams const & runparams,
-                  pit_type & pit, odocstream & os, TexRow & texrow)
+                  pit_type & pit, otexstream & os, TexRow & texrow)
 {
        ParagraphList const & paragraphs = text.paragraphs();
        ParagraphList::const_iterator par = paragraphs.constIterator(pit);
@@ -326,7 +326,7 @@ void TeXEnvironment(Buffer const & buf,
 } // namespace anon
 
 
-int latexArgInsets(Paragraph const & par, odocstream & os,
+int latexArgInsets(Paragraph const & par, otexstream & os,
        OutputParams const & runparams, unsigned int reqargs,
        unsigned int optargs)
 {
@@ -383,7 +383,7 @@ int latexArgInsets(Paragraph const & par, odocstream & os,
 namespace {
 
 // output the proper paragraph start according to latextype.
-void parStartCommand(Paragraph const & par, odocstream & os, TexRow & texrow,
+void parStartCommand(Paragraph const & par, otexstream & os, TexRow & texrow,
                     OutputParams const & runparams,Layout const & style) 
 {
        switch (style.latextype) {
@@ -419,7 +419,7 @@ void parStartCommand(Paragraph const & par, odocstream & os, TexRow & texrow,
 void TeXOnePar(Buffer const & buf,
          Text const & text,
          pit_type pit,
-         odocstream & os, TexRow & texrow,
+         otexstream & os, TexRow & texrow,
          OutputParams const & runparams_in,
          string const & everypar,
          int start_pos, int end_pos)
@@ -487,9 +487,9 @@ void TeXOnePar(Buffer const & buf,
                // task because in the other user of parStartCommand
                // the code is different (JMarc)
                if (style.isCommand())
-                       os << from_ascii("}\n");
+                       os << "}\n";
                else
-                       os << from_ascii("\n");
+                       os << '\n';
                texrow.newline();
                if (!style.parbreak_is_newline) {
                        os << '\n';
@@ -659,8 +659,8 @@ void TeXOnePar(Buffer const & buf,
                        if (i != 0 && encoding->package() == Encoding::CJK)
                                continue;
 
-                       pair<bool, int> enc_switch = switchEncoding(os, bparams, runparams,
-                               *encoding);
+                       pair<bool, int> enc_switch = switchEncoding(os.os(),
+                                               bparams, runparams, *encoding);
                        // the following is necessary after a CJK environment in a multilingual
                        // context (nesting issue).
                        if (par_language->encoding()->package() == Encoding::CJK
@@ -941,7 +941,7 @@ void TeXOnePar(Buffer const & buf,
 // LaTeX all paragraphs
 void latexParagraphs(Buffer const & buf,
                     Text const & text,
-                    odocstream & os,
+                    otexstream & os,
                     TexRow & texrow,
                     OutputParams const & runparams,
                     string const & everypar)
@@ -1065,12 +1065,11 @@ void latexParagraphs(Buffer const & buf,
        if (was_title && !already_title) {
                if (tclass.titletype() == TITLE_ENVIRONMENT) {
                        os << "\\end{" << from_ascii(tclass.titlename())
-                           << "}\n";
-               }
-               else {
+                          << "}\n";
+               } else {
                        os << "\\" << from_ascii(tclass.titlename())
-                           << "\n";
-                               }
+                          << "\n";
+               }
                texrow.newline();
        }