diff options
Diffstat (limited to 'sw/source/core/txtnode/justify.hxx')
-rw-r--r-- | sw/source/core/txtnode/justify.hxx | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/sw/source/core/txtnode/justify.hxx b/sw/source/core/txtnode/justify.hxx index e98ecb5216c2..5a4c08b3da28 100644 --- a/sw/source/core/txtnode/justify.hxx +++ b/sw/source/core/txtnode/justify.hxx @@ -25,6 +25,24 @@ namespace Justify SW_DLLPUBLIC void SpaceDistribution(std::vector<sal_Int32>& rKernArray, const OUString& rText, sal_Int32 nStt, sal_Int32 nLen, tools::Long nSpaceAdd, tools::Long nKern, bool bNoHalfSpace); + +/// Snap ideographs to text grids: +/// a) Ideographic open brackets are aligned to the rightmost edge of spanned grids so that +// they can be closer to the next ideograph. +/// b) Ideographic close brackets, ideogrpahic comma, and idographic 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 spnaned grids. +/// @param[in,out] rKernArray text positions from OutDev::GetTextArray(). +/// @param rText string used to determine where space and kern are inserted. +/// @param nStt starting index of rText. +/// @param nLen number of elements to process in rKernArray and rText. +/// @param nGirdWidth width of a text gird +/// @param nWidth width of the whole portion. +/// @return the delta offset of first glyph so text origin can be updated accordingly. +SW_DLLPUBLIC tools::Long SnapToGrid(std::vector<sal_Int32>& rKernArray, const OUString& rText, + sal_Int32 nStt, sal_Int32 nLen, tools::Long nGridWidth, + tools::Long nWidth); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |