]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Fix Tabular::CellData::operator=()
[lyx.git] / src / Font.cpp
index df4da4440f22efd3f55609a623d18e2a2b429194..7e8b3f4f2bcc2e9d8200b14305a0a848adb0460c 100644 (file)
@@ -286,6 +286,9 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
                        tmp += "{";
                        os << from_ascii(tmp);
                        count += tmp.length();
+               } else if (language()->encoding()->package() != Encoding::CJK) {
+                       os << '{';
+                       count += 1;
                }
        } else if (language()->babel() != base.language()->babel() &&
            language() != prev.language()) {
@@ -318,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;
                }
@@ -415,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;
 }
@@ -494,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