mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-23 02:14:50 +00:00
Now generate previews when loading the buffer for insets in insets.
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@4847 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
cc132995fa
commit
5f46df1f0f
@ -1,3 +1,10 @@
|
||||
2002-08-02 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* insetcollapsable.[Ch] (addPreview):
|
||||
* insettabular.[Ch] (addPreview):
|
||||
* insettext.[Ch] (addPreview): new methods. Can now generate previews
|
||||
for insets in insets.
|
||||
|
||||
2002-08-02 Angus Leeming <leeming@lyx.org>
|
||||
|
||||
* insetcite.C: fix typo.
|
||||
|
@ -676,3 +676,9 @@ string const InsetCollapsable::selectNextWordToSpellcheck(BufferView * bv,
|
||||
first_after_edit = false;
|
||||
return str;
|
||||
}
|
||||
|
||||
|
||||
void InsetCollapsable::addPreview(grfx::PreviewLoader & loader) const
|
||||
{
|
||||
inset.addPreview(loader);
|
||||
}
|
||||
|
@ -190,6 +190,9 @@ public:
|
||||
bool searchBackward(BufferView * bv, string const & str,
|
||||
bool = true, bool = false);
|
||||
|
||||
///
|
||||
void addPreview(grfx::PreviewLoader &) const;
|
||||
|
||||
protected:
|
||||
///
|
||||
int ascent_collapsed() const;
|
||||
|
@ -2917,3 +2917,15 @@ bool InsetTabular::insertAsciiString(BufferView * bv, string const & buf,
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
void InsetTabular::addPreview(grfx::PreviewLoader & loader) const
|
||||
{
|
||||
int const rows = tabular->rows();
|
||||
int const columns = tabular->columns();
|
||||
for (int i = 0; i < rows; ++i) {
|
||||
for (int j = 0; j < columns; ++j) {
|
||||
tabular->GetCellInset(i,j)->addPreview(loader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -229,6 +229,9 @@ public:
|
||||
// "normal" means without width set!
|
||||
bool forceDefaultParagraphs(Inset const * in) const;
|
||||
|
||||
///
|
||||
void addPreview(grfx::PreviewLoader &) const;
|
||||
|
||||
//
|
||||
// Public structures and variables
|
||||
///
|
||||
|
@ -2797,3 +2797,18 @@ void InsetText::appendParagraphs(BufferParams const & bparams,
|
||||
|
||||
reinitLyXText();
|
||||
}
|
||||
|
||||
|
||||
void InsetText::addPreview(grfx::PreviewLoader & loader) const
|
||||
{
|
||||
Paragraph * par = getFirstParagraph(0);
|
||||
while (par) {
|
||||
Paragraph::inset_iterator it = par->inset_iterator_begin();
|
||||
Paragraph::inset_iterator end = par->inset_iterator_end();
|
||||
for (; it != end; ++it) {
|
||||
it->addPreview(loader);
|
||||
}
|
||||
|
||||
par = par->next();
|
||||
}
|
||||
}
|
||||
|
@ -248,6 +248,8 @@ public:
|
||||
///
|
||||
void appendParagraphs(BufferParams const & bparams, Paragraph *);
|
||||
///
|
||||
void addPreview(grfx::PreviewLoader &) const;
|
||||
|
||||
//
|
||||
// Public structures and variables
|
||||
///
|
||||
|
Loading…
Reference in New Issue
Block a user