Commit Graph
64 Commits
Author SHA1 Message Date
lli 96cf60649a Make the text:line-break elements behave like <br>
Problem with the dipslay:block.
If we don't set a height for text:line-break, then there is no gaps
between sentences. As block element with no height doesn't take any space.
On the other hand if we do set a height for text:line-break, then all the
line breaks takes an empty line which is not exactly what we like. The
very first one should just end the line.
2013-10-18 16:47:50 +11:00
Friedrich W. H. Kossebau bf6369f63b Use new namespace "urn:webodf:names:helper" also for attribute "containsparagraphanchor" 2013-10-16 18:43:01 +02:00
Philip Peitsch ed80b875ea Only hide the browser selection once edit-mode is enabled
The recent shadow cursor implementation hides the native browser selection
highlights. However, the shadow cursor itself only starts being drawn
after edit-mode is enabled, meaning for a readonly document the selection
is invisible (#119)

This is a simple workaround that allows the native selection to be drawn
in circumstances where the shadow cursor is not active. Long term, the
shadow cursor should be also used on non-editable documents as detailed
in solution ideas for #119.
2013-10-16 21:42:59 +11:00
lli 7580166fec Support image selection
*Added a ImageSelector class to draw and clear image selection

Known issue:
The selection box is moving up and down when using browser's zooming functionality. but it is working fine with the slider zoom
2013-10-15 21:42:20 +11:00
Aditya Bhatt b426aab73f Add a SelectionView class that can be initialized with a cursor, a
SelectionViewManager that maintains SelectionView instances, and a
shadow cursor object that is an invisible caret-less cursor, fed to both
SessionController and SessionView, which follows the selection as it
changes.
Selections by each cursor are colored according to their memberid
2013-10-15 11:44:23 +02:00
Philip Peitsch 2ef6372de4 Improve visual height and vertical alignment of caret
Implementation makes judicious use of the cursor's selection and
getClientRects to compute small adjustments necessary to make the
caret more closely match the browser caret positioning.

At the moment, each cursor must be re-fixed after any operation that
may affect the line height of the caret (e.g., removing a text char may
place cursor next to a larger text character)

This implementation has been tested with
- Forward & backward selections
- Wrapped text & white space
- Image deletion
2013-09-30 10:07:12 +10:00
Philip Peitsch 2b15d50727 Add support for direct paragraph styling
Supported commands include:
- Paragraph alignment (left, center, right, justify)
- Paragraph indentation/unindentation
2013-09-06 10:38:14 +10:00
Aditya Bhatt 2c90904588 Hide annotations pane when no annotations are there;
even if annotations are enabled.
2013-08-29 16:25:23 +02:00
Lu Li 1e21b7f909 give draw:text-box a light grey border in text document (mimic what LibreOffice does) 2013-08-28 09:40:18 +02:00
Aditya Bhatt 64867d6e29 Use a × for the remove button icon, with some CSS to make it immune to
paragraph style changes
2013-08-14 13:49:33 +02:00
Aditya Bhatt d17e0a1c02 * Add a cicrular button to the annotation note in AnnotationViewManager
to delete the annotation
* Add click-handling for such buttons in SessionController
* Add OdfCanvas.forgetAnnotations() to untrack annotations
* Add OpRemoveAnnotation that takes a position within the
 annotation, and deletes that annotation. It also takes the
 walkable length of the annotation node for OT purposes.
 Any cursors inside are moved to the left of the annotation.
2013-08-14 13:49:33 +02:00
Aditya Bhatt cde5744cb6 Enforce style rules for paragraphs within annotations, till we have a
way to do some default styles for various kinds of things in webodf
2013-08-05 16:37:20 +02:00
Aditya Bhatt 3d2ba3712e Change the background gradient of annotation notes, so that blue
selections are better visible
2013-08-05 16:36:51 +02:00
Lu Li 00f6db91e4 move caret a little downwards so it looks better aligned to text.
otherwise the caret would be appeared at the top left corner of those text that
has double line spacing
2013-08-02 08:53:54 +02:00
Aditya Bhatt 7d6c95d9f2 A new AnnotationManager class in gui that handles wrapping the
annotation in html containers, adds connector elements, and a text
highlight.
Trigger OdfCanvas's anntationManager instance whenever any text
modification operation occurs.
2013-08-01 16:17:00 +02:00
Aditya Bhatt 2c66d5aca7 Wrap annotation node into a div and set it's right offset to position it
onto the sidebar using javascript, instead of hardcoded CSS
2013-08-01 16:17:00 +02:00
Aditya Bhatt 1ce15f31a7 * Don't let annotation highlighting override normal ODF styles
* Add a highlighting and therefore a connector regardless of the
presence of annotation-end.
* Some :before css to render an arrowhead of the connector
2013-08-01 16:16:33 +02:00
Aditya Bhatt ff55958701 * Better styling for annotation metadata
* A new RootFilter in OdtDocument
* A new core.PositionFilterChain to concatenate filters and chains
* Functions to convert steps between two filter spaces in SelectionMover
* A keyboardMovementsFilter = { base filter + RootFilter } chain in
SessionController, used to calculate steps to move triggered by keyboard
events. These steps are then mapped to base filter's space for op
initialization
2013-08-01 16:16:33 +02:00
Aditya Bhatt 302cc7a283 *Add an annotationsPane and position annotations onto it by styling them
via CSS
*Refactoring: Move common functions from TextStyleApplicator to DomUtils
and OdfUtils.
*Allow application of 'gui' style (with an annotation: namespace) in
TextStyleApplicator and Formatting.
*More CSS for annotations.
*Make OdfCanvas handle annotations.

Add an annotation:connector element to the highlight span for a dotted
line
2013-08-01 16:14:58 +02:00
Aditya Bhatt 9177dc936d Hide selection highlights that overflow into office|text 2013-07-08 11:16:43 +02:00
Philip Peitsch 6687b092a6 Allow deletion of tabs by OpRemoveText
OpRemoveText depends heavily on there being text present
for the node to be considered for removal. A simple way
to allow deletion of tabs is to add some basic text content
(e.g., a tab char) so the text node is then considered and
the containing tab can be cleaned up.

* Modify css to preserve whitespace in tab elements
* Added assert to OperationsTest to ensure correct tab data
* Updated all tests to specify the correct tab text content
2013-06-27 00:40:19 +10:00
Aditya Bhatt 06e29d3ff4 Shadow content needs the same text-align: left rule as
office|presentation
2013-06-20 11:46:45 +02:00
Aditya Bhatt 6b309ae2a7 Hide elements like presentation|footer-decl and
presentation|date-time-decl, and use draw|page:nth-of-type instead of
nth-child to select the page to be displayed. Now the slideshow only
shows actual slides, not other objects
2013-06-19 13:08:48 +02:00
Aditya Bhatt 29f45f5b54 Stop hardcoding dimensions for presentation pages in webodf.css, and get
these dimensions from the page style.
A new API call has been added to know the type of document
(text/presentation/spreadsheet), and this is used to decide what sort of
CSS rule to generate for page layouts.
As a little temporary hack, for slideshows, the last page style where the
height is lesser than the width is used for layouting, because for the
vast majority of presentations this holds true. This will change once we
adequately implement support for master styles.
2013-06-19 13:08:48 +02:00
Lu Li 51d65b0efb prevent long words from extending out the table cell 2013-06-14 15:04:51 +10:00
Aditya Bhatt c1028400c0 Don't obscure avatar handles when at boundaries. 2013-06-11 15:29:36 +02:00
Aditya Bhatt 248d43c319 A new mapping for ODT page style in Style2CSS
Temporarily disable page height mapping, till we have pagination
2013-06-11 12:42:17 +02:00
Lu Li dd0327d842 increase the min-height of the text block to 1.3em. document with empty paragraphs looks a bit better with this value. 2013-05-23 12:02:23 +02:00
Aditya Bhatt 8d57a04c8e Insert text:s elements instead of spaces in OpInsertText.
Also make the cursor behave properly around such elements.
2013-05-13 10:18:10 +00:00
Jos van den Oever 9ae5bb99ed Fix dimensions of A4. 2013-05-02 16:23:36 +02:00
Philip Peitsch 8813c3b491 Prevent empty paragraphs and headings from being collapsed 2013-04-22 16:09:18 +10:00
Philip Peitsch 94985f606a office:text element will force a word-wrap if a particular word is longer than the available line width 2013-04-17 11:42:06 +02:00
Aditya Bhatt 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.
2013-03-26 13:46:54 +05:30
Aditya Bhatt 27857f6cf4 We don't want these animations anymore 2013-03-16 00:38:46 +05:30
Aditya Bhatt 674bbba4e1 Use proper heights and line-heights for editInfo content, so everything
looks centered and also avoid wrong line alignment
2013-03-15 18:40:21 +05:30
Aditya Bhatt 4c441ea646 Some style fixes to have all the editInfo elements in the tooltip appear
properly aligned
2013-03-14 18:21:03 +05:30
Aditya Bhatt 251d441337 Use proper namespace name, and set tooltip content width to 100% 2013-03-14 18:21:03 +05:30
Aditya Bhatt 8fd6f8117f Make marker partially transparent so that bullet points are not hidden 2013-01-24 15:08:34 +05:30
Aditya Bhatt c6b630e4fa Start top of marker from position 0 so the markers are aligned properly
in lists
2013-01-24 15:04:59 +05:30
Aditya Bhatt bae145599c Move tooltip arrow to bottom left, and make tooltip handle appear above
the paragraph
2013-01-24 14:39:54 +05:30
Aditya Bhatt 40ec535037 Styles for marker and tooltip 2013-01-24 06:09:14 +05:30
Aditya Bhatt e5efdbef9e Use relative positioning so we can absolutely position 100% high divs
inside p and h nodes. Experimental.
2013-01-24 02:27:56 +05:30
Aditya Bhatt e5f358a435 Set default normal line-height for text elements, so that dojo cannot pollute
it
2013-01-23 00:13:52 +05:30
Aditya Bhatt 73160ed414 Unset (arbitrary?) margins and paddings to text elements, this partially
fixes the problem of text shifting slightly when you save a style without
modification through the dialog.
2013-01-23 00:11:35 +05:30
Friedrich W. H. Kossebau ccb91768f6 Don't set font-weight to bold as default for text:h 2012-12-28 12:05:06 +01:00
Friedrich W. H. Kossebau 77d66a16c5 Unbreak avatar handler coloring 2012-11-09 12:29:35 +01:00
Friedrich W. H. Kossebau 5dd5b08ce4 Attach avatar handler to the right node (cursor element, not span element)
Fixes:
* avatar handler styles not being applied
* cursor blinking directly before avatar handler
and possibly also
* losing the avatar handler sometimes
2012-11-09 12:29:29 +01:00
Aditya Bhatt 349365feea use better caret, and hide the native content-editable outline 2012-10-22 10:32:09 +02:00
Jos van den Oever 566749728e Get avatar to move somewhat along with the caret. 2012-08-28 22:19:58 +02:00
Jos van den Oever 6186336626 Make test file have two documents and add avatar icons. 2012-08-09 09:17:39 +02:00