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

void PoDoFo::PdfDestination::AddToDictionary ( PdfDictionary dictionary ) const

Adds this destination to an dictionary. This method handles the all the complexities of making sure it's added correctly

If this destination is empty. Nothing will be added.

dictionarythe destination will be added to this dictionary

Definition at line 164 of file PdfDestination.cpp.

References PoDoFo::PdfDictionary::AddKey(), PoDoFo::ePdfError_ActionAlreadyPresent, PoDoFo::PdfDictionary::HasKey(), PODOFO_RAISE_ERROR, PoDoFo::PdfDictionary::RemoveKey(), and PoDoFo::PdfArray::size().

Referenced by PoDoFo::PdfOutlineItem::SetDestination(), and PoDoFo::PdfAnnotation::SetDestination().

    // Do not add empty destinations
    if( !m_array.size() )

    // since we can only have EITHER a Dest OR an Action
    // we check for an Action, and if already present, we throw
    if ( dictionary.HasKey( PdfName( "A" ) ) )
        PODOFO_RAISE_ERROR( ePdfError_ActionAlreadyPresent );

    dictionary.RemoveKey( "Dest" );
    dictionary.AddKey( "Dest", m_pObject );

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