diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-09-29 12:35:44 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-10-20 14:13:24 +0200 |
commit | 93f5800e181372d3e5f02c825fd3b09f2756cac7 (patch) | |
tree | 2771a723cd2f23258fc7402bd3da40b05c5ec079 /sw | |
parent | 73360bdf0b60370c76d9669502c2b0e5a9d4e504 (diff) |
RotGrfFlyFrame: Corrected position for CropHandles
Position was taken from OuterBound FlyFrame, even in current
master which is wrong. There can be a distance defined between
InnerBound and OuterBound that has to be taken into account
Change-Id: Id88f99c0b218bd26fa1daa5e8215eced00c0baa6
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/draw/dflyobj.cxx | 15 | ||||
-rw-r--r-- | sw/uiconfig/swriter/toolbar/graphicobjectbar.xml | 2 | ||||
-rw-r--r-- | sw/uiconfig/swxform/toolbar/graphicobjectbar.xml | 4 |
3 files changed, 11 insertions, 10 deletions
diff --git a/sw/source/core/draw/dflyobj.cxx b/sw/source/core/draw/dflyobj.cxx index 358085bd2760..6a21d0eb9d71 100644 --- a/sw/source/core/draw/dflyobj.cxx +++ b/sw/source/core/draw/dflyobj.cxx @@ -48,6 +48,7 @@ #include "pagefrm.hxx" #include "rootfrm.hxx" #include "wrtsh.hxx" +#include <ndgrf.hxx> #include <svx/sdr/properties/defaultproperties.hxx> #include <basegfx/range/b2drange.hxx> @@ -958,10 +959,10 @@ SdrObject* SwVirtFlyDrawObj::getFullDragClone() const if(0 != nRotation) { const double fRotate(static_cast< double >(-nRotation) * (M_PI/1800.0)); - const tools::Rectangle aOutRect(GetFlyFrame()->Frame().SVRect()); + const tools::Rectangle aTmpOutRect(GetFlyFrame()->Frame().SVRect()); const basegfx::B2DRange aTargetRange( - aOutRect.Left(), aOutRect.Top(), - aOutRect.Right(), aOutRect.Bottom()); + aTmpOutRect.Left(), aTmpOutRect.Top(), + aTmpOutRect.Right(), aTmpOutRect.Bottom()); const basegfx::B2DHomMatrix aTargetTransform( basegfx::utils::createRotateAroundCenterKeepAspectRatioStayInsideRange( aTargetRange, @@ -979,10 +980,10 @@ void SwVirtFlyDrawObj::addCropHandles(SdrHdlList& rTarget) const // RotGrfFlyFrame: Adapt to possible rotated Graphic contained in FlyFrame if(GetFlyFrame()->Frame().HasArea()) { - const tools::Rectangle aOutRect(GetFlyFrame()->Frame().SVRect()); - const basegfx::B2DRange aTargetRange( - aOutRect.Left(), aOutRect.Top(), - aOutRect.Right(), aOutRect.Bottom()); + // Use InnerBound, OuterBound (same as GetFlyFrame()->Frame().SVRect()) + // may have a distance to InnerBound which needs to be taken into acocunt. + // The Graphic is mapped to InnerBound, as is the rotated Graphic. + const basegfx::B2DRange aTargetRange(getInnerBound()); if(!aTargetRange.isEmpty()) { diff --git a/sw/uiconfig/swriter/toolbar/graphicobjectbar.xml b/sw/uiconfig/swriter/toolbar/graphicobjectbar.xml index 172d8b4d52b5..c1ba2219af1b 100644 --- a/sw/uiconfig/swriter/toolbar/graphicobjectbar.xml +++ b/sw/uiconfig/swriter/toolbar/graphicobjectbar.xml @@ -29,7 +29,7 @@ <toolbar:toolbaritem xlink:href=".uno:RotateLeft"/> <toolbar:toolbaritem xlink:href=".uno:RotateRight"/> <toolbar:toolbaritem xlink:href=".uno:Rotate180" toolbar:visible="false"/> - <toolbar:toolbaritem xlink:href=".uno:RotateReset"/> + <toolbar:toolbaritem xlink:href=".uno:RotateReset" toolbar:visible="false"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:GrafTransparence"/> <toolbar:toolbarseparator/> diff --git a/sw/uiconfig/swxform/toolbar/graphicobjectbar.xml b/sw/uiconfig/swxform/toolbar/graphicobjectbar.xml index 6e2c6a2b4823..19662053bc76 100644 --- a/sw/uiconfig/swxform/toolbar/graphicobjectbar.xml +++ b/sw/uiconfig/swxform/toolbar/graphicobjectbar.xml @@ -30,8 +30,8 @@ <toolbar:toolbaritem xlink:href=".uno:FlipHorizontal"/> <toolbar:toolbaritem xlink:href=".uno:RotateLeft"/> <toolbar:toolbaritem xlink:href=".uno:RotateRight"/> - <toolbar:toolbaritem xlink:href=".uno:Rotate180"/> - <toolbar:toolbaritem xlink:href=".uno:RotateReset"/> + <toolbar:toolbaritem xlink:href=".uno:Rotate180" toolbar:visible="false"/> + <toolbar:toolbaritem xlink:href=".uno:RotateReset" toolbar:visible="false"/> <toolbar:toolbaritem xlink:href=".uno:Crop"/> <toolbar:toolbarseparator/> <toolbar:toolbaritem xlink:href=".uno:FrameDialog"/> |