]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalTransforms.cpp
Fix length of hfills
[lyx.git] / src / insets / ExternalTransforms.cpp
index 47625364847c554025e5a0c6ee0979eedcda4a65..a3bf82df65a08b612cf191233526a57e2c711e22 100644 (file)
@@ -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\": "