From 36765b8e2109ad05c529076e6f91ede4ac57e293 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Wed, 15 Sep 2010 13:54:56 +0000 Subject: [PATCH] comments and whitespace git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35391 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Layout.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Layout.cpp b/src/Layout.cpp index d1dad60670..06a6f64d45 100644 --- a/src/Layout.cpp +++ b/src/Layout.cpp @@ -1017,7 +1017,11 @@ void Layout::makeDefaultCSS() const { // wipe out what we did before. if (!htmldefaultstyle_.empty()) return; + + // main font htmldefaultstyle_ = font.asCSS(); + + // top and bottom margins string tmp; if (topsep > 0) tmp += "margin-top: " + makeMarginValue(topsep) + ";\n"; @@ -1028,12 +1032,17 @@ void Layout::makeDefaultCSS() const { htmldefaultstyle_ += from_ascii("\n"); htmldefaultstyle_ += from_ascii(tmp); } + + // wrap up what we have, if anything if (!htmldefaultstyle_.empty()) htmldefaultstyle_ = from_ascii(htmltag() + "." + defaultCSSClass() + " {\n") + htmldefaultstyle_ + from_ascii("\n}\n"); + if (labelfont == font || htmllabeltag() == "NONE") return; + + // label font docstring const labelfontCSS = labelfont.asCSS(); if (!labelfontCSS.empty()) htmldefaultstyle_ +=