]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.cpp
saner borderline between buffer and exporter
[lyx.git] / src / BufferView.cpp
index 3dd9351879c2435db1791e4c067db72a8fe31e85..5582d28c96c8b6fb750a20611c975c339bb192c7 100644 (file)
@@ -106,8 +106,6 @@ using support::bformat;
 using support::FileFilterList;
 using support::FileName;
 using support::fileSearch;
-using support::isDirWriteable;
-using support::isFileReadable;
 using support::makeDisplayPath;
 using support::makeAbsPath;
 using support::package;
@@ -422,7 +420,7 @@ BufferView::~BufferView()
        // That is to say, if a cursor is in a nested inset, it will be
        // restore to the left of the top level inset.
        LyX::ref().session().lastFilePos().save(
-               support::FileName(buffer_.fileName()),
+               support::FileName(buffer_.absFileName()),
                boost::tie(d->cursor_.bottom().pit(), d->cursor_.bottom().pos()) );
 
        delete d;
@@ -723,7 +721,7 @@ void BufferView::saveBookmark(unsigned int idx)
        // pit and pos will be updated with bottom level pit/pos
        // when lyx exits.
        LyX::ref().session().bookmarks().save(
-               FileName(buffer_.fileName()),
+               FileName(buffer_.absFileName()),
                d->cursor_.bottom().pit(),
                d->cursor_.bottom().pos(),
                d->cursor_.paragraph().id(),
@@ -1088,7 +1086,7 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd)
                                LYXERR(Debug::INFO)
                                        << "Paragraph " << par->id()
                                        << " found in buffer `"
-                                       << b->fileName() << "'." << endl;
+                                       << b->absFileName() << "'." << endl;
 
                                if (b == &buffer_) {
                                        // Set the cursor
@@ -1096,7 +1094,7 @@ Update::flags BufferView::dispatch(FuncRequest const & cmd)
                                } else {
                                        // Switch to other buffer view and resend cmd
                                        theLyXFunc().dispatch(FuncRequest(
-                                               LFUN_BUFFER_SWITCH, b->fileName()));
+                                               LFUN_BUFFER_SWITCH, b->absFileName()));
                                        theLyXFunc().dispatch(cmd);
                                        updateFlags = Update::None;
                                }
@@ -1928,7 +1926,7 @@ void BufferView::menuInsertLyXFile(string const & filenm)
                string initpath = lyxrc.document_path;
                string const trypath = buffer_.filePath();
                // If directory is writeable, use this as default.
-               if (isDirWriteable(FileName(trypath)))
+               if (FileName(trypath).isDirWritable())
                        initpath = trypath;
 
                // FIXME UNICODE