summaryrefslogtreecommitdiff
path: root/editeng
diff options
context:
space:
mode:
authorTamás Zolnai <tamas.zolnai@collabora.com>2017-04-23 16:14:23 +0200
committerTamás Zolnai <tamas.zolnai@collabora.com>2017-04-23 18:28:12 +0200
commitc0d09cc0e7ee12ac6dcc144e06855ba4621e4144 (patch)
treef200e24fadd32a73e2f864e8b5ce2dde88faa18d /editeng
parent8c46185bf28f61e674186694e4944c1f8b3a9c00 (diff)
Fix mouse position conversion in case of BottomToTop text
Change-Id: Ib058e44a1480013ce924585d8950534d0f3fc5a4 Reviewed-on: https://gerrit.libreoffice.org/36834 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
Diffstat (limited to 'editeng')
-rw-r--r--editeng/source/editeng/editeng.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx
index 33e04c4961c3..8dfa3a1220d9 100644
--- a/editeng/source/editeng/editeng.cxx
+++ b/editeng/source/editeng/editeng.cxx
@@ -1926,8 +1926,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;
}