]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetGraphicsParams.cpp
nomenclWidest(): take (proper) formatting into account.
[lyx.git] / src / insets / InsetGraphicsParams.cpp
index e158e81d98546d4af50a3fee97acbc053b738d91..b7ea377f4208a40d35c308bd2a57fe06f47519f4 100644 (file)
@@ -177,17 +177,20 @@ void InsetGraphicsParams::Write(ostream & os, Buffer const & buffer) const
 }
 
 
-bool InsetGraphicsParams::Read(Lexer & lex, string const & token, string const & bufpath)
+bool InsetGraphicsParams::Read(Lexer & lex, string const & token,
+                               Buffer const & buf, bool allowOrigin)
 {
        if (token == "filename") {
                lex.eatLine();
-               filename.set(lex.getString(), bufpath);
+               if (allowOrigin)
+                       filename = buf.getReferencedFileName(lex.getString());
+               else
+                       filename.set(lex.getString(), buf.filePath());
        } else if (token == "lyxscale") {
                lex.next();
                lyxscale = lex.getInteger();
        } else if (token == "display") {
                lex.next();
-               string const type = lex.getString();
                display = lex.getString() != "false";
        } else if (token == "scale") {
                lex.next();