LibreOffice Module svx (master) 1
|
Contains the widths of primary and secondary line of a frame style. More...
#include <framelink.hxx>
Public Member Functions | |
Style () | |
Constructs an invisible frame style. More... | |
Style (double nP, double nD, double nS, SvxBorderLineStyle nType, double fScale) | |
Constructs a frame style with passed line widths. More... | |
Style (const Color &rColorPrim, const Color &rColorSecn, const Color &rColorGap, bool bUseGapColor, double nP, double nD, double nS, SvxBorderLineStyle nType, double fScale) | |
Constructs a frame style with passed color and line widths. More... | |
Style (const editeng::SvxBorderLine *pBorder, double fScale) | |
Constructs a frame style from the passed SvxBorderLine struct. More... | |
RefMode | GetRefMode () const |
Color | GetColorPrim () const |
Color | GetColorSecn () const |
Color | GetColorGap () const |
bool | UseGapColor () const |
double | Prim () const |
double | Dist () const |
double | Secn () const |
double | PatternScale () const |
SvxBorderLineStyle | Type () const |
bool | IsUsed () const |
Check if this style is used - this depends on it having any width definition. More... | |
double | GetWidth () const |
Returns the total width of this frame style. More... | |
void | Clear () |
Sets the frame style to invisible state. More... | |
void | Set (double nP, double nD, double nS) |
Sets the frame style to the passed line widths. More... | |
void | Set (const Color &rColorPrim, const Color &rColorSecn, const Color &rColorGap, bool bUseGapColor, double nP, double nD, double nS) |
Sets the frame style to the passed line widths. More... | |
void | Set (const editeng::SvxBorderLine *pBorder, double fScale, sal_uInt16 nMaxWidth=SAL_MAX_UINT16) |
Sets the frame style to the passed SvxBorderLine struct. More... | |
void | SetRefMode (RefMode eRefMode) |
Sets a new reference point handling mode, does not modify other settings. More... | |
void | SetColorPrim (const Color &rColor) |
Sets a new color, does not modify other settings. More... | |
void | SetColorSecn (const Color &rColor) |
void | SetType (SvxBorderLineStyle nType) |
Sets whether to use dotted style for single hair lines. More... | |
Style & | MirrorSelf () |
Mirrors this style (exchanges primary and secondary), if it is a double frame style. More... | |
void | SetWordTableCell (bool bWordTableCell) |
Enables the Word-compatible Style comparison code. More... | |
bool | operator== (const Style &rOther) const |
bool | operator< (const Style &rOther) const |
Private Attributes | |
Color | maColorPrim |
Color | maColorSecn |
Color | maColorGap |
double | mfPrim |
double | mfDist |
Width of primary (single, left, or top) line. More... | |
double | mfSecn |
Distance between primary and secondary line. More... | |
double | mfPatternScale |
Width of secondary (right or bottom) line. More... | |
SvxBorderLineStyle | mnType |
Scale used for line pattern spacing. More... | |
RefMode | meRefMode |
bool | mbWordTableCell: 1 |
Reference point handling for this frame border. More... | |
bool | mbUseGapColor: 1 |
Contains the widths of primary and secondary line of a frame style.
In the following, "frame style" is a complete style of one frame border, i.e. the double line at the left side of the frame. A "line" is always a trivial single line, i.e. the first line of a double frame style.
The following states of the members of this struct are valid:
0 0 0 invisible >0 0 0 single >0 >0 >0 double
The behaviour of the member functions for other states is not defined.
Per definition the primary line in double frame styles is:
The following picture shows the upper end of a vertical double frame border.
|<---------------- GetWidth() ----------------->| | | |<----- mnPrim ----->||<- mnDist ->||<- mnSecn >| | || || | ###################### ############# ###################### ############# ###################### ############# ###################### ############# ###################### | ############# ###################### | ############# | |<- middle of the frame border
Definition at line 98 of file framelink.hxx.
|
inlineexplicit |
Constructs an invisible frame style.
Definition at line 170 of file framelink.hxx.
References svx::frame::Centered, mnType, and SOLID.
|
explicit |
Constructs a frame style with passed line widths.
Definition at line 34 of file framelink.cxx.
References Clear(), mfPatternScale, mnType, nType, and Set().
|
explicit |
Constructs a frame style with passed color and line widths.
Definition at line 42 of file framelink.cxx.
References Clear(), mfPatternScale, mnType, nType, and Set().
|
explicit |
Constructs a frame style from the passed SvxBorderLine struct.
Definition at line 50 of file framelink.cxx.
References Clear(), mfPatternScale, and Set().
void svx::frame::Style::Clear | ( | ) |
Sets the frame style to invisible state.
Definition at line 60 of file framelink.cxx.
References svx::frame::Centered, maColorGap, maColorPrim, maColorSecn, mbUseGapColor, mbWordTableCell, meRefMode, mfDist, mfPatternScale, mfPrim, mfSecn, and mnType.
Referenced by Set(), svx::FrameBorder::SetState(), and Style().
|
inline |
Definition at line 129 of file framelink.hxx.
Referenced by svx::FrameSelectorImpl::DrawAllFrameBorders(), operator<(), and operator==().
|
inline |
Definition at line 126 of file framelink.hxx.
Referenced by svx::FrameSelectorImpl::DrawAllFrameBorders(), and operator==().
|
inline |
Definition at line 124 of file framelink.hxx.
Referenced by svx::FrameSelectorImpl::DrawAllFrameBorders(), and operator==().
|
inline |
Definition at line 125 of file framelink.hxx.
Referenced by svx::FrameSelectorImpl::DrawAllFrameBorders(), and operator==().
|
inline |
Definition at line 123 of file framelink.hxx.
Referenced by operator==().
|
inline |
Returns the total width of this frame style.
Definition at line 139 of file framelink.hxx.
Referenced by operator<(), and Set().
|
inline |
Check if this style is used - this depends on it having any width definition.
As can be seen in the definition comment above, Prim() must be non zero to have a width
Definition at line 136 of file framelink.hxx.
Referenced by drawinglayer::primitive2d::SdrFrameBorderData::addSdrConnectStyleData(), svx::frame::Array::CreateB2DPrimitiveRange(), svx::frame::HelperCreateBLTREntry(), svx::frame::HelperCreateTLBREntry(), and svx::FrameBorder::SetCoreStyle().
Style & svx::frame::Style::MirrorSelf | ( | ) |
Mirrors this style (exchanges primary and secondary), if it is a double frame style.
Definition at line 162 of file framelink.cxx.
References svx::frame::Begin, svx::frame::Centered, svx::frame::End, maColorPrim, maColorSecn, meRefMode, mfPrim, and mfSecn.
bool svx::frame::Style::operator< | ( | const Style & | rOther | ) | const |
Definition at line 287 of file framelink.cxx.
References Dist(), GetWidth(), mbWordTableCell, Secn(), and Type().
bool svx::frame::Style::operator== | ( | const Style & | rOther | ) | const |
Definition at line 179 of file framelink.cxx.
References Dist(), GetColorGap(), GetColorPrim(), GetColorSecn(), GetRefMode(), Prim(), Secn(), Type(), and UseGapColor().
|
inline |
Definition at line 131 of file framelink.hxx.
Referenced by svx::FrameSelectorImpl::DrawAllFrameBorders().
|
inline |
Definition at line 128 of file framelink.hxx.
Referenced by svx::FrameSelectorImpl::DrawAllFrameBorders(), and operator==().
|
inline |
Definition at line 130 of file framelink.hxx.
Referenced by svx::FrameSelectorImpl::DrawAllFrameBorders(), operator<(), and operator==().
void svx::frame::Style::Set | ( | const Color & | rColorPrim, |
const Color & | rColorSecn, | ||
const Color & | rColorGap, | ||
bool | bUseGapColor, | ||
double | nP, | ||
double | nD, | ||
double | nS | ||
) |
Sets the frame style to the passed line widths.
Definition at line 89 of file framelink.cxx.
References maColorGap, maColorPrim, maColorSecn, mbUseGapColor, and Set().
void svx::frame::Style::Set | ( | const editeng::SvxBorderLine * | pBorder, |
double | fScale, | ||
sal_uInt16 | nMaxWidth = SAL_MAX_UINT16 |
||
) |
Sets the frame style to the passed SvxBorderLine struct.
If nullptr, resets the style
Definition at line 98 of file framelink.cxx.
References Clear(), editeng::SvxBorderLine::GetBorderLineStyle(), editeng::SvxBorderLine::GetColorGap(), editeng::SvxBorderLine::GetColorIn(), editeng::SvxBorderLine::GetColorOut(), editeng::SvxBorderLine::GetDistance(), editeng::SvxBorderLine::GetInWidth(), editeng::SvxBorderLine::GetOutWidth(), GetWidth(), editeng::SvxBorderLine::HasGapColor(), maColorGap, maColorPrim, maColorSecn, mbUseGapColor, mfDist, mfPatternScale, mfPrim, mfSecn, mnType, and Set().
void svx::frame::Style::Set | ( | double | nP, |
double | nD, | ||
double | nS | ||
) |
Sets the frame style to the passed line widths.
Definition at line 75 of file framelink.cxx.
References mfDist, mfPrim, and mfSecn.
Referenced by Set(), svx::FrameBorder::SetCoreStyle(), and Style().
|
inline |
Sets a new color, does not modify other settings.
Definition at line 153 of file framelink.hxx.
Referenced by svx::FrameBorder::SetUIColorPrim().
|
inline |
Definition at line 154 of file framelink.hxx.
Referenced by svx::FrameBorder::SetUIColorSecn().
|
inline |
Sets a new reference point handling mode, does not modify other settings.
Definition at line 151 of file framelink.hxx.
|
inline |
Sets whether to use dotted style for single hair lines.
Definition at line 156 of file framelink.hxx.
|
inline |
Enables the Word-compatible Style comparison code.
Definition at line 162 of file framelink.hxx.
|
inline |
Definition at line 132 of file framelink.hxx.
References mnType.
Referenced by svx::FrameSelectorImpl::DrawAllFrameBorders(), operator<(), and operator==().
|
inline |
Definition at line 127 of file framelink.hxx.
Referenced by svx::FrameSelectorImpl::DrawAllFrameBorders(), and operator==().
|
private |
Definition at line 103 of file framelink.hxx.
|
private |
Definition at line 101 of file framelink.hxx.
Referenced by Clear(), MirrorSelf(), and Set().
|
private |
Definition at line 102 of file framelink.hxx.
Referenced by Clear(), MirrorSelf(), and Set().
|
private |
Definition at line 111 of file framelink.hxx.
|
private |
Reference point handling for this frame border.
Definition at line 110 of file framelink.hxx.
Referenced by Clear(), and operator<().
|
private |
Definition at line 109 of file framelink.hxx.
Referenced by Clear(), and MirrorSelf().
|
private |
Width of primary (single, left, or top) line.
Definition at line 105 of file framelink.hxx.
|
private |
Width of secondary (right or bottom) line.
Definition at line 107 of file framelink.hxx.
|
private |
Definition at line 104 of file framelink.hxx.
Referenced by Clear(), MirrorSelf(), and Set().
|
private |
Distance between primary and secondary line.
Definition at line 106 of file framelink.hxx.
Referenced by Clear(), MirrorSelf(), and Set().
|
private |
Scale used for line pattern spacing.
Definition at line 108 of file framelink.hxx.