mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 21:21:32 +00:00
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:
parent
eb28cb8755
commit
3e28f0fc57
@ -1398,7 +1398,7 @@ DocumentClass const & BufferParams::documentClass() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
DocumentClass * BufferParams::documentClassPtr() const {
|
DocumentClass const * BufferParams::documentClassPtr() const {
|
||||||
return doc_class_;
|
return doc_class_;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ public:
|
|||||||
DocumentClass const & documentClass() const;
|
DocumentClass const & documentClass() const;
|
||||||
/// \return A pointer to the DocumentClass currently in use: the BaseClass
|
/// \return A pointer to the DocumentClass currently in use: the BaseClass
|
||||||
/// as modified by modules.
|
/// as modified by modules.
|
||||||
DocumentClass * documentClassPtr() const;
|
DocumentClass const * documentClassPtr() const;
|
||||||
/// This bypasses the baseClass and sets the textClass directly.
|
/// This bypasses the baseClass and sets the textClass directly.
|
||||||
/// Should be called with care and would be better not being here,
|
/// Should be called with care and would be better not being here,
|
||||||
/// but it seems to be needed by CutAndPaste::putClipboard().
|
/// but it seems to be needed by CutAndPaste::putClipboard().
|
||||||
|
@ -1532,7 +1532,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
|||||||
LASSERT(lyx_view_, /**/);
|
LASSERT(lyx_view_, /**/);
|
||||||
|
|
||||||
Buffer * buffer = lyx_view_->buffer();
|
Buffer * buffer = lyx_view_->buffer();
|
||||||
DocumentClass * oldClass = buffer->params().documentClassPtr();
|
DocumentClass const * const oldClass = buffer->params().documentClassPtr();
|
||||||
Cursor & cur = view()->cursor();
|
Cursor & cur = view()->cursor();
|
||||||
cur.recordUndoFullDocument();
|
cur.recordUndoFullDocument();
|
||||||
|
|
||||||
@ -1561,7 +1561,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
|||||||
case LFUN_LAYOUT_MODULES_CLEAR: {
|
case LFUN_LAYOUT_MODULES_CLEAR: {
|
||||||
LASSERT(lyx_view_, /**/);
|
LASSERT(lyx_view_, /**/);
|
||||||
Buffer * buffer = lyx_view_->buffer();
|
Buffer * buffer = lyx_view_->buffer();
|
||||||
DocumentClass * oldClass = buffer->params().documentClassPtr();
|
DocumentClass const * const oldClass = buffer->params().documentClassPtr();
|
||||||
view()->cursor().recordUndoFullDocument();
|
view()->cursor().recordUndoFullDocument();
|
||||||
buffer->params().clearLayoutModules();
|
buffer->params().clearLayoutModules();
|
||||||
buffer->params().makeDocumentClass();
|
buffer->params().makeDocumentClass();
|
||||||
@ -1573,7 +1573,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
|||||||
case LFUN_LAYOUT_MODULE_ADD: {
|
case LFUN_LAYOUT_MODULE_ADD: {
|
||||||
LASSERT(lyx_view_, /**/);
|
LASSERT(lyx_view_, /**/);
|
||||||
Buffer * buffer = lyx_view_->buffer();
|
Buffer * buffer = lyx_view_->buffer();
|
||||||
DocumentClass * oldClass = buffer->params().documentClassPtr();
|
DocumentClass const * const oldClass = buffer->params().documentClassPtr();
|
||||||
view()->cursor().recordUndoFullDocument();
|
view()->cursor().recordUndoFullDocument();
|
||||||
buffer->params().addLayoutModule(argument);
|
buffer->params().addLayoutModule(argument);
|
||||||
buffer->params().makeDocumentClass();
|
buffer->params().makeDocumentClass();
|
||||||
@ -1598,7 +1598,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
//Save the old, possibly modular, layout for use in conversion.
|
//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();
|
view()->cursor().recordUndoFullDocument();
|
||||||
buffer->params().setBaseClass(argument);
|
buffer->params().setBaseClass(argument);
|
||||||
buffer->params().makeDocumentClass();
|
buffer->params().makeDocumentClass();
|
||||||
@ -1610,7 +1610,7 @@ void LyXFunc::dispatch(FuncRequest const & cmd)
|
|||||||
case LFUN_LAYOUT_RELOAD: {
|
case LFUN_LAYOUT_RELOAD: {
|
||||||
LASSERT(lyx_view_, /**/);
|
LASSERT(lyx_view_, /**/);
|
||||||
Buffer * buffer = lyx_view_->buffer();
|
Buffer * buffer = lyx_view_->buffer();
|
||||||
DocumentClass * oldClass = buffer->params().documentClassPtr();
|
DocumentClass const * const oldClass = buffer->params().documentClassPtr();
|
||||||
LayoutFileIndex bc = buffer->params().baseClassID();
|
LayoutFileIndex bc = buffer->params().baseClassID();
|
||||||
LayoutFileList::get().reset(bc);
|
LayoutFileList::get().reset(bc);
|
||||||
buffer->params().setBaseClass(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..."));
|
lyx_view_->message(_("Converting document to new document class..."));
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ private:
|
|||||||
///
|
///
|
||||||
bool ensureBufferClean(BufferView * bv);
|
bool ensureBufferClean(BufferView * bv);
|
||||||
///
|
///
|
||||||
void updateLayout(DocumentClass * oldlayout, Buffer * buffer);
|
void updateLayout(DocumentClass const * const oldlayout, Buffer * buffer);
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Implementation is in LyX.cpp
|
/// Implementation is in LyX.cpp
|
||||||
|
Loading…
Reference in New Issue
Block a user