]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetQuotes.cpp
Typo
[features.git] / src / insets / InsetQuotes.cpp
index 3dfed9e419f132b4c941254821749167734b591e..19eb846baabc358107533a81cacb372c7fa8d557 100644 (file)
@@ -851,7 +851,7 @@ void InsetQuotes::latex(otexstream & os, OutputParams const & runparams) const
        docstring qstr;
 
        // In pass-thru context, we output plain quotes
-       if (runparams.pass_thru || runparams.for_searchAdv != OutputParams::NoSearch)
+       if (runparams.pass_thru || runparams.find_effective())
                qstr = (level_ == QuoteLevel::Primary) ? from_ascii("\"") : from_ascii("'");
        else if (style == QuoteStyle::Plain && fontspec_) {
                // For XeTeX and LuaTeX,we need to disable mapping to get straight
@@ -942,11 +942,20 @@ void InsetQuotes::latex(otexstream & os, OutputParams const & runparams) const
 
 
 int InsetQuotes::plaintext(odocstringstream & os,
-        OutputParams const &, size_t) const
+        OutputParams const & op, size_t) const
 {
-       docstring const str = displayString();
-       os << str;
-       return str.size();
+       if (!op.find_effective()) {
+               docstring const str = displayString();
+               os << str;
+               return str.size();
+       }
+       else {
+               if (level_ == QuoteLevel::Primary)
+                       os << from_ascii("\"");
+               else
+                       os << from_ascii("'");
+               return 1;
+       }
 }