+
+void InsetQuotes::parseString(string const & s, bool const allow_wildcards)
+{
+ style_ = quoteparams.getQuoteStyle(s, allow_wildcards, style_);
+ side_ = quoteparams.getQuoteSide(s, allow_wildcards, side_);
+ level_ = quoteparams.getQuoteLevel(s, allow_wildcards, level_);
+}
+
+
+QuoteStyle InsetQuotes::getStyle(string const & s)
+{
+ QuoteStyle qs = QuoteStyle::English;
+
+ if (s == "english")
+ qs = QuoteStyle::English;
+ else if (s == "swedish")
+ qs = QuoteStyle::Swedish;
+ else if (s == "german")
+ qs = QuoteStyle::German;
+ else if (s == "polish")
+ qs = QuoteStyle::Polish;
+ else if (s == "swiss")
+ qs = QuoteStyle::Swiss;
+ else if (s == "danish")
+ qs = QuoteStyle::Danish;
+ else if (s == "plain")
+ qs = QuoteStyle::Plain;
+ else if (s == "british")
+ qs = QuoteStyle::British;
+ else if (s == "swedishg")
+ qs = QuoteStyle::SwedishG;
+ else if (s == "french")
+ qs = QuoteStyle::French;
+ else if (s == "frenchin")
+ qs = QuoteStyle::FrenchIN;
+ else if (s == "russian")
+ qs = QuoteStyle::Russian;
+ else if (s == "cjk")
+ qs = QuoteStyle::CJK;
+ else if (s == "cjkangle")
+ qs = QuoteStyle::CJKAngle;
+ else if (s == "hungarian")
+ qs = QuoteStyle::Hungarian;
+ else if (s == "dynamic")
+ qs = QuoteStyle::Dynamic;
+
+ return qs;
+}
+
+
+docstring InsetQuotes::displayString() const
+{
+ // In PassThru, we use straight quotes
+ if (pass_thru_)
+ return (level_ == QuoteLevel::Primary) ?
+ from_ascii("\"") : from_ascii("'");
+
+ QuoteStyle style =
+ (style_ == QuoteStyle::Dynamic) ? global_style_ : style_;
+
+ docstring retdisp = docstring(1, quoteparams.getQuoteChar(style, level_, side_, rtl_));
+
+ // in French, thin spaces are added inside double guillemets
+ if (prefixIs(context_lang_, "fr")
+ && level_ == QuoteLevel::Primary
+ && (style == QuoteStyle::Swiss
+ || style == QuoteStyle::French
+ || style == QuoteStyle::FrenchIN)) {
+ // THIN SPACE (U+2009)
+ char_type const thin_space = 0x2009;
+ if (side_ == QuoteSide::Opening)
+ retdisp += thin_space;