]> git.lyx.org Git - features.git/blobdiff - src/Paragraph.cpp
* Lazy MathData to avoid unneeded interpretation of macro definitions
[features.git] / src / Paragraph.cpp
index 3b66a68de395f3966f2e0bf8ea039f3c309a927c..61fe11117bf5f64e1b75cf7c0d05729cce1dbb6b 100644 (file)
@@ -183,10 +183,6 @@ public:
        ///
        ParagraphParameters params_;
 
-       /// position of the paragraph in the buffer. Only macros from
-       /// paragraphs strictly smaller are visible in this paragraph
-       unsigned int macrocontext_position_;
-       
        /// for recording and looking up changes
        Changes changes_;
 
@@ -232,7 +228,6 @@ Paragraph::Private::Private(Paragraph * owner)
        : owner_(owner), inset_owner_(0), begin_of_body_(0)
 {
        id_ = paragraph_id++;
-       macrocontext_position_ = 0;
        text_.reserve(100);
 }
 
@@ -2024,9 +2019,17 @@ bool Paragraph::latex(Buffer const & buf,
                                        texrow, rp, running_font,
                                        basefont, outerfont, open_font,
                                        runningChange, *style, i, column);
-               else
-                       d->latexSpecialChar(os, rp, running_font, runningChange,
-                               *style, i, column);
+               else {
+                       try {
+                               d->latexSpecialChar(os, rp, running_font, runningChange,
+                                       *style, i, column);
+                       } catch (EncodingException & e) {
+                               // add location information and throw again.
+                               e.par_id = id();
+                               e.pos = i;
+                               throw(e);
+                       }
+               }
 
                // Set the encoding to that returned from simpleTeXSpecialChars (see
                // comment for encoding member in OutputParams.h)
@@ -2489,18 +2492,6 @@ int Paragraph::checkBiblio(bool track_changes)
 }
 
 
-unsigned int Paragraph::macrocontextPosition() const
-{
-       return d->macrocontext_position_;
-}
-
-
-void Paragraph::setMacrocontextPosition(unsigned int pos)
-{
-       d->macrocontext_position_ = pos;
-}
-
-
 void Paragraph::checkAuthors(AuthorList const & authorList)
 {
        d->changes_.checkAuthors(authorList);