[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sw/source

Justin Luth justin_luth at sil.org
Tue Feb 16 09:01:27 UTC 2016


 sw/source/filter/ww8/ww8graf.cxx |   18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

New commits:
commit c0ec06b19c0e14cfc7f69500e50e6ebb17a07ec0
Author: Justin Luth <justin_luth at sil.org>
Date:   Tue Feb 16 08:32:33 2016 +0300

    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 at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>
    
    (cherry picked (minus unit tests)
       from commit aa03fd09c0e18ace241c9fe151f7f52c6773f403)
    
    Change-Id: Ia85e3459d00f40d852bbcd3fcfe15e7b53d518ba
    Reviewed-on: https://gerrit.libreoffice.org/22384
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: David Tardon <dtardon at redhat.com>

diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 7458609..66e0141 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();


More information about the Libreoffice-commits mailing list