Add some constness where we can.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@24883 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Richard Heck 2008-05-22 14:02:35 +00:00
parent eb28cb8755
commit 3e28f0fc57
4 changed files with 9 additions and 9 deletions

View File

@ -1398,7 +1398,7 @@ DocumentClass const & BufferParams::documentClass() const
}
DocumentClass * BufferParams::documentClassPtr() const {
DocumentClass const * BufferParams::documentClassPtr() const {
return doc_class_;
}

View File

@ -118,7 +118,7 @@ public:
DocumentClass const & documentClass() const;
/// \return A pointer to the DocumentClass currently in use: the BaseClass
/// as modified by modules.
DocumentClass * documentClassPtr() const;
DocumentClass const * documentClassPtr() const;
/// This bypasses the baseClass and sets the textClass directly.
/// Should be called with care and would be better not being here,
/// but it seems to be needed by CutAndPaste::putClipboard().

View File

@ -1532,7 +1532,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
LASSERT(lyx_view_, /**/);
Buffer * buffer = lyx_view_->buffer();
DocumentClass * oldClass = buffer->params().documentClassPtr();
DocumentClass const * const oldClass = buffer->params().documentClassPtr();
Cursor & cur = view()->cursor();
cur.recordUndoFullDocument();
@ -1561,7 +1561,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
case LFUN_LAYOUT_MODULES_CLEAR: {
LASSERT(lyx_view_, /**/);
Buffer * buffer = lyx_view_->buffer();
DocumentClass * oldClass = buffer->params().documentClassPtr();
DocumentClass const * const oldClass = buffer->params().documentClassPtr();
view()->cursor().recordUndoFullDocument();
buffer->params().clearLayoutModules();
buffer->params().makeDocumentClass();
@ -1573,7 +1573,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
case LFUN_LAYOUT_MODULE_ADD: {
LASSERT(lyx_view_, /**/);
Buffer * buffer = lyx_view_->buffer();
DocumentClass * oldClass = buffer->params().documentClassPtr();
DocumentClass const * const oldClass = buffer->params().documentClassPtr();
view()->cursor().recordUndoFullDocument();
buffer->params().addLayoutModule(argument);
buffer->params().makeDocumentClass();
@ -1598,7 +1598,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
break;
//Save the old, possibly modular, layout for use in conversion.
DocumentClass * oldDocClass = buffer->params().documentClassPtr();
DocumentClass const * const oldDocClass = buffer->params().documentClassPtr();
view()->cursor().recordUndoFullDocument();
buffer->params().setBaseClass(argument);
buffer->params().makeDocumentClass();
@ -1610,7 +1610,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
case LFUN_LAYOUT_RELOAD: {
LASSERT(lyx_view_, /**/);
Buffer * buffer = lyx_view_->buffer();
DocumentClass * oldClass = buffer->params().documentClassPtr();
DocumentClass const * const oldClass = buffer->params().documentClassPtr();
LayoutFileIndex bc = buffer->params().baseClassID();
LayoutFileList::get().reset(bc);
buffer->params().setBaseClass(bc);
@ -1859,7 +1859,7 @@ bool LyXFunc::wasMetaKey() const
}
void LyXFunc::updateLayout(DocumentClass * oldlayout,Buffer * buffer)
void LyXFunc::updateLayout(DocumentClass const * const oldlayout, Buffer * buffer)
{
lyx_view_->message(_("Converting document to new document class..."));

View File

@ -130,7 +130,7 @@ private:
///
bool ensureBufferClean(BufferView * bv);
///
void updateLayout(DocumentClass * oldlayout, Buffer * buffer);
void updateLayout(DocumentClass const * const oldlayout, Buffer * buffer);
};
/// Implementation is in LyX.cpp