#include "Format.h"
#include "support/debug.h"
+#include "support/docstream.h"
#include "support/filetools.h"
#include "support/FileName.h"
#include "support/regex.h"
// 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");
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;