Kaydet (Commit) 257014ce authored tarafından Miklos Vajna's avatar Miklos Vajna Kaydeden (comit) Christian Lohmaier

tdf#113143 PDF export: fix mis-scaled JPGs on Impress note pages

This is really similar to commit
4c2172a3 (tdf#106702 PDF export: fix
missing images from Writer headers/footers, 2018-05-22) just this one is
about the size of the output rectangle for JPG content, while the
previous problem was about the position of them.

Also extract PdfExportTest::exportAndParse() from the last two tests to
avoid duplication.

(cherry picked from commit 89dc667c)

Change-Id: I9812924d505e9fdaca2a95b4990e7aaa5e44fd7f
Reviewed-on: https://gerrit.libreoffice.org/54989Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>
üst 15ea1cda
...@@ -467,8 +467,9 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc ...@@ -467,8 +467,9 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc
// Look up the output rectangle from the previous // Look up the output rectangle from the previous
// bitmap scale action if possible. This has the // bitmap scale action if possible. This has the
// correct position for images repeated in // correct position and size for images with a
// Writer headers/footers for non-first pages. // custom translation (Writer header) or scaling
// (Impress notes page).
if (rCurGDIMtfAction > 0) if (rCurGDIMtfAction > 0)
{ {
const MetaAction* pAction = rMtf.GetAction(rCurGDIMtfAction - 1); const MetaAction* pAction = rMtf.GetAction(rCurGDIMtfAction - 1);
...@@ -477,6 +478,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc ...@@ -477,6 +478,7 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc
const MetaBmpScaleAction* pA const MetaBmpScaleAction* pA
= static_cast<const MetaBmpScaleAction*>(pAction); = static_cast<const MetaBmpScaleAction*>(pAction);
aOutputRect.SetPos(pA->GetPoint()); aOutputRect.SetPos(pA->GetPoint());
aOutputRect.SetSize(pA->GetSize());
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment