diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-24 16:04:55 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-03-30 09:23:43 +0200 |
commit | e7cf3c046d5ce7e2ecc3a031e5eb7835b381f716 (patch) | |
tree | b710193321069c6ead3751211eee58d5ae38f701 /svx/source | |
parent | 78dee9c45d50dd1f1d2f6d6d34e1a6ab1052ca4d (diff) |
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
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/svdraw/svdmrkv.cxx | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx index 03bc2fbce6a2..6adfa2f0f2b1 100644 --- a/svx/source/svdraw/svdmrkv.cxx +++ b/svx/source/svdraw/svdmrkv.cxx @@ -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) |