Kaydet (Commit) 00fda95a authored tarafından galbarnissan's avatar galbarnissan Kaydeden (comit) Norbert Thiebaud

fdo#85806: Hebrew and Arabic is not working on MAC

Change-Id: Id4476a041eb539d0b9c1227070289d34a939c6f6
Reviewed-on: https://gerrit.libreoffice.org/13288Reviewed-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
Tested-by: 's avatarNorbert Thiebaud <nthiebaud@gmail.com>
üst 9629322f
......@@ -217,7 +217,7 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
DeviceCoordinate nPixelWidth = 0;
if(rArgs.mpDXArray)
if(rArgs.mpDXArray && !(rArgs.mnFlags & SAL_LAYOUT_BIDI_RTL) )
{
nPixelWidth = rArgs.mpDXArray[ mnCharCount - 1 ];
if( nPixelWidth <= 0)
......@@ -231,18 +231,18 @@ void CTLayout::AdjustLayout( ImplLayoutArgs& rArgs )
mfTrailingSpaceWidth = nFullPixelWidth - nPixelWidth;
if( nPixelWidth <= 0)
return;
// in RTL-layouts trailing spaces are leftmost
// TODO: use BiDi-algorithm to thoroughly check this assumption
if( rArgs.mnFlags & SAL_LAYOUT_BIDI_RTL)
{
mfBaseAdv = mfTrailingSpaceWidth;
}
}
mfCachedWidth = nPixelWidth;
}
else
{
nPixelWidth = rArgs.mnLayoutWidth;
if( nPixelWidth <= 0 && rArgs.mnFlags & SAL_LAYOUT_BIDI_RTL)
{
nPixelWidth = GetTextWidth();
}
if( nPixelWidth <= 0)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment