X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fgraphics%2Fepstools.cpp;h=d5674ba7d18205c168bb05318e9165ba34469bc6;hb=ab81c23656b59aa14c41b8acc45f0f3e410ed785;hp=5fb403c3ecc92f9abab5ad5eda13507a747378ac;hpb=26e5f1a8ec3eb2952e49c87c91395fdcdceddfe9;p=lyx.git diff --git a/src/graphics/epstools.cpp b/src/graphics/epstools.cpp index 5fb403c3ec..d5674ba7d1 100644 --- a/src/graphics/epstools.cpp +++ b/src/graphics/epstools.cpp @@ -26,6 +26,7 @@ #include "Format.h" #include "support/debug.h" +#include "support/docstream.h" #include "support/filetools.h" #include "support/FileName.h" #include "support/regex.h" @@ -46,9 +47,9 @@ string const readBB_from_PSFile(FileName const & file) // end of the file. Than we have in the header: // %%BoundingBox: (atend) // In this case we must check the end. - bool const zipped = formats.isZippedFile(file); + bool const zipped = theFormats().isZippedFile(file); FileName const file_ = zipped ? unzipFile(file) : file; - string const format = formats.getFormatFromFile(file_); + string const format = theFormats().getFormatFromFile(file_); if (!Formats::isPostScriptFileFormat(format)) { LYXERR(Debug::GRAPHICS, "[readBB_from_PSFile] no(e)ps-format"); @@ -57,8 +58,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;