summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgalbarnissan <gal.bar.nissan@cloudon.com>2014-12-03 11:55:31 +0200
committerTor Lillqvist <tml@collabora.com>2014-12-03 15:49:39 +0200
commit2f95a5f5b1564cc115f007403869741608ae2c01 (patch)
tree621270db3a21e78566ab90db5e4409cee685008e
parentd0b24883c2189f77982d64e481061d9ce430fed5 (diff)
fdo#85806: Hebrew and Arabic is not working on MAC
Change-Id: Id4476a041eb539d0b9c1227070289d34a939c6f6 Reviewed-on: https://gerrit.libreoffice.org/13288 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
-rw-r--r--vcl/quartz/ctlayout.cxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/vcl/quartz/ctlayout.cxx b/vcl/quartz/ctlayout.cxx
index 759b3f5339b5..5803976b05b8 100644
--- a/vcl/quartz/ctlayout.cxx
+++ b/vcl/quartz/ctlayout.cxx
@@ -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;