summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-02-15 17:57:36 +0300
committerCaolán McNamara <caolanm@redhat.com>2016-02-18 09:26:01 +0000
commit153818bf686fe9d1b8f5a4f65cc14ea57420d1b0 (patch)
treed625024cc9ff951d9e520636eb9415b25ef08c7c
parent85c789be1f94777b582977e69b16665a47dc364f (diff)
tdf#82012 - keep flip settings when compressing image
Format - flip - Horizontal/Vertical setting was lost when compressing an image. Change-Id: Id39e7ce9a82174ac2248851107e398979fba56aa Reviewed-on: https://gerrit.libreoffice.org/22372 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r--sw/source/uibase/shells/grfsh.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index edefcd897048..0e2411ba827d 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<const SwMirrorGrf&>( aSet.Get(RES_GRFATR_MIRRORGRF)) );
SwCropGrf aCrop( static_cast<const SwCropGrf&>( aSet.Get(RES_GRFATR_CROPGRF)) );
Rectangle aCropRectangle(
@@ -179,6 +180,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
rSh.ReRead(OUString(), OUString(), const_cast<const Graphic*>(&aCompressedGraphic));
rSh.SetAttrItem(aCrop);
+ rSh.SetAttrItem(aMirror);
rSh.EndUndo(UNDO_END);
rSh.EndAllAction();