diff options
author | Faisal M. Al-Otaibi <fmalotaibi@kacst.edu.sa> | 2012-11-14 10:28:17 +0300 |
---|---|---|
committer | Andras Timar <atimar@suse.com> | 2012-11-20 19:27:03 +0000 |
commit | 5e5c11c664f67ff9fd1120905b09a32bea3b2f6c (patch) | |
tree | 19bc454e7380d01848feec6f99eb53170f2cd0f0 /sdext/source/presenter/PresenterSlideSorter.cxx | |
parent | 4012983def85bd75e7b611bd8e4fa636817dbb01 (diff) |
fdo#42070-Fix RTL support in presenter console
Problems that still exist:
1-Help layout.
2-Slide sorter view (slides alignment).
3-Note view buttons.
4-Scroll bars.
Change-Id: Ie78519358d2f6d847692ee870ecdc1790c5244e6
Reviewed-on: https://gerrit.libreoffice.org/1053
Tested-by: Lior Kaplan <kaplanlior@gmail.com>
Reviewed-by: Andras Timar <atimar@suse.com>
Tested-by: Andras Timar <atimar@suse.com>
Diffstat (limited to 'sdext/source/presenter/PresenterSlideSorter.cxx')
-rw-r--r-- | sdext/source/presenter/PresenterSlideSorter.cxx | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/sdext/source/presenter/PresenterSlideSorter.cxx b/sdext/source/presenter/PresenterSlideSorter.cxx index cc00c0960482..6c5d75da837a 100644 --- a/sdext/source/presenter/PresenterSlideSorter.cxx +++ b/sdext/source/presenter/PresenterSlideSorter.cxx @@ -17,6 +17,8 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ +#include "vcl/svapp.hxx" + #include "PresenterSlideSorter.hxx" #include "PresenterButton.hxx" #include "PresenterCanvasHelper.hxx" @@ -512,14 +514,26 @@ void SAL_CALL PresenterSlideSorter::windowPaint (const css::awt::PaintEvent& rEv void SAL_CALL PresenterSlideSorter::mousePressed (const css::awt::MouseEvent& rEvent) throw(css::uno::RuntimeException) { - const geometry::RealPoint2D aPosition (rEvent.X, rEvent.Y); + css::awt::MouseEvent rTemp =rEvent; + /// check whether RTL interface or not + if(Application::GetSettings().GetLayoutRTL()){ + awt::Rectangle aBox = mxWindow->getPosSize(); + rTemp.X=aBox.Width-rEvent.X; + } + const geometry::RealPoint2D aPosition(rTemp.X, rEvent.Y); mnSlideIndexMousePressed = mpLayout->GetSlideIndexForPosition(aPosition); } void SAL_CALL PresenterSlideSorter::mouseReleased (const css::awt::MouseEvent& rEvent) throw(css::uno::RuntimeException) { - const geometry::RealPoint2D aPosition (rEvent.X, rEvent.Y); + css::awt::MouseEvent rTemp =rEvent; + /// check whether RTL interface or not + if(Application::GetSettings().GetLayoutRTL()){ + awt::Rectangle aBox = mxWindow->getPosSize(); + rTemp.X=aBox.Width-rEvent.X; + } + const geometry::RealPoint2D aPosition(rTemp.X, rEvent.Y); const sal_Int32 nSlideIndex (mpLayout->GetSlideIndexForPosition(aPosition)); if (nSlideIndex == mnSlideIndexMousePressed && mnSlideIndexMousePressed >= 0) @@ -563,7 +577,13 @@ void SAL_CALL PresenterSlideSorter::mouseMoved (const css::awt::MouseEvent& rEve { if (mpMouseOverManager.get() != NULL) { - const geometry::RealPoint2D aPosition (rEvent.X, rEvent.Y); + css::awt::MouseEvent rTemp =rEvent; + /// check whether RTL interface or not + if(Application::GetSettings().GetLayoutRTL()){ + awt::Rectangle aBox = mxWindow->getPosSize(); + rTemp.X=aBox.Width-rEvent.X; + } + const geometry::RealPoint2D aPosition(rTemp.X, rEvent.Y); sal_Int32 nSlideIndex (mpLayout->GetSlideIndexForPosition(aPosition)); if (nSlideIndex < 0) |