]> git.lyx.org Git - features.git/commitdiff
fix bug 1776
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Tue, 8 Feb 2005 17:15:17 +0000 (17:15 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Tue, 8 Feb 2005 17:15:17 +0000 (17:15 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9605 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/ChangeLog
src/insets/insetgraphics.C

index b5f6f6a648fad8927a397b6c6a4800495f032c8d..e4f9d42fa093e11216fead1aa468c5648898d3b4 100644 (file)
@@ -1,3 +1,8 @@
+2005-02-08  Georg Baum  <Georg.Baum@post.rwth-aachen.de>
+
+       * insetgraphics.C (latex): Remove line continuation '%\n' (bug xxx,
+       workaround for broken HTML converter)
+
 2005-02-08  Lars Gullik Bjonnes  <larsbj@gullik.net>
 
        * insetcollapsable.C (leaveInset): size() -> depth()
index e6e69ca92da75cfdcea6c642d50995203f1814b6..3a867e60201976853b3e9fa40bf5017623ddd2af 100644 (file)
@@ -294,48 +294,47 @@ string const InsetGraphics::createLatexOptions() const
        // before writing it to the output stream.
        ostringstream options;
        if (!params().bb.empty())
-           options << " bb=" << rtrim(params().bb) << ",\n";
+           options << "bb=" << rtrim(params().bb) << ',';
        if (params().draft)
-           options << " draft,\n";
+           options << "draft,";
        if (params().clip)
-           options << " clip,\n";
+           options << "clip,";
        double const scl = convert<double>(params().scale);
        if (!params().scale.empty() && !float_equal(scl, 0.0, 0.05)) {
                if (!float_equal(scl, 100.0, 0.05))
-                       options << " scale=" << scl / 100.0
-                               << ",\n";
+                       options << "scale=" << scl / 100.0 << ',';
        } else {
                if (!params().width.zero())
-                       options << " width=" << params().width.asLatexString() << ",\n";
+                       options << "width=" << params().width.asLatexString() << ',';
                if (!params().height.zero())
-                       options << " height=" << params().height.asLatexString() << ",\n";
+                       options << "height=" << params().height.asLatexString() << ',';
                if (params().keepAspectRatio)
-                       options << " keepaspectratio,\n";
+                       options << "keepaspectratio,";
        }
 
        // Make sure rotation angle is not very close to zero;
        // a float can be effectively zero but not exactly zero.
        if (!params().rotateAngle.empty()
                && !float_equal(convert<double>(params().rotateAngle), 0.0, 0.001)) {
-           options << "  angle=" << params().rotateAngle << ",\n";
+           options << "angle=" << params().rotateAngle << ',';
            if (!params().rotateOrigin.empty()) {
-               options << "  origin=" << params().rotateOrigin[0];
+               options << "origin=" << params().rotateOrigin[0];
                if (contains(params().rotateOrigin,"Top"))
                    options << 't';
                else if (contains(params().rotateOrigin,"Bottom"))
                    options << 'b';
                else if (contains(params().rotateOrigin,"Baseline"))
                    options << 'B';
-               options << ",\n";
+               options << ',';
            }
        }
 
        if (!params().special.empty())
-           options << params().special << ",\n";
+           options << params().special << ',';
 
        string opts = options.str();
-       // delete last ",\n"
-       return opts.substr(0, opts.size() - 2);
+       // delete last ','
+       return opts.substr(0, opts.size() - 1);
 }
 
 
@@ -722,9 +721,9 @@ int InsetGraphics::latex(Buffer const & buf, ostream & os,
        lyxerr[Debug::GRAPHICS] << "\tOpts = " << opts << endl;
 
        if (!opts.empty() && !message.empty())
-               before += ("[%\n" + opts + ',' + message + ']');
+               before += ('[' + opts + ',' + message + ']');
        else if (!opts.empty() || !message.empty())
-               before += ("[%\n" + opts + message + ']');
+               before += ('[' + opts + message + ']');
 
        lyxerr[Debug::GRAPHICS]
                << "\tBefore = " << before