]> git.lyx.org Git - lyx.git/blobdiff - src/insets/insetgraphicsParams.C
quick fix for commented out figures
[lyx.git] / src / insets / insetgraphicsParams.C
index b398fbee8d7cb1fed3a8605a32e0e22f1f2df73a..de44375bb533cae6c12b1a4c28141394918506bc 100644 (file)
@@ -53,9 +53,9 @@ LyXLength convertResizeValue(string const token, LyXLex & lex) {
     else if (token == "inch")
        return (LyXLength(value+"in"));
     else if (token == "percentOfColumn")
-       return (LyXLength(value+"c%"));
+       return (LyXLength(value+"col%"));
     else if (token == "percentOfPage")
-       return (LyXLength(value+"p%"));
+       return (LyXLength(value+"page%"));
     else return LyXLength("0pt");      // nothing with figinset
 }
 
@@ -182,13 +182,11 @@ bool operator!=(InsetGraphicsParams const & left,
 }
 
 
-void InsetGraphicsParams::Write(Buffer const * buf, ostream & os) const
+void InsetGraphicsParams::Write(ostream & os) const
 {
        // If there is no filename, write nothing for it.
-       if (! filename.empty()) {
-               os << "\tfilename "
-               << MakeRelPath(filename, buf->filePath())
-               << '\n';
+       if (!filename.empty()) {
+               os << "\tfilename " << filename << '\n';
        }
        if (!bb.empty())                // bounding box
                os << "\tBoundingBox " << bb << '\n';
@@ -237,16 +235,11 @@ void InsetGraphicsParams::Write(Buffer const * buf, ostream & os) const
 }
 
 
-bool InsetGraphicsParams::Read(Buffer const * buf, LyXLex & lex,
-                              string const& token)
+bool InsetGraphicsParams::Read(LyXLex & lex, string const& token)
 {
        if (token == "filename") {
                lex.next();
                filename = lex.getString();
-               if (!filename.empty()) {
-                       // Make the filename with absolute directory.
-                       filename = MakeAbsPath(filename, buf->filePath());
-               }
        } else if (token == "BoundingBox") {
                for (int i=0; i<4 ;i++) {
                    lex.next();