summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svddrgmt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svddrgmt.cxx')
-rw-r--r--svx/source/svdraw/svddrgmt.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/svx/source/svdraw/svddrgmt.cxx b/svx/source/svdraw/svddrgmt.cxx
index 3348579bd508..a00528f61af8 100644
--- a/svx/source/svdraw/svddrgmt.cxx
+++ b/svx/source/svdraw/svddrgmt.cxx
@@ -2097,18 +2097,28 @@ bool SdrDragRotate::BeginSdrDrag()
{
SdrHdl* pH=GetHdlList().GetHdl(SdrHdlKind::Ref1);
- if (pH!=nullptr)
+ if (nullptr != pH)
{
Show();
DragStat().Ref1()=pH->GetPos();
nAngle0=GetAngle(DragStat().GetStart()-DragStat().GetRef1());
return true;
}
- else
+
+ // RotGrfFlyFrame: Support rotation around center *without* Ref1 (normally
+ // the rotation point)
+ const tools::Rectangle aLocalMarkRect(getSdrDragView().GetMarkedObjRect());
+
+ if(!aLocalMarkRect.IsEmpty())
{
- OSL_FAIL("SdrDragRotate::BeginSdrDrag(): No reference point handle found.");
- return false;
+ Show();
+ DragStat().Ref1() = aLocalMarkRect.Center();
+ nAngle0=GetAngle(DragStat().GetStart()-DragStat().GetRef1());
+ return true;
}
+
+ OSL_FAIL("SdrDragRotate::BeginSdrDrag(): No reference point handle found.");
+ return false;
}
basegfx::B2DHomMatrix SdrDragRotate::getCurrentTransformation()