Kaydet (Commit) 465d3076 authored tarafından jan iversen's avatar jan iversen

Revert "tdf#73797 Enable object rotation (.uno:ToggleObjectRotateMode) for writer"

This reverts commit 594182ce.

Change-Id: Idf2580e84d4190ba0aaba1a3394a4318043da458
Reviewed-on: https://gerrit.libreoffice.org/28858Reviewed-by: 's avatarjan iversen <jani@documentfoundation.org>
Tested-by: 's avatarjan iversen <jani@documentfoundation.org>
üst 2546ca9d
......@@ -87,13 +87,6 @@ interface BaseTextGraphic
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_OBJECT_ROTATE
[
ExecMethod = ExecuteRotation ;
StateMethod = GetAttrStateForRotation ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_OBJECT_CROP
[
ExecMethod = Execute ;
......
......@@ -217,6 +217,14 @@ interface TextDraw : TextDrawBase
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_OBJECT_ROTATE
[
Export = FALSE;
ExecMethod = Execute ;
StateMethod = GetState ;
DisableFlags="SW_DISABLE_ON_PROTECTED_CURSOR";
]
SID_BEZIER_EDIT
[
Export = FALSE;
......
......@@ -422,6 +422,16 @@ void SwDrawShell::GetState(SfxItemSet& rSet)
rSet.DisableItem( nWhich );
break;
case SID_OBJECT_ROTATE:
{
const bool bIsRotate = GetView().IsDrawRotate();
if ( (!bIsRotate && !pSdrView->IsRotateAllowed()) || bProtected )
rSet.DisableItem( nWhich );
else
rSet.Put( SfxBoolItem( nWhich, bIsRotate ) );
}
break;
case SID_BEZIER_EDIT:
if (!Disable(rSet, nWhich))
rSet.Put( SfxBoolItem( nWhich, !GetView().IsDrawSelMode()));
......
......@@ -840,15 +840,6 @@ void SwGrfShell::ExecuteRotation(SfxRequest &rReq)
SwWrtShell& rShell = GetShell();
if (rReq.GetSlot() == SID_OBJECT_ROTATE)
{
if (GetView().IsDrawRotate())
rShell.SetDragMode(SdrDragMode::Move);
else
rShell.SetDragMode(SdrDragMode::Rotate);
GetView().FlipDrawRotate();
}
if (rReq.GetSlot() == SID_ROTATE_GRAPHIC_LEFT)
{
aRotation = 900;
......@@ -917,7 +908,6 @@ void SwGrfShell::GetAttrStateForRotation(SfxItemSet &rSet)
bool bDisable = bIsParentContentProtected;
switch( nWhich )
{
case SID_OBJECT_ROTATE:
case SID_ROTATE_GRAPHIC_LEFT:
case SID_ROTATE_GRAPHIC_RIGHT:
if( rShell.GetGraphicType() == GraphicType::NONE )
......
......@@ -39,8 +39,6 @@
<toolbar:toolbaritem xlink:href=".uno:Paste" toolbar:helpid="5712"/>
<toolbar:toolbaritem xlink:href=".uno:FormatPaintbrush" toolbar:helpid="5715"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:ToggleObjectRotateMode"/>
<toolbar:toolbarseparator/>
<toolbar:toolbaritem xlink:href=".uno:Undo" toolbar:helpid="5701"/>
<toolbar:toolbaritem xlink:href=".uno:Redo" toolbar:helpid="5700"/>
<toolbar:toolbarseparator/>
......
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