LibreOffice Module tools (master) 1
Public Member Functions | Friends | List of all members
Size Class Referencefinal

#include <gen.hxx>

Inheritance diagram for Size:
[legend]
Collaboration diagram for Size:
[legend]

Public Member Functions

constexpr Size ()
 
constexpr Size (tools::Long nWidth, tools::Long nHeight)
 
constexpr tools::Long Width () const
 
constexpr tools::Long Height () const
 
tools::Long AdjustWidth (tools::Long n)
 
tools::Long AdjustHeight (tools::Long n)
 
constexpr tools::Long getWidth () const
 
constexpr tools::Long getHeight () const
 
void setWidth (tools::Long nWidth)
 
void setHeight (tools::Long nHeight)
 
bool IsEmpty () const
 
void extendBy (tools::Long x, tools::Long y)
 
Pair const & toPair () const
 
PairtoPair ()
 
Sizeoperator+= (const Size &rSize)
 
Sizeoperator-= (const Size &rSize)
 
Sizeoperator*= (const tools::Long nVal)
 
Sizeoperator/= (const tools::Long nVal)
 
constexpr Size scale (sal_Int64 nMulX, sal_Int64 nDivX, sal_Int64 nMulY, sal_Int64 nDivY) const
 
TOOLS_DLLPUBLIC rtl::OString toString () const
 
TOOLS_DLLPUBLIC size_t GetHashValue () const
 

Friends

Size operator+ (const Size &rVal1, const Size &rVal2)
 
Size operator- (const Size &rVal1, const Size &rVal2)
 
Size operator* (const Size &rVal1, const tools::Long nVal2)
 
Size operator/ (const Size &rVal1, const tools::Long nVal2)
 

Additional Inherited Members

- Protected Member Functions inherited from Pair
constexpr Pair ()
 
constexpr Pair (tools::Long nA, tools::Long nB)
 
tools::Long A () const
 
tools::Long B () const
 
tools::LongA ()
 
tools::LongB ()
 
TOOLS_DLLPUBLIC rtl::OString toString () const
 
TOOLS_DLLPUBLIC size_t GetHashValue () const
 
- Protected Attributes inherited from Pair
tools::Long mnA
 
tools::Long mnB
 

Detailed Description

Definition at line 211 of file gen.hxx.

Constructor & Destructor Documentation

◆ Size() [1/2]

constexpr Size::Size ( )
inlineconstexpr

Definition at line 214 of file gen.hxx.

Referenced by scale().

◆ Size() [2/2]

constexpr Size::Size ( tools::Long  nWidth,
tools::Long  nHeight 
)
inlineconstexpr

Definition at line 215 of file gen.hxx.

Member Function Documentation

◆ AdjustHeight()

tools::Long Size::AdjustHeight ( tools::Long  n)
inline

Definition at line 221 of file gen.hxx.

References n.

Referenced by operator+=().

◆ AdjustWidth()

tools::Long Size::AdjustWidth ( tools::Long  n)
inline

Definition at line 220 of file gen.hxx.

References n.

Referenced by operator+=().

◆ extendBy()

void Size::extendBy ( tools::Long  x,
tools::Long  y 
)
inline

Definition at line 230 of file gen.hxx.

References x, and y.

◆ GetHashValue()

size_t Pair::GetHashValue ( ) const

Definition at line 57 of file gen.cxx.

◆ getHeight()

constexpr tools::Long Size::getHeight ( ) const
inlineconstexpr

Definition at line 224 of file gen.hxx.

References Height.

Referenced by tools::GenericTypeSerializer::writeSize().

◆ getWidth()

constexpr tools::Long Size::getWidth ( ) const
inlineconstexpr

Definition at line 223 of file gen.hxx.

References Width.

Referenced by tools::GenericTypeSerializer::writeSize().

◆ Height()

constexpr tools::Long Size::Height ( ) const
inlineconstexpr

◆ IsEmpty()

bool Size::IsEmpty ( ) const
inline

Definition at line 228 of file gen.hxx.

◆ operator*=()

Size & Size::operator*= ( const tools::Long  nVal)
inline

Definition at line 281 of file gen.hxx.

References Pair::mnA, and Pair::mnB.

◆ operator+=()

Size & Size::operator+= ( const Size rSize)
inline

Definition at line 267 of file gen.hxx.

References Pair::mnA, and Pair::mnB.

◆ operator-=()

Size & Size::operator-= ( const Size rSize)
inline

Definition at line 274 of file gen.hxx.

References Pair::mnA, and Pair::mnB.

◆ operator/=()

Size & Size::operator/= ( const tools::Long  nVal)
inline

Definition at line 288 of file gen.hxx.

References Pair::mnA, and Pair::mnB.

◆ scale()

constexpr Size Size::scale ( sal_Int64  nMulX,
sal_Int64  nDivX,
sal_Int64  nMulY,
sal_Int64  nDivY 
) const
inlineconstexpr

Definition at line 315 of file gen.hxx.

References o3tl::convert(), Height(), Size(), and Width().

Referenced by o3tl::convert().

◆ setHeight()

void Size::setHeight ( tools::Long  nHeight)
inline

Definition at line 226 of file gen.hxx.

Referenced by tools::GenericTypeSerializer::readSize().

◆ setWidth()

void Size::setWidth ( tools::Long  nWidth)
inline

Definition at line 225 of file gen.hxx.

Referenced by tools::GenericTypeSerializer::readSize().

◆ toPair() [1/2]

Pair & Size::toPair ( )
inline

Definition at line 237 of file gen.hxx.

◆ toPair() [2/2]

Pair const & Size::toPair ( ) const
inline

Definition at line 236 of file gen.hxx.

Referenced by operator==().

◆ toString()

OString Pair::toString ( ) const

Definition at line 54 of file gen.cxx.

◆ Width()

constexpr tools::Long Size::Width ( ) const
inlineconstexpr

Friends And Related Function Documentation

◆ operator*

Size operator* ( const Size rVal1,
const tools::Long  nVal2 
)
friend

Definition at line 305 of file gen.hxx.

◆ operator+

Size operator+ ( const Size rVal1,
const Size rVal2 
)
friend

Definition at line 295 of file gen.hxx.

◆ operator-

Size operator- ( const Size rVal1,
const Size rVal2 
)
friend

Definition at line 300 of file gen.hxx.

◆ operator/

Size operator/ ( const Size rVal1,
const tools::Long  nVal2 
)
friend

Definition at line 310 of file gen.hxx.


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