summaryrefslogtreecommitdiff
path: root/sdext/source/presenter/PresenterSlideSorter.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source/presenter/PresenterSlideSorter.cxx')
-rw-r--r--sdext/source/presenter/PresenterSlideSorter.cxx26
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)