Revision df5914bf
| b/webodf/lib/odf/OdfCanvas.js | ||
|---|---|---|
| 4 | 4 |
* This class manages a loaded ODF document that is shown in an element. |
| 5 | 5 |
* It takes care of giving visual feedback on loading, ensures that the |
| 6 | 6 |
* stylesheets are loaded. |
| 7 |
* @constructor |
|
| 8 |
* @param {!Element} element Put and ODF Canvas inside this element.
|
|
| 7 | 9 |
**/ |
| 8 | 10 |
odf.OdfCanvas = (function () {
|
| 9 | 11 |
var namespaces = (new odf.Style2CSS()).namespaces, |
| ... | ... | |
| 176 | 178 |
* @constructor |
| 177 | 179 |
* @param {!Element} element Put and ODF Canvas inside this element.
|
| 178 | 180 |
*/ |
| 179 |
function OdfCanvas(element) {
|
|
| 181 |
odf.OdfCanvas = function OdfCanvas(element) {
|
|
| 180 | 182 |
var self = this, |
| 181 | 183 |
document = element.ownerDocument, |
| 182 | 184 |
odfcontainer, |
| ... | ... | |
| 330 | 332 |
} |
| 331 | 333 |
|
| 332 | 334 |
listenEvent(element, "click", processClick); |
| 333 |
} |
|
| 334 |
return OdfCanvas; |
|
| 335 |
};
|
|
| 336 |
return odf.OdfCanvas;
|
|
| 335 | 337 |
}()); |
| b/webodf/lib/odf/OdfContainer.js | ||
|---|---|---|
| 7 | 7 |
/** |
| 8 | 8 |
* The OdfContainer class manages the various parts that constitues an ODF |
| 9 | 9 |
* document. |
| 10 |
* @constructor |
|
| 11 |
* @param {!string} url
|
|
| 10 | 12 |
**/ |
| 11 | 13 |
odf.OdfContainer = (function () {
|
| 12 | 14 |
var styleInfo = new odf.StyleInfo(), |
| ... | ... | |
| 148 | 150 |
/** |
| 149 | 151 |
* @constructor |
| 150 | 152 |
* @param {!string} name
|
| 151 |
* @param {!OdfContainer} container
|
|
| 153 |
* @param {!odf.OdfContainer} container
|
|
| 152 | 154 |
* @param {!core.Zip} zip
|
| 153 | 155 |
*/ |
| 154 | 156 |
function OdfPart(name, container, zip) {
|
| ... | ... | |
| 218 | 220 |
}; |
| 219 | 221 |
/** |
| 220 | 222 |
* @constructor |
| 221 |
* @param {!OdfContainer} odfcontainer
|
|
| 223 |
* @param {!odf.OdfContainer} odfcontainer
|
|
| 222 | 224 |
*/ |
| 223 | 225 |
function OdfPartList(odfcontainer) {
|
| 224 | 226 |
var self = this; |
| ... | ... | |
| 231 | 233 |
* @constructor |
| 232 | 234 |
* @param {!string} url
|
| 233 | 235 |
*/ |
| 234 |
function OdfContainer(url) {
|
|
| 236 |
odf.OdfContainer = function OdfContainer(url) {
|
|
| 235 | 237 |
var self = this, |
| 236 | 238 |
zip = null; |
| 237 | 239 |
|
| ... | ... | |
| 498 | 500 |
/**@type{!string}*/ s = documentElement("document-content", nsmap);
|
| 499 | 501 |
serializer.filter = new OdfNodeFilter(self.rootElement, |
| 500 | 502 |
self.rootElement.body); |
| 501 |
// Until there is code to determine if a font is referenced only from
|
|
| 502 |
// all font declaratios will be stored in styles.xml |
|
| 503 |
// Until there is code to determine if a font is referenced only |
|
| 504 |
// from all font declaratios will be stored in styles.xml
|
|
| 503 | 505 |
s += serializer.writeToString(self.rootElement.automaticStyles, nsmap); |
| 504 | 506 |
s += serializer.writeToString(self.rootElement.body, nsmap); |
| 505 | 507 |
s += "</office:document-content>"; |
| ... | ... | |
| 568 | 570 |
loadComponents(); |
| 569 | 571 |
} |
| 570 | 572 |
}); |
| 571 |
} |
|
| 572 |
OdfContainer.EMPTY = 0; |
|
| 573 |
OdfContainer.LOADING = 1; |
|
| 574 |
OdfContainer.DONE = 2; |
|
| 575 |
OdfContainer.INVALID = 3; |
|
| 576 |
OdfContainer.SAVING = 4; |
|
| 577 |
OdfContainer.MODIFIED = 5; |
|
| 573 |
};
|
|
| 574 |
odf.OdfContainer.EMPTY = 0;
|
|
| 575 |
odf.OdfContainer.LOADING = 1;
|
|
| 576 |
odf.OdfContainer.DONE = 2;
|
|
| 577 |
odf.OdfContainer.INVALID = 3;
|
|
| 578 |
odf.OdfContainer.SAVING = 4;
|
|
| 579 |
odf.OdfContainer.MODIFIED = 5;
|
|
| 578 | 580 |
/** |
| 579 | 581 |
* @param {!string} url
|
| 580 |
* @return {!OdfContainer}
|
|
| 582 |
* @return {!odf.OdfContainer}
|
|
| 581 | 583 |
*/ |
| 582 |
OdfContainer.getContainer = function (url) {
|
|
| 583 |
return new OdfContainer(url); |
|
| 584 |
odf.OdfContainer.getContainer = function (url) {
|
|
| 585 |
return new odf.OdfContainer(url);
|
|
| 584 | 586 |
}; |
| 585 |
return OdfContainer; |
|
| 587 |
return odf.OdfContainer;
|
|
| 586 | 588 |
}()); |
| b/webodf/odfedit.js | ||
|---|---|---|
| 1 | 1 |
/*global runtime document odf window Ext*/ |
| 2 |
/** |
|
| 3 |
* @type {odf.OdfCanvas}
|
|
| 4 |
*/ |
|
| 2 | 5 |
var odfcanvas; |
| 3 | 6 |
|
| 4 | 7 |
/** |
| ... | ... | |
| 155 | 158 |
var me = this; |
| 156 | 159 |
function buttonHandler(button, event) {
|
| 157 | 160 |
} |
| 158 |
this.defaults = {
|
|
| 161 |
me.defaults = {
|
|
| 159 | 162 |
}; |
| 160 |
this.initialConfig = Ext.apply({
|
|
| 161 |
}, this.initialConfig);
|
|
| 162 |
this.items = [{
|
|
| 163 |
me.initialConfig = Ext.apply({
|
|
| 164 |
}, me.initialConfig);
|
|
| 165 |
me.items = [{
|
|
| 163 | 166 |
xtype: 'box', |
| 164 | 167 |
id: 'canvas', |
| 165 | 168 |
autoEl: {
|
| ... | ... | |
| 172 | 175 |
autoScroll: true, |
| 173 | 176 |
scroll: true |
| 174 | 177 |
}]; |
| 175 |
this.tbar = {
|
|
| 178 |
me.tbar = {
|
|
| 176 | 179 |
xtype: 'toolbar', |
| 177 | 180 |
items: [{
|
| 178 | 181 |
xtype: 'button', |
| b/webodf/tools/extjsexterns.js | ||
|---|---|---|
| 30 | 30 |
* @type {!Object}
|
| 31 | 31 |
*/ |
| 32 | 32 |
Ext.data.Node.prototype.attributes = {};
|
| 33 |
/** |
|
| 34 |
* @param {!string} id
|
|
| 35 |
* @return {Ext.Component}
|
|
| 36 |
*/ |
|
| 37 |
Ext.getCmp = function (id) {};
|
|
| 33 | 38 |
Ext.tree = {};
|
| 34 | 39 |
/** |
| 35 | 40 |
* @constructor |
| ... | ... | |
| 45 | 50 |
Ext.tree.TreePanel.prototype.getRootNode = function () {};
|
| 46 | 51 |
/** |
| 47 | 52 |
* @constructor |
| 53 |
* @extends {Ext.Component}
|
|
| 48 | 54 |
*/ |
| 49 | 55 |
Ext.BoxComponent = function (settings) {};
|
| 50 | 56 |
/** |
| ... | ... | |
| 52 | 58 |
*/ |
| 53 | 59 |
Ext.BoxComponent.prototype.getEl = function () {};
|
| 54 | 60 |
/** |
| 55 |
* @type {!Ext.Element}
|
|
| 61 |
* @constructor
|
|
| 56 | 62 |
*/ |
| 57 |
Ext.BoxComponent.prototype.el;
|
|
| 63 |
Ext.Button = function (settings) {};
|
|
| 58 | 64 |
/** |
| 59 | 65 |
* @constructor |
| 60 | 66 |
*/ |
| 61 |
Ext.Button = function (settings) {};
|
|
| 67 |
Ext.Component = function (settings) {};
|
|
| 68 |
/** |
|
| 69 |
* @type {Object}
|
|
| 70 |
*/ |
|
| 71 |
Ext.Component.prototype.superclass = {};
|
|
| 72 |
/** |
|
| 73 |
* @type {!Ext.Element}
|
|
| 74 |
*/ |
|
| 75 |
Ext.Component.prototype.el; |
|
| 62 | 76 |
/** |
| 63 | 77 |
* @constructor |
| 64 | 78 |
*/ |
| 65 | 79 |
Ext.Element = function (settings) {};
|
| 66 | 80 |
/** |
| 81 |
* @constructor |
|
| 82 |
*/ |
|
| 83 |
Ext.Panel = function (settings) {};
|
|
| 84 |
/** |
|
| 67 | 85 |
* @type {!Element}
|
| 68 | 86 |
*/ |
| 69 | 87 |
Ext.Element.prototype.dom; |
Also available in: Unified diff