]> git.lyx.org Git - lyx.git/commitdiff
Next attack on the background color. Thanks Juergen.
authorPavel Sanda <sanda@lyx.org>
Mon, 18 May 2009 10:53:02 +0000 (10:53 +0000)
committerPavel Sanda <sanda@lyx.org>
Mon, 18 May 2009 10:53:02 +0000 (10:53 +0000)
http://www.mail-archive.com/lyx-devel@lists.lyx.org/msg151267.html

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29723 a592a061-630c-0410-9148-cb99ea01b6c8

src/Buffer.cpp
src/BufferParams.cpp

index f42b0e1f74f23742afeec4d642ea42547722d144..30076ff2f21b252af22620979b1f231aac1fed8a 100644 (file)
@@ -525,6 +525,7 @@ int Buffer::readHeader(Lexer & lex)
        params().clearRemovedModules();
        params().pdfoptions().clear();
        params().indiceslist().clear();
+       params().backgroundcolor = lyx::rgbFromHexName("#ffffff");
 
        for (int i = 0; i < 4; ++i) {
                params().user_defined_bullet(i) = ITEMIZE_DEFAULTS[i];
index 31a24469e95d58aee0d308776df30a4fd4894995..929489139c49c3ee16222b8f383dd1ac84102353 100644 (file)
@@ -830,8 +830,9 @@ void BufferParams::writeFile(ostream & os) const
           << "\n\\use_bibtopic " << convert<string>(use_bibtopic)
           << "\n\\use_indices " << convert<string>(use_indices)
           << "\n\\paperorientation " << string_orientation[orientation]
-          << "\n\\backgroundcolor " << lyx::X11hexname(backgroundcolor)
           << '\n';
+          if (backgroundcolor != lyx::rgbFromHexName("#ffffff"))
+               os << "\\backgroundcolor " << lyx::X11hexname(backgroundcolor) << '\n';
 
        BranchList::const_iterator it = branchlist().begin();
        BranchList::const_iterator end = branchlist().end();