X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FFont.cpp;h=7e8b3f4f2bcc2e9d8200b14305a0a848adb0460c;hb=0092b523c7d3c1735b6854bcbdb4e65ec782f092;hp=084a4072fc80f1664d2dfb1d6afc43637ad5d0c6;hpb=6e69a61d003256a4538af4d49f11fdbddc81fd23;p=lyx.git diff --git a/src/Font.cpp b/src/Font.cpp index 084a4072fc..7e8b3f4f2b 100644 --- a/src/Font.cpp +++ b/src/Font.cpp @@ -286,7 +286,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams, tmp += "{"; os << from_ascii(tmp); count += tmp.length(); - } else { + } else if (language()->encoding()->package() != Encoding::CJK) { os << '{'; count += 1; } @@ -321,7 +321,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams, "$$lang", language()->babel()); os << from_ascii(tmp); count += tmp.length(); - } else { + } else if (language()->encoding()->package() != Encoding::CJK) { os << '{'; count += 1; } @@ -418,22 +418,22 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams, if (f.underbar() == FONT_ON) { os << "\\uline{"; count += 10; - runparams.inulemcmd = true; + ++runparams.inulemcmd; } if (f.strikeout() == FONT_ON) { os << "\\sout{"; count += 9; - runparams.inulemcmd = true; + ++runparams.inulemcmd; } if (f.uuline() == FONT_ON) { os << "\\uuline{"; count += 11; - runparams.inulemcmd = true; + ++runparams.inulemcmd; } if (f.uwave() == FONT_ON) { os << "\\uwave{"; count += 10; - runparams.inulemcmd = true; + ++runparams.inulemcmd; } return count; } @@ -497,22 +497,22 @@ int Font::latexWriteEndChanges(otexstream & os, BufferParams const & bparams, if (f.underbar() == FONT_ON) { os << '}'; ++count; - runparams.inulemcmd = false; + --runparams.inulemcmd; } if (f.strikeout() == FONT_ON) { os << '}'; ++count; - runparams.inulemcmd = false; + --runparams.inulemcmd; } if (f.uuline() == FONT_ON) { os << '}'; ++count; - runparams.inulemcmd = false; + --runparams.inulemcmd; } if (f.uwave() == FONT_ON) { os << '}'; ++count; - runparams.inulemcmd = false; + --runparams.inulemcmd; } // If the current language is Hebrew, Arabic, or Farsi