| GOffice Reference Manual | ||||
|---|---|---|---|---|
| Top | Description | Object Hierarchy | Properties | Signals | ||||
GODoc; GOImage * go_doc_add_image (GODoc *doc,char const *id,GOImage *image); void go_doc_end_read (GODoc *doc); gint64 go_doc_get_dirty_time (GODoc const *doc); GOImage * go_doc_get_image (GODoc *doc,char const *id); GHashTable * go_doc_get_images (GODoc *doc); GsfDocMetaData * go_doc_get_meta_data (GODoc const *doc); char const * go_doc_get_uri (GODoc const *doc); GOImage * go_doc_image_fetch (GODoc *doc,char const *id,GType type); void go_doc_init_read (GODoc *doc,GsfInput *input); void go_doc_init_write (GODoc *doc,GsfXMLOut *output); gboolean go_doc_is_dirty (GODoc const *doc); gboolean go_doc_is_pristine (GODoc const *doc); void go_doc_read (GODoc *doc,GsfXMLIn *xin,xmlChar const **attrs); void go_doc_save_image (GODoc *doc,char const *id); void go_doc_save_resource (GODoc *doc,GOPersist const *gp); void go_doc_set_dirty (GODoc *doc,gboolean is_dirty); void go_doc_set_dirty_time (GODoc *doc,gint64 t); void go_doc_set_meta_data (GODoc *doc,GsfDocMetaData *data); void go_doc_set_pristine (GODoc *doc,gboolean pristine); gboolean go_doc_set_uri (GODoc *doc,char const *uri); void go_doc_update_meta_data (GODoc *doc); void go_doc_write (GODoc *doc,GsfXMLOut *output);
"dirty" gboolean : Read / Write "dirty-time" gint64 : Read / Write "pristine" gboolean : Read / Write "uri" gchar* : Read / Write
GOImage * go_doc_add_image (GODoc *doc,char const *id,GOImage *image);
Adds image to the document if no such image already exists. The name of
the returned image might be different from id, even if given.
gint64 go_doc_get_dirty_time (GODoc const *doc);
|
GODoc |
Returns : |
the time (as in g_get_real_time()) the document was first marked
dirty.
|
GHashTable * go_doc_get_images (GODoc *doc);
|
GODoc |
Returns : |
the images registered inside the document. [transfer none] |
GsfDocMetaData * go_doc_get_meta_data (GODoc const *doc);
|
GODoc |
Returns : |
doc's metadata. [transfer none]
|
GOImage * go_doc_image_fetch (GODoc *doc,char const *id,GType type);
Searches for a GOImage with name id in the document image buffer and
creates one if needed. The caller does not own a reference on the returned
GOImage.
This function must be called after a call to go_doc_init_read(), otherwise
it will emit a critical and return NULL.
gboolean go_doc_is_dirty (GODoc const *doc);
|
GODoc |
Returns : |
TRUE if doc has been modified.
|
gboolean go_doc_is_pristine (GODoc const *doc);
This checks to see if the doc has ever been used ( approximately )
void go_doc_read (GODoc *doc,GsfXMLIn *xin,xmlChar const **attrs);
|
|
|
|
|
void go_doc_save_image (GODoc *doc,char const *id);
Saves the image with the document. Each image will be saved only once.
void go_doc_save_resource (GODoc *doc,GOPersist const *gp);
Saves the resource with the document. Each resource will be saved only once.
void go_doc_set_dirty (GODoc *doc,gboolean is_dirty);
Changes the dirty state of doc to is_dirty and clears the pristine state
no matter what.
|
GODoc |
|
bool |
void go_doc_set_dirty_time (GODoc *doc,gint64 t);
Changes the dirty time, i.e., the time the document was first marked dirty.
|
GODoc |
|
a timestamp from g_get_real_time |
void go_doc_set_meta_data (GODoc *doc,GsfDocMetaData *data);
Adds a ref to data.
|
GODoc |
|
GsfDocMetaData |
void go_doc_set_pristine (GODoc *doc,gboolean pristine);
Sets the indication of whether this document is unchanged since it was created. Note: if both "dirty" and "pristine" are being set, set "pristine" last.
|
GODoc |
|
a gboolean. |
gboolean go_doc_set_uri (GODoc *doc,char const *uri);
|
the document to modify |
|
the uri for this worksheet. |
Returns : |
TRUE if the name was set succesfully. |
void go_doc_update_meta_data (GODoc *doc);
Signal that doc's metadata should be updated
- statistics (sheet count, word count)
- content (sheet names, bookmarks)
- reloading linked items
|
GODoc |
"dirty" property"dirty" gboolean : Read / Write
Whether the document has been changed.
Default value: FALSE
"dirty-time" property"dirty-time" gint64 : Read / Write
When the document was first changed.
Default value: 0
"pristine" property"pristine" gboolean : Read / Write
Whether the document is unchanged since it was created.
Default value: FALSE
"uri" property"uri" gchar* : Read / Write
The URI associated with this document.
Default value: NULL