+ user_defined_bullet(iter) = ITEMIZE_DEFAULTS[iter];
+ temp_bullet(iter) = ITEMIZE_DEFAULTS[iter];
+ }
+}
+
+
+BufferParams::~BufferParams()
+{}
+
+
+AuthorList & BufferParams::authors()
+{
+ return pimpl_->authorlist;
+}
+
+
+AuthorList const & BufferParams::authors() const
+{
+ return pimpl_->authorlist;
+}
+
+
+BranchList & BufferParams::branchlist()
+{
+ return pimpl_->branchlist;
+}
+
+
+BranchList const & BufferParams::branchlist() const
+{
+ return pimpl_->branchlist;
+}
+
+
+Bullet & BufferParams::temp_bullet(lyx::size_type const index)
+{
+ BOOST_ASSERT(index < 4);
+ return pimpl_->temp_bullets[index];
+}
+
+
+Bullet const & BufferParams::temp_bullet(lyx::size_type const index) const
+{
+ BOOST_ASSERT(index < 4);
+ return pimpl_->temp_bullets[index];
+}
+
+
+Bullet & BufferParams::user_defined_bullet(lyx::size_type const index)
+{
+ BOOST_ASSERT(index < 4);
+ return pimpl_->user_defined_bullets[index];
+}
+
+
+Bullet const & BufferParams::user_defined_bullet(lyx::size_type const index) const
+{
+ BOOST_ASSERT(index < 4);
+ return pimpl_->user_defined_bullets[index];
+}
+
+
+Spacing & BufferParams::spacing()
+{
+ return pimpl_->spacing;
+}
+
+
+Spacing const & BufferParams::spacing() const
+{
+ return pimpl_->spacing;
+}
+
+
+VSpace const & BufferParams::getDefSkip() const
+{
+ return pimpl_->defskip;
+}
+
+
+void BufferParams::setDefSkip(VSpace const & vs)
+{
+ pimpl_->defskip = vs;
+}
+
+
+string const BufferParams::readToken(LyXLex & lex, string const & token)
+{
+ if (token == "\\textclass") {
+ lex.next();
+ string const classname = lex.getString();
+ pair<bool, lyx::textclass_type> pp =
+ textclasslist.NumberOfClass(classname);
+ if (pp.first) {
+ textclass = pp.second;
+ } else {
+ textclass = 0;
+ return classname;
+ }
+ if (!getLyXTextClass().isTeXClassAvailable()) {
+ string const msg =
+ bformat(_("The document uses a missing "
+ "TeX class \"%1$s\".\n"), classname);
+ Alert::warning(_("Document class not available"),
+ msg + _("LyX will not be able to produce output."));
+ }
+ } else if (token == "\\begin_preamble") {
+ readPreamble(lex);
+ } else if (token == "\\options") {
+ lex.eatLine();
+ options = lex.getString();
+ } else if (token == "\\language") {
+ readLanguage(lex);
+ } else if (token == "\\inputencoding") {
+ lex >> inputenc;
+ } else if (token == "\\graphics") {
+ readGraphicsDriver(lex);
+ } else if (token == "\\fontscheme") {
+ lex >> fonts;
+ } else if (token == "\\paragraph_separation") {
+ string parsep;
+ lex >> parsep;
+ paragraph_separation = parseptranslator().find(parsep);
+ } else if (token == "\\defskip") {
+ lex.next();
+ pimpl_->defskip = VSpace(lex.getString());
+ } else if (token == "\\quotes_language") {
+ string quotes_lang;
+ lex >> quotes_lang;
+ quotes_language = quoteslangtranslator().find(quotes_lang);
+ } else if (token == "\\papersize") {
+ string ppsize;
+ lex >> ppsize;
+ papersize = papersizetranslator().find(ppsize);
+ } else if (token == "\\use_geometry") {
+ lex >> use_geometry;
+ } else if (token == "\\use_amsmath") {
+ int use_ams;
+ lex >> use_ams;
+ use_amsmath = amstranslator().find(use_ams);
+ } else if (token == "\\cite_engine") {
+ string engine;
+ lex >> engine;
+ cite_engine = citeenginetranslator().find(engine);
+ } else if (token == "\\use_bibtopic") {
+ lex >> use_bibtopic;
+ } else if (token == "\\tracking_changes") {
+ lex >> tracking_changes;
+ } else if (token == "\\output_changes") {
+ lex >> output_changes;
+ } else if (token == "\\branch") {
+ lex.next();
+ string branch = lex.getString();
+ branchlist().add(branch);
+ while (true) {
+ lex.next();
+ string const tok = lex.getString();
+ if (tok == "\\end_branch")
+ break;
+ Branch * branch_ptr = branchlist().find(branch);
+ if (tok == "\\selected") {
+ lex.next();
+ if (branch_ptr)
+ branch_ptr->setSelected(lex.getInteger());
+ }
+ // not yet operational
+ if (tok == "\\color") {
+ lex.eatLine();
+ string color = lex.getString();
+ if (branch_ptr)
+ branch_ptr->setColor(color);
+ // Update also the LColor table:
+ if (color == "none")
+ color = lcolor.getX11Name(LColor::background);
+ lcolor.setColor(branch, color);
+
+ }
+ }
+ } else if (token == "\\author") {
+ lex.eatLine();
+ istringstream ss(lex.getString());
+ Author a;
+ ss >> a;
+ author_map.push_back(pimpl_->authorlist.record(a));
+ } else if (token == "\\paperorientation") {
+ string orient;
+ lex >> orient;
+ orientation = paperorientationtranslator().find(orient);
+ } else if (token == "\\paperwidth") {
+ lex >> paperwidth;
+ } else if (token == "\\paperheight") {
+ lex >> paperheight;
+ } else if (token == "\\leftmargin") {
+ lex >> leftmargin;
+ } else if (token == "\\topmargin") {
+ lex >> topmargin;
+ } else if (token == "\\rightmargin") {
+ lex >> rightmargin;
+ } else if (token == "\\bottommargin") {
+ lex >> bottommargin;
+ } else if (token == "\\headheight") {
+ lex >> headheight;
+ } else if (token == "\\headsep") {
+ lex >> headsep;
+ } else if (token == "\\footskip") {
+ lex >> footskip;
+ } else if (token == "\\paperfontsize") {
+ lex >> fontsize;
+ } else if (token == "\\papercolumns") {
+ lex >> columns;
+ } else if (token == "\\papersides") {
+ int psides;
+ lex >> psides;
+ sides = sidestranslator().find(psides);
+ } else if (token == "\\paperpagestyle") {
+ lex >> pagestyle;
+ } else if (token == "\\bullet") {
+ readBullets(lex);
+ } else if (token == "\\bulletLaTeX") {
+ readBulletsLaTeX(lex);
+ } else if (token == "\\secnumdepth") {
+ lex >> secnumdepth;
+ } else if (token == "\\tocdepth") {
+ lex >> tocdepth;
+ } else if (token == "\\spacing") {
+ string nspacing;
+ lex >> nspacing;
+ string tmp_val;
+ if (nspacing == "other") {
+ lex >> tmp_val;
+ }
+ spacing().set(spacetranslator().find(nspacing), tmp_val);
+ } else if (token == "\\float_placement") {
+ lex >> float_placement;
+ } else {
+ return token;