summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorJustin Luth <justin_luth@sil.org>2016-02-16 08:32:33 +0300
committerDavid Tardon <dtardon@redhat.com>2016-02-16 09:01:00 +0000
commitc0ec06b19c0e14cfc7f69500e50e6ebb17a07ec0 (patch)
treef2471dd88cee8acd9671544fc32d65967bcbf839 /sw
parent2f496d6a1e83ec234ce7479c5397c04dc126b12c (diff)
tdf#56321 - .doc import image flipped status
Although LO was exporting whether an image was flipped horizontally or vertically, it wasn't reading it in during an import. Reviewed-on: https://gerrit.libreoffice.org/22344 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> (cherry picked (minus unit tests) from commit aa03fd09c0e18ace241c9fe151f7f52c6773f403) Change-Id: Ia85e3459d00f40d852bbcd3fcfe15e7b53d518ba Reviewed-on: https://gerrit.libreoffice.org/22384 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Justin Luth <justin_luth@sil.org> Reviewed-by: David Tardon <dtardon@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx18
1 files changed, 18 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 7458609689f6..66e0141c9379 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -2095,6 +2095,24 @@ SwWW8ImplReader::SetAttributesAtGrfNode(SvxMSDffImportRec const*const pRecord,
pGrfNd->SetAttr( aCrop );
}
+ bool bFlipH = pRecord->nFlags & SHAPEFLAG_FLIPH;
+ bool bFlipV = pRecord->nFlags & SHAPEFLAG_FLIPV;
+ if ( bFlipH || bFlipV )
+ {
+ SwMirrorGrf aMirror = pGrfNd->GetSwAttrSet().GetMirrorGrf();
+ if( bFlipH )
+ {
+ if( bFlipV )
+ aMirror.SetValue(RES_MIRROR_GRAPH_BOTH);
+ else
+ aMirror.SetValue(RES_MIRROR_GRAPH_VERT);
+ }
+ else
+ aMirror.SetValue(RES_MIRROR_GRAPH_HOR);
+
+ pGrfNd->SetAttr( aMirror );
+ }
+
if (pRecord->pObj)
{
const SfxItemSet& rOldSet = pRecord->pObj->GetMergedItemSet();