summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uiview')
-rw-r--r--sw/source/uibase/uiview/view0.cxx8
-rw-r--r--sw/source/uibase/uiview/viewdraw.cxx14
2 files changed, 22 insertions, 0 deletions
diff --git a/sw/source/uibase/uiview/view0.cxx b/sw/source/uibase/uiview/view0.cxx
index dab7f898fe51..a3ed716038da 100644
--- a/sw/source/uibase/uiview/view0.cxx
+++ b/sw/source/uibase/uiview/view0.cxx
@@ -371,6 +371,9 @@ void SwView::StateViewOptions(SfxItemSet &rSet)
case FN_BOOKVIEW:
aBool.SetValue( pOpt->IsViewLayoutBookMode());
break;
+ case SID_CLICK_CHANGE_ROTATION:
+ aBool.SetValue( pOpt->IsClickChangeRotation());
+ break;
}
if( nWhich )
@@ -734,6 +737,11 @@ void SwView::ExecViewOptions(SfxRequest &rReq)
pOpt->SetViewLayoutColumns( 2 );
pOpt->SetViewLayoutBookMode( true );
break;
+ case SID_CLICK_CHANGE_ROTATION:
+ if( STATE_TOGGLE == eState )
+ bFlag = !pOpt->IsClickChangeRotation();
+ pOpt->SetClickChangeRotation(bFlag);
+ break;
default:
OSL_FAIL("wrong request method");
diff --git a/sw/source/uibase/uiview/viewdraw.cxx b/sw/source/uibase/uiview/viewdraw.cxx
index 0a82e404f331..99c68eb0c132 100644
--- a/sw/source/uibase/uiview/viewdraw.cxx
+++ b/sw/source/uibase/uiview/viewdraw.cxx
@@ -448,6 +448,20 @@ void SwView::NoRotate()
}
}
+void SwView::ToggleRotate()
+{
+ if (m_pWrtShell->GetSelectedObjCount() &&
+ m_pWrtShell->GetDrawView()->IsRotateAllowed())
+ {
+ if (IsDrawRotate())
+ m_pWrtShell->SetDragMode(SdrDragMode::Move);
+ else
+ m_pWrtShell->SetDragMode(SdrDragMode::Rotate);
+
+ FlipDrawRotate();
+ }
+}
+
// Enable DrawTextEditMode
static bool lcl_isTextBox(SdrObject const * pObject)