Class: GOffice::FileSaver
- Inherits:
-
Object
- Object
- GOffice::FileSaver
- Defined in:
- (unknown)
Overview
File saver base class.
Class Method Summary collapse
-
.default ⇒ GOffice::FileSaver
Finds file saver registered as default saver with the highest priority.
-
.for_file_name(file_name) ⇒ GOffice::FileSaver
Searches for file saver matching the given file_name, registered using go_file_saver_register.
-
.for_id(id) ⇒ GOffice::FileSaver
Searches for file saver with given id, registered using go_file_saver_register or register_file_opener_as_default.
-
.for_mime_type(mime_type) ⇒ GOffice::FileSaver
mime_type.
Instance Method Summary collapse
-
#description ⇒ String
Description.
- #description=(description) ⇒ String
-
#extension ⇒ String
Extension.
- #extension=(extension) ⇒ String
-
#format_level ⇒ GOffice::FileFormatLevel
Format-level.
- #format_level=(format_level) ⇒ GOffice::FileFormatLevel
-
#id ⇒ String
Id.
- #id=(id) ⇒ String
-
#initialize(id, extension, description, level, save_func) ⇒ GOffice::FileSaver
constructor
Creates new GOFile::Saver object.
- #interactive_only=(interactive_only) ⇒ Boolean
-
#interactive_only? ⇒ Boolean
Interactive-only.
-
#mime_type ⇒ String
Mime-type.
- #mime_type=(mime_type) ⇒ String
- #overwrite=(overwrite) ⇒ Boolean
-
#overwrite? ⇒ Boolean
Overwrite.
-
#overwrite_files=(overwrite) ⇒ nil
Changes behaviour of the saver when saving a file.
-
#register ⇒ nil
Adds fs saver to the list of available file savers, making it available for the user when selecting file format for save.
-
#register_as_default(priority) ⇒ nil
Adds fs saver to the list of available file savers, making it available for the user when selecting file format for save.
-
#save(io_context, view, output) ⇒ nil
Saves wbv and the workbook it is attached to into output stream.
-
#save_scope ⇒ GOffice::FileSaveScope
The save scope of fs.
- #save_scope=(scope) ⇒ nil
-
#scope ⇒ GOffice::FileSaveScope
Scope.
- #scope=(scope) ⇒ GOffice::FileSaveScope
- #set_export_options(doc, options) ⇒ Boolean
- #sheet_selection=(sheet_selection) ⇒ Boolean
-
#sheet_selection? ⇒ Boolean
Sheet-selection.
-
#unregister ⇒ nil
Removes fs saver from list of available file savers.
Constructor Details
#initialize(id, extension, description, level, save_func) ⇒ GOffice::FileSaver
Creates new GOFile::Saver object. Optional id will be used after registering it with go_file_saver_register or go_file_saver_register_as_default function.
Class Method Details
.default ⇒ GOffice::FileSaver
Finds file saver registered as default saver with the highest priority. Reference count for the saver is NOT incremented. default saver.
.for_file_name(file_name) ⇒ GOffice::FileSaver
Searches for file saver matching the given file_name, registered using go_file_saver_register.
.for_id(id) ⇒ GOffice::FileSaver
Searches for file saver with given id, registered using go_file_saver_register or register_file_opener_as_default.
.for_mime_type(mime_type) ⇒ GOffice::FileSaver
mime_type.
Instance Method Details
#description ⇒ String
Returns description.
#description=(description) ⇒ String
#extension ⇒ String
Returns extension.
#extension=(extension) ⇒ String
#format_level ⇒ GOffice::FileFormatLevel
Returns format-level.
#format_level=(format_level) ⇒ GOffice::FileFormatLevel
#id ⇒ String
Returns id.
#id=(id) ⇒ String
#interactive_only=(interactive_only) ⇒ Boolean
#interactive_only? ⇒ Boolean
Returns interactive-only.
#mime_type ⇒ String
Returns mime-type.
#mime_type=(mime_type) ⇒ String
#overwrite=(overwrite) ⇒ Boolean
#overwrite? ⇒ Boolean
Returns overwrite.
#overwrite_files=(overwrite) ⇒ nil
Changes behaviour of the saver when saving a file. If overwrite is set to TRUE, existing file will be overwritten. Otherwise, the saver will report an error without saving anything.
#register ⇒ nil
Adds fs saver to the list of available file savers, making it available for the user when selecting file format for save.
#register_as_default(priority) ⇒ nil
Adds fs saver to the list of available file savers, making it available for the user when selecting file format for save. The saver is also marked as default saver with given priority. When Gnumeric needs default file saver, it chooses the one with the highest priority. Recommended range for priority is [0, 100].
#save(io_context, view, output) ⇒ nil
Saves wbv and the workbook it is attached to into output stream. Results are reported using io_context object, use go_io_error_occurred to find out if operation was successful. It's possible that file_name is created and contain some data if operation fails, you should remove the file in that case.
#save_scope ⇒ GOffice::FileSaveScope
Returns The save scope of fs.
#save_scope=(scope) ⇒ nil
#scope ⇒ GOffice::FileSaveScope
Returns scope.
#scope=(scope) ⇒ GOffice::FileSaveScope
#set_export_options(doc, options) ⇒ Boolean
#sheet_selection=(sheet_selection) ⇒ Boolean
#sheet_selection? ⇒ Boolean
Returns sheet-selection.
#unregister ⇒ nil
Removes fs saver from list of available file savers. Reference count for the saver is decremented inside the function.