X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Finsets%2FExternalTransforms.cpp;h=a3bf82df65a08b612cf191233526a57e2c711e22;hb=1f0305509b99681885958c03f8d8f04c1564c84c;hp=47625364847c554025e5a0c6ee0979eedcda4a65;hpb=dae8555234f0e5c8358b91c307d91b219c664617;p=lyx.git diff --git a/src/insets/ExternalTransforms.cpp b/src/insets/ExternalTransforms.cpp index 4762536484..a3bf82df65 100644 --- a/src/insets/ExternalTransforms.cpp +++ b/src/insets/ExternalTransforms.cpp @@ -218,7 +218,10 @@ string const ClipLatexOption::option_impl() const ostringstream os; if (!data.bbox.empty()) - os << "bb=" << data.bbox << ','; + os << "bb=" << data.bbox.xl.asLatexString() << ' ' + << data.bbox.yb.asLatexString() << ' ' + << data.bbox.xr.asLatexString() << ' ' + << data.bbox.yt.asLatexString() << ','; if (data.clip) os << "clip,"; return os.str(); @@ -280,7 +283,7 @@ string const sanitizeLatexOption(string const & input) // "[,,,,foo..." -> "foo..." ("foo..." may be empty) string output; lyx::smatch what; - static lyx::regex const front("^( *[[],*)(.*)$"); + static lyx::regex const front("^( *\\[,*)(.*)$"); regex_match(it, end, what, front); if (!what[0].matched) { @@ -306,7 +309,7 @@ string const sanitizeLatexOption(string const & input) // Strip any trailing commas // "...foo,,,]" -> "...foo" ("...foo,,," may be empty) - static lyx::regex const back("^(.*[^,])?,*[]] *$"); + static lyx::regex const back("^(.*[^,])?,*\\] *$"); regex_match(output, what, back); if (!what[0].matched) { lyxerr << "Unable to sanitize LaTeX \"Option\": "