From: Vincent van Ravesteijn Date: Sun, 8 Apr 2012 21:20:01 +0000 (+0200) Subject: Fix bug #8114: LyX does not retrieve negative bbox parameters X-Git-Tag: 2.1.0beta1~1933^2~51 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=f0754582b8af481dc636c6d31eb3a52c853d7db0;p=features.git Fix bug #8114: LyX does not retrieve negative bbox parameters LyX fails to read the bounding box from an EPS file if it has negative values. Adjusting the regex will overcome this problem. Negative values do not pose big problems later on, but the GUI doesn't handle it correctly yet (see bug #5718). --- diff --git a/src/graphics/epstools.cpp b/src/graphics/epstools.cpp index 5fb403c3ec..17aedfcb0a 100644 --- a/src/graphics/epstools.cpp +++ b/src/graphics/epstools.cpp @@ -57,8 +57,8 @@ string const readBB_from_PSFile(FileName const & file) return string(); } - static lyx::regex bbox_re( - "^%%BoundingBox:\\s*([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)"); + static lyx::regex bbox_re("^%%BoundingBox:\\s*([-]*[[:digit:]]+)" + "\\s+([-]*[[:digit:]]+)\\s+([-]*[[:digit:]]+)\\s+([-]*[[:digit:]]+)"); ifstream is(file_.toFilesystemEncoding().c_str()); while (is) { string s;