/** adds the given shape to this list */ void ShapeList::addShape( SdrObject& rObject )
{ if( maShapeSet.insert(&rObject).second )
{
maShapeList.push_back(&rObject);
rObject.AddObjectUser( *this );
} else
{
OSL_FAIL("sd::ShapeList::addShape(), given shape already part of list!");
}
}
/** removes the given shape from this list */ void ShapeList::removeShape( SdrObject& rObject )
{ if( maShapeSet.erase(&rObject) )
{
ListImpl::iterator aIter( std::find( maShapeList.begin(), maShapeList.end(), &rObject ) ); bool bIterErased = aIter == maIter;
if( bIterErased )
maIter = aIter;
} else
{
OSL_FAIL("sd::ShapeList::removeShape(), given shape not part of list!");
}
}
/** removes all shapes from this list
NOTE: iterators will become invalid */ void ShapeList::clear()
{
ListImpl aShapeList;
aShapeList.swap( maShapeList );
maShapeSet.clear();
/** returns true if this list is empty */ bool ShapeList::isEmpty() const
{ return maShapeList.empty();
}
/** returns true if given shape is part of this list */ bool ShapeList::hasShape( SdrObject& rObject ) const
{ return maShapeSet.contains( &rObject );
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.