office-gobmx/emfio/qa/cppunit/emf/data/TestEmfPlusGetDC.emf
Bartosz Kosiorek f26ba7f7c9 tdf#147818 EMF+ Fix restoring clipping states
With previous implementation the clipping restoring with EmfPlusRecordTypeRestore
was implemented wrongly as it is only taken to account
the shape of clipping (state.getClipPolyPolygon) and doesn't
take if clipping was even enabled (state.getClipPolyPolygonActive).

Additionally the changing states should be made by using method:
wmfemfhelper::HandleNewClipRegion() and not directly.

The similar implementation was applied also to EmfPlusRecordTypeGetDC.

Additionally the clipping for
   EmfPlusRecordTypeSetClipRect
   EmfPlusRecordTypeSetClipPath
   EmfPlusRecordTypeSetClipRegion
was fixed, as initially the clipping is disabled (state.getClipPolyPolygonActive)
and the clipping shape is empty (state.getClipPolyPolygon).
It means that combination other than EmfPlusCombineModeReplace,
was not working correctly.

With this implementation, if Clipping is disabled, then treat clip combining
in special way.

Change-Id: I258bda64e8bfdade7f47ffc7518bf04b7340344f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132415
Tested-by: Jenkins
Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2022-04-01 17:24:07 +02:00

23 KiB