tex2lyx Preamble.cpp, text.cpp: fix #7845 also for spreadsheet template

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40425 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Uwe Stöhr 2011-12-07 21:21:41 +00:00
parent cbc62641e5
commit d9788beac8
2 changed files with 16 additions and 5 deletions

View File

@ -727,11 +727,12 @@ void Preamble::handle_package(Parser &p, string const & name,
options.clear();
}
else if (name == "array" || name == "booktabs" || name == "float" ||
name == "color" || name == "hhline" || name == "longtable" ||
name == "makeidx" || name == "nomencl" || name == "splitidx" ||
name == "setspace" || name == "subscript" || name == "ulem" ||
name == "url") {
else if (name == "array" || name == "booktabs" || name == "calc" ||
name == "color" || name == "hhline" || name == "ifthen" ||
name == "float" || name == "longtable" || name == "makeidx" ||
name == "multirow" || name == "nomencl" || name == "setspace" ||
name == "splitidx" || name == "subscript" || name == "ulem" ||
name == "url") {
if (!in_lyx_preamble)
h_preamble << package_beg_sep << name
<< package_mid_sep << "\\usepackage{"

View File

@ -2362,6 +2362,16 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
end_inset(os);
context.check_layout(os);
macro = false;
// register the packages that are automatically reloaded
// by the Gnumeric template
// Fixme: InsetExternal.cpp should give us that list
preamble.registerAutomaticallyLoadedPackage("array");
preamble.registerAutomaticallyLoadedPackage("calc");
preamble.registerAutomaticallyLoadedPackage("color");
preamble.registerAutomaticallyLoadedPackage("hhline");
preamble.registerAutomaticallyLoadedPackage("ifthen");
preamble.registerAutomaticallyLoadedPackage("longtable");
preamble.registerAutomaticallyLoadedPackage("multirow");
}
}
}