]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
Cmake export tests: Handle attic files with now missing references to png graphics
[lyx.git] / src / Font.cpp
index a155ec557ae24212d703d1d07c8515ab616091aa..f0814a3a3eb94103dbb8dd202a87595a3da88475 100644 (file)
@@ -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
@@ -695,6 +695,19 @@ void Font::validate(LaTeXFeatures & features) const
                case Color_latex:
                case Color_notelabel:
                        break;
+               case Color_brown:
+               case Color_darkgray:
+               case Color_gray:
+               case Color_lightgray:
+               case Color_lime:
+               case Color_olive:
+               case Color_orange:
+               case Color_pink:
+               case Color_purple:
+               case Color_teal:
+               case Color_violet:
+                       features.require("xcolor");
+                       break;
                default:
                        features.require("color");
                        LYXERR(Debug::LATEX, "Color enabled. Font: " << to_utf8(stateText(0)));