]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
This doesn't return a reference any more.
[lyx.git] / src / BufferParams.cpp
index 01fbfb0a457cf01dc65966e45ce492cd7aa365a9..7477a9ac5123b3fdca4957de15b869e2e4fd4512 100644 (file)
@@ -225,15 +225,15 @@ PackageTranslator const & packagetranslator()
 
 
 // Cite engine
-typedef Translator<string, biblio::CiteEngine> CiteEngineTranslator;
+typedef Translator<string, CiteEngine> CiteEngineTranslator;
 
 
 CiteEngineTranslator const init_citeenginetranslator()
 {
-       CiteEngineTranslator translator("basic", biblio::ENGINE_BASIC);
-       translator.addPair("natbib_numerical", biblio::ENGINE_NATBIB_NUMERICAL);
-       translator.addPair("natbib_authoryear", biblio::ENGINE_NATBIB_AUTHORYEAR);
-       translator.addPair("jurabib", biblio::ENGINE_JURABIB);
+       CiteEngineTranslator translator("basic", ENGINE_BASIC);
+       translator.addPair("natbib_numerical", ENGINE_NATBIB_NUMERICAL);
+       translator.addPair("natbib_authoryear", ENGINE_NATBIB_AUTHORYEAR);
+       translator.addPair("jurabib", ENGINE_JURABIB);
        return translator;
 }
 
@@ -277,7 +277,6 @@ public:
 
        AuthorList authorlist;
        BranchList branchlist;
-       vector<string> extraEmbeddedFiles;
        Bullet temp_bullets[4];
        Bullet user_defined_bullets[4];
        Spacing spacing;
@@ -329,7 +328,7 @@ BufferParams::BufferParams()
        use_geometry = false;
        use_amsmath = package_auto;
        use_esint = package_auto;
-       cite_engine_ = biblio::ENGINE_BASIC;
+       cite_engine_ = ENGINE_BASIC;
        use_bibtopic = false;
        trackChanges = false;
        outputChanges = false;
@@ -351,7 +350,6 @@ BufferParams::BufferParams()
        listings_params = string();
        pagestyle = "default";
        compressed = false;
-       embedded = lyxrc.use_bundled_format;
        for (int iter = 0; iter < 4; ++iter) {
                user_defined_bullet(iter) = ITEMIZE_DEFAULTS[iter];
                temp_bullet(iter) = ITEMIZE_DEFAULTS[iter];
@@ -378,18 +376,6 @@ AuthorList const & BufferParams::authors() const
 }
 
 
-vector<string> & BufferParams::extraEmbeddedFiles()
-{
-       return pimpl_->extraEmbeddedFiles;
-}
-
-
-vector<string> const & BufferParams::extraEmbeddedFiles() const
-{
-       return pimpl_->extraEmbeddedFiles;
-}
-
-
 BranchList & BufferParams::branchlist()
 {
        return pimpl_->branchlist;
@@ -467,7 +453,7 @@ void BufferParams::setDefSkip(VSpace const & vs)
 
 
 string BufferParams::readToken(Lexer & lex, string const & token,
-       FileName const & filepath, FileName const & temppath)
+       FileName const & filepath)
 {
        if (token == "\\textclass") {
                lex.next();
@@ -476,8 +462,6 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                // NOTE: in this case, the textclass (.cls file) is assumed to be available.
                string tcp;
                LayoutFileList & bcl = LayoutFileList::get();
-               if (!temppath.empty())
-                       tcp = bcl.addLayoutFile(classname, temppath.absFilename(), LayoutFileList::Embedded);
                if (tcp.empty() && !filepath.empty())
                        tcp = bcl.addLayoutFile(classname, filepath.absFilename(), LayoutFileList::Local);
                if (!tcp.empty())
@@ -673,16 +657,6 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                                toktmp << endl;
                        return toktmp;
                }
-       } else if (token == "\\extra_embedded_files") {
-               extraEmbeddedFiles().clear();
-               string par;
-               lex >> par;
-               string tmp;
-               par = split(par, tmp, ',');
-               while (!tmp.empty()) {
-                       extraEmbeddedFiles().push_back(tmp);
-                       par = split(par, tmp, ',');
-               }
        } else {
                lyxerr << "BufferParams::readToken(): Unknown token: " << 
                        token << endl;
@@ -1491,9 +1465,8 @@ void BufferParams::makeDocumentClass()
                                        "probably need to reconfigure LyX.\n"), from_utf8(modName));
                        frontend::Alert::warning(_("Module not available"),
                                        msg + _("Some layouts may not be available."));
-                       lyxerr << "BufferParams::makeDocumentClass(): Module " <<
-                                       modName << " requested but not found in module list." <<
-                                       endl;
+                       LYXERR0("BufferParams::makeDocumentClass(): Module " <<
+                                       modName << " requested but not found in module list.");
                        continue;
                }
                if (!lm->isAvailable()) {
@@ -1530,12 +1503,9 @@ bool BufferParams::addLayoutModule(string const & modName)
 {
        LayoutModuleList::const_iterator it = layoutModules_.begin();
        LayoutModuleList::const_iterator end = layoutModules_.end();
-       for (; it != end; it++) {
+       for (; it != end; it++)
                if (*it == modName) 
-                       break;
-       }
-       if (it != layoutModules_.end())
-               return false;
+                       return false;
        layoutModules_.push_back(modName);
        return true;
 }
@@ -2010,18 +1980,18 @@ Encoding const & BufferParams::encoding() const
 }
 
 
-biblio::CiteEngine BufferParams::citeEngine() const
+CiteEngine BufferParams::citeEngine() const
 {
        // FIXME the class should provide the numerical/
        // authoryear choice
        if (documentClass().provides("natbib")
-           && cite_engine_ != biblio::ENGINE_NATBIB_NUMERICAL)
-               return biblio::ENGINE_NATBIB_AUTHORYEAR;
+           && cite_engine_ != ENGINE_NATBIB_NUMERICAL)
+               return ENGINE_NATBIB_AUTHORYEAR;
        return cite_engine_;
 }
 
 
-void BufferParams::setCiteEngine(biblio::CiteEngine cite_engine)
+void BufferParams::setCiteEngine(CiteEngine cite_engine)
 {
        cite_engine_ = cite_engine;
 }