}
-void BufferParams::setDocumentClass(DocumentClassConstPtr tc)
+void BufferParams::setDocumentClass(DocumentClassConstPtr const & tc)
{
// evil, but this function is evil
doc_class_ = const_pointer_cast<DocumentClass>(tc);
/// 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().
- void setDocumentClass(DocumentClassConstPtr);
+ void setDocumentClass(DocumentClassConstPtr const &);
/// List of modules in use
LayoutModuleList const & getModules() const { return layout_modules_; }
/// List of default modules the user has removed
}
-void BufferView::updateDocumentClass(DocumentClassConstPtr olddc)
+void BufferView::updateDocumentClass(DocumentClassConstPtr const & olddc)
{
StableDocIterator backcur(d->cursor_);
ErrorList & el = buffer_.errorList("Class Switch");
void updateHoveredInset() const;
///
- void updateDocumentClass(DocumentClassConstPtr olddc);
+ void updateDocumentClass(DocumentClassConstPtr const & olddc);
///
int width_;
///
}
-Buffer * copyToTempBuffer(ParagraphList const & paragraphs, DocumentClassConstPtr docclass)
+Buffer * copyToTempBuffer(ParagraphList const & paragraphs, DocumentClassConstPtr const & docclass)
{
// This used to need to be static to avoid a memory leak. It no longer needs
// to be so, but the alternative is to construct a new one of these (with a
}
-void switchBetweenClasses(DocumentClassConstPtr oldone,
- DocumentClassConstPtr newone, InsetText & in) {
+void switchBetweenClasses(DocumentClassConstPtr const & oldone,
+ DocumentClassConstPtr const & newone, InsetText & in) {
ErrorList el = {};
switchBetweenClasses(oldone, newone, in, el);
}
-void switchBetweenClasses(DocumentClassConstPtr oldone,
- DocumentClassConstPtr newone, InsetText & in, ErrorList & errorlist)
+void switchBetweenClasses(DocumentClassConstPtr const & oldone,
+ DocumentClassConstPtr const & newone, InsetText & in, ErrorList & errorlist)
{
errorlist.clear();
* It changes layouts and character styles. Errors are reported
* in the passed ErrorList.
*/
-void switchBetweenClasses(DocumentClassConstPtr oldone,
- DocumentClassConstPtr newone, InsetText & in, ErrorList & el);
+void switchBetweenClasses(DocumentClassConstPtr const & oldone,
+ DocumentClassConstPtr const & newone, InsetText & in, ErrorList & el);
/// Same but without error reporting.
-void switchBetweenClasses(DocumentClassConstPtr oldone,
- DocumentClassConstPtr newone, InsetText & in);
+void switchBetweenClasses(DocumentClassConstPtr const & oldone,
+ DocumentClassConstPtr const & newone, InsetText & in);
/// Get the current selection as a string. Does not change the selection.
/// Does only work if the whole selection is in mathed.