]> git.lyx.org Git - lyx.git/commitdiff
more unicode filenames
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Mon, 4 Dec 2006 15:07:05 +0000 (15:07 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Mon, 4 Dec 2006 15:07:05 +0000 (15:07 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@16172 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/controllers/ControlLog.C
src/frontends/controllers/ControlLog.h
src/frontends/controllers/tex_helpers.C

index e138e67a12027debcbb4a56b2a6c7121b62d7625..1ce66963a84b65aa5c2f17512c6ca781e0df7e49 100644 (file)
 #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)
@@ -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;
 
index 0b02932c54c6166844b5e2346414fe3ad4720ad8..7c76010951bdce89da432ffac19470f3b6b589a5 100644 (file)
@@ -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
index 888a83e6e4d6176fd5659029d2f5e8bb69200bcc..fbc78c2d78b1e023b9e8e120072aa9084662b282 100644 (file)
@@ -103,9 +103,11 @@ void getTexFileList(string const & filename, std::vector<string> & 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;