]> git.lyx.org Git - lyx.git/blobdiff - src/BufferParams.cpp
Fix some group boxes.
[lyx.git] / src / BufferParams.cpp
index bc4a7b5da90bec90f026431502ae0aeb7aefd215..de46966f2e29573fe9162d6a73ca4eb758280961 100644 (file)
@@ -435,6 +435,7 @@ BufferParams::BufferParams()
        columns = 1;
        listings_params = string();
        pagestyle = "default";
+       tablestyle = "default";
        suppress_date = false;
        justification = true;
        // no color is the default (white)
@@ -754,15 +755,6 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                                origin.replace(0, sysdirprefix.length() - 1,
                                        package().system_support().absFileName());
                }
-               string const builddirprefix = "/buildlyxdir/";
-               if (prefixIs(origin, builddirprefix)) {
-                       string docsys;
-                       if (inSystemDir(filepath, docsys))
-                               origin.replace(0, builddirprefix.length() - 1, docsys);
-                       else
-                               origin.replace(0, builddirprefix.length() - 1,
-                                       package().system_support().absFileName());
-               }
        } else if (token == "\\begin_preamble") {
                readPreamble(lex);
        } else if (token == "\\begin_local_layout") {
@@ -1061,6 +1053,8 @@ string BufferParams::readToken(Lexer & lex, string const & token,
                sides = sidestranslator().find(psides);
        } else if (token == "\\paperpagestyle") {
                lex >> pagestyle;
+       } else if (token == "\\tablestyle") {
+               lex >> tablestyle;
        } else if (token == "\\bullet") {
                readBullets(lex);
        } else if (token == "\\bulletLaTeX") {
@@ -1150,12 +1144,8 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const
                        : addPath(package().system_support().realPath(), "");
        string const relpath =
                to_utf8(makeRelPath(from_utf8(filepath), from_utf8(sysdir)));
-       // LYXERR0("docsys: " << docsys << ",build:  " << package().build_support().realPath());
        if (!prefixIs(relpath, "../") && !FileName::isAbsolute(relpath))
-               filepath = (prefixIs(docsys, package().build_support().realPath())) ?
-                                       addPath("/buildlyxdir", relpath)
-                                     : addPath("/systemlyxdir", relpath);
-
+               filepath = addPath("/systemlyxdir", relpath);
        else if (!save_transient_properties || !lyxrc.save_origin)
                filepath = "unavailable";
        os << "\\origin " << quoteIfNeeded(filepath) << '\n';
@@ -1409,7 +1399,8 @@ void BufferParams::writeFile(ostream & os, Buffer const * buf) const
           << "\n\\dynamic_quotes " << dynamic_quotes
           << "\n\\papercolumns " << columns
           << "\n\\papersides " << sides
-          << "\n\\paperpagestyle " << pagestyle << '\n';
+          << "\n\\paperpagestyle " << pagestyle
+          << "\n\\tablestyle " << tablestyle << '\n';
        if (!listings_params.empty())
                os << "\\listings_params \"" <<
                        InsetListingsParams(listings_params).encodedString() << "\"\n";
@@ -2449,6 +2440,7 @@ void BufferParams::useClassDefaults()
        sides = tclass.sides();
        columns = tclass.columns();
        pagestyle = tclass.pagestyle();
+       tablestyle = tclass.tablestyle();
        use_default_options = true;
        // Only if class has a ToC hierarchy
        if (tclass.hasTocLevels()) {
@@ -2465,6 +2457,7 @@ bool BufferParams::hasClassDefaults() const
        return sides == tclass.sides()
                && columns == tclass.columns()
                && pagestyle == tclass.pagestyle()
+               && tablestyle == tclass.tablestyle()
                && use_default_options
                && secnumdepth == tclass.secnumdepth()
                && tocdepth == tclass.tocdepth();