summaryrefslogtreecommitdiff
path: root/emfio/source/reader/mtftools.cxx
diff options
context:
space:
mode:
authorBartosz Kosiorek <gang65@poczta.onet.pl>2021-04-02 16:06:11 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-04-06 14:04:15 +0200
commit8deb9b3d2f8781628db73d3b2a3c7939ea4fcc2d (patch)
tree9d8e32bcdc073534e50bd5d571092e5b4bc69c49 /emfio/source/reader/mtftools.cxx
parent4b2dc7863a532bdac4db59f9e0cce126f80207d3 (diff)
tdf#37281 tdf#45820 tdf#48916 tdf#55058 EMF Implement complex clipping
As the visual glitches were resolved with: https://gerrit.libreoffice.org/c/core/+/113423 It is time for enabling complex clipping. Change-Id: I12edc88fc9a55c8deedf3d87faeb50cfe0067a01 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113520 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl> (cherry picked from commit aa17ea3d36b8f1ea8cd3d2fb215e80051547439d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113637 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'emfio/source/reader/mtftools.cxx')
-rw-r--r--emfio/source/reader/mtftools.cxx27
1 files changed, 6 insertions, 21 deletions
diff --git a/emfio/source/reader/mtftools.cxx b/emfio/source/reader/mtftools.cxx
index 94ddcd549cec..092e26d3a0d9 100644
--- a/emfio/source/reader/mtftools.cxx
+++ b/emfio/source/reader/mtftools.cxx
@@ -1170,31 +1170,16 @@ namespace emfio
mbComplexClip = rClipPoly.count() > 1
|| !basegfx::utils::isRectangle(rClipPoly);
- static bool bEnableComplexClipViaRegion = getenv("SAL_WMF_COMPLEXCLIP_VIA_REGION") != nullptr;
-
- if (bEnableComplexClipViaRegion)
+ // This makes cases like tdf#45820 work in reasonable time.
+ if (mbComplexClip)
{
- //this makes cases like tdf#45820 work in reasonable time, and I feel in theory should
- //be just fine. In practice I see the output is different so needs work before its the
- //default, but for file fuzzing it should be good enough
- if (mbComplexClip)
- {
- mpGDIMetaFile->AddAction(
- new MetaISectRegionClipRegionAction(
- vcl::Region(rClipPoly)));
- mbComplexClip = false;
- }
- else
- {
- mpGDIMetaFile->AddAction(
- new MetaISectRectClipRegionAction(
- vcl::unotools::rectangleFromB2DRectangle(
- rClipPoly.getB2DRange())));
- }
+ mpGDIMetaFile->AddAction(
+ new MetaISectRegionClipRegionAction(
+ vcl::Region(rClipPoly)));
+ mbComplexClip = false;
}
else
{
- //normal case
mpGDIMetaFile->AddAction(
new MetaISectRectClipRegionAction(
vcl::unotools::rectangleFromB2DRectangle(