From c31afc3624224b926069e87ad13c14f8cc9d63ce Mon Sep 17 00:00:00 2001 From: Justin Luth Date: Mon, 15 Feb 2016 17:57:36 +0300 Subject: tdf#82012 - keep flip settings when compressing image MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Format - flip - Horizontal/Vertical setting was lost when compressing an image. Change-Id: Id39e7ce9a82174ac2248851107e398979fba56aa Reviewed-on: https://gerrit.libreoffice.org/22385 Tested-by: Jenkins Reviewed-by: Justin Luth Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- sw/source/uibase/shells/grfsh.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 901d9c4cfee0..cbd82f15aec1 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -151,8 +151,9 @@ void SwGrfShell::Execute(SfxRequest &rReq) convertTwipToMm100(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Width()), convertTwipToMm100(rSh.GetAnyCurRect(RECT_FLY_EMBEDDED).Height())); - SfxItemSet aSet( rSh.GetAttrPool(), RES_GRFATR_CROPGRF, RES_GRFATR_CROPGRF ); + SfxItemSet aSet( rSh.GetAttrPool(), RES_GRFATR_MIRRORGRF, RES_GRFATR_CROPGRF ); rSh.GetCurAttr( aSet ); + SwMirrorGrf aMirror( static_cast( aSet.Get(RES_GRFATR_MIRRORGRF)) ); SwCropGrf aCrop( static_cast( aSet.Get(RES_GRFATR_CROPGRF)) ); Rectangle aCropRectangle( @@ -179,6 +180,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) rSh.ReRead(OUString(), OUString(), const_cast(&aCompressedGraphic)); rSh.SetAttrItem(aCrop); + rSh.SetAttrItem(aMirror); rSh.EndUndo(UNDO_END); rSh.EndAllAction(); -- cgit v1.2.3