diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2018-01-29 16:20:46 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2018-01-30 16:11:26 +0100 |
commit | 59de9010a07710c99722208ba8fdbaa7df616984 (patch) | |
tree | 37b8689ec9a84b6c2883e78ffdf9195f2c45b4ef /writerfilter | |
parent | 0e7c8c3a1be5c266f8ba7ad42fd9ce80beae5264 (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
Reviewed-on: https://gerrit.libreoffice.org/48902
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'writerfilter')
-rw-r--r-- | writerfilter/source/dmapper/GraphicImport.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx index 22878b6121f1..e9826192143c 100644 --- a/writerfilter/source/dmapper/GraphicImport.cxx +++ b/writerfilter/source/dmapper/GraphicImport.cxx @@ -1361,6 +1361,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 ) |