From 534095ce9e82d0b0f875540f7306ff218df3b5aa Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Mon, 4 Dec 2006 15:07:05 +0000 Subject: [PATCH] more unicode filenames git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16172 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/controllers/ControlLog.C | 9 +++++---- src/frontends/controllers/ControlLog.h | 4 +++- src/frontends/controllers/tex_helpers.C | 6 ++++-- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/frontends/controllers/ControlLog.C b/src/frontends/controllers/ControlLog.C index e138e67a12..1ce66963a8 100644 --- a/src/frontends/controllers/ControlLog.C +++ b/src/frontends/controllers/ControlLog.C @@ -19,13 +19,14 @@ #include #include -using lyx::docstring; - using std::istringstream; using std::ostream; using std::string; namespace lyx { + +using support::FileName; + namespace frontend { ControlLog::ControlLog(Dialog & parent) @@ -61,7 +62,7 @@ bool ControlLog::initialiseParams(string const & data) else return false; - logfile_ = logfile; + logfile_ = FileName(logfile); return true; } @@ -95,7 +96,7 @@ docstring const ControlLog::title() const void ControlLog::getContents(std::ostream & ss) const { - std::ifstream in(logfile_.c_str()); + std::ifstream in(logfile_.toFilesystemEncoding().c_str()); bool success = false; diff --git a/src/frontends/controllers/ControlLog.h b/src/frontends/controllers/ControlLog.h index 0b02932c54..7c76010951 100644 --- a/src/frontends/controllers/ControlLog.h +++ b/src/frontends/controllers/ControlLog.h @@ -15,6 +15,8 @@ #include "Dialog.h" +#include "support/filename.h" + namespace lyx { namespace frontend { @@ -51,7 +53,7 @@ private: }; LOGTYPE type_; - std::string logfile_; + support::FileName logfile_; }; } // namespace frontend diff --git a/src/frontends/controllers/tex_helpers.C b/src/frontends/controllers/tex_helpers.C index 888a83e6e4..fbc78c2d78 100644 --- a/src/frontends/controllers/tex_helpers.C +++ b/src/frontends/controllers/tex_helpers.C @@ -103,9 +103,11 @@ void getTexFileList(string const & filename, std::vector & list) 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; -- 2.39.2