commit 4508a7f855976bb1b23d8f9008a331204f31e651
Author: Enrico Forestieri <[email protected]>
Date:   Sun Sep 25 08:56:12 2016 +0200

    No need to clutter runparams...
---
 src/Font.cpp         |    4 ++--
 src/OutputParams.cpp |    3 +--
 src/OutputParams.h   |   10 ----------
 src/Paragraph.cpp    |    2 +-
 src/output_latex.cpp |    3 ---
 5 files changed, 4 insertions(+), 18 deletions(-)

diff --git a/src/Font.cpp b/src/Font.cpp
index f6eb6b9..95d015b 100644
--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -287,7 +287,7 @@ int Font::latexWriteStartChanges(odocstream & os, 
BufferParams const & bparams,
                        tmp += "{";
                        os << from_ascii(tmp);
                        count += tmp.length();
-                       
runparams.pushPolyglossiaLang(language()->polyglossia());
+                       pushPolyglossiaLang(language()->polyglossia());
                } else if (language()->encoding()->package() != Encoding::CJK) {
                        os << '{';
                        count += 1;
@@ -547,7 +547,7 @@ int Font::latexWriteEndChanges(otexstream & os, 
BufferParams const & bparams,
                os << '}';
                ++count;
                if (runparams.use_polyglossia)
-                       runparams.popPolyglossiaLang();
+                       popPolyglossiaLang();
        }
 
        return count;
diff --git a/src/OutputParams.cpp b/src/OutputParams.cpp
index 2b4c9d9..20c3a65 100644
--- a/src/OutputParams.cpp
+++ b/src/OutputParams.cpp
@@ -21,8 +21,7 @@ namespace lyx {
 OutputParams::OutputParams(Encoding const * enc)
        : flavor(LATEX), math_flavor(NotApplicable), nice(false), 
is_child(false),
          moving_arg(false), intitle(false), inulemcmd(0), local_font(0), 
master_language(0),
-         encoding(enc), pushPolyglossiaLang(0), popPolyglossiaLang(0),
-         free_spacing(false), use_babel(false), use_polyglossia(false),
+         encoding(enc), free_spacing(false), use_babel(false), 
use_polyglossia(false),
          use_indices(false), use_japanese(false), linelen(0), depth(0),
          exportdata(new ExportData),
          inComment(false), inTableCell(NO), inFloat(NONFLOAT),
diff --git a/src/OutputParams.h b/src/OutputParams.h
index 4927085..3914617 100644
--- a/src/OutputParams.h
+++ b/src/OutputParams.h
@@ -141,16 +141,6 @@ public:
         */
        mutable Encoding const * encoding;
 
-       /** Pointer to a function for registering a language switch
-           when using polyglossia.
-       */
-       mutable void (* pushPolyglossiaLang)(std::string const & lang_name);
-
-       /** Pointer to a function for unregistering  the last language
-           switch when using polyglossia.
-       */
-       mutable void (* popPolyglossiaLang)();
-
        /** free_spacing == true means that the inset is in a free-spacing
            paragraph.
        */
diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp
index fd0f7fa..3bdb4cc 100644
--- a/src/Paragraph.cpp
+++ b/src/Paragraph.cpp
@@ -2442,7 +2442,7 @@ void Paragraph::latex(BufferParams const & bparams,
                                os << from_ascii(end_tag);
                                column += end_tag.length();
                                if (runparams.use_polyglossia)
-                                       runparams.popPolyglossiaLang();
+                                       popPolyglossiaLang();
                }
 
                // Switch file encoding if necessary (and allowed)
diff --git a/src/output_latex.cpp b/src/output_latex.cpp
index 0875fbf..c656ecf 100644
--- a/src/output_latex.cpp
+++ b/src/output_latex.cpp
@@ -1289,9 +1289,6 @@ void latexParagraphs(Buffer const & buf,
                }
        }
 
-       runparams.pushPolyglossiaLang = pushPolyglossiaLang;
-       runparams.popPolyglossiaLang = popPolyglossiaLang;
-
        ParagraphList const & paragraphs = text.paragraphs();
 
        if (runparams.par_begin == runparams.par_end) {

Reply via email to