using std::pair;
using std::stack;
using std::vector;
+using std::string;
// all these externs should eventually be removed.
string filepath;
boost::scoped_ptr<Messages> messages;
+
+ /** set to true only when the file is fully loaded.
+ * Used to prevent the premature generation of previews
+ * and by the citation inset.
+ */
+ bool file_fully_loaded;
};
Buffer::Impl::Impl(Buffer & parent, string const & file, bool readonly_)
: nicefile(true),
lyx_clean(true), bak_clean(true), unnamed(false), read_only(readonly_),
- filename(file), filepath(OnlyPath(file))
+ filename(file), filepath(OnlyPath(file)), file_fully_loaded(false)
{
lyxvc.buffer(&parent);
if (readonly_ || lyxrc.use_tempdir)
int Buffer::readParagraph(LyXLex & lex, string const & token,
ParagraphList & pars, ParagraphList::iterator & pit,
- Paragraph::depth_type & depth)
+ lyx::depth_type & depth)
{
static Change current_change;
int unknown = 0;
}
+bool Buffer::fully_loaded() const
+{
+ return pimpl_->file_fully_loaded;
+}
+
+
bool Buffer::readFile(LyXLex & lex, string const & filename,
ParagraphList::iterator pit)
{
" that it is probably corrupted."),
filename));
}
+ pimpl_->file_fully_loaded = true;
return true;
}
// Handle internal paragraph parsing -- layout already processed.
void Buffer::simpleLinuxDocOnePar(ostream & os,
ParagraphList::iterator par,
- Paragraph::depth_type /*depth*/) const
+ lyx::depth_type /*depth*/) const
{
LyXLayout_ptr const & style = par->layout();
void Buffer::simpleDocBookOnePar(ostream & os,
ParagraphList::iterator par, int & desc_on,
- Paragraph::depth_type depth) const
+ lyx::depth_type depth) const
{
bool emph_flag = false;