]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.cpp
* src/buffer_funcs.{cpp,h}:
[lyx.git] / src / Buffer.cpp
index 2c26164ae37d9aa3e7c05f0434b1b94c7e2e5cb4..5be6679dca5479e1ea9c3d989919eba9eb629ee9 100644 (file)
@@ -118,7 +118,7 @@ namespace {
 
 // Do not remove the comment below, so we get merge conflict in
 // independent branches. Instead add your own.
-int const LYX_FORMAT = 345;  // jamatos: xml elements
+int const LYX_FORMAT = 346;  // jspitzm: Swiss German
 
 typedef map<string, bool> DepClean;
 typedef map<docstring, pair<InsetLabel const *, Buffer::References> > RefCache;
@@ -588,7 +588,7 @@ bool Buffer::readDocument(Lexer & lex)
                FileName const master_file = makeAbsPath(params().master,
                           onlyPath(absFileName()));
                if (isLyXFilename(master_file.absFilename())) {
-                       Buffer * master = checkAndLoadLyXFile(master_file);
+                       Buffer * master = checkAndLoadLyXFile(master_file, true);
                        d->parent_buffer = master;
                }
        }
@@ -685,6 +685,8 @@ bool Buffer::readFile(FileName const & filename)
 {
        FileName fname(filename);
 
+       params().compressed = fname.isZippedFile();
+
        // remove dummy empty par
        paragraphs().clear();
        Lexer lex;
@@ -1925,11 +1927,10 @@ void Buffer::updateMacros(DocIterator & it, DocIterator & scope) const
                        // is it an external file?
                        if (iit->inset->lyxCode() == INCLUDE_CODE) {
                                // get buffer of external file
-                               InsetCommand const & inset
-                                       = static_cast<InsetCommand const &>(*iit->inset);
-                               InsetCommandParams const & ip = inset.params();
+                               InsetInclude const & inset
+                                       = static_cast<InsetInclude const &>(*iit->inset);
                                d->macro_lock = true;
-                               Buffer * child = loadIfNeeded(*this, ip);
+                               Buffer * child = inset.loadIfNeeded(*this);
                                d->macro_lock = false;
                                if (!child)
                                        continue;