]> git.lyx.org Git - lyx.git/blobdiff - src/insets/ExternalTransforms.cpp
Circumvent odd stmary font metrics (part of #9990).
[lyx.git] / src / insets / ExternalTransforms.cpp
index 270a7c83b0f9deb387387ec84d074b9c66bca1ef..a3bf82df65a08b612cf191233526a57e2c711e22 100644 (file)
@@ -18,7 +18,7 @@
 #include "support/lyxlib.h" // float_equal
 #include "support/Translator.h"
 
-#include <boost/regex.hpp>
+#include "support/regex.h"
 
 #include <cmath> // abs
 #include <sstream>
@@ -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();
@@ -279,10 +282,10 @@ string const sanitizeLatexOption(string const & input)
        // Strip any leading commas
        // "[,,,,foo..." -> "foo..." ("foo..." may be empty)
        string output;
-       boost::smatch what;
-       static boost::regex const front("^( *[[],*)(.*)$");
+       lyx::smatch what;
+       static lyx::regex const front("^( *\\[,*)(.*)$");
 
-       regex_match(it, end, what, front, boost::match_partial);
+       regex_match(it, end, what, front);
        if (!what[0].matched) {
                lyxerr << "Unable to sanitize LaTeX \"Option\": "
                       << input << '\n';
@@ -293,9 +296,9 @@ string const sanitizeLatexOption(string const & input)
        // Replace any consecutive commas with a single one
        // "foo,,,,bar" -> "foo,bar"
        // with iterator now pointing to 'b'
-       static boost::regex const commas("([^,]*)(,,*)(.*)$");
+       static lyx::regex const commas("([^,]*)(,,*)(.*)$");
        for (; it != end;) {
-               regex_match(it, end, what, commas, boost::match_partial);
+               regex_match(it, end, what, commas);
                if (!what[0].matched) {
                        output += string(it, end);
                        break;
@@ -306,7 +309,7 @@ string const sanitizeLatexOption(string const & input)
 
        // Strip any trailing commas
        // "...foo,,,]" -> "...foo" ("...foo,,," may be empty)
-       static boost::regex const back("^(.*[^,])?,*[]] *$");
+       static lyx::regex const back("^(.*[^,])?,*\\] *$");
        regex_match(output, what, back);
        if (!what[0].matched) {
                lyxerr << "Unable to sanitize LaTeX \"Option\": "