From d9788beac8ee22537072855d3d4b79ca293e5975 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Uwe=20St=C3=B6hr?= Date: Wed, 7 Dec 2011 21:21:41 +0000 Subject: [PATCH] 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 --- src/tex2lyx/Preamble.cpp | 11 ++++++----- src/tex2lyx/text.cpp | 10 ++++++++++ 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/tex2lyx/Preamble.cpp b/src/tex2lyx/Preamble.cpp index f5d0f4e412..1e17463204 100644 --- a/src/tex2lyx/Preamble.cpp +++ b/src/tex2lyx/Preamble.cpp @@ -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{" diff --git a/src/tex2lyx/text.cpp b/src/tex2lyx/text.cpp index 0838fb8ee9..d9821437d3 100644 --- a/src/tex2lyx/text.cpp +++ b/src/tex2lyx/text.cpp @@ -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"); } } } -- 2.39.5