]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetgraphicsParams.C
fix #832
[lyx.git] / src / insets / insetgraphicsParams.C
index af7cba0a1e3e72cfdfd725de20ce0b62c9b69ee4..d8b01f8404fca99e15da88a75dd873b985edf18f 100644 (file)
@@ -24,6 +24,7 @@
 #include "lyxrc.h"
 #include "debug.h"
 #include "lyxlex.h"
+#include "frontends/lyx_gui.h"
 
 using std::ostream;
 
@@ -222,8 +223,10 @@ bool InsetGraphicsParams::Read(LyXLex & lex, string const & token)
        } else if (token == "subcaption") {
                subcaption = true;
        } else if (token == "subcaptionText") {
-               lex.next();
-               subcaptionText = lex.getString();
+               lex.eatLine();
+               string sub = lex.getString();
+               // strip surrounding " "
+               subcaptionText = sub.substr(1, sub.length() - 2);
        } else if (token == "special") {
                lex.eatLine();
                special = lex.getString();
@@ -304,7 +307,7 @@ grfx::Params InsetGraphicsParams::as_grfxParams(string const & filepath) const
        }
 
        // Override the above if we're not using a gui
-       if (!lyxrc.use_gui) {
+       if (!lyx_gui::use_gui) {
                pars.display = grfx::NoDisplay;
        }