summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/pdfextoutdevdata.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/source/gdi/pdfextoutdevdata.cxx')
-rw-r--r--vcl/source/gdi/pdfextoutdevdata.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/vcl/source/gdi/pdfextoutdevdata.cxx b/vcl/source/gdi/pdfextoutdevdata.cxx
index 34c448ce33de..73d923267a64 100644
--- a/vcl/source/gdi/pdfextoutdevdata.cxx
+++ b/vcl/source/gdi/pdfextoutdevdata.cxx
@@ -420,9 +420,10 @@ bool PageSyncData::PlaySyncPageAct( PDFWriter& rWriter, sal_uInt32& rCurGDIMtfAc
if ( !mbGroupIgnoreGDIMtfActions )
mCurrentGraphic = rGraphic;
}
- else if ( eType == GfxLinkType::NativePng )
+ else if ( eType == GfxLinkType::NativePng && mParaRects.size() >= 2 )
{
- mCurrentGraphic = rGraphic;
+ if ( rOutDevData.HasAdequateCompression(rGraphic, mParaRects[0], mParaRects[1]) )
+ mCurrentGraphic = rGraphic;
}
}
break;
@@ -805,7 +806,7 @@ bool PDFExtOutDevData::HasAdequateCompression( const Graphic &rGraphic,
{
bool bReduceResolution = false;
- assert( rGraphic.IsLink() && rGraphic.GetLink().GetType() == GfxLinkType::NativeJpg );
+ assert( rGraphic.IsLink() && (rGraphic.GetLink().GetType() == GfxLinkType::NativeJpg || rGraphic.GetLink().GetType() == GfxLinkType::NativePng));
// small items better off as PNG anyway
if ( rGraphic.GetSizePixel().Width() < 32 &&