X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FInsetGraphicsParams.cpp;h=b7ea377f4208a40d35c308bd2a57fe06f47519f4;hb=1bd422355430d4753e48eee298dafaf8c1ac458f;hp=e158e81d98546d4af50a3fee97acbc053b738d91;hpb=c09663d2cb3ba57639e412488f1c58ebe76b04d8;p=lyx.git diff --git a/src/insets/InsetGraphicsParams.cpp b/src/insets/InsetGraphicsParams.cpp index e158e81d98..b7ea377f42 100644 --- a/src/insets/InsetGraphicsParams.cpp +++ b/src/insets/InsetGraphicsParams.cpp @@ -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();