[Libreoffice-commits] core.git: canvas/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 8 23:29:01 UTC 2018


 canvas/source/directx/dx_textlayout.cxx            |    3 ++-
 canvas/source/directx/dx_textlayout_drawhelper.cxx |    6 ++++--
 canvas/source/directx/dx_textlayout_drawhelper.hxx |    3 ++-
 3 files changed, 8 insertions(+), 4 deletions(-)

New commits:
commit d9ad59da50c1172fe98f94370221c9c1b688200a
Author:     Mark Hung <marklh9 at gmail.com>
AuthorDate: Sat Oct 6 15:12:29 2018 +0800
Commit:     Mark Hung <marklh9 at gmail.com>
CommitDate: Tue Oct 9 01:28:37 2018 +0200

    tdf#55361 fix result of showing RTL text in the animation.
    
    Call drawTextArray with SalLayoutFlags::BiDiRTL if the
    text direction of a TextLayout is RTL.
    
    Change-Id: I1a3bfaee5521eea77b44350c21c104cbf72fac97
    Reviewed-on: https://gerrit.libreoffice.org/61460
    Tested-by: Jenkins
    Reviewed-by: Mark Hung <marklh9 at gmail.com>

diff --git a/canvas/source/directx/dx_textlayout.cxx b/canvas/source/directx/dx_textlayout.cxx
index 16e2dc09129e..ff62ee5e0b80 100644
--- a/canvas/source/directx/dx_textlayout.cxx
+++ b/canvas/source/directx/dx_textlayout.cxx
@@ -207,7 +207,8 @@ namespace dxcanvas
             maLogicalAdvancements,
             mpFont.get(),
             mpFont->getFontMatrix(),
-            bAlphaSurface);
+            bAlphaSurface,
+            mnTextDirection != 0);
 
         return true;
     }
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.cxx b/canvas/source/directx/dx_textlayout_drawhelper.cxx
index 3b1246cf15c9..f4d51e9d8d73 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.cxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.cxx
@@ -68,7 +68,8 @@ namespace dxcanvas
         const css::uno::Reference<
             css::rendering::XCanvasFont >&     rCanvasFont,
         const css::geometry::Matrix2D&         rFontMatrix,
-        bool                                   bAlphaSurface )
+        bool                                   bAlphaSurface,
+        bool bIsRTL)
     {
         HDC hdc = rGraphics->GetHDC();
 
@@ -209,7 +210,8 @@ namespace dxcanvas
                                               aText,
                                               pDXArray.get(),
                                               rText.StartPosition,
-                                              rText.Length );
+                                              rText.Length,
+                                              bIsRTL ? SalLayoutFlags::BiDiRtl : SalLayoutFlags::NONE);
             }
             else
             {
diff --git a/canvas/source/directx/dx_textlayout_drawhelper.hxx b/canvas/source/directx/dx_textlayout_drawhelper.hxx
index 4bb82ec7c716..897d7eb1c727 100644
--- a/canvas/source/directx/dx_textlayout_drawhelper.hxx
+++ b/canvas/source/directx/dx_textlayout_drawhelper.hxx
@@ -57,7 +57,8 @@ namespace dxcanvas
                        const css::uno::Reference<
                                css::rendering::XCanvasFont >&  rCanvasFont,
                        const css::geometry::Matrix2D&          rFontMatrix,
-                       bool                                                 bAlphaSurface );
+                       bool                                                 bAlphaSurface,
+                       bool bIsRTL);
 
         css::geometry::RealRectangle2D queryTextBounds(
             const css::rendering::StringContext&   rText,


More information about the Libreoffice-commits mailing list