#include "LyXFunc.h"
-#include "BaseClassList.h"
+#include "LayoutFile.h"
#include "BranchList.h"
#include "buffer_funcs.h"
#include "Buffer.h"
bool loadLayoutFile(string const & name, string const & buf_path)
{
- if (!BaseClassList::get().haveClass(name)) {
+ if (!LayoutFileList::get().haveClass(name)) {
lyxerr << "Document class \"" << name
<< "\" does not exist."
<< endl;
return false;
}
- LayoutFile & tc = BaseClassList::get()[name];
+ LayoutFile & tc = LayoutFileList::get()[name];
if (!tc.load(buf_path)) {
docstring s = bformat(_("The document class %1$s."
"could not be loaded."), from_utf8(name));
case LFUN_BUFFER_PARAMS_APPLY: {
BOOST_ASSERT(lyx_view_);
- biblio::CiteEngine const oldEngine =
- lyx_view_->buffer()->params().getEngine();
Buffer * buffer = lyx_view_->buffer();
-
DocumentClass * oldClass = buffer->params().documentClassPtr();
-
Cursor & cur = view()->cursor();
cur.recordUndoFullDocument();
updateLayout(oldClass, buffer);
- biblio::CiteEngine const newEngine =
- lyx_view_->buffer()->params().getEngine();
-
- if (oldEngine != newEngine) {
- FuncRequest fr(LFUN_INSET_REFRESH);
-
- Inset & inset = lyx_view_->buffer()->inset();
- InsetIterator it = inset_iterator_begin(inset);
- InsetIterator const end = inset_iterator_end(inset);
- for (; it != end; ++it)
- if (it->lyxCode() == CITE_CODE)
- it->dispatch(cur, fr);
- }
-
updateFlags = Update::Force | Update::FitCursor;
- // We are here most certainaly because of a change in the document
- // It is then better to make sure that all dialogs are in sync
- // with current document settings. LyXView::restartCursor() achieve this.
+ // 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
+ // current document settings. LyXView::restartCursor() achieve this.
lyx_view_->restartCursor();
break;
}
break;
LayoutFile const * old_layout = buffer->params().baseClass();
- LayoutFile const * new_layout = &(BaseClassList::get()[argument]);
+ LayoutFile const * new_layout = &(LayoutFileList::get()[argument]);
if (old_layout == new_layout)
// nothing to do
Buffer * buffer = lyx_view_->buffer();
DocumentClass * oldClass = buffer->params().documentClassPtr();
LayoutFileIndex bc = buffer->params().baseClassID();
- BaseClassList::get().reset(bc);
+ LayoutFileList::get().reset(bc);
buffer->params().makeDocumentClass();
updateLayout(oldClass, buffer);
updateFlags = Update::Force | Update::FitCursor;