LibreOffice Module desktop (master) 1
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
desktop::RectangleAndPart Struct Reference

Represents an invalidated rectangle inside a given document part. More...

#include <init.hxx>

Collaboration diagram for desktop::RectangleAndPart:
[legend]

Public Member Functions

 RectangleAndPart ()
 
 RectangleAndPart (const tools::Rectangle *pRect, int nPart, int nMode)
 
OString toString () const
 
bool isInfinite () const
 Infinite Rectangle is both sides are equal or longer than SfxLokHelper::MaxTwips. More...
 
bool isEmpty () const
 Empty Rectangle is when it has zero dimensions. More...
 

Static Public Member Functions

static RectangleAndPart Create (const OString &rPayload)
 
static tools::Rectangle SanitizedRectangle (tools::Long nLeft, tools::Long nTop, tools::Long nWidth, tools::Long nHeight)
 Makes sure a rectangle is valid (apparently some code does not like negative coordinates for example). More...
 
static tools::Rectangle SanitizedRectangle (const tools::Rectangle &rect)
 

Public Attributes

tools::Rectangle m_aRectangle
 
int m_nPart
 
int m_nMode
 

Static Public Attributes

static constexpr tools::Rectangle emptyAllRectangle = {0, 0, SfxLokHelper::MaxTwips, SfxLokHelper::MaxTwips}
 

Detailed Description

Represents an invalidated rectangle inside a given document part.

Definition at line 42 of file init.hxx.

Constructor & Destructor Documentation

◆ RectangleAndPart() [1/2]

desktop::RectangleAndPart::RectangleAndPart ( )
inline

Definition at line 53 of file init.hxx.

◆ RectangleAndPart() [2/2]

desktop::RectangleAndPart::RectangleAndPart ( const tools::Rectangle pRect,
int  nPart,
int  nMode 
)
inline

Definition at line 59 of file init.hxx.

Member Function Documentation

◆ Create()

RectangleAndPart desktop::RectangleAndPart::Create ( const OString &  rPayload)
static

◆ isEmpty()

bool desktop::RectangleAndPart::isEmpty ( ) const
inline

Empty Rectangle is when it has zero dimensions.

Definition at line 84 of file init.hxx.

References tools::Rectangle::IsEmpty(), and m_aRectangle.

Referenced by desktop::CallbackFlushHandler::processInvalidateTilesEvent().

◆ isInfinite()

bool desktop::RectangleAndPart::isInfinite ( ) const
inline

Infinite Rectangle is both sides are equal or longer than SfxLokHelper::MaxTwips.

Definition at line 77 of file init.hxx.

References tools::Rectangle::GetHeight(), tools::Rectangle::GetWidth(), m_aRectangle, and SfxLokHelper::MaxTwips.

Referenced by desktop::CallbackFlushHandler::processInvalidateTilesEvent(), and toString().

◆ SanitizedRectangle() [1/2]

tools::Rectangle desktop::RectangleAndPart::SanitizedRectangle ( const tools::Rectangle rect)
static

◆ SanitizedRectangle() [2/2]

tools::Rectangle desktop::RectangleAndPart::SanitizedRectangle ( tools::Long  nLeft,
tools::Long  nTop,
tools::Long  nWidth,
tools::Long  nHeight 
)
static

Makes sure a rectangle is valid (apparently some code does not like negative coordinates for example).

Definition at line 587 of file init.cxx.

Referenced by Create(), and SanitizedRectangle().

◆ toString()

OString desktop::RectangleAndPart::toString ( ) const
inline

Member Data Documentation

◆ emptyAllRectangle

constexpr tools::Rectangle desktop::RectangleAndPart::emptyAllRectangle = {0, 0, SfxLokHelper::MaxTwips, SfxLokHelper::MaxTwips}
staticconstexpr

Definition at line 51 of file init.hxx.

◆ m_aRectangle

tools::Rectangle desktop::RectangleAndPart::m_aRectangle

◆ m_nMode

int desktop::RectangleAndPart::m_nMode

◆ m_nPart

int desktop::RectangleAndPart::m_nPart

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