Logo Search packages:      
Sourcecode: libpodofo version File versions  Download package

void PoDoFo::PdfVecObjects::AddFreeObject ( const PdfReference rReference )

Mark a reference as unused so that it can be reused for new objects.

Parameters:
rReferencethe reference to reuse

Definition at line 236 of file PdfVecObjects.cpp.

References PoDoFo::PdfError::DebugMessage(), PoDoFo::PdfReference::ObjectNumber(), and SetObjectCount().

Referenced by PoDoFo::PdfDocument::Append(), PoDoFo::PdfParser::ReadObjectsInternal(), and RemoveObject().

{
    std::pair<TIPdfReferenceList,TIPdfReferenceList> it = 
        std::equal_range( m_lstFreeObjects.begin(), m_lstFreeObjects.end(), rReference, ReferenceComparatorPredicate() );

    if( it.first != it.second && !m_lstFreeObjects.empty() ) 
    {
        // Be sure that no reference is added twice to free list
        PdfError::DebugMessage( "Adding %d to freelist, is already contained !!", rReference.ObjectNumber() );
        return;
    }
    else
    {
        // When append free objects from external doc we need plus one number objects
        SetObjectCount( rReference );

        // Insert so that list stays sorted
        m_lstFreeObjects.insert( it.first, rReference );
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:


Generated by  Doxygen 1.6.0   Back to index