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

SdrMarkView::SetMarkHandles: perform the mm100 -> twip conversion on a copy

Otherwise the position of the mark handles will depend on if we do tiled
rendering or not, which is not wanted.

Change-Id: Id415aa75977bb0224866ad0defc3c256357c366f
üst 78dee9c4
......@@ -706,9 +706,10 @@ void SdrMarkView::SetMarkHandles()
if (GetModel()->isTiledRendering())
{
OString sRectangle;
if (aRect.IsEmpty())
sRectangle = "EMPTY";
Rectangle aSelection(aRect);
OString sSelection;
if (aSelection.IsEmpty())
sSelection = "EMPTY";
else
{
// In case the map mode is in 100th MM, then need to convert the coordinates over to twips for LOK.
......@@ -717,13 +718,13 @@ void SdrMarkView::SetMarkHandles()
if (OutputDevice* pOutputDevice = pMarkedPV->GetView().GetFirstOutputDevice())
{
if (pOutputDevice->GetMapMode().GetMapUnit() == MAP_100TH_MM)
aRect = OutputDevice::LogicToLogic(aRect, MAP_100TH_MM, MAP_TWIP);
aSelection = OutputDevice::LogicToLogic(aSelection, MAP_100TH_MM, MAP_TWIP);
}
}
sRectangle = aRect.toString();
sSelection = aSelection.toString();
}
GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, sRectangle.getStr());
GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, sSelection.getStr());
}
if (bFrmHdl)
......
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