From 6f624ab79bb1aa771ce3da935f4a6c5da0a4c045 Mon Sep 17 00:00:00 2001 From: Richard Heck Date: Mon, 8 Mar 2010 20:37:11 +0000 Subject: [PATCH] Change updateLayout() to updateDocumentClass(), since that is what it does. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@33682 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/BufferView.cpp | 14 +++++++------- src/BufferView.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/BufferView.cpp b/src/BufferView.cpp index 1e0f4b249d..3ad78813c5 100644 --- a/src/BufferView.cpp +++ b/src/BufferView.cpp @@ -899,14 +899,14 @@ bool BufferView::scrollToCursor(DocIterator const & dit, bool recenter) } -void BufferView::updateLayout(DocumentClass const * const oldlayout) +void BufferView::updateDocumentClass(DocumentClass const * const olddc) { message(_("Converting document to new document class...")); StableDocIterator backcur(d->cursor_); ErrorList & el = buffer_.errorList("Class Switch"); cap::switchBetweenClasses( - oldlayout, buffer_.params().documentClassPtr(), + olddc, buffer_.params().documentClassPtr(), static_cast(buffer_.inset()), el); setCursor(backcur.asDocIterator(&buffer_)); @@ -1179,7 +1179,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) << unknown_tokens << " unknown token" << (unknown_tokens == 1 ? "" : "s")); } - updateLayout(oldClass); + updateDocumentClass(oldClass); // We are most certainly here because of a change in the document // It is then better to make sure that all dialogs are in sync with @@ -1194,7 +1194,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) cur.recordUndoFullDocument(); buffer_.params().clearLayoutModules(); buffer_.params().makeDocumentClass(); - updateLayout(oldClass); + updateDocumentClass(oldClass); dr.update(Update::Force | Update::FitCursor); break; } @@ -1211,7 +1211,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) cur.recordUndoFullDocument(); buffer_.params().addLayoutModule(argument); buffer_.params().makeDocumentClass(); - updateLayout(oldClass); + updateDocumentClass(oldClass); dr.update(Update::Force | Update::FitCursor); break; } @@ -1234,7 +1234,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) cur.recordUndoFullDocument(); buffer_.params().setBaseClass(argument); buffer_.params().makeDocumentClass(); - updateLayout(oldDocClass); + updateDocumentClass(oldDocClass); dr.update(Update::Force | Update::FitCursor); break; } @@ -1250,7 +1250,7 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr) LayoutFileList::get().reset(bc); buffer_.params().setBaseClass(bc); buffer_.params().makeDocumentClass(); - updateLayout(oldClass); + updateDocumentClass(oldClass); dr.update(Update::Force | Update::FitCursor); break; } diff --git a/src/BufferView.h b/src/BufferView.h index 6a01ed0fc4..67f113f2d6 100644 --- a/src/BufferView.h +++ b/src/BufferView.h @@ -333,7 +333,7 @@ private: ) const; /// - void updateLayout(DocumentClass const * const oldlayout); + void updateDocumentClass(DocumentClass const * const olddc); /// int width_; ///