LibreOffice Module sw (master) 1
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SwContourCache Class Reference

#include <txtfly.hxx>

Classes

struct  CacheItem
 

Public Member Functions

 SwContourCache ()
 
 ~SwContourCache ()
 
const SdrObjectGetObject (sal_uInt16 nPos) const
 
sal_uInt16 GetCount () const
 
void ClrObject (sal_uInt16 nPos)
 

Static Public Member Functions

static SwRect CalcBoundRect (const SwAnchoredObject *pAnchoredObj, const SwRect &rLine, const SwTextFrame *pFrame, const tools::Long nXPos, const bool bRight)
 Computes the rectangle that will cover the object in the given line. More...
 

Private Member Functions

SwRect ContourRect (const SwFormat *pFormat, const SdrObject *pObj, const SwTextFrame *pFrame, const SwRect &rLine, const tools::Long nXPos, const bool bRight)
 

Private Attributes

std::vector< CacheItemmvItems
 
tools::Long mnPointCount
 

Friends

void ClrContourCache ()
 

Detailed Description

Definition at line 54 of file txtfly.hxx.

Constructor & Destructor Documentation

◆ SwContourCache()

SwContourCache::SwContourCache ( )

Definition at line 122 of file txtfly.cxx.

Referenced by CalcBoundRect().

◆ ~SwContourCache()

SwContourCache::~SwContourCache ( )

Definition at line 127 of file txtfly.cxx.

Member Function Documentation

◆ CalcBoundRect()

SwRect SwContourCache::CalcBoundRect ( const SwAnchoredObject pAnchoredObj,
const SwRect rLine,
const SwTextFrame pFrame,
const tools::Long  nXPos,
const bool  bRight 
)
static

Computes the rectangle that will cover the object in the given line.

For non contour-flow objects, this is simply the overlap area of BoundRect (including spacing), and the line, for contour-flow, the tools::PolyPolygon of the object gets traversed

Definition at line 158 of file txtfly.cxx.

References ContourRect(), SwAnchoredObject::DynCastFlyFrame(), SwAnchoredObject::GetDrawObj(), SwAnchoredObject::GetFrameFormat(), SwAnchoredObject::GetObjRectWithSpaces(), SwFormat::GetSurround(), SwFormatSurround::IsContour(), SwFrame::IsNoTextFrame(), SwLayoutFrame::Lower(), SwRect::Overlaps(), pContourCache, SwFlyFreeFrame::supportsAutoContour(), SwContourCache(), and SwRect::Width().

Referenced by SwTextFly::AnchoredObjToRect(), SwTextFly::CalcLeftMargin(), and SwTextFly::CalcRightMargin().

◆ ClrObject()

void SwContourCache::ClrObject ( sal_uInt16  nPos)

Definition at line 131 of file txtfly.cxx.

References mnPointCount, mvItems, and nPos.

Referenced by ClrContourCache().

◆ ContourRect()

SwRect SwContourCache::ContourRect ( const SwFormat pFormat,
const SdrObject pObj,
const SwTextFrame pFrame,
const SwRect rLine,
const tools::Long  nXPos,
const bool  bRight 
)
private

◆ GetCount()

sal_uInt16 SwContourCache::GetCount ( ) const
inline

Definition at line 72 of file txtfly.hxx.

References mvItems.

Referenced by ClrContourCache(), and ContourRect().

◆ GetObject()

const SdrObject * SwContourCache::GetObject ( sal_uInt16  nPos) const
inline

Definition at line 71 of file txtfly.hxx.

References mvItems, and nPos.

Referenced by ClrContourCache().

Friends And Related Function Documentation

◆ ClrContourCache

void ClrContourCache ( )
friend

Definition at line 148 of file txtfly.cxx.

Member Data Documentation

◆ mnPointCount

tools::Long SwContourCache::mnPointCount
private

Definition at line 63 of file txtfly.hxx.

Referenced by ClrObject(), and ContourRect().

◆ mvItems

std::vector<CacheItem> SwContourCache::mvItems
private

Definition at line 62 of file txtfly.hxx.

Referenced by ClrObject(), ContourRect(), GetCount(), and GetObject().


The documentation for this class was generated from the following files: