]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
Track change of label name
[lyx.git] / src / BufferParams.cpp
index 3952c86845bd9b2251abb6244b739dae6358dd42..399faa393344a97d0c7039c6a2222885b5f654d8 100644 (file)
@@ -365,7 +365,9 @@ BufferParams::Impl::Impl()
 {
        // set initial author
        // FIXME UNICODE
-       authorlist.record(Author(from_utf8(lyxrc.user_name), from_utf8(lyxrc.user_email)));
+       authorlist.record(Author(from_utf8(lyxrc.user_name),
+                                from_utf8(lyxrc.user_email),
+                                from_utf8(lyxrc.user_initials)));
 }
 
 
@@ -408,6 +410,7 @@ BufferParams::BufferParams()
        save_transient_properties = true;
        track_changes = false;
        output_changes = false;
+       change_bars = false;
        use_default_options = true;
        maintain_unincluded_children = false;
        secnumdepth = 3;
@@ -949,6 +952,8 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                lex >> track_changes;
        } else if (token == "\\output_changes") {
                lex >> output_changes;
+       } else if (token == "\\change_bars") {
+               lex >> change_bars;
        } else if (token == "\\branch") {
                lex.eatLine();
                docstring branch = lex.getDocString();
@@ -1466,6 +1471,10 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const
           << (save_transient_properties ? convert<string>(output_changes) : "false")
           << '\n';
 
+       os << "\\change_bars "
+          << (save_transient_properties ? convert<string>(change_bars) : "false")
+          << '\n';
+
        os << "\\html_math_output " << html_math_output << '\n'
           << "\\html_css_as_file " << html_css_as_file << '\n'
           << "\\html_be_strict " << convert<string>(html_be_strict) << '\n';
@@ -1523,6 +1532,8 @@ void BufferParams::validate(LaTeXFeatures & features) const
                default:
                        break;
                }
+               if (change_bars)
+                       features.require("changebar");
        }
 
        // Floats with 'Here definitely' as default setting.
@@ -1635,7 +1646,7 @@ bool BufferParams::writeLaTeX(otexstream & os, LaTeXFeatures & features,
                || find(classpsizes.begin(), classpsizes.end(), string_papersize[papersize]) != classpsizes.end();
 
        if ((!use_geometry || features.isProvided("geometry-light"))
-           && class_supported_papersize)
+           && class_supported_papersize && papersize != PAPER_DEFAULT)
                clsoptions << subst(tclass.pagesizeformat(), "$$s", string_papersize[papersize]) << ",";
 
        // if needed
@@ -2935,12 +2946,12 @@ void BufferParams::readIncludeonly(Lexer & lex)
 }
 
 
-string BufferParams::paperSizeName(PapersizePurpose purpose, string const psize) const
+string BufferParams::paperSizeName(PapersizePurpose purpose, string const psize) const
 {
        PAPER_SIZE ppsize = psize.empty() ? papersize : papersizetranslator().find(psize);
        switch (ppsize) {
        case PAPER_DEFAULT:
-               if (documentClass().pagesize() == "custom")
+               if (documentClass().pagesize() == "default")
                        // could be anything, so don't guess
                        return string();
                return paperSizeName(purpose, documentClass().pagesize());