From 036e0c2abd78b5b51b09c3b89a24337bf5093923 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Sun, 8 Apr 2012 23:20:01 +0200 Subject: [PATCH] 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 f0754582b8af481dc636c6d31eb3a52c853d7db0) --- src/support/filetools.cpp | 2 +- status.20x | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/support/filetools.cpp b/src/support/filetools.cpp index bf61983325..f7c48cade8 100644 --- a/src/support/filetools.cpp +++ b/src/support/filetools.cpp @@ -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; diff --git a/status.20x b/status.20x index 081d44e28c..577627a041 100644 --- a/status.20x +++ b/status.20x @@ -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 -- 2.39.5