summaryrefslogtreecommitdiff
path: root/writerfilter/source
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-01-29 16:20:46 +0100
committerAndras Timar <andras.timar@collabora.com>2018-02-12 21:40:14 +0100
commit02aaacf21749099a58033ff5993e3644bccf6c97 (patch)
treeca10b2cb2443ec4ee86634c34390ba3115cc205a /writerfilter/source
parent6c1100a596a1a3e544f25b400943d77f524604e2 (diff)
DOCX import: handle horizontal flip of bitmaps
Horizontal mirror on the UNO API level, mirror on the vertical axis internally. (cherry picked from commit 4bdbb5502f5995727017e22bb8a74b9f45552067) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport11.cxx Change-Id: If142274a8f81a6875059a2651af6d8470870a36a
Diffstat (limited to 'writerfilter/source')
-rw-r--r--writerfilter/source/dmapper/GraphicImport.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 991b1461ed8d..5044454ddaef 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -1368,6 +1368,17 @@ uno::Reference< text::XTextContent > GraphicImport::createGraphicObject( const b
m_pImpl->applyMargins(xGraphicObjectProperties);
m_pImpl->applyName(xGraphicObjectProperties);
}
+
+ // Handle horizontal flip.
+ bool bMirrored = false;
+ xShapeProps->getPropertyValue("IsMirrored") >>= bMirrored;
+ if (bMirrored)
+ {
+ xGraphicObjectProperties->setPropertyValue("HoriMirroredOnEvenPages",
+ uno::makeAny(true));
+ xGraphicObjectProperties->setPropertyValue("HoriMirroredOnOddPages",
+ uno::makeAny(true));
+ }
}
}
catch( const uno::Exception& e )