]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph.C
fix one ambiguity, and comment out a un-implemented operator
[lyx.git] / src / paragraph.C
index f45a5db3298e2419b2fb353cb11943de3fac0a45..516228c5d78424e5ae26295602246fd671c7c94a 100644 (file)
@@ -929,8 +929,6 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
                basefont = getLayoutFont(bparams, outerfont);
        }
 
-       bool const moving_arg = runparams.moving_arg | style->needprotect;
-
        // Which font is currently active?
        LyXFont running_font(basefont);
        // Do we have an open font change?
@@ -947,7 +945,8 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
                        ++column;
                }
                if (!asdefault)
-                       column += startTeXParParams(bparams, os, moving_arg);
+                       column += startTeXParParams(bparams, os, 
+                                                   runparams.moving_arg);
        }
 
        for (pos_type i = 0; i < size(); ++i) {
@@ -971,7 +970,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
 
                        if (!asdefault)
                                column += startTeXParParams(bparams, os,
-                                                           moving_arg);
+                                                           runparams.moving_arg);
                }
 
                value_type c = getChar(i);
@@ -1029,7 +1028,6 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
                running_change = change;
 
                OutputParams rp = runparams;
-               rp.moving_arg = moving_arg;
                rp.free_spacing = style->free_spacing;
                rp.local_language = font.language()->babel();
                rp.intitle = style->intitle;
@@ -1073,7 +1071,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
        }
 
        if (!asdefault) {
-               column += endTeXParParams(bparams, os, moving_arg);
+               column += endTeXParParams(bparams, os, runparams.moving_arg);
        }
 
        lyxerr[Debug::LATEX] << "SimpleTeXOnePar...done " << this << endl;
@@ -1356,7 +1354,7 @@ bool Paragraph::emptyTag() const
 }
 
 
-string Paragraph::getID() const
+string Paragraph::getID(Buffer const & buf, OutputParams const & runparams) const
 {
        for (pos_type i = 0; i < size(); ++i) {
                if (isInset(i)) {
@@ -1364,7 +1362,7 @@ string Paragraph::getID() const
                        InsetBase::Code lyx_code = inset->lyxCode();
                        if (lyx_code == InsetBase::LABEL_CODE) {
                                string const id = static_cast<InsetCommand const *>(inset)->getContents();
-                               return "id=\"" + sgml::cleanID(id) + "\"";
+                               return "id=\"" + sgml::cleanID(buf, runparams, id) + "\"";
                        }
                }