X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2Finsetspecialchar.C;h=8caa469bfebcb8ef3c215c006d2fd9843b1d9c83;hb=3c8aba3b556871fb1100a2f98cd93d5d4e3f70c9;hp=d0fd3296e9534a345cd60fb6d98ff1d4ee6488aa;hpb=77e706c44175f3cf71473a42d5db890c77b3b7b3;p=lyx.git diff --git a/src/insets/insetspecialchar.C b/src/insets/insetspecialchar.C index d0fd3296e9..8caa469bfe 100644 --- a/src/insets/insetspecialchar.C +++ b/src/insets/insetspecialchar.C @@ -61,11 +61,6 @@ int InsetSpecialChar::width(Painter &, LyXFont const & font) const { return lyxfont::width(" x ", font); } -#if 0 - case NEWLINE: - { - } -#endif case PROTECTED_SEPARATOR: { return lyxfont::width('x', font); @@ -119,11 +114,6 @@ void InsetSpecialChar::draw(Painter & pain, LyXFont const & f, x += width(pain, font); break; } -#if 0 - case NEWLINE: - { - } -#endif case PROTECTED_SEPARATOR: { float w = width(pain, font); @@ -159,9 +149,6 @@ void InsetSpecialChar::Write(ostream & os) const case END_OF_SENTENCE: command = "\\@."; break; case LDOTS: command = "\\ldots{}"; break; case MENU_SEPARATOR: command = "\\menuseparator"; break; -#if 0 - case NEWLINE: command = "\\newline"; break; -#endif case PROTECTED_SEPARATOR: command = "\\protected_separator"; break; } @@ -190,7 +177,7 @@ void InsetSpecialChar::Read(LyXLex & lex) } -int InsetSpecialChar::Latex(ostream & os, signed char /*fragile*/, +int InsetSpecialChar::Latex(ostream & os, bool /*fragile*/, bool free_space) const { switch (kind) { @@ -203,12 +190,11 @@ int InsetSpecialChar::Latex(ostream & os, signed char /*fragile*/, return 0; } - -int InsetSpecialChar::Linuxdoc(ostream & os) const +int InsetSpecialChar::Ascii(ostream & os) const { switch (kind) { - case HYPHENATION: os << ""; break; - case END_OF_SENTENCE: os << ""; break; + case HYPHENATION: break; + case END_OF_SENTENCE: os << "."; break; case LDOTS: os << "..."; break; case MENU_SEPARATOR: os << "->"; break; case PROTECTED_SEPARATOR: os << " "; break; @@ -217,16 +203,15 @@ int InsetSpecialChar::Linuxdoc(ostream & os) const } +int InsetSpecialChar::Linuxdoc(ostream & os) const +{ + return Ascii(os); +} + + int InsetSpecialChar::DocBook(ostream & os) const { - switch (kind) { - case HYPHENATION: os << ""; break; - case END_OF_SENTENCE: os << ""; break; - case LDOTS: os << "..."; break; - case MENU_SEPARATOR: os << "->"; break; - case PROTECTED_SEPARATOR: os << " "; break; - } - return 0; + return Ascii(os); }