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

PdfOutlineItem * PoDoFo::PdfOutlineItem::CreateNext ( const PdfString sTitle,
const PdfAction rAction 
) [inherited]

Create a PdfOutlineItem that is on the same level and follows the current item.

Parameters:
sTitletitle of this item
rActionaction of this item

Definition at line 147 of file PdfOutlines.cpp.

References PoDoFo::PdfDictionary::AddKey(), PoDoFo::PdfVariant::GetDictionary(), PoDoFo::PdfElement::GetObject(), PoDoFo::PdfOutlineItem::Next(), PoDoFo::PdfOutlineItem::PdfOutlineItem(), and PoDoFo::PdfObject::Reference().

{
    PdfOutlineItem* pItem = new PdfOutlineItem( sTitle, rAction, m_pParentOutline, this->GetObject()->GetOwner() );

    if( m_pNext ) 
    {
        m_pNext->SetPrevious( pItem );
        pItem->SetNext( m_pNext );
    }

    m_pNext = pItem;
    m_pNext->SetPrevious( this );

    this->GetObject()->GetDictionary().AddKey( "Next", m_pNext->GetObject()->Reference() );

    if( m_pParentOutline && !m_pNext->Next() ) 
        m_pParentOutline->SetLast( m_pNext );

    return m_pNext;
}

Here is the call graph for this function:


Generated by  Doxygen 1.6.0   Back to index