From a42b0985c7619efdc934bb1cf19e5e2c2b6faea2 Mon Sep 17 00:00:00 2001 From: Armin Le Grand Date: Fri, 22 Sep 2017 15:28:33 +0200 Subject: RotGrfFlyFrame: Initial adaptions To allow free rotation of Graphic FlyFrames in Writer, several adaptions are necessary. This change takes care of all needed changes to internally support a freely definable rotation angle for that case. Save/Load round trip is working, the graphic does no longer get modified and added in 90-degree-changed state to the object, the original will be preserved. Support for needed slot in core/ui is implemented. Rotation can be applied from Menus/Toolbars in the known 90/180 degree steps. Added a slot/Button/command to reset rotation in these cases. Added support in Sidebar to rotate using the rotation wheel and/or numeric field. These fields and support added to Image TabPage, too, fully functional. Missing now is a solution for displaying the rotated Graphic. For now, it just gets rotated, but this will not be the final state of this change. Change-Id: I6f3b85ebb5be2b4ad3311c536d54f27a37a494e7 RotGrfFlyFrame: Linux build adaptions Change-Id: I365287ecd6525b1972e8436d61332f7121d88649 --- sw/source/uibase/frmdlg/frmmgr.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'sw/source/uibase/frmdlg/frmmgr.cxx') diff --git a/sw/source/uibase/frmdlg/frmmgr.cxx b/sw/source/uibase/frmdlg/frmmgr.cxx index 73df037c9fdf..fdc883b6a22a 100644 --- a/sw/source/uibase/frmdlg/frmmgr.cxx +++ b/sw/source/uibase/frmdlg/frmmgr.cxx @@ -41,6 +41,7 @@ #include #include #include +#include using namespace ::com::sun::star; @@ -568,6 +569,16 @@ void SwFlyFrameAttrMgr::SetHeightSizeType( SwFrameSize eType ) m_aSet.Put( aSize ); } +void SwFlyFrameAttrMgr::SetRotation(sal_uInt32 nOld, sal_uInt32 nNew, Size aUnrotatedSize) +{ + // RotGrfFlyFrame: Central handling of real change of rotation here. Adaption of pos/size + // may be wanted in the future + if(nOld != nNew) + { + m_pOwnSh->SetAttrItem(SwRotationGrf(static_cast(nNew), aUnrotatedSize)); + } +} + void SwFlyFrameAttrMgr::SetSize( const Size& rSize ) { SwFormatFrameSize aSize( GetFrameSize() ); -- cgit