Changeset 78 for trunk/src/IDocument.cxx
- Timestamp:
- 04/17/06 07:28:50 (3 years ago)
- Files:
-
- 1 modified
-
trunk/src/IDocument.cxx (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/IDocument.cxx
r73 r78 131 131 m_Format = NULL; 132 132 m_Keywords = NULL; 133 m_Linearized = FALSE;133 m_Linearized = NULL; 134 134 m_ModifiedDate = NULL; 135 135 m_PageLayout = PageLayoutUnset; … … 156 156 g_free (m_Format); 157 157 g_free (m_Keywords); 158 g_free (m_Linearized); 158 159 g_free (m_ModifiedDate); 159 160 g_free (m_Password); … … 182 183 /// @brief Sets the document's title. 183 184 /// 184 /// @param title The title of the document. 185 /// 186 void 187 IDocument::setTitle ( constgchar *title)185 /// @param title The title of the document. IDocument will free it. 186 /// 187 void 188 IDocument::setTitle (gchar *title) 188 189 { 189 190 g_free (m_Title); 190 m_Title = g_strdup (title);191 m_Title = title; 191 192 } 192 193 … … 210 211 /// @brief Sets the document's author. 211 212 /// 212 /// @param author The name of the document's author. 213 /// 214 void 215 IDocument::setAuthor ( constgchar *author)213 /// @param author The name of the document's author. IDocument will free it. 214 /// 215 void 216 IDocument::setAuthor (gchar *author) 216 217 { 217 218 g_free (m_Author); 218 m_Author = g_strdup (author);219 m_Author = author; 219 220 } 220 221 … … 238 239 /// @brief Sets the document's subject. 239 240 /// 240 /// @param subject The subject of the document. 241 /// 242 void 243 IDocument::setSubject ( constgchar *subject)241 /// @param subject The subject of the document. IDocument will free it. 242 /// 243 void 244 IDocument::setSubject (gchar *subject) 244 245 { 245 246 g_free (m_Subject); 246 m_Subject = g_strdup (subject);247 m_Subject = subject; 247 248 } 248 249 … … 266 267 /// @brief Sets the document's keywords. 267 268 /// 268 /// @param keywords A white space separated list of keywords. 269 /// 270 void 271 IDocument::setKeywords (const gchar *keywords) 269 /// @param keywords A white space separated list of keywords. IDocument will 270 /// free it. 271 /// 272 void 273 IDocument::setKeywords (gchar *keywords) 272 274 { 273 275 g_free (m_Keywords); 274 m_Keywords = g_strdup (keywords);276 m_Keywords = keywords; 275 277 } 276 278 … … 295 297 /// 296 298 /// @param creator The name of the software that created the document. 297 /// 298 void 299 IDocument::setCreator (const gchar *creator) 299 /// IDocument will free it. 300 /// 301 void 302 IDocument::setCreator (gchar *creator) 300 303 { 301 304 g_free (m_Creator); 302 m_Creator = g_strdup (creator);305 m_Creator = creator; 303 306 } 304 307 /// … … 322 325 /// 323 326 /// @param producer The name of the software that converted the document. 324 /// 325 void 326 IDocument::setProducer (const gchar *producer) 327 /// IDocument will free it. 328 /// 329 void 330 IDocument::setProducer (gchar *producer) 327 331 { 328 332 g_free (m_Producer); 329 m_Producer = g_strdup (producer);333 m_Producer = producer; 330 334 } 331 335 … … 350 354 /// @brief Sets the document's format. 351 355 /// 352 /// @param format Set the format in which the document is. 353 /// 354 void 355 IDocument::setFormat (const gchar *format) 356 /// @param format Set the format in which the document is. IDocument will free 357 /// it. 358 /// 359 void 360 IDocument::setFormat (gchar *format) 356 361 { 357 362 g_free (m_Format); 358 m_Format = g_strdup (format);363 m_Format = format; 359 364 } 360 365 … … 369 374 IDocument::getLinearized () 370 375 { 371 if ( m_Linearized )372 { 373 return " Yes";374 } 375 return "No";376 if ( NULL == m_Linearized ) 377 { 378 return "No"; 379 } 380 return m_Linearized; 376 381 } 377 382 … … 379 384 /// @brief Sets if the document is linearised. 380 385 /// 381 /// @param linearized Set to TRUE if the document is linearized. 382 /// FALSE otherwise. 383 /// 384 void 385 IDocument::setLinearized (gboolean linearized) 386 { 386 /// @param linearized Set to "Yes" if the document is linearized. "No" 387 /// otherwise. IDocument will free it. 388 /// 389 void 390 IDocument::setLinearized (gchar *linearized) 391 { 392 g_free (m_Linearized); 387 393 m_Linearized = linearized; 388 394 } … … 408 414 /// 409 415 /// @param date The date and time the document was created in format 410 /// 'Y-M-D H:M:s'. 411 /// 412 void 413 IDocument::setCreationDate ( constgchar *date)416 /// 'Y-M-D H:M:s'. IDocument will free it. 417 /// 418 void 419 IDocument::setCreationDate (gchar *date) 414 420 { 415 421 g_free (m_CreationDate); 416 m_CreationDate = g_strdup (date);422 m_CreationDate = date; 417 423 } 418 424 … … 437 443 /// 438 444 /// @param date The date and time the document was modified in format 439 /// 'Y-M-D H:M:s'. 440 /// 441 void 442 IDocument::setModifiedDate ( constgchar *date)445 /// 'Y-M-D H:M:s'. IDocument will free it. 446 /// 447 void 448 IDocument::setModifiedDate (gchar *date) 443 449 { 444 450 g_free (m_ModifiedDate); 445 m_ModifiedDate = g_strdup (date); 446 451 m_ModifiedDate = date; 447 452 } 448 453
