setViewCache: small helper function to hide messy details.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@7253 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
André Pönitz 2003-07-10 10:06:20 +00:00
parent 485313c6d7
commit 46c55ef6b7
2 changed files with 10 additions and 2 deletions

View File

@ -1981,14 +1981,20 @@ RowList::iterator InsetText::crow(BufferView * bv) const
LyXText * InsetText::getLyXText(BufferView const * bv,
bool const recursive) const
{
if (bv)
text_.bv_owner = const_cast<BufferView *>(bv);
setViewCache(bv);
if (recursive && the_locking_inset)
return the_locking_inset->getLyXText(bv, true);
return &text_;
}
void InsetText::setViewCache(BufferView const * bv) const
{
if (bv)
text_.bv_owner = const_cast<BufferView *>(bv);
}
void InsetText::deleteLyXText(BufferView * bv, bool recursive) const
{
if (recursive) {

View File

@ -165,6 +165,8 @@ public:
LyXText * getLyXText(BufferView const *,
bool const recursive = false) const;
///
void setViewCache(BufferView const * bv) const;
///
void deleteLyXText(BufferView *, bool recursive = true) const;
///
void resizeLyXText(BufferView *, bool force = false) const;