2014-10-10 02:22:38 +00:00
|
|
|
/* Part 3: Packages */
|
2017-02-03 20:50:45 +00:00
|
|
|
function parse_ods(zip/*:ZIPFile*/, opts/*:?ParseOpts*/) {
|
|
|
|
opts = opts || ({}/*:any*/);
|
2017-02-22 06:57:59 +00:00
|
|
|
var ods = !!safegetzipfile(zip, 'objectdata');
|
|
|
|
if(ods) var manifest = parse_manifest(getzipdata(zip, 'META-INF/manifest.xml'), opts);
|
|
|
|
var content = getzipdata(zip, 'content.xml');
|
2017-03-09 05:24:32 +00:00
|
|
|
if(!content) throw new Error("Missing content.xml in " + (ods ? "ODS" : "UOF")+ " file");
|
2017-02-22 06:57:59 +00:00
|
|
|
return parse_content_xml(ods ? content : utf8read(content), opts);
|
|
|
|
}
|
|
|
|
|
|
|
|
function parse_fods(data/*:string*/, opts/*:?ParseOpts*/) {
|
|
|
|
return parse_content_xml(data, opts);
|
2017-02-03 20:50:45 +00:00
|
|
|
}
|