summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2023-05-16 10:42:45 +0200
committerAndras Timar <andras.timar@collabora.com>2023-05-16 10:42:45 +0200
commit587bf295fc205b76b499f9782ddf6808770387b1 (patch)
tree792d9b260f831906bd535ffa9925ffa14ec85e87
parentBump version to 22.05.14.3 (diff)
downloadcore-587bf295fc205b76b499f9782ddf6808770387b1.tar.gz
core-587bf295fc205b76b499f9782ddf6808770387b1.zip
Revert "lok: sc: fix layout RTL mouse selection"
This reverts commit cdf604f95c132f0f88ce31b002d47d1abd731d50.
-rw-r--r--sc/source/ui/view/gridwin.cxx74
1 files changed, 3 insertions, 71 deletions
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 266790951ded..47370ee4f4a4 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -48,7 +48,6 @@
#include <vcl/weldutils.hxx>
#include <sot/formats.hxx>
#include <comphelper/classids.hxx>
-#include <comphelper/scopeguard.hxx>
#include <svx/drawitem.hxx>
#include <svx/svdview.hxx>
@@ -346,18 +345,6 @@ static bool lcl_GetHyperlinkCell(
return bFound;
}
-static void lcl_GetMirror(Point& rPoint, tools::Rectangle& rRect, const tools::Long nWidth)
-{
- tools::Long nLeft = rRect.Left();
- tools::Long nRight = rRect.Right();
- tools::Long nMirrorPX = o3tl::convert(nWidth, o3tl::Length::twip, o3tl::Length::px);
- tools::Long nMirrorMM = o3tl::convert(nWidth, o3tl::Length::twip, o3tl::Length::mm100);
-
- rPoint.setX(nMirrorPX - rPoint.X());
- rRect.SetLeft(nMirrorMM - nRight);
- rRect.SetRight(nMirrorMM - nLeft);
-}
-
// WB_DIALOGCONTROL needed for UNO-Controls
ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData& rData, ScSplitPos eWhichPos )
: DocWindow( pParent, WB_CLIPCHILDREN | WB_DIALOGCONTROL ),
@@ -1891,25 +1878,7 @@ void ScGridWindow::HandleMouseButtonDown( const MouseEvent& rMEvt, MouseEventSta
pScMod->SetInputMode( SC_INPUT_TABLE );
bEEMouse = true;
-
- if (comphelper::LibreOfficeKit::isActive() && rDoc.IsLayoutRTL(mrViewData.GetTabNo()))
- {
- Point aMouse = rMEvt.GetPosPixel();
- tools::Rectangle aOutputArea = pEditView->GetOutputArea();
- comphelper::ScopeGuard aOutputGuard(
- [pEditView, aOutputArea] {
- pEditView->SetOutputArea(aOutputArea);
- });
-
- lcl_GetMirror(aMouse, aOutputArea, mrViewData.getLOKVisibleArea().GetWidth());
- pEditView->SetOutputArea(aOutputArea);
-
- MouseEvent aEvent(aMouse, rMEvt.GetClicks(), rMEvt.GetMode(),
- rMEvt.GetButtons(), rMEvt.GetModifier());
- pEditView->MouseButtonDown( aEvent );
- }
- else
- pEditView->MouseButtonDown( rMEvt );
+ pEditView->MouseButtonDown( rMEvt );
return;
}
}
@@ -2170,25 +2139,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
SCCOL nEditCol;
SCROW nEditRow;
mrViewData.GetEditView( eWhich, pEditView, nEditCol, nEditRow );
-
- if (comphelper::LibreOfficeKit::isActive() && rDoc.IsLayoutRTL(mrViewData.GetTabNo()))
- {
- Point aMouse = rMEvt.GetPosPixel();
- tools::Rectangle aOutputArea = pEditView->GetOutputArea();
- comphelper::ScopeGuard aOutputGuard(
- [pEditView, aOutputArea] {
- pEditView->SetOutputArea(aOutputArea);
- });
-
- lcl_GetMirror(aMouse, aOutputArea, mrViewData.getLOKVisibleArea().GetWidth());
- pEditView->SetOutputArea(aOutputArea);
-
- MouseEvent aEvent(aMouse, rMEvt.GetClicks(), rMEvt.GetMode(),
- rMEvt.GetButtons(), rMEvt.GetModifier());
- pEditView->MouseButtonUp( aEvent );
- }
- else
- pEditView->MouseButtonUp( rMEvt );
+ pEditView->MouseButtonUp( rMEvt );
if ( rMEvt.IsMiddle() &&
GetSettings().GetMouseSettings().GetMiddleButtonAction() == MouseMiddleButtonAction::PasteSelection )
@@ -2681,26 +2632,7 @@ void ScGridWindow::MouseMove( const MouseEvent& rMEvt )
SCCOL nEditCol;
SCROW nEditRow;
mrViewData.GetEditView( eWhich, pEditView, nEditCol, nEditRow );
-
- if (comphelper::LibreOfficeKit::isActive() && mrViewData.GetDocument().IsLayoutRTL(mrViewData.GetTabNo()))
- {
- Point aMouse = rMEvt.GetPosPixel();
- tools::Rectangle aOutputArea = pEditView->GetOutputArea();
- comphelper::ScopeGuard aOutputGuard(
- [pEditView, aOutputArea] {
- pEditView->SetOutputArea(aOutputArea);
- });
-
- lcl_GetMirror(aMouse, aOutputArea, mrViewData.getLOKVisibleArea().GetWidth());
- pEditView->SetOutputArea(aOutputArea);
-
- MouseEvent aEvent(aMouse, rMEvt.GetClicks(), rMEvt.GetMode(),
- rMEvt.GetButtons(), rMEvt.GetModifier());
-
- pEditView->MouseMove( aEvent );
- }
- else
- pEditView->MouseMove( rMEvt );
+ pEditView->MouseMove( rMEvt );
return;
}