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, 19 insertions(+), 18 deletions(-)
New commits: commit 594182ce7c2551dd1d13a014cfdfd96a057e63de Author: Gulsah Kose <gulsah.1...@gmail.com> Date: Mon Aug 8 22:11:22 2016 +0300 tdf#73797 Enable object rotation (.uno:ToggleObjectRotateMode) for writer Change-Id: Ida868d0fc077d6697a0c3754b1add6a48c5d426c Signed-off-by: Gulsah Kose <gulsah.1...@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/27995 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: jan iversen <j...@documentfoundation.org> diff --git a/sw/sdi/_grfsh.sdi b/sw/sdi/_grfsh.sdi index bf8270c..36ba32c 100644 --- a/sw/sdi/_grfsh.sdi +++ b/sw/sdi/_grfsh.sdi @@ -87,6 +87,13 @@ 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 6b95420..523990f 100644 --- a/sw/sdi/drawsh.sdi +++ b/sw/sdi/drawsh.sdi @@ -217,14 +217,6 @@ 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 a0b3b35..e62b324 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -422,16 +422,6 @@ 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 db91663..dd64d13 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -840,6 +840,15 @@ 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; @@ -908,6 +917,7 @@ 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 4db30e8..396f035 100644 --- a/sw/uiconfig/swriter/toolbar/standardbar.xml +++ b/sw/uiconfig/swriter/toolbar/standardbar.xml @@ -39,6 +39,8 @@ <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/> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits