]> git.lyx.org Git - features.git/commitdiff
Fix bug #9383. Writing directly to the output stream bypassed the
authorRichard Heck <rgheck@lyx.org>
Mon, 9 Feb 2015 22:24:13 +0000 (17:24 -0500)
committerRichard Heck <rgheck@lyx.org>
Mon, 9 Feb 2015 22:26:47 +0000 (17:26 -0500)
machinery that clears the tag stack.

src/insets/InsetQuotes.cpp
src/insets/InsetQuotes.h

index 8a183fa0fae0860b35a149719caa42c896869397..9cb4786bda5d618351294a00aad13f2b1829bcaa 100644 (file)
@@ -307,26 +307,30 @@ int InsetQuotes::plaintext(odocstringstream & os,
 }
 
 
-int InsetQuotes::docbook(odocstream & os, OutputParams const &) const
-{
+docstring InsetQuotes::getQuoteEntity() const {
        if (times_ == DoubleQuotes) {
                if (side_ == LeftQuote)
-                       os << "&ldquo;";
-               else
-                       os << "&rdquo;";
-       } else {
-               if (side_ == LeftQuote)
-                       os << "&lsquo;";
+                       return from_ascii("&ldquo;");
                else
-                       os << "&rsquo;";
+                       return from_ascii("&rdquo;");
        }
+       if (side_ == LeftQuote)
+               return from_ascii("&lsquo;");
+       else
+               return from_ascii("&rsquo;");
+}
+
+
+int InsetQuotes::docbook(odocstream & os, OutputParams const &) const
+{
+       os << getQuoteEntity();
        return 0;
 }
 
 
 docstring InsetQuotes::xhtml(XHTMLStream & xs, OutputParams const & op) const
 {
-       docbook(xs.os(), op);
+       xs << XHTMLStream::ESCAPE_NONE << getQuoteEntity();
        return docstring();
 }
 
index 932cd9168da25246a091c718156d04fdb7af4665..98a0cbbcf8f842e091f438f25b3a2bd2528766d9 100644 (file)
@@ -109,6 +109,8 @@ private:
        void parseString(std::string const &);
        ///
        docstring displayString() const;
+       ///
+       docstring getQuoteEntity() const;
 
        ///
        QuoteLanguage language_;