diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-03-20 11:23:45 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-03-20 14:01:26 +0100 |
commit | dbae716d9fddc40459ea72374d6c14224668a138 (patch) | |
tree | b839b8b979b2b942cf2043975abeefd82ff0cdc2 | |
parent | 5747ed051440a8baff4b503b3b45146510f198bc (diff) |
Resolves: tdf#116483 smart art incorrectly rendered
HasPolyPolygon as true case sets an alternative non-broken region even if its
legacy version would have been broken
Change-Id: I4520b7d7a4032684afad61816380fef7171040f6
Reviewed-on: https://gerrit.libreoffice.org/51632
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | vcl/source/gdi/region.cxx | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index ab711c245c3d..4c68d6ddee1c 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -1589,13 +1589,12 @@ SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& rRegion) bool bSuccess = pNewRegionBand->load(rIStrm); rRegion.mpRegionBand.reset(pNewRegionBand); - if(aCompat.GetVersion() >= 2) + bool bHasPolyPolygon(false); + if (aCompat.GetVersion() >= 2) { - bool bHasPolyPolygon(false); - rIStrm.ReadCharAsBool( bHasPolyPolygon ); - if(bHasPolyPolygon) + if (bHasPolyPolygon) { tools::PolyPolygon* pNewPoly = new tools::PolyPolygon(); ReadPolyPolygon( rIStrm, *pNewPoly ); @@ -1603,9 +1602,9 @@ SvStream& ReadRegion(SvStream& rIStrm, vcl::Region& rRegion) } } - if (!bSuccess) + if (!bSuccess && !bHasPolyPolygon) { - SAL_WARN("vcl.gdi", "bad region band"); + SAL_WARN("vcl.gdi", "bad region band:" << bHasPolyPolygon); rRegion.SetNull(); } |