From 59aa19e92075a2ff9fcaabacfee37f5c3c379957 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Tue, 14 Aug 2007 15:32:58 +0000 Subject: [PATCH] * callback.cpp: newFile() takes a LyXView instead of a BufferView. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@19564 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/LyXFunc.cpp | 2 +- src/callback.cpp | 4 ++-- src/callback.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/LyXFunc.cpp b/src/LyXFunc.cpp index 4bc66bfb92..cc3d5fe026 100644 --- a/src/LyXFunc.cpp +++ b/src/LyXFunc.cpp @@ -1258,7 +1258,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd) case LFUN_FILE_NEW: BOOST_ASSERT(lyx_view_); - newFile(lyx_view_->view(), argument); + newFile(*lyx_view_, argument); break; case LFUN_FILE_OPEN: diff --git a/src/callback.cpp b/src/callback.cpp index 022181e744..d0ee831216 100644 --- a/src/callback.cpp +++ b/src/callback.cpp @@ -324,7 +324,7 @@ void autoSave(BufferView * bv) // create new file with template // SERVERCMD ! // -void newFile(BufferView * bv, string const & filename) +void newFile(LyXView & lv, string const & filename) { // Split argument by : string name; @@ -335,7 +335,7 @@ void newFile(BufferView * bv, string const & filename) Buffer * const b = newFile(name, tmpname); if (b) - bv->setBuffer(b); + lv.setBuffer(b); } diff --git a/src/callback.h b/src/callback.h index df11f506c9..716e30b942 100644 --- a/src/callback.h +++ b/src/callback.h @@ -33,7 +33,7 @@ bool writeAs(Buffer * buffer, std::string const & filename = std::string()); /// void autoSave(BufferView * bv); /// -void newFile(BufferView * bv, std::string const & filename); +void newFile(frontend::LyXView & lv, std::string const & filename); /// void insertPlaintextFile(BufferView * bv, std::string const & f, bool asParagraph); /// read plain text file (if \p f is empty, prompt for a filename) -- 2.39.2