pimpl_->isViewCacheValid = false;
}
+
+// We shouldn't need to reset the params here, since anything
+// we need will be recopied.
+void BufferParams::copyForAdvFR(const BufferParams & bp)
+{
+ string const & lang = bp.language->lang();
+ setLanguage(lang);
+ layout_modules_ = bp.layout_modules_;
+ string const & doc_class = bp.documentClass().name();
+ setBaseClass(doc_class);
+}
+
} // namespace lyx
bool setLanguage(std::string const & lang);
///
void invalidateConverterCache() const;
+ /// Copies over some of the settings from \param bp,
+ /// namely the ones need by Advanced F&R. We don't want
+ /// to copy them all, e.g., not the default master.
+ void copyForAdvFR(BufferParams const & bp);
private:
///
static void destroy(Impl *);
};
support::copied_ptr<Impl, MemoryTraits> pimpl_;
-
};
} // namespace lyx
}
-/** Copy selected elements from bv's BufferParams to the dest_bv's one
- ** We don't want to copy'em all, e.g., not the default master **/
+// Copy selected elements from bv's BufferParams to the dest_bv's
static void copy_params(BufferView const & bv, BufferView & dest_bv) {
Buffer const & doc_buf = bv.buffer();
BufferParams const & doc_bp = doc_buf.params();
- string const & lang = doc_bp.language->lang();
- string const & doc_class = doc_bp.documentClass().name();
Buffer & dest_buf = dest_bv.buffer();
- dest_buf.params().setLanguage(lang);
- dest_buf.params().setBaseClass(doc_class);
+ dest_buf.params().copyForAdvFR(doc_bp);
dest_bv.makeDocumentClass();
dest_bv.cursor().current_font.setLanguage(doc_bp.language);
}