clip PolyPolygon::Insert on .svm load
valgrind + bff Change-Id: Ib3ed8a6e518c0686f8cbeaf021b9ca3a07005032
This commit is contained in:
parent
aba0106926
commit
fd64d444b7
@ -154,7 +154,7 @@ void PolyPolygon::Insert( const Polygon& rPoly, sal_uInt16 nPos )
|
||||
|
||||
void PolyPolygon::Remove( sal_uInt16 nPos )
|
||||
{
|
||||
DBG_ASSERT( nPos < Count(), "PolyPolygon::Remove(): nPos >= nSize" );
|
||||
assert(nPos < Count() && "PolyPolygon::Remove(): nPos >= nSize");
|
||||
|
||||
if ( mpImplPolyPolygon->mnRefCount > 1 )
|
||||
{
|
||||
@ -171,7 +171,7 @@ void PolyPolygon::Remove( sal_uInt16 nPos )
|
||||
|
||||
void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos )
|
||||
{
|
||||
DBG_ASSERT( nPos < Count(), "PolyPolygon::Replace(): nPos >= nSize" );
|
||||
assert(nPos < Count() && "PolyPolygon::Replace(): nPos >= nSize");
|
||||
|
||||
if ( mpImplPolyPolygon->mnRefCount > 1 )
|
||||
{
|
||||
@ -185,7 +185,7 @@ void PolyPolygon::Replace( const Polygon& rPoly, sal_uInt16 nPos )
|
||||
|
||||
const Polygon& PolyPolygon::GetObject( sal_uInt16 nPos ) const
|
||||
{
|
||||
DBG_ASSERT( nPos < Count(), "PolyPolygon::GetObject(): nPos >= nSize" );
|
||||
assert(nPos < Count() && "PolyPolygon::GetObject(): nPos >= nSize");
|
||||
|
||||
return *(mpImplPolyPolygon->mpPolyAry[nPos]);
|
||||
}
|
||||
@ -508,7 +508,7 @@ Rectangle PolyPolygon::GetBoundRect() const
|
||||
|
||||
Polygon& PolyPolygon::operator[]( sal_uInt16 nPos )
|
||||
{
|
||||
DBG_ASSERT( nPos < Count(), "PolyPolygon::[](): nPos >= nSize" );
|
||||
assert(nPos < Count() && "PolyPolygon::[](): nPos >= nSize");
|
||||
|
||||
if ( mpImplPolyPolygon->mnRefCount > 1 )
|
||||
{
|
||||
|
@ -1077,6 +1077,12 @@ void MetaPolyPolygonAction::Read( SvStream& rIStm, ImplMetaReadData* )
|
||||
rIStm.ReadUInt16( nIndex );
|
||||
Polygon aPoly;
|
||||
aPoly.Read( rIStm );
|
||||
if (nIndex >= maPolyPoly.Count())
|
||||
{
|
||||
SAL_WARN("vcl.gdi", "svm contains polygon index " << nIndex
|
||||
<< " outside possible range " << maPolyPoly.Count());
|
||||
continue;
|
||||
}
|
||||
maPolyPoly.Replace( aPoly, nIndex );
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user