#include <sstream>
#include <fstream>
-using lyx::docstring;
-
using std::istringstream;
using std::ostream;
using std::string;
namespace lyx {
+
+using support::FileName;
+
namespace frontend {
ControlLog::ControlLog(Dialog & parent)
else
return false;
- logfile_ = logfile;
+ logfile_ = FileName(logfile);
return true;
}
void ControlLog::getContents(std::ostream & ss) const
{
- std::ifstream in(logfile_.c_str());
+ std::ifstream in(logfile_.toFilesystemEncoding().c_str());
bool success = false;
#include "Dialog.h"
+#include "support/filename.h"
+
namespace lyx {
namespace frontend {
};
LOGTYPE type_;
- std::string logfile_;
+ support::FileName logfile_;
};
} // namespace frontend
string const getListOfOptions(string const & classname, string const & type)
{
- string const filename = getTexFileFromList(classname,type);
+ FileName const filename(getTexFileFromList(classname, type));
+ if (filename.empty())
+ return string();
string optionList = string();
- std::ifstream is(filename.c_str());
+ std::ifstream is(filename.toFilesystemEncoding().c_str());
while (is) {
string s;
is >> s;