From ooo-commits-return-15374-apmail-incubator-ooo-commits-archive=incubator.apache.org@incubator.apache.org Thu Oct 25 09:36:51 2012 Return-Path: X-Original-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-ooo-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9F038D893 for ; Thu, 25 Oct 2012 09:36:51 +0000 (UTC) Received: (qmail 54181 invoked by uid 500); 25 Oct 2012 09:36:51 -0000 Delivered-To: apmail-incubator-ooo-commits-archive@incubator.apache.org Received: (qmail 54047 invoked by uid 500); 25 Oct 2012 09:36:50 -0000 Mailing-List: contact ooo-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: ooo-dev@incubator.apache.org Delivered-To: mailing list ooo-commits@incubator.apache.org Received: (qmail 54001 invoked by uid 99); 25 Oct 2012 09:36:49 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2012 09:36:49 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 25 Oct 2012 09:36:47 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 77D5123889D7; Thu, 25 Oct 2012 09:36:03 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1402041 - /incubator/ooo/trunk/main/vcl/source/gdi/region.cxx Date: Thu, 25 Oct 2012 09:36:03 -0000 To: ooo-commits@incubator.apache.org From: alg@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20121025093603.77D5123889D7@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: alg Date: Thu Oct 25 09:36:02 2012 New Revision: 1402041 URL: http://svn.apache.org/viewvc?rev=1402041&view=rev Log: #121237# Corrected Region export, was missing to write an end marker when RegionBand was empty Modified: incubator/ooo/trunk/main/vcl/source/gdi/region.cxx Modified: incubator/ooo/trunk/main/vcl/source/gdi/region.cxx URL: http://svn.apache.org/viewvc/incubator/ooo/trunk/main/vcl/source/gdi/region.cxx?rev=1402041&r1=1402040&r2=1402041&view=diff ============================================================================== --- incubator/ooo/trunk/main/vcl/source/gdi/region.cxx (original) +++ incubator/ooo/trunk/main/vcl/source/gdi/region.cxx Thu Oct 25 09:36:02 2012 @@ -1389,8 +1389,7 @@ bool Region::IsInside( const Point& rPoi //} // ensure RegionBand existance - const_cast< Region* >(this)->GetAsRegionBand(); - const RegionBand* pRegionBand = getRegionBand(); + const RegionBand* pRegionBand = GetAsRegionBand(); if(pRegionBand) { @@ -1673,6 +1672,14 @@ SvStream& operator<<( SvStream& rOStrm, { pRegionBand->save(rOStrm); } + else + { + // for compatibility, write an empty RegionBand (will only write + // the end marker STREAMENTRY_END, but this *is* needed) + const RegionBand aRegionBand; + + aRegionBand.save(rOStrm); + } // write polypolygon if available const sal_Bool bHasPolyPolygon(rRegion.HasPolyPolygonOrB2DPolyPolygon()); @@ -1696,8 +1703,7 @@ void Region::GetRegionRectangles(Rectang rTarget.clear(); // ensure RegionBand existance - const_cast< Region* >(this)->GetAsRegionBand(); - const RegionBand* pRegionBand = getRegionBand(); + const RegionBand* pRegionBand = GetAsRegionBand(); if(pRegionBand) {