diff options
-rw-r--r-- | vcl/source/gdi/print2.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/vcl/source/gdi/print2.cxx b/vcl/source/gdi/print2.cxx index 285818e7284b..f7e4d8875341 100644 --- a/vcl/source/gdi/print2.cxx +++ b/vcl/source/gdi/print2.cxx @@ -788,6 +788,18 @@ bool OutputDevice::RemoveTransparenciesFromMetaFile( const GDIMetaFile& rInMtf, ++nActionNum; } + if (nLastBgAction != -1) + { + size_t nActionSize = rInMtf.GetActionSize(); + // tdf#134736 move nLastBgAction to also include any trailing pops + for (size_t nPostLastBgAction = nLastBgAction + 1; nPostLastBgAction < nActionSize; ++nPostLastBgAction) + { + if (rInMtf.GetAction(nPostLastBgAction)->GetType() != MetaActionType::POP) + break; + nLastBgAction = nPostLastBgAction; + } + } + aMapModeVDev->ClearStack(); // clean up aMapModeVDev // fast-forward until one after the last background action |