diff --git a/.gitignore b/.gitignore index 7732fa90..34ab02be 100644 --- a/.gitignore +++ b/.gitignore @@ -15,3 +15,4 @@ programs/ios/www/webodf.js webodf/webodf.css.js build *.sw? +.idea \ No newline at end of file diff --git a/programs/editor/Editor.js b/programs/editor/Editor.js index 404e5f32..ab323692 100644 --- a/programs/editor/Editor.js +++ b/programs/editor/Editor.js @@ -66,7 +66,6 @@ define("webodf/editor/Editor", [ userList, networked = args.networked === true, opRouter, - sessionid, userModel, saveOdtFile = args.saveCallback, documentUrl; diff --git a/programs/editor/EditorSession.js b/programs/editor/EditorSession.js index 07fb0926..0b661749 100644 --- a/programs/editor/EditorSession.js +++ b/programs/editor/EditorSession.js @@ -369,9 +369,9 @@ define("webodf/editor/EditorSession", [ */ this.getDeclaredFonts = function () { var fontMap = formatting.getFontMap(), - sortedNames = [], usedFamilies = [], array = [], + sortedNames, key, value, i; diff --git a/webodf/lib/gui/Caret.js b/webodf/lib/gui/Caret.js index 38c5b319..d5539a4c 100644 --- a/webodf/lib/gui/Caret.js +++ b/webodf/lib/gui/Caret.js @@ -47,11 +47,6 @@ runtime.loadClass("ops.OdtCursor"); */ gui.Caret = function Caret(cursor, avatarInitiallyVisible) { "use strict"; - function clearNode(node) { - while (node.firstChild !== null) { - node.removeNode(node.firstChild); - } - } var self = this, span, avatar, @@ -222,6 +217,7 @@ gui.Caret = function Caret(cursor, avatarInitiallyVisible) { * without any scrolling * @param {!Element} caretElement * @param {?Element} containerElement + * @param {!number} margin * @return {!{left:!number,top:!number,right:!number,bottom:!number}} */ function getRelativeCaretOffsetRect(caretElement, containerElement, margin) { diff --git a/webodf/lib/gui/SessionView.js b/webodf/lib/gui/SessionView.js index f68807f2..be1f75f9 100644 --- a/webodf/lib/gui/SessionView.js +++ b/webodf/lib/gui/SessionView.js @@ -73,16 +73,14 @@ gui.SessionView = (function () { } /** - * @constructor + * @constructor * @param {gui.SessionViewOptions} viewOptions * @param {ops.Session} session * @param {gui.CaretFactory} caretFactory - */ + */ function SessionView(viewOptions, session, caretFactory) { var carets = {}, avatarInfoStyles, - headlineNodeName = 'text|h', - paragraphNodeName = 'text|p', editHighlightingEnabled = true, editInfons = 'urn:webodf:names:editinfo', editInfoMap = {}, @@ -96,6 +94,7 @@ gui.SessionView = (function () { /** * @param {string} nodeName + * @param {string} className * @param {string} memberId * @return {?Node} */ @@ -157,7 +156,6 @@ gui.SessionView = (function () { var editInfo, editInfoMarker, id = '', - userModel = session.getUserModel(), editInfoNode = element.getElementsByTagNameNS(editInfons, 'editinfo')[0]; if (editInfoNode) { diff --git a/webodf/lib/ops/OdtCursor.js b/webodf/lib/ops/OdtCursor.js index de211f51..86d4916d 100644 --- a/webodf/lib/ops/OdtCursor.js +++ b/webodf/lib/ops/OdtCursor.js @@ -109,7 +109,7 @@ ops.OdtCursor = function OdtCursor(memberId, odtDocument) { }; /** * Obtain the node representing the cursor. - * @return {Element} + * @return {!Element} */ this.getNode = function () { return cursor.getNode(); @@ -130,8 +130,7 @@ ops.OdtCursor = function OdtCursor(memberId, odtDocument) { }; function init() { - var distanceToFirstTextNode, selection; - selection = new core.Selection(odtDocument.getDOM()); + var selection = new core.Selection(odtDocument.getDOM()); cursor = new core.Cursor(selection, odtDocument.getDOM()); // mark cursornode with memberid