Kaydet (Commit) ad80a956 authored tarafından Armin Le Grand's avatar Armin Le Grand Kaydeden (comit) Caolán McNamara

Related: #i121237# Corrected Region export

was missing to write an end marker when RegionBand was empty

(cherry picked from commit a6b23e53)

Change-Id: I0dbcb27aa0936b061062c94cdf4a2c7f1f306b0e
üst e717d1dc
......@@ -1386,8 +1386,7 @@ bool Region::IsInside( const Point& rPoint ) const
//}
// ensure RegionBand existance
const_cast< Region* >(this)->GetAsRegionBand();
const RegionBand* pRegionBand = getRegionBand();
const RegionBand* pRegionBand = GetAsRegionBand();
if(pRegionBand)
{
......@@ -1670,6 +1669,14 @@ SvStream& operator<<( SvStream& rOStrm, const Region& rRegion )
{
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());
......@@ -1693,8 +1700,7 @@ void Region::GetRegionRectangles(RectangleVector& rTarget) const
rTarget.clear();
// ensure RegionBand existance
const_cast< Region* >(this)->GetAsRegionBand();
const RegionBand* pRegionBand = getRegionBand();
const RegionBand* pRegionBand = GetAsRegionBand();
if(pRegionBand)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment