Kaydet (Commit) 6bbdf4dd authored tarafından Caolán McNamara's avatar Caolán McNamara

Resolves: fdo#39995 restore original semantics of GDIMetaFile::ReplaceAction

These semantics are fairly horrific, but existing code expects them, so
callers need to be changed if this is changed.
üst f3aebf9a
......@@ -340,17 +340,14 @@ MetaAction* GDIMetaFile::NextAction()
MetaAction* GDIMetaFile::ReplaceAction( MetaAction* pAction, size_t nAction )
{
if ( nAction < aList.size() )
{
::std::vector< MetaAction* >::iterator it = aList.begin();
::std::advance( it, nAction );
(*it)->Delete();
*it = pAction;
}
if ( nAction >= aList.size() )
return NULL;
//fdo#39995 This does't increment the incoming action ref-count nor does it
//decrement the outgoing action ref-count
std::swap(pAction, aList[nAction]);
return pAction;
}
// ------------------------------------------------------------------------
GDIMetaFile& GDIMetaFile::operator=( const GDIMetaFile& rMtf )
......
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