[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - editeng/source

Tamás Zolnai tamas.zolnai at collabora.com
Mon Apr 24 18:02:31 UTC 2017


 editeng/source/editeng/editeng.cxx |   12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

New commits:
commit 64d917906565bba657238b09b42735859f26c448
Author: Tamás Zolnai <tamas.zolnai at collabora.com>
Date:   Sun Apr 23 16:14:23 2017 +0200

    Fix mouse position conversion in case of BottomToTop text
    
    Change-Id: Ib058e44a1480013ce924585d8950534d0f3fc5a4
    Reviewed-on: https://gerrit.libreoffice.org/36834
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tamás Zolnai <tamas.zolnai at collabora.com>
    (cherry picked from commit c0d09cc0e7ee12ac6dcc144e06855ba4621e4144)
    Reviewed-on: https://gerrit.libreoffice.org/36888
    Reviewed-by: Andras Timar <andras.timar at collabora.com>
    Tested-by: Andras Timar <andras.timar at collabora.com>

diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 5f88c0e36a10..0accd5a69303 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1916,8 +1916,16 @@ Point EditEngine::GetDocPos( const Point& rPaperPos ) const
     Point aDocPos( rPaperPos );
     if ( IsVertical() )
     {
-        aDocPos.X() = rPaperPos.Y();
-        aDocPos.Y() = GetPaperSize().Width() - rPaperPos.X();
+        if ( IsTopToBottom() )
+        {
+            aDocPos.X() = rPaperPos.Y();
+            aDocPos.Y() = GetPaperSize().Width() - rPaperPos.X();
+        }
+        else
+        {
+            aDocPos.X() = rPaperPos.Y();
+            aDocPos.Y() = rPaperPos.X();
+        }
     }
     return aDocPos;
 }


More information about the Libreoffice-commits mailing list