25#include <osl/diagnose.h>
29 SwCacheObj( static_cast<void const *>(pFrame) ),
30 m_pLine(
std::move(pNew) )
106 OSL_ENSURE( !
IsLocked(),
"+SwTextFrame::ClearPara: this is locked." );
113 pTextLine->
SetPara(
nullptr,
true );
138 pTextLine->
SetPara( pNew, bDelete );
142 OSL_ENSURE( !pNew,
"+SetPara: Losing SwParaPortion" );
153 OSL_FAIL(
"+SetPara: InsertCache failed." );
169 sal_uInt16 nVisibleShells(0);
179 sal_uInt16
const nPreserved(100 * nVisibleShells);
181 if (rCache.
GetCurMax() < nPreserved + 250)
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetNext(const SfxViewShell &rPrev, bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
static SAL_WARN_UNUSED_RESULT SfxViewShell * GetFirst(bool bOnlyVisible=true, const std::function< bool(const SfxViewShell *)> &isViewShell=nullptr)
Access class for the Cache.
SwCacheObj * Get(bool isDuplicateOwnerAllowed)
The Cache object base class Users of the Cache must derive a class from the SwCacheObj and store thei...
sal_uInt16 GetCachePos() const
void Delete(const void *pOwner, sal_uInt16 nIndex)
sal_uInt16 GetCurMax() const
void IncreaseMax(const sal_uInt16 nAdd)
void SetLRUOfst(const sal_uInt16 nOfst)
Mark some entries as "do not delete".
Collection of SwLineLayout instances, represents the paragraph text in Writer layout.
SwSaveSetLRUOfst()
Prevent the SwParaPortions of the visible paragraphs from being deleted; they would just be recreated...
Represents the visualization of a paragraph.
void ClearPara()
Removes the Line information from the Cache but retains the entry itself.
void SetPara(SwParaPortion *pNew, bool bDelete=true)
void SetCacheIdx(const sal_uInt16 nNew)
SwParaPortion * GetPara()
static SwCache * s_pTextCache
SwLineLayout cache: the lines are not actually owned by the SwTextFrame but by this SwCache,...
static SwCache * GetTextCache()
sal_uInt16 GetCacheIdx() const
void RemoveFromCache()
Removes this frame completely from the Cache.
virtual SwCacheObj * NewObj() override
Can be use in NewObj.
SwTextLineAccess(const SwTextFrame *pOwner)
SwParaPortion * GetPara()
SwParaPortion * GetPara()
SwTextLine(SwTextFrame const *pFrame, std::unique_ptr< SwParaPortion > pNew=nullptr)
virtual void UpdateCachePos() override
virtual ~SwTextLine() override
void SetPara(SwParaPortion *pNew, bool bDelete)
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
SVXCORE_DLLPUBLIC MSO_SPT Get(const OUString &)