From d436597a446534affbb1882e089e33b062e8ff30 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Tue, 8 Feb 2005 17:15:17 +0000 Subject: [PATCH] fix bug 1776 git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@9605 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/insets/ChangeLog | 5 +++++ src/insets/insetgraphics.C | 31 +++++++++++++++---------------- 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index b5f6f6a648..e4f9d42fa0 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2005-02-08 Georg Baum + + * insetgraphics.C (latex): Remove line continuation '%\n' (bug xxx, + workaround for broken HTML converter) + 2005-02-08 Lars Gullik Bjonnes * insetcollapsable.C (leaveInset): size() -> depth() diff --git a/src/insets/insetgraphics.C b/src/insets/insetgraphics.C index e6e69ca92d..3a867e6020 100644 --- a/src/insets/insetgraphics.C +++ b/src/insets/insetgraphics.C @@ -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(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(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 -- 2.39.2