summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-20 11:23:45 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-20 14:01:26 +0100
commitdbae716d9fddc40459ea72374d6c14224668a138 (patch)
treeb839b8b979b2b942cf2043975abeefd82ff0cdc2 /vcl
parent5747ed051440a8baff4b503b3b45146510f198bc (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>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/region.cxx11
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();
}