]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetGraphicsParams.cpp
Circumvent odd stmary font metrics (part of #9990).
[lyx.git] / src / insets / InsetGraphicsParams.cpp
index e158e81d98546d4af50a3fee97acbc053b738d91..03ca0d6287d10c90a86a8d3844764f50bda79923 100644 (file)
@@ -177,11 +177,15 @@ 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();