#include <fstream>
#include <sstream>
-using std::endl;
-using std::getline;
-using std::make_pair;
-using std::string;
-using std::ifstream;
-using std::ostringstream;
-using std::vector;
-using std::pair;
+using namespace std;
namespace lyx {
namespace support {
static boost::regex bbox_re(
"^%%BoundingBox:\\s*([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)\\s+([[:digit:]]+)");
- std::ifstream is(file_.toFilesystemEncoding().c_str());
+ ifstream is(file_.toFilesystemEncoding().c_str());
while (is) {
string s;
getline(is,s);
}
-std::vector<FileName> dirList(FileName const & filename, std::string const & ext)
-{
- std::vector<FileName> dirlist;
- if (!filename.isDirectory()) {
- LYXERR0("Directory '" << filename << "' does not exist!");
- return dirlist;
- }
-
- QDir dir(toqstr(filename.absoluteFilePath()));
-
- if (!ext.empty()) {
- QString filter;
- switch (ext[0]) {
- case '.': filter = "*" + toqstr(ext); break;
- case '*': filter = toqstr(ext); break;
- default: filter = "*." + toqstr(ext);
- }
- dir.setNameFilters(QStringList(filter));
- LYXERR(Debug::FILES, "filtering on extension "
- << fromqstr(filter) << " is requested.");
- }
-
- QFileInfoList list = dir.entryInfoList();
- for (int i = 0; i != list.size(); ++i) {
- FileName fi(fromqstr(list.at(i).absoluteFilePath()));
- dirlist.push_back(fi);
- LYXERR(Debug::FILES, "found file " << fi);
- }
-
- return dirlist;
-}
-
-
} //namespace support
} // namespace lyx