]> git.lyx.org Git - features.git/commitdiff
tex2lyx/text.cpp: backport fixes from trunk (no status entry necessary)
authorUwe Stöhr <uwestoehr@web.de>
Sun, 11 Dec 2011 23:24:44 +0000 (23:24 +0000)
committerUwe Stöhr <uwestoehr@web.de>
Sun, 11 Dec 2011 23:24:44 +0000 (23:24 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/branches/BRANCH_2_0_X@40482 a592a061-630c-0410-9148-cb99ea01b6c8

src/tex2lyx/text.cpp

index d9821437d3f88de952caf10dfbcb42836baaebfa..2c8adca33c30731a8dc8db8067f1672455b35414 100644 (file)
@@ -2340,10 +2340,12 @@ void parse_text(Parser & p, ostream & os, unsigned flags, bool outer,
                                                string const path = getMasterFilePath();
                                                // We want to preserve relative / absolute filenames,
                                                // therefore path is only used for testing
+                                               // The file extension is in every case ".tex".
+                                               // So we need to remove this extension and check for
+                                               // the original one.
+                                               name = removeExtension(name);
                                                if (!makeAbsPath(name, path).exists()) {
-                                                       // The file extension is probably missing.
-                                                       // Now try to find it out.
-                                                       char const * const Gnumeric_formats[] = {"gnumeric"
+                                                       char const * const Gnumeric_formats[] = {"gnumeric",
                                                                "ods", "xls", 0};
                                                        string const Gnumeric_name =
                                                                find_file(name, path, Gnumeric_formats);