Following initial design there should be multiple different operation sets
possible, all working on the same document classes.
So relying on a certain optype and its spec in the code of ops.OdtDocument
is conflicting with that.
Line ending detection is still not stable when the wrap point doesn't
span a cursor position (as happens when the wrap occurs over
whitespace). Fixing this issue is not easy, so these tests demonstrate
the current bad behaviour so at least it is somewhat documented.
Line ending detection was relying on wrapping occurring near or in a block
of collapsed whitespace. When wrapping occurs between two elements, both
previous and next rectangles may be defined, though the vertical overlap
will be absent.
Recent changes to Formatting.getAppliedStyles return type were not correctly
spread through the DirectFormattingController. Update the CC types and fix
incorrect type usages in this controller.
To help preserve future sanity, some rough unit tests have been added for
the specifically fixed branches ONLY.
Fixes#723.
* remove @license tag, for consistency with library source files
* use copyright@kogmbh.com email address everywhere
* remove "additional permission", to be added only to released stuff
* separate license header by empty line from following content
* remove @license tag (to prevent Closure compiler keeping the comment)
* use copyright@kogmbh.com email address everywhere
* remove "additional permission", to be added only to released webodf.js
* separate license header by empty line from following content
runtime.loadClass(...) no longer expects that eval(fileContent) yields
the constructor, and a few loaded files rely on that (e.g. all singletons/namespaces),
so let's be consistent
The SelectionController interfaces allow word-expansion to occur on
arbitrary ranges that may not be tied directly to the cursor (e.g., when
used via the selectRange interface). This means the correct root to use
in all circumstances is the starting node & offset.
Fix an unhandled case if the anchor and focus points of a range were in
two separate roots. The select range logic will now clip the range to
the closest valid edge within the anchor's root.
There are no worthwhile unit tests in SelectionMoverTests after these
are cleaned out, so for now the whole class file has been removed.
Mid-term, the SelectionMover class is to be removed as soon as an
implementation of navigate-by-line-boundaries has been created for
the step-iterator approach.
This has been sourced from http://apps.timwhitlock.info/js/regex, which
creates these sets using the cset JS library. The set includes all
punctuation components only.
Addresses issue #268
Continuous typing causes the undo states to potentially become extremely
large. The naive assumption that some of the arrays in use would stay
small causes immense slow-downs when determining whether to create a new
undo state.
These bottlenecks have now been removed, and the search depth of various
grouping conditions have been limited to psmaller sizes.
When selecting or modifying large areas of content, the multiple
style information lookup becomes quite expensive. These can be greatly
sped up by using a common cached value + associated query object
instead.
An executing operation needs to emit various other signals (e.g.,
signalOperationStart) in order for various other controllers and UI
managers to perform correctly (e.g., preserving focus, re-drawing
the selection etc.).
The simplest way to ensure this happens is to use the session.enqueue
call. The UndoManager will ignore any new operations while performing
an undo.
Previously an edit would always start a new undo state if there last
operation in the current undo state was a non-edit. This change means
moving the cursor around will not reset the redo stack, more closely
matching other office suites.
Support has been added for operation groups. Operation groups (i.e.,
a group of ops queued together) are never split across multiple undo
states.
When groups are used, a new operation will be considered continuous
with the current undo state if it is continuous with the most recent
operation of the same type in the most recent group in the existing
undo state.
This allows consumers to enter and exit edit mode multiple times without
the undo stack being reset. Once the initial undo state has been captured
after the document is loaded, there is no major problems with preserving
the undo state (other than the undo manager’s shameful performance).
The names of the test functions are now passed separately from the function in
a structure. The reason for this is that Closure Compiler does not allow adding
additional fields to functions.