]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetSpecialChar.cpp
tex2lyx/text.cpp: fix typos
[lyx.git] / src / insets / InsetSpecialChar.cpp
index 6550ac90940ec6984999b034fd12c3fcc15c3ee6..9e7346ffbf6c307fb2064a991438ab294ea8338a 100644 (file)
@@ -243,8 +243,10 @@ int InsetSpecialChar::plaintext(odocstream & os, OutputParams const &) const
 {
        switch (kind_) {
        case HYPHENATION:
-       case LIGATURE_BREAK:
                return 0;
+       case LIGATURE_BREAK:
+               os.put(0x200c);
+               return 1;
        case END_OF_SENTENCE:
                os << '.';
                return 1;
@@ -258,7 +260,7 @@ int InsetSpecialChar::plaintext(odocstream & os, OutputParams const &) const
                os << '/';
                return 1;
        case NOBREAKDASH:
-               os << '-';
+               os.put(0x2011);
                return 1;
        }
        return 0;
@@ -295,7 +297,9 @@ docstring InsetSpecialChar::xhtml(XHTMLStream & xs, OutputParams const &) const
 {
        switch (kind_) {
        case HYPHENATION:
+               break;
        case LIGATURE_BREAK:
+               xs << XHTMLStream::ESCAPE_NONE << "&#8204;";
                break;
        case END_OF_SENTENCE:
                xs << '.';
@@ -310,7 +314,7 @@ docstring InsetSpecialChar::xhtml(XHTMLStream & xs, OutputParams const &) const
                xs << XHTMLStream::ESCAPE_NONE << "&frasl;";
                break;
        case NOBREAKDASH:
-               xs << '-';
+               xs << XHTMLStream::ESCAPE_NONE << "&#8209;";
                break;
        }
        return docstring();
@@ -342,13 +346,8 @@ void InsetSpecialChar::validate(LaTeXFeatures & features) const
 
 bool InsetSpecialChar::isLetter() const
 {
-       return kind_ == HYPHENATION || kind_ == LIGATURE_BREAK;
-}
-
-
-bool InsetSpecialChar::skipOnSearch() const
-{
-       return kind_ == HYPHENATION || kind_ == LIGATURE_BREAK;
+       return kind_ == HYPHENATION || kind_ == LIGATURE_BREAK
+               || kind_ == NOBREAKDASH;
 }
 
 
@@ -359,7 +358,8 @@ bool InsetSpecialChar::isLineSeparator() const
        // Paragraph::stripLeadingSpaces nukes the characters which
        // have this property. I leave the code here, since it should
        // eventually be made to work. (JMarc 20020327)
-       return kind_ == HYPHENATION || kind_ == MENU_SEPARATOR;
+       return kind_ == HYPHENATION || kind_ == MENU_SEPARATOR
+               || kind_ == SLASH;
 #else
        return false;
 #endif