Kaydet (Commit) 2bfd1c7d authored tarafından Miklos Vajna's avatar Miklos Vajna

vcl lok: fix scrollbar to accept mouse events in twips

(cherry picked from commit 43976548)

Conflicts:
	vcl/source/control/scrbar.cxx

Change-Id: Ieaedaa525d613f8ba55f336c613da163a09f7a33
üst 90a46a80
......@@ -897,7 +897,19 @@ void ScrollBar::MouseButtonDown( const MouseEvent& rMEvt )
if (rMEvt.IsLeft() || rMEvt.IsMiddle() || rMEvt.IsRight())
{
const Point& rMousePos = rMEvt.GetPosPixel();
Point aPosPixel;
if (!IsMapModeEnabled() && GetMapMode().GetMapUnit() == MAP_TWIP)
{
// rMEvt coordinates are in twips.
Push(PushFlags::MAPMODE);
EnableMapMode();
MapMode aMapMode = GetMapMode();
aMapMode.SetOrigin(Point(0, 0));
SetMapMode(aMapMode);
aPosPixel = LogicToPixel(rMEvt.GetPosPixel());
Pop();
}
const Point& rMousePos = (GetMapMode().GetMapUnit() != MAP_TWIP ? rMEvt.GetPosPixel() : aPosPixel);
sal_uInt16 nTrackFlags = 0;
bool bHorizontal = ( GetStyle() & WB_HORZ ) != 0;
bool bIsInside = false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment