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).

(cherry picked from commit f0754582b8)
This commit is contained in:
Vincent van Ravesteijn 2012-04-08 23:20:01 +02:00
parent a6399dcd84
commit 036e0c2abd
2 changed files with 4 additions and 1 deletions

View File

@ -1033,7 +1033,7 @@ string const readBB_from_PSFile(FileName const & file)
}
static lyx::regex bbox_re(
"^%%BoundingBox:\\s*([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)");
"^%%BoundingBox:\\s*([-]*[[:digit:]]+)\\s+([-]*[[:digit:]]+)\\s+([-]*[[:digit:]]+)\\s+([-]*[[:digit:]]+)");
ifstream is(file_.toFilesystemEncoding().c_str());
while (is) {
string s;

View File

@ -82,6 +82,9 @@ What's new
- Fixed some probelms XHTML output had with empty paragraphs.
- Fixed reading the bounding box from EPS figures with negative
values (bug 8114).
* USER INTERFACE