From 465d3076835d88972d99c92b9b518a0e1762fea2 Mon Sep 17 00:00:00 2001 From: jan iversen Date: Tue, 13 Sep 2016 09:14:23 +0000 Subject: Revert "tdf#73797 Enable object rotation (.uno:ToggleObjectRotateMode) for writer" This reverts commit 594182ce7c2551dd1d13a014cfdfd96a057e63de. Change-Id: Idf2580e84d4190ba0aaba1a3394a4318043da458 Reviewed-on: https://gerrit.libreoffice.org/28858 Reviewed-by: jan iversen Tested-by: jan iversen --- sw/sdi/_grfsh.sdi | 7 ------- sw/sdi/drawsh.sdi | 8 ++++++++ sw/source/uibase/shells/drawsh.cxx | 10 ++++++++++ sw/source/uibase/shells/grfsh.cxx | 10 ---------- sw/uiconfig/swriter/toolbar/standardbar.xml | 2 -- 5 files changed, 18 insertions(+), 19 deletions(-) diff --git a/sw/sdi/_grfsh.sdi b/sw/sdi/_grfsh.sdi index 36ba32cbda00..bf8270c74bef 100644 --- a/sw/sdi/_grfsh.sdi +++ b/sw/sdi/_grfsh.sdi @@ -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 ; diff --git a/sw/sdi/drawsh.sdi b/sw/sdi/drawsh.sdi index 523990f26896..6b9542033d60 100644 --- a/sw/sdi/drawsh.sdi +++ b/sw/sdi/drawsh.sdi @@ -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; diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx index e62b324293ed..a0b3b3504613 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -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())); diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index dd64d1346ca3..db916633f505 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -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 ) diff --git a/sw/uiconfig/swriter/toolbar/standardbar.xml b/sw/uiconfig/swriter/toolbar/standardbar.xml index 396f035b0bd8..4db30e8e712b 100644 --- a/sw/uiconfig/swriter/toolbar/standardbar.xml +++ b/sw/uiconfig/swriter/toolbar/standardbar.xml @@ -39,8 +39,6 @@ - - -- cgit v1.2.3