[Libreoffice-commits] core.git: vcl/source

Caolán McNamara caolanm at redhat.com
Tue Mar 20 13:01:53 UTC 2018


 vcl/source/gdi/region.cxx |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

New commits:
commit dbae716d9fddc40459ea72374d6c14224668a138
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Mar 20 11:23:45 2018 +0000

    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 at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

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();
             }
 


More information about the Libreoffice-commits mailing list