Commit Graph

  • 3b69405a4d Make linter happy Aditya Bhatt 2013-04-15 13:38:25 +05:30
  • 468f5490b1 A method to retrieve the cursor position using it's node's DOM location, as a container + offset pair. Use this position for iterator.setPosition() every time SelectionMover uses it for some distance calculation. This fixes the problem where after a removeText operation a textNode would be removed from the DOM and therefore container.parentNode would be null, thus breaking movement. Aditya Bhatt 2013-04-15 12:42:00 +05:30
  • 4c80c84e4e Rewritten OpRemoveText, using the new and awesome getTextNeighborhood method, which can delete text across serveral nodes. Aditya Bhatt 2013-04-12 15:09:21 +05:30
  • 43fd952ed3 Use a flat 1 dimensional array for the textneighbor hood, with the elements ordered accoding to the length direction Aditya Bhatt 2013-04-12 01:29:43 +05:30
  • 204b4f2f2d Reverse the neighborhood before appending if the length is negative (i.e., deleting towards the left). Aditya Bhatt 2013-04-11 23:59:37 +05:30
  • b6ad072725 Handle a minor issue where a non-textNode does not have a node.data property Aditya Bhatt 2013-04-11 23:37:40 +05:30
  • f1f5e7b7f3 Add a getTextNeighborhood(position, length) method to OdtDocument, which gives the smallest possible array of sequential, disjoint text neighborhoods that contain the positions position and position + length in them. Very useful for deletion. Aditya Bhatt 2013-04-11 23:04:54 +05:30
  • e68ed4ee27 Rename nextPosition and previousPosition methods in Position Iterator to get() versions, and add a method to OdtDocument to get a position iterator at a desired position value Aditya Bhatt 2013-04-11 18:59:01 +05:30
  • c2c9106cd7 a getNeighborhood method for PositionIterator, which gives an array of textNodes (which was 1 textNode, but splitted for some reason like having a cursor) Aditya Bhatt 2013-04-11 17:35:24 +05:30
  • a3b328cc21 Use domOffset instead of textOffset to get the offset within this text node Aditya Bhatt 2013-04-11 17:20:41 +05:30
  • c2b4622d6b Because now we may not always enter a textNode from it's offset 0 (for example when we skip that position when entering a span from the left), set it's first encountered nodeOffset as iterator.textOffset(), instead of 0. This fixes backspacing within a span. Aditya Bhatt 2013-04-11 16:20:22 +05:30
  • b8b2418d5a Some convenience retriever methods - previousSibling(), nextSibling(), and text() for positionIterator, for when we need more information about a position's surroundings. Use these methods in getPositionInTextNode and in the TextPositionFilter in OdtDocument to have (as far as I have tested) smooth movement across spans and text nodes within a paragraph. Also, text is now inserted near the cursor position instead of at a paragraph's extremities. Text removal offsets are broken after this. Aditya Bhatt 2013-04-10 05:46:33 +05:30
  • 25c0b375d1 Check for previous sibling type and text offset to determine which positions to filter out during cursor movement. Now the cursor moves naturally across spans <-> text nodes. Aditya Bhatt 2013-04-09 23:35:11 +05:30
  • 2ebda70e75 WORKAROUND: let's keep the text node as "" after pressing delete before the last character. Deleting it breaks things currently because the position iterator is very much dependent on a 'container' which, because of having an inline cursor, happens to be the text node that was deleted. Aditya Bhatt 2013-04-09 21:33:33 +05:30
  • fdc93f721c The paragraphElement for a textNode should be saved in a variable first because accessing it after the textNode is deleted would not be possible Aditya Bhatt 2013-04-09 21:23:52 +05:30
  • ae7afd4930 No need for height setting in CSS rule for #canvas in editor.js, is overwritten by odf.OdfCanvas Friedrich W. H. Kossebau 2013-04-24 11:09:35 +02:00
  • be545658d7 Trigger an update of the canvas size on changes of the content/styles Friedrich W. H. Kossebau 2013-04-23 18:01:06 +02:00
  • 9832095cd0 Remove unused methods from odf.Formatting Friedrich W. H. Kossebau 2013-04-19 15:54:28 +02:00
  • 3d200dcf75 Remove outdated webodf/odfedit.html & webodf/odfedit.js Friedrich W. H. Kossebau 2013-04-19 15:53:58 +02:00
  • 377f925a66 PositionIterator: more assert Tobias Hintze 2013-04-22 14:10:25 +02:00
  • e96ebc7128 PositionIterator: more asserts Tobias Hintze 2013-04-22 12:36:39 +02:00
  • f2023c9b8f add more runtime.assert calls Tobias Hintze 2013-04-22 12:05:54 +02:00
  • 8813c3b491 Prevent empty paragraphs and headings from being collapsed Philip Peitsch 2013-04-22 16:09:18 +10:00
  • 0d4c7c0d49 Move createFontFaceDeclsMap() function from odf.Style2CSS to odf.Formatting Friedrich W. H. Kossebau 2013-04-18 19:24:50 +02:00
  • a3ba82f92a Turn odf.Namespace from a class into a singleton object Friedrich W. H. Kossebau 2013-04-18 14:26:09 +02:00
  • b13a9ce90b Move loading of fonts into a css stylesheet to odf.OdfCanvas Friedrich W. H. Kossebau 2013-04-17 16:33:55 +02:00
  • 7741d55f2e Create new class odf.Namespaces Friedrich W. H. Kossebau 2013-04-17 16:22:52 +02:00
  • 24018a41fd remove broken code for loading embedded fonts with flat odt files Friedrich W. H. Kossebau 2013-04-18 10:29:49 +02:00
  • aa6e122433 Remove outdated code trying to call getPartUrl on ODF containers Friedrich W. H. Kossebau 2013-04-18 10:28:54 +02:00
  • f709b07228 Implemented OpInsertTable Philip Peitsch 2013-04-12 11:24:36 +10:00
  • 79c5d5d228 Implementation notes and ideas around editing Philip Peitsch 2013-04-12 16:12:57 +10:00
  • 94985f606a office:text element will force a word-wrap if a particular word is longer than the available line width Philip Peitsch 2013-04-10 16:47:08 +10:00
  • b5f75271cf In odf.FontLoader's loadFontIntoCSS() break if we reached the targeted entry, no need to loop on Friedrich W. H. Kossebau 2013-04-16 17:16:43 +02:00
  • 9a01746ad7 Workaround for failed build with Closure compiler. When a build fails with Closure Compiler it still creates the output file. We work around this by telling Closure Compiler to write to a temporary file and move the file the actual target only after Closure Compiler finishes successfully. Jos van den Oever 2013-04-16 11:24:33 +02:00
  • e21635d074 Fix parallelization of cmake build. There is a remark in the CMake documentation that says: Do not list the output in more than one independent target that may build in parallel or the two instances of the rule may conflict (instead use add_custom_target to drive the command and make the other targets depend on that one). This patch makes sure that that advice is followed in many more places in the WebODF build. Jos van den Oever 2013-04-15 19:21:55 +02:00
  • 506f56434f cleanup odf.Style2CSS.makeFontFaceDeclsMap (now .createFontFaceDeclsMap) Friedrich W. H. Kossebau 2013-04-15 16:08:55 +02:00
  • 677246994a Update closure compiler. Jos van den Oever 2013-04-15 15:49:53 +02:00
  • 5b221ebf1a Remove unused lib/core/dummyxmlmodel.js_ Friedrich W. H. Kossebau 2013-04-10 16:41:31 +02:00
  • b7b767dd90 Remove unused ops.SessionPointFilter Friedrich W. H. Kossebau 2013-04-10 16:18:33 +02:00
  • 80cd3069d6 Add license header to LoopWatchDog.js Friedrich W. H. Kossebau 2013-04-10 16:36:20 +02:00
  • 6e7e3fe55f Rename OpCloneStyle to OpCloneParagraphStyle, OpDeleteStyle to OpDeleteParagraphStyle Friedrich W. H. Kossebau 2013-04-10 12:15:07 +02:00
  • a8fab106c0 move core.EditInfo into ops namespace Friedrich W. H. Kossebau 2013-04-09 15:31:11 +02:00
  • 3d03b1cc70 Cleanup ops.Session: add types & API dox, remove unneeded methods Friedrich W. H. Kossebau 2013-04-09 00:31:19 +02:00
  • dadc0578f2 Add ops.OperationRouter to describe the generic interface Friedrich W. H. Kossebau 2013-04-09 00:12:01 +02:00
  • d5c27b7892 Extend callbacks in the editorOptions: cursorAddedCallback, cursorRemovedCallback, registerCallbackForShutdown Friedrich W. H. Kossebau 2013-04-10 10:40:16 +02:00
  • 11e1a7666d Make all ops only depend on global ops Friedrich W. H. Kossebau 2013-04-06 05:26:38 +02:00
  • 263002f70f Update Copyright years of ops code files Friedrich W. H. Kossebau 2013-04-06 05:21:18 +02:00
  • 16f634ce1a Have ops return the success of their execute Friedrich W. H. Kossebau 2013-04-06 05:08:22 +02:00
  • 6f5ced4d1e Do not pass session as parameter to the ops contructors, pass odtDocument instead of domroot in the execute method Friedrich W. H. Kossebau 2013-04-06 04:39:39 +02:00
  • 7868d6bfa3 Move eventNotifier from ops.Session to ops.OdtDocument Friedrich W. H. Kossebau 2013-04-06 04:21:18 +02:00
  • dade008500 Add core.EventNotifier, as generic notification handler for both ops.Session and EditoSession Friedrich W. H. Kossebau 2013-04-06 03:46:00 +02:00
  • 54b3a1381c move all DOM manipulation code to the ops Friedrich W. H. Kossebau 2013-04-06 02:43:32 +02:00
  • 138123bc94 Cope with list and bullet styles that do not specify values for fo:text-indent or fo:margin-left Philip Peitsch 2013-04-09 17:20:39 +10:00
  • b5ebf1452b change SessionViewOptions declaration from @interface to @typedef Tobias Hintze 2013-04-09 12:41:55 +02:00
  • 1ecc0ec1f9 JSDoc cleanups and dead code removal Philip Peitsch 2013-04-09 11:27:38 +10:00
  • 259b203d21 Avatars and modification markers are hidden by default for a non-networked editing session Philip Peitsch 2013-04-09 11:21:15 +10:00
  • 7455add5fc booting the editor: expose saveCallback and loginProcedure Tobias Hintze 2013-04-08 16:49:47 +02:00
  • c19c55f556 Remove notion of the extjs submodule dir from jscoverage call, now that it's gone Friedrich W. H. Kossebau 2013-04-05 17:37:35 +02:00
  • b14a98d003 Remove submodules. Jos van den Oever 2013-04-05 15:18:20 +02:00
  • 95407f9336 Upgrade to JSLint 2013-03-28 Jos van den Oever 2013-04-04 13:06:12 +02:00
  • d1dc5840c4 Upgrade to newer closure compiler. Jos van den Oever 2013-03-28 10:23:36 +01:00
  • f8014050d0 Remove outdated comment about moving signal ids to ops.Session Friedrich W. H. Kossebau 2013-04-05 14:32:32 +02:00
  • e46d4877b2 Remove unused file webodf/lib/ops/OperationInstance.js Friedrich W. H. Kossebau 2013-04-04 15:30:22 +02:00
  • a5cd223e77 Corrected function descriptions Philip Peitsch 2013-04-03 17:22:10 +11:00
  • a6bb3d1141 Create a valid manifest.xml that contains all loaded parts and their types Philip Peitsch 2013-04-03 15:31:36 +11:00
  • 95d923dc26 Remove unused/unneeded property "position" from OpUpdateParagraphStyle Friedrich W. H. Kossebau 2013-04-03 18:00:20 +02:00
  • 8bc12fa829 add info text about state of style saving Friedrich W. H. Kossebau 2013-04-03 16:45:02 +02:00
  • 87b7b97284 Use textNode.length instead of just length Aditya Bhatt 2013-04-03 14:20:05 +05:30
  • b9b7b0d380 Handle backspace and delete at paragraph extremites gracefully Aditya Bhatt 2013-04-03 14:06:28 +05:30
  • 9182956538 Don't set the text that is deleted with removeText to "" if the offset is zero, *delete* that textNode. So that we can avoid multiple textNodes after backspacing. Important: SessionController allowed removeText operations to be fired if the position was -1. This caused a lot of nodes *after* the cursor to be deleted in 'bulk' if you pressed backspace at the first position of the document. Disallow that. Aditya Bhatt 2013-03-28 22:02:57 +05:30
  • 9e2582aa0d Initialize the cursorTextNode with "" if the putCursorIntoTextNode offset is zero. Aditya Bhatt 2013-03-27 18:38:31 +05:30
  • 8a57e64279 Also "load" fonts declared in content.xml and for flat ODT Friedrich W. H. Kossebau 2013-04-03 14:59:06 +02:00
  • a468e5b539 Prefix automatic styles from styles.xml, to avoid possibly style shadowing due to reused style names Friedrich W. H. Kossebau 2013-04-03 14:56:11 +02:00
  • 8c13d0da0e boot_editor.js and Editor cleanup round2: most notable: untangle init_gui_and_doc: provide clean chain of callbacks, separate collaborative/network hookup from document loading, changeSomeNames, comments and declarations Tobias Hintze 2013-04-03 13:37:17 +02:00
  • c27d22ef09 tag origin of automatic styles on loading and write all styles completely back Friedrich W. H. Kossebau 2013-03-27 18:07:56 +01:00
  • 421535d891 Small fix in API dox of xmldom.LSSerializerFilter.writeToString() Friedrich W. H. Kossebau 2013-03-27 18:05:21 +01:00
  • 287303d177 more cleanup related to the SessionImplementation -> Session rename Tobias Hintze 2013-03-26 14:23:19 +01:00
  • 66eb0054d0 rename SessionImplementation to Session (and thus remove the Session-interface) Tobias Hintze 2013-03-26 14:15:02 +01:00
  • 75408c990a usermodel: fix the checking for double-subscription and check on unsubscribe Tobias Hintze 2013-03-26 10:20:26 +01:00
  • 2af73a06bd implement the updated concept of getUserDetailsAndUpdates; adds quite some comments and asserts Tobias Hintze 2013-03-26 09:35:34 +01:00
  • 1a7f6a6dd7 Some avatar handle styling changes. In webodf, the handle's image's border is set with the user's color instead of the handle background. Also, the cursor span is changed to 2px width for better visibility. In editor.css, custom CSS overrides are applied to make the handles look very much like the avatar 'thumbnails' in the people sidebar. Aditya Bhatt 2013-03-25 19:49:42 +05:30
  • d543584eea whitespace Aditya Bhatt 2013-03-25 18:34:04 +05:30
  • aa02bf59c6 Need to enclose the dropdownbutton text span within a span, because dojo restructures the html upto the first descendant span Aditya Bhatt 2013-03-25 18:27:21 +05:30
  • eacdba133c Fix wrong alignment when strings are too long Aditya Bhatt 2013-03-25 17:19:08 +05:30
  • 28eaa42dc8 make webodf/Editor a class; change getin.js to boot_editor.js Tobias Hintze 2013-03-26 09:07:59 +01:00
  • e8e98928e6 if(value) Aditya Bhatt 2013-03-25 15:29:03 +05:30
  • 21f7e5fff4 Better handling of undefined font family in fontPicker Aditya Bhatt 2013-03-25 14:34:55 +05:30
  • 5df8bc3471 Parantheses. Use parantheses. Generate proper CSS that includes semicolon. Aditya Bhatt 2013-03-25 14:02:09 +05:30
  • a1354b010e Some changes to handle undefined font families Aditya Bhatt 2013-03-23 23:50:47 +05:30
  • df17d620c7 Add a getFamily method to fontPicker, which retrieves the family for a font with a given name. Use this in the font pane so that we can see previews for fonts. Aditya Bhatt 2013-03-20 22:00:56 +05:30
  • 39ba2df2dc SessionView: don't fail on missing userdata Tobias Hintze 2013-03-25 11:07:10 +01:00
  • 375ecd5737 simplerevisionserver: tell where the server listens Tobias Hintze 2013-03-23 22:29:59 +01:00
  • 694a80e6e0 add a README-viewer.odt to programs/viewer/ and in viewer-$ver.zip Tobias Hintze 2013-03-23 14:01:20 +01:00
  • 74a0bab26f add odf pack into tools dir Tobias Hintze 2013-03-22 19:52:03 +01:00
  • 7f86af9234 pimp StyleInfo code a little with types, comments and slight var/methods renamings Friedrich W. H. Kossebau 2013-03-22 11:29:43 +01:00
  • 7a9e7c50c7 whitespaces Tobias Hintze 2013-03-20 22:26:01 +01:00
  • e97953f6f1 programs/editor/widgets: make two panes work in a subdir as well Tobias Hintze 2013-03-20 20:47:03 +01:00
  • c23067a494 removing verbosity on js console Tobias Hintze 2013-03-20 15:48:21 +01:00
  • be7ba7cd80 yet another update of the welcome.odt, introducing embdedded font Tobias Hintze 2013-03-20 15:20:47 +01:00
  • f5dda183da Add dojo/text!resources/fonts/fonts.css explanation Aditya Bhatt 2013-03-20 19:01:21 +05:30