]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
Update tex2lyx tests.
[lyx.git] / src / BufferParams.cpp
index 487f0341b37a88b1f539f033dffe3cc1e3dd1232..fa0b7c3b92819ccb8d4beea6f64c898a71fd9487 100644 (file)
@@ -72,7 +72,8 @@ static char const * const string_paragraph_separation[] = {
 
 
 static char const * const string_quotes_style[] = {
-       "english", "swedish", "german", "polish", "french", "danish", ""
+       "english", "swedish", "german", "polish", "swiss", "danish", "plain",
+       "british", "swedishg", "french", "frenchin", "russian", "cjk", "cjkangle", ""
 };
 
 
@@ -128,18 +129,26 @@ ParSepTranslator const & parseptranslator()
 
 
 // Quotes style
-typedef Translator<string, InsetQuotes::QuoteStyle> QuotesStyleTranslator;
+typedef Translator<string, InsetQuotesParams::QuoteStyle> QuotesStyleTranslator;
 
 
 QuotesStyleTranslator const init_quotesstyletranslator()
 {
        QuotesStyleTranslator translator
-               (string_quotes_style[0], InsetQuotes::EnglishQuotes);
-       translator.addPair(string_quotes_style[1], InsetQuotes::SwedishQuotes);
-       translator.addPair(string_quotes_style[2], InsetQuotes::GermanQuotes);
-       translator.addPair(string_quotes_style[3], InsetQuotes::PolishQuotes);
-       translator.addPair(string_quotes_style[4], InsetQuotes::FrenchQuotes);
-       translator.addPair(string_quotes_style[5], InsetQuotes::DanishQuotes);
+               (string_quotes_style[0], InsetQuotesParams::EnglishQuotes);
+       translator.addPair(string_quotes_style[1], InsetQuotesParams::SwedishQuotes);
+       translator.addPair(string_quotes_style[2], InsetQuotesParams::GermanQuotes);
+       translator.addPair(string_quotes_style[3], InsetQuotesParams::PolishQuotes);
+       translator.addPair(string_quotes_style[4], InsetQuotesParams::SwissQuotes);
+       translator.addPair(string_quotes_style[5], InsetQuotesParams::DanishQuotes);
+       translator.addPair(string_quotes_style[6], InsetQuotesParams::PlainQuotes);
+       translator.addPair(string_quotes_style[7], InsetQuotesParams::BritishQuotes);
+       translator.addPair(string_quotes_style[8], InsetQuotesParams::SwedishGQuotes);
+       translator.addPair(string_quotes_style[9], InsetQuotesParams::FrenchQuotes);
+       translator.addPair(string_quotes_style[10], InsetQuotesParams::FrenchINQuotes);
+       translator.addPair(string_quotes_style[11], InsetQuotesParams::RussianQuotes);
+       translator.addPair(string_quotes_style[12], InsetQuotesParams::CJKQuotes);
+       translator.addPair(string_quotes_style[13], InsetQuotesParams::CJKAngleQuotes);
        return translator;
 }
 
@@ -394,7 +403,8 @@ BufferParams::BufferParams()
        cite_engine_type_ = ENGINE_TYPE_DEFAULT;
        makeDocumentClass();
        paragraph_separation = ParagraphIndentSeparation;
-       quotes_style = InsetQuotes::EnglishQuotes;
+       quotes_style = InsetQuotesParams::EnglishQuotes;
+       dynamic_quotes = false;
        fontsize = "default";
 
        /*  PaperLayout */
@@ -832,6 +842,8 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                string qstyle;
                lex >> qstyle;
                quotes_style = quotesstyletranslator().find(qstyle);
+       } else if (token == "\\dynamic_quotes") {
+               lex >> dynamic_quotes;
        } else if (token == "\\papersize") {
                string ppsize;
                lex >> ppsize;
@@ -1301,6 +1313,7 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const
                os << "\n\\defskip " << getDefSkip().asLyXCommand();
        os << "\n\\quotes_style "
           << string_quotes_style[quotes_style]
+          << "\n\\dynamic_quotes " << dynamic_quotes
           << "\n\\papercolumns " << columns
           << "\n\\papersides " << sides
           << "\n\\paperpagestyle " << pagestyle << '\n';
@@ -2547,7 +2560,7 @@ Font const BufferParams::getFont() const
 }
 
 
-InsetQuotes::QuoteStyle BufferParams::getQuoteStyle(string const & qs) const
+InsetQuotesParams::QuoteStyle BufferParams::getQuoteStyle(string const & qs) const
 {
        return quotesstyletranslator().find(qs);
 }