]> git.lyx.org Git - lyx.git/blobdiff - src/tex2lyx/tex2lyx.cpp
pimpl not needed here
[lyx.git] / src / tex2lyx / tex2lyx.cpp
index 08b8a0cacb879d563127ae3249dd82aaa29eb5bc..f2af56d9a7c5b28d64c6c683f4b6f232f4978701 100644 (file)
@@ -17,6 +17,7 @@
 
 #include "debug.h"
 #include "TextClass.h"
+#include "Layout.h"
 
 #include "support/convert.h"
 #include "support/filetools.h"
@@ -64,10 +65,10 @@ using support::makeAbsPath;
 using support::onlyPath;
 using support::os::internal_path;
 using support::rtrim;
-using support::isFileReadable;
 
 namespace fs = boost::filesystem;
 
+LayoutPtr captionlayout;
 
 // Hacks to allow the thing to link in the lyxlayout stuff
 LyXErr lyxerr(std::cerr.rdbuf());
@@ -427,6 +428,7 @@ void tex2lyx(std::istream &is, std::ostream &os)
 
        stringstream ss;
        TextClass textclass = parse_preamble(p, ss, documentclass);
+       captionlayout = LayoutPtr(Layout::forCaption());
 
        active_environments.push_back("document");
        Context context(true, textclass);
@@ -470,7 +472,7 @@ bool tex2lyx(FileName const & infilename, std::ostream &os)
 
 bool tex2lyx(string const &infilename, FileName const &outfilename)
 {
-       if (isFileReadable(outfilename)) {
+       if (outfilename.isFileReadable()) {
                if (overwrite_files) {
                        cerr << "Overwriting existing file "
                             << outfilename << endl;