]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
Revert "Mark some intentional fall-throughs (in a way understandable to gcc)"
[lyx.git] / src / Buffer.cpp
index 5e2057ac5b764b45d110b934e2c5a356f08185be..d7e827fc2aa05f427d0d187b744ec383e66801d6 100644 (file)
@@ -55,6 +55,7 @@
 #include "ParagraphParameters.h"
 #include "ParIterator.h"
 #include "PDFOptions.h"
+#include "Session.h"
 #include "SpellChecker.h"
 #include "sgml.h"
 #include "texstream.h"
@@ -76,7 +77,7 @@
 
 #include "mathed/InsetMathHull.h"
 #include "mathed/MacroTable.h"
-#include "mathed/MathMacroTemplate.h"
+#include "mathed/InsetMathMacroTemplate.h"
 #include "mathed/MathSupport.h"
 
 #include "graphics/GraphicsCache.h"
@@ -136,7 +137,7 @@ int const LYX_FORMAT = LYX_FORMAT_LYX;
 typedef map<string, bool> DepClean;
 typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
 
-} // namespace anon
+} // namespace
 
 
 // A storehouse for the cloned buffers.
@@ -980,6 +981,8 @@ int Buffer::readHeader(Lexer & lex)
                errorList.push_back(ErrorItem(_("Document header error"), s));
        }
 
+       params().shell_escape = theSession().shellescapeFiles().find(absFileName());
+
        params().makeDocumentClass();
 
        return unknown_tokens;
@@ -3598,7 +3601,7 @@ void Buffer::Impl::updateMacros(DocIterator & it, DocIterator & scope)
                                continue;
 
                        // get macro data
-                       MathMacroTemplate & macroTemplate =
+                       InsetMathMacroTemplate & macroTemplate =
                                *iit->inset->asInsetMath()->asMacroTemplate();
                        MacroContext mc(owner_, it);
                        macroTemplate.updateToContext(mc);
@@ -3748,7 +3751,7 @@ void Buffer::listParentMacros(MacroSet & macros, LaTeXFeatures & features) const
                if (data) {
                        macros.insert(data);
 
-                       // we cannot access the original MathMacroTemplate anymore
+                       // we cannot access the original InsetMathMacroTemplate anymore
                        // here to calls validate method. So we do its work here manually.
                        // FIXME: somehow make the template accessible here.
                        if (data->optionals() > 0)
@@ -4100,7 +4103,7 @@ int AutoSaveBuffer::generateChild()
        return pid;
 }
 
-} // namespace anon
+} // namespace
 
 
 FileName Buffer::getEmergencyFileName() const