2010-06-12 01:15:51 +02:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
2010-06-11 18:00:18 +02:00
|
|
|
<head>
|
|
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
2010-06-12 20:42:50 +02:00
|
|
|
<style type="text/css" media="screen">
|
|
|
|
|
body, html, div {
|
|
|
|
|
padding: 0px;
|
|
|
|
|
margin: 0px;
|
|
|
|
|
border: 0px;
|
2010-06-12 20:57:09 +02:00
|
|
|
background: #888888;
|
2010-06-12 20:42:50 +02:00
|
|
|
}
|
|
|
|
|
</style>
|
2010-06-11 18:00:18 +02:00
|
|
|
<style type="text/css" media="screen">
|
2010-06-12 01:15:51 +02:00
|
|
|
@namespace text url(urn:oasis:names:tc:opendocument:xmlns:text:1.0);
|
2010-06-12 20:42:50 +02:00
|
|
|
@namespace draw url(urn:oasis:names:tc:opendocument:xmlns:drawing:1.0);
|
|
|
|
|
@namespace office url(urn:oasis:names:tc:opendocument:xmlns:office:1.0);
|
2010-06-12 21:27:49 +02:00
|
|
|
@namespace table url(urn:oasis:names:tc:opendocument:xmlns:table:1.0);
|
2010-06-12 20:42:50 +02:00
|
|
|
text|p, text|h {
|
2010-06-12 01:15:51 +02:00
|
|
|
display: block;
|
|
|
|
|
border: 1px solid black;
|
2010-06-12 20:42:50 +02:00
|
|
|
padding: 3px 3px 3px 3px;
|
|
|
|
|
margin: 5px 5px 5px 5px;
|
|
|
|
|
}
|
|
|
|
|
text|h {
|
|
|
|
|
font-weight: bold;
|
|
|
|
|
}
|
|
|
|
|
office|text {
|
|
|
|
|
display: block;
|
2010-06-12 21:27:49 +02:00
|
|
|
background: white;
|
|
|
|
|
}
|
|
|
|
|
office|spreadsheet {
|
|
|
|
|
display: block;
|
|
|
|
|
border-collapse: collapse;
|
2010-06-12 21:59:13 +02:00
|
|
|
empty-cells: show;
|
2010-06-12 21:27:49 +02:00
|
|
|
font-family: sans-serif;
|
|
|
|
|
font-size: 10pt;
|
2010-06-12 20:42:50 +02:00
|
|
|
}
|
|
|
|
|
office|presentation {
|
|
|
|
|
background: #888888;
|
2010-06-12 20:57:09 +02:00
|
|
|
display: inline-block;
|
2010-06-12 20:42:50 +02:00
|
|
|
}
|
|
|
|
|
draw|page {
|
|
|
|
|
display: block;
|
|
|
|
|
width: 6in;
|
|
|
|
|
height: 4in;
|
|
|
|
|
background: white;
|
2010-06-12 01:15:51 +02:00
|
|
|
margin: 3px;
|
|
|
|
|
}
|
2010-06-12 21:27:49 +02:00
|
|
|
office|spreadsheet text|p {
|
|
|
|
|
border: 0px;
|
|
|
|
|
padding: 1px;
|
|
|
|
|
margin: 0px;
|
|
|
|
|
}
|
2010-06-12 21:59:13 +02:00
|
|
|
office|spreadsheet table|table {
|
|
|
|
|
background: white;
|
|
|
|
|
margin: 3px;
|
|
|
|
|
}
|
2010-06-12 23:35:40 +02:00
|
|
|
office|spreadsheet table|table:after {
|
|
|
|
|
/* show sheet name the end of the sheet */
|
|
|
|
|
content: attr(table|name);
|
|
|
|
|
}
|
|
|
|
|
office|spreadsheet table|table-row {
|
|
|
|
|
counter-increment: row;
|
|
|
|
|
}
|
|
|
|
|
office|spreadsheet table|table-row:before {
|
|
|
|
|
width: 3em;
|
|
|
|
|
background: #cccccc;
|
|
|
|
|
border: 1px solid black;
|
|
|
|
|
text-align: center;
|
|
|
|
|
content: counter(row);
|
|
|
|
|
}
|
2010-06-12 21:27:49 +02:00
|
|
|
office|spreadsheet table|table-cell {
|
|
|
|
|
border: 1px solid #cccccc;
|
|
|
|
|
}
|
|
|
|
|
table|table {
|
|
|
|
|
display: table;
|
|
|
|
|
border: 1px solid black;
|
|
|
|
|
}
|
|
|
|
|
table|table-row {
|
|
|
|
|
display: table-row;
|
|
|
|
|
}
|
|
|
|
|
table|table-column {
|
|
|
|
|
display: table-column;
|
|
|
|
|
}
|
|
|
|
|
table|table-cell {
|
|
|
|
|
display: table-cell;
|
|
|
|
|
}
|
2010-06-12 01:15:51 +02:00
|
|
|
text|p[text|style-name='list.start'] {
|
|
|
|
|
color: red;
|
2010-06-11 18:00:18 +02:00
|
|
|
}
|
|
|
|
|
</style>
|
2010-06-12 01:15:51 +02:00
|
|
|
<script src="zip.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
<script src="base64.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
<script src="bytearray.js" type="text/javascript" charset="utf-8"></script>
|
|
|
|
|
<script src="rawinflate.js" type="text/javascript" charset="utf-8"></script>
|
2010-06-11 18:00:18 +02:00
|
|
|
<script type="text/javascript" charset="utf-8">
|
|
|
|
|
function init() {
|
|
|
|
|
var location = new String(document.location);
|
|
|
|
|
var pos = location.indexOf('#');
|
|
|
|
|
if (pos != -1) {
|
|
|
|
|
location = location.substr(pos+1);
|
|
|
|
|
}
|
|
|
|
|
document.body.innerHTML = location;
|
2010-06-12 01:15:51 +02:00
|
|
|
try {
|
|
|
|
|
loadFile(location);
|
|
|
|
|
} catch(e) {
|
|
|
|
|
document.body.innerHTML = e;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
function clear() {
|
|
|
|
|
while (document.body.firstChild) {
|
|
|
|
|
document.body.removeChild(document.body.firstChild);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
function loadFile(url) {
|
|
|
|
|
clear();
|
|
|
|
|
|
|
|
|
|
var ziplist = document.body;
|
2010-06-12 21:27:49 +02:00
|
|
|
document.body.innerHTML = 'Loading...';
|
2010-06-12 01:15:51 +02:00
|
|
|
var zip;
|
|
|
|
|
try {
|
|
|
|
|
zip = new jsodfkit.Zip(url);
|
|
|
|
|
} catch (e) {
|
|
|
|
|
ziplist.innerHTML = e;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
var xmldata = zip.load('content.xml');
|
|
|
|
|
if (!xmldata || xmldata.length == 0) {
|
|
|
|
|
throw "Cannot read content.xml";
|
|
|
|
|
}
|
|
|
|
|
var contentxml = document.createElement('div');
|
|
|
|
|
contentxml.id = 'contentxml';
|
|
|
|
|
var parser = new DOMParser();
|
|
|
|
|
var content = parser.parseFromString(xmldata, 'text/xml');
|
|
|
|
|
if (content && content.firstChild) {
|
|
|
|
|
content = document.importNode(content.firstChild, true);
|
|
|
|
|
contentxml.appendChild(content);
|
|
|
|
|
}
|
2010-06-12 21:27:49 +02:00
|
|
|
clear();
|
2010-06-12 01:15:51 +02:00
|
|
|
document.body.appendChild(contentxml);
|
|
|
|
|
}
|
2010-06-11 18:00:18 +02:00
|
|
|
</script>
|
|
|
|
|
|
2010-06-12 01:15:51 +02:00
|
|
|
<title></title>
|
2010-06-11 18:00:18 +02:00
|
|
|
</head>
|
|
|
|
|
|
2010-06-12 20:57:09 +02:00
|
|
|
<body contenteditable onload='init()'>
|
2010-06-12 23:35:40 +02:00
|
|
|
hello
|
2010-06-11 18:00:18 +02:00
|
|
|
</body>
|
|
|
|
|
</html>
|