]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetquotes.C
The speed patch: redraw only rows that have changed
[lyx.git] / src / insets / insetquotes.C
index 78424adc990e1328bc87621544afc9865a126f28..7a85306c6d5cff8ca1ce9eb9603e94fcfd3b5630 100644 (file)
@@ -254,7 +254,7 @@ void InsetQuotes::write(Buffer const &, ostream & os) const
 
 void InsetQuotes::read(Buffer const &, LyXLex & lex)
 {
-       lex.nextToken();
+       lex.next();
        parseString(lex.getString());
        lex.next();
        if (lex.getString() != "\\end_inset") {
@@ -270,17 +270,11 @@ int InsetQuotes::latex(Buffer const &, ostream & os,
        string qstr;
 
        if (language_ == FrenchQ && times_ == DoubleQ
-           && runparams.lang == "frenchb") {
+           && prefixIs(runparams.local_font->language()->code(), "fr")) {
                if (side_ == LeftQ)
                        qstr = "\\og "; //the spaces are important here
                else
                        qstr = " \\fg{}"; //and here
-       } else if (language_ == FrenchQ && times_ == DoubleQ
-                  && runparams.lang == "french") {
-               if (side_ == LeftQ)
-                       qstr = "<< "; //the spaces are important here
-               else
-                       qstr = " >>"; //and here
        } else if (lyxrc.fontenc == "T1") {
                qstr = latex_quote_t1[times_][quoteind];
 #ifdef DO_USE_DEFAULT_LANGUAGE
@@ -336,6 +330,13 @@ int InsetQuotes::docbook(Buffer const &, ostream & os,
 }
 
 
+int InsetQuotes::textString(Buffer const & buf, ostream & os,
+                      OutputParams const & op) const
+{
+       return plaintext(buf, os, op);
+}
+
+
 void InsetQuotes::validate(LaTeXFeatures & features) const
 {
        bool const use_babel = features.useBabel();
@@ -365,13 +366,13 @@ void InsetQuotes::validate(LaTeXFeatures & features) const
 }
 
 
-auto_ptr<InsetBase> InsetQuotes::clone() const
+auto_ptr<InsetBase> InsetQuotes::doClone() const
 {
        return auto_ptr<InsetBase>(new InsetQuotes(language_, side_, times_));
 }
 
 
-InsetOld::Code InsetQuotes::lyxCode() const
+InsetBase::Code InsetQuotes::lyxCode() const
 {
-  return InsetOld::QUOTE_CODE;
+  return InsetBase::QUOTE_CODE;
 }