Changeset 65 for trunk/src/IDocument.cxx

Show
Ignore:
Timestamp:
04/14/06 16:24:42 (3 years ago)
Author:
jordi
Message:

The Main presenter now can reload encrypted files without bothering the user about password, unless the document's password has been changed. In this case, it will behaviour like opening the file as new.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/IDocument.cxx

    r64 r65  
    136136    m_PageMode = PageModeUnset; 
    137137    m_PageNumber = 0; 
     138    m_Password = NULL; 
    138139    m_Producer = NULL; 
    139140    m_Rotation = 0; 
     
    156157    g_free (m_Keywords); 
    157158    g_free (m_ModifiedDate); 
     159    g_free (m_Password); 
    158160    g_free (m_Producer); 
    159161    g_free (m_Subject); 
     
    504506 
    505507/// 
    506 /// @brief Set the document's number of pages. 
     508/// @brief Gets the password used to open the document. 
     509/// 
     510/// @return The password used to open the document, or NULL 
     511///         if no password was used. 
     512/// 
     513const gchar * 
     514IDocument::getPassword () 
     515{ 
     516    return m_Password; 
     517} 
     518 
     519/// 
     520/// @brief Sets the password user to open the document. 
     521/// 
     522/// @param password The password used. 
     523/// 
     524void 
     525IDocument::setPassword (const gchar *password) 
     526{ 
     527    gchar *oldPassword = m_Password; 
     528    m_Password = g_strdup (password); 
     529    g_free (oldPassword); 
     530} 
     531 
     532/// 
     533/// @brief Sets the document's number of pages. 
    507534/// 
    508535/// @param numPages The number of pages the document has.