diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 548eb400ed..3df51d7b84 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -713,10 +713,10 @@ int Buffer::readHeader(Lexer & lex) params().indiceslist().clear(); params().backgroundcolor = lyx::rgbFromHexName("#ffffff"); params().isbackgroundcolor = false; - params().fontcolor = lyx::rgbFromHexName("#000000"); + params().fontcolor = RGBColor(0, 0, 0); params().isfontcolor = false; - params().notefontcolor = lyx::rgbFromHexName("#cccccc"); - params().boxbgcolor = lyx::rgbFromHexName("#ff0000"); + params().notefontcolor = RGBColor(0xCC, 0xCC, 0xCC); + params().boxbgcolor = RGBColor(0xFF, 0, 0); params().html_latex_start.clear(); params().html_latex_end.clear(); params().html_math_img_scale = 1.0; @@ -1642,6 +1642,21 @@ void Buffer::writeLyXHTMLSource(odocstream & os, << styleinfo << "\n"; } + + bool const needfg = params().fontcolor != RGBColor(0, 0, 0); + bool const needbg = params().backgroundcolor != RGBColor(OxFF, OxFF, OxFF); + if (needfg || needbg) { + os << "\n"; + } os << "\n\n"; }