summaryrefslogtreecommitdiff
path: root/sdext/source/pdfimport/tree/pdfiprocessor.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sdext/source/pdfimport/tree/pdfiprocessor.cxx')
-rw-r--r--sdext/source/pdfimport/tree/pdfiprocessor.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sdext/source/pdfimport/tree/pdfiprocessor.cxx b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
index cb514072e91b..a19f71642fce 100644
--- a/sdext/source/pdfimport/tree/pdfiprocessor.cxx
+++ b/sdext/source/pdfimport/tree/pdfiprocessor.cxx
@@ -349,8 +349,12 @@ void PDFIProcessor::setupImage(ImageId nImage)
pFrame->h = pImageElement->h = aScale.getY();
pFrame->ZOrder = m_nNextZOrder++;
- if (aScale.getY() < 0)
- pFrame->MirrorVertical = pImageElement->MirrorVertical = true;
+ // Poppler wrapper takes into account that vertical axes of PDF and ODF are opposite,
+ // and it flips matrix vertically (see poppler's GfxState::GfxState()).
+ // But image internal vertical axis is independent of PDF vertical axis direction,
+ // so arriving matrix is extra-flipped relative to image.
+ // We force vertical flip here to compensate that.
+ pFrame->MirrorVertical = true;
}
void PDFIProcessor::drawMask(const uno::Sequence<beans::PropertyValue>& xBitmap,