Commit Graph
11 Commits
Author SHA1 Message Date
Philip Peitsch 9d682b91b2 Moved Formatting.applyStyle into consuming operation
Apply style logic is only consumed in one location. Extra wrapping
functions added in StyleHelper and Formatting are unnecessary, and
should not have been called from outside an operation. Pushing this
logic into the operation prevents accidental misuse.
2013-12-06 01:27:19 +11:00
Jos van den Oever 545c15fedb Add more type information to class UnitTester.
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.
2013-11-26 16:55:00 +01:00
Friedrich W. H. Kossebau c2a795e668 Update link to repo: now https://github.com/kogmbh/WebODF/ 2013-10-23 18:20:30 +02:00
Friedrich W. H. Kossebau 508570dab8 Add copy of the AGPL3 to sources (+ add to created zip files) 2013-10-21 17:55:16 +02:00
Friedrich W. H. Kossebau 297562afb3 Consistency: "named" style -> "common" style 2013-09-20 18:50:29 +02:00
Philip Peitsch d73b8efb9e Adjust container re-use checks for applying direct styling
If the text node being considered was the 3rd child node (or later)
and the 1st node in the container was an unstyled text node, the
domUtils.rangeContainsNode check could incorrectly report the
parent container as suitable for re-use.
2013-09-20 14:28:00 +02:00
Philip Peitsch 5a86bddc6e Fix direct styling for selections that contain links
Usually the limits for a selection reference the first or last
text nodes. When the first text node is migrated to a new styled span,
the range limits will suddenly not include the following siblings that
should also be migrated. This causes moveToNewSpan to produce more
spans than necessary.
2013-09-20 14:28:00 +02:00
Philip Peitsch b29ab4e7bd Fix issue where parent-style-name is lost when deriving from an auto-style 2013-09-06 03:53:09 +10:00
Lu Li 0eff2c6a0a Refactor odf.Formatting class
* move getTextNode from OdfUtils to StyleHelper
* move some of the unit tests under FormattingTests to StyleHelperTests
2013-07-22 16:47:42 +02:00
Philip Peitsch db4b386b00 Generated auto-styles names are now deterministic across clients
* Memberid is hashed to ensure it is always valid characters
2013-07-16 15:01:08 +02:00
Philip Peitsch c3a28b3ce3 Implemented support for direct formatting of selection
Applying a direct style to a range will result in new
automatic styles being created for each unique style
block with the desired text properties.

Formatted text is contained within a span element just
above each text node that is within an ODF container
element.

TODO
* Styles should be validated before being applied
* Empty spans should be removed when modifying styles
2013-07-02 21:19:36 +02:00