]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetSpecialChar.cpp
Fix conflicting inset font defaults (bug #8874)
[lyx.git] / src / insets / InsetSpecialChar.cpp
index 9e7346ffbf6c307fb2064a991438ab294ea8338a..f342d0f20d0ee24de9a2149da9e495e9b7c7ac0d 100644 (file)
@@ -239,7 +239,8 @@ void InsetSpecialChar::latex(otexstream & os,
 }
 
 
-int InsetSpecialChar::plaintext(odocstream & os, OutputParams const &) const
+int InsetSpecialChar::plaintext(odocstringstream & os,
+        OutputParams const &, size_t) const
 {
        switch (kind_) {
        case HYPHENATION:
@@ -323,7 +324,17 @@ docstring InsetSpecialChar::xhtml(XHTMLStream & xs, OutputParams const &) const
 
 void InsetSpecialChar::toString(odocstream & os) const
 {
-       plaintext(os, OutputParams(0));
+       switch (kind_) {
+       case LIGATURE_BREAK:
+               // Do not output ZERO WIDTH NON JOINER here
+               // Spell checker would choke on it.
+               return;
+       default:
+               break;
+       }
+       odocstringstream ods;
+       plaintext(ods, OutputParams(0));
+       os << ods.str();
 }