]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
Add buffer param to opt-out fragile content movement
[lyx.git] / src / BufferParams.cpp
index 22793ecb997c75b96942363b33794efb3a1d309d..b1cedda6fa5b29682e64946ab7b52f7b35e0ce5c 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,8 @@ BufferParams::BufferParams()
        save_transient_properties = true;
        track_changes = false;
        output_changes = false;
+       change_bars = false;
+       postpone_fragile_content = true;
        use_default_options = true;
        maintain_unincluded_children = false;
        secnumdepth = 3;
@@ -949,6 +953,10 @@ 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 == "\\postpone_fragile_content") {
+               lex >> postpone_fragile_content;
        } else if (token == "\\branch") {
                lex.eatLine();
                docstring branch = lex.getDocString();
@@ -1466,6 +1474,12 @@ 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 << "\\postpone_fragile_content " << convert<string>(postpone_fragile_content) << '\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 +1537,8 @@ void BufferParams::validate(LaTeXFeatures & features) const
                default:
                        break;
                }
+               if (change_bars)
+                       features.require("changebar");
        }
 
        // Floats with 'Here definitely' as default setting.