Ignore:
Timestamp:
Mar 26, 2010, 10:19:31 PM (12 years ago)
Author:
dmik
Message:

branches/kmk: Implemented LuPopplerDocument::getInputFields() and LuPopplerInputField?.

Location:
branches/kmk/Lucide/plugins/ludoc
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/kmk/Lucide/plugins/ludoc/ludoc.cpp

    r319 r321  
    476476}
    477477
     478
     479SOM_Scope void  SOMLINK freeInputFields(Environment *ev, LuDocument_LuInputFieldSequence* aInputFields)
     480{
     481    if ( aInputFields != NULL ) {
     482        if ( ( ( aInputFields->_maximum != 0 ) ||
     483               ( aInputFields->_length != 0 ) ) &&
     484                   ( aInputFields->_buffer != NULL ) ) {
     485            for ( size_t i = 0; i < aInputFields->_length; ++i )
     486                delete aInputFields->_buffer[i];
     487            SOMFree( aInputFields->_buffer );
     488        }
     489        SOMFree( aInputFields );
     490    }
     491}
     492
     493
    478494SOM_Scope void SOMLINK somDefaultInit(LuDocument *somSelf, som3InitCtrl* ctrl)
    479495{
  • branches/kmk/Lucide/plugins/ludoc/ludoc.idl

    r319 r321  
    559559     * This sequence must be freed with freeInputFields() when done.
    560560     *
    561      * Note: SOMMalloc() must be used for all memory allocations.
     561     * Note: The returned sequence must be allocated with SOMMalloc(),
     562     * each element must be a newly created SOM object.
    562563     *
    563564     * Return value: A pointer to sequence of LuInputField.
     
    566567     **/
    567568    LuInputFieldSequence *getInputFields( in long pagenum );
     569
     570
     571    /**
     572     * Frees the input field sequence returned by getInputFields().
     573     *
     574     * Subclasses should never override this method.
     575     */
     576    void freeInputFields(in LuInputFieldSequence aInputFields);
    568577
    569578
     
    584593                      freeDocumentInfo, getThumbnailSize, getThumbnail,
    585594                      searchText, isFixedImage, isCreateFileThumbnail,
    586                       isHaveInputFields, getInputFields;
     595                      isHaveInputFields, getInputFields, freeInputFields;
    587596
    588597
     
    593602        freeFontInfo: procedure, noself;
    594603        freeDocumentInfo: procedure, noself;
    595 
     604        freeInputFields: procedure, noself;
    596605
    597606        passthru C_h_before =  ""
  • branches/kmk/Lucide/plugins/ludoc/luibutton.cpp

    r319 r321  
    7777SOM_Scope void  SOMLINK freeSiblings(Environment *ev, LuInputButton_SiblingSequence* aSiblings)
    7878{
    79     if ( aSiblings != NULL )
    80     {
     79    if ( aSiblings != NULL ) {
    8180        if ( ( ( aSiblings->_maximum != 0 ) ||
    8281               ( aSiblings->_length != 0 ) ) &&
    83                    ( aSiblings->_buffer != NULL ) )
    84         {
     82                   ( aSiblings->_buffer != NULL ) ) {
    8583            SOMFree( aSiblings->_buffer );
    8684        }
  • branches/kmk/Lucide/plugins/ludoc/luibutton.idl

    r319 r321  
    5353     * Radio button. For other button types, returns NULL.
    5454     *
    55      * Note: SOMMalloc() must be used for all memory allocations.
     55     * Note: The returned sequence and elements must be allocated with
     56     * SOMMalloc().
    5657     */
    5758    SiblingSequence *getSiblings();
Note: See TracChangeset for help on using the changeset viewer.