LibreOffice Module sw (master) 1
|
Functions | |
sal_Int32 | GetModelPosition (const KernArray &rKernArray, sal_Int32 nLen, tools::Long nX) |
Get model position base on given kern array. More... | |
void | SpaceDistribution (KernArray &rKernArray, std::u16string_view aText, sal_Int32 nStt, sal_Int32 nLen, tools::Long nSpaceAdd, tools::Long nKern, bool bNoHalfSpace) |
Distribute space between words and letters. More... | |
tools::Long | SnapToGrid (KernArray &rKernArray, std::u16string_view aText, sal_Int32 nStt, sal_Int32 nLen, tools::Long nGridWidth, bool bForceLeft) |
Snap ideographs to text grids: a) Ideographic open brackets are aligned to the rightmost edge of spanned grids so that. More... | |
void | SnapToGridEdge (KernArray &rKernArray, sal_Int32 nLen, tools::Long nGridWidth, tools::Long nSpace, tools::Long nKern) |
Snap ideographs to text grids edge ( used when snap to char is off ): space will be distributed ( in case that alignment is set to justify. More... | |
SW_DLLPUBLIC sal_Int32 sw::Justify::GetModelPosition | ( | const KernArray & | rKernArray, |
sal_Int32 | nLen, | ||
tools::Long | nX | ||
) |
Get model position base on given kern array.
rKernArray | text positions from OutDev::GetTextArray(). |
nLen | number of elements to process in rKernArray. |
nX | the visual position |
Definition at line 77 of file justify.cxx.
Referenced by SwFntObj::GetModelPositionForViewPoint().
SW_DLLPUBLIC tools::Long sw::Justify::SnapToGrid | ( | KernArray & | rKernArray, |
std::u16string_view | aText, | ||
sal_Int32 | nStt, | ||
sal_Int32 | nLen, | ||
tools::Long | nGridWidth, | ||
bool | bForceLeft | ||
) |
Snap ideographs to text grids: a) Ideographic open brackets are aligned to the rightmost edge of spanned grids so that.
b) Ideographic close brackets, ideographic comma, and ideographic fullstop are aligned to the leftmost edge of spanned grids so that they can be closer to the previous ideograph. c) Other ideographs are aligned to the center of the spanned grids.
[in,out] | rKernArray | text positions from OutDev::GetTextArray(). |
aText | string used to determine where space and kern are inserted. | |
nStt | starting index of rText. | |
nLen | number of elements to process in rKernArray and rText. | |
nGridWidth | width of a text grid | |
bForceLeft | for align to the left edge of the grid disregard of the punctuation type. This is useful for calculate text width, line break, and conversion model position. |
Definition at line 176 of file justify.cxx.
References i, KernArray::set(), and KernArray::size().
Referenced by SwTextCursor::AdjustBaseLine(), SwTextFormatter::CalcRealHeight(), SwFntObj::DrawText(), SwFntObj::GetModelPositionForViewPoint(), SwFont::GetTextBreak(), and SwFntObj::GetTextSize().
SW_DLLPUBLIC void sw::Justify::SnapToGridEdge | ( | KernArray & | rKernArray, |
sal_Int32 | nLen, | ||
tools::Long | nGridWidth, | ||
tools::Long | nSpace, | ||
tools::Long | nKern | ||
) |
Snap ideographs to text grids edge ( used when snap to char is off ): space will be distributed ( in case that alignment is set to justify.
).
[in,out] | rKernArray | text positions from OutDev::GetTextArray(). |
nLen | number of elements to process in rKernArray and rText. | |
nGridWidth | width of a text grid | |
nSpace | amount of space distributed under justify text alignment mode. | |
nKern | letter spacing. |
Definition at line 216 of file justify.cxx.
References i, KernArray::set(), and KernArray::size().
Referenced by SwFntObj::DrawText(), SwFntObj::GetModelPositionForViewPoint(), SwFont::GetTextBreak(), and SwFntObj::GetTextSize().
SW_DLLPUBLIC void sw::Justify::SpaceDistribution | ( | KernArray & | rKernArray, |
std::u16string_view | aText, | ||
sal_Int32 | nStt, | ||
sal_Int32 | nLen, | ||
tools::Long | nSpaceAdd, | ||
tools::Long | nKern, | ||
bool | bNoHalfSpace | ||
) |
Distribute space between words and letters.
[in,out] | rKernArray | text positions from OutDev::GetTextArray(). |
aText | string used to determine where space and kern are inserted. | |
nStt | starting index of rText. | |
nLen | number of elements to process in rKernArray and rText. | |
nSpaceAdd | amount of space to insert for each CH_BLANK. | |
nKern | amount of space to insert between letters. | |
bNoHalfSpace | whether to split the space into two halves. Split spaces are inserted before and after CH_BLANK. Set to true in word line mode and for Arabic text to avoid splitting. |
Definition at line 101 of file justify.cxx.
References KernArray::adjust(), CH_BLANK, i, nValue, KernArray::set(), and KernArray::size().
Referenced by SwFntObj::DrawText().