53 Commits
Author SHA1 Message Date
Jos van den Oever a637eb31bf Add support for asynchronous loading of classes.
Dependencies between classes are listed in the manifest.json files.
These files list what classes are required to load other classes. Yet, each eval
of a class can trigger loading of a required class. This means that the request
for a particular class is only sent out when the class that needs it is loaded.

This patch adds a new function:
    runtime.loadClasses(classNames, callback);

This function creates a list of all required classes before doing any loading.
If the environment is the browser and a callback is provided, the list of files
is added as <script/> tags to the DOM. This means the browser can request all
files at once. The callback is attached to the onload trigger of the last
<script/> tag.

If no callback is provided, the files are still loaded synchronously.

runtime.loadClass is still present but redundant, since the runtime already
knows what classes are needed for other classes.

odf.html is adapted to use the new class.
2014-02-07 15:38:09 +01:00
Jos van den Oever 2a2be65654 Remove unneeded script tags. 2013-11-29 18:30:23 +01:00
Jos van den Oever 2ccfde5fa4 Simplify loading of classes.
runtime.js is now 100.0% typed. The contents of packages.js moves to runtime.js. manifest.js files now use JSON format.
2013-11-26 16:56:00 +01:00
Philip Peitsch eeac880f46 Improve mouse selection peformance by throttling shadow cursor redrawing
Drawing the cursor on every mouse move event badly impacts the responsiveness
of the application, because the move events buffer in the browser until
every single event is processed. By setting these on a background timer,
the cursor is updated asap, but is able to aggregate multiple move events
received in this time period.
2013-10-31 23:07:02 +11:00
Friedrich W. H. Kossebau 22570d0dfe Remove outdated gui.XMLEdit and webodf/xmledit 2013-10-18 20:14:23 +02:00
Friedrich W. H. Kossebau 49950b1daf Remove outdated gui.PresenterUI 2013-10-18 17:21:25 +02: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
Lu Li f295b71cf8 add support for inserting inline images into text document
TODO: eliminating duplicates, resize image to fit in table cell
2013-10-02 16:37:48 +10:00
Lu Li 3f80a1517d Add OpSetBlob and OpRemoveBlob 2013-10-02 13:39:36 +10:00
Lu Li 3b5b28afd5 refactor StyleNameGenerator into ObjectNameGenerator
- moved getAllStyleNames from Formatting to ObjectNameGenerator
- renamed StyleNameGeneratorTest to ObjectNameGeneratorTest and added a couple of more unit tests
2013-10-02 13:39:35 +10:00
Lu Li bbb5ecef8a Refactoring: changed Op(Add|Remove)ParagraphStyle to Op(Add|Remove)Style, so they can handle all style families NOT just paragraph 2013-09-20 17:36:41 +02:00
Friedrich W. H. Kossebau f2b56083e6 add a ops.Server interface + a ServerFactory interface, move Nowjs-based server stuff into programs/editor/server/nowjs
MemberModel, SessionList, and OperationRouter are proxy classes which use
the server object to communicate with the server, while the server does
not always need to know about them
e.g. some server could not provide a SessionList, while another could have
that and more, while sharing the same basic server protocol.
Thus the serverfactory instance is separated from the server instance.
2013-08-28 16:33:49 +02:00
Friedrich W. H. Kossebau f4d293645d Rename OpDeleteParagraphStyle to OpRemoveParagraphStyle 2013-08-08 16:26:03 +02:00
Friedrich W. H. Kossebau 4322b22858 Rename everything with "[Uu]ser|[Ppeople]" to "[Mm]ember"
consolidates the terms used a little
2013-08-07 18:03:19 +02:00
Friedrich W. H. Kossebau cce094b2c1 turn OpCloneParagraphStyle into OpAddParagraphStyle
having all the data in the spec not only helps/enables OT, but also
makes it possible to create styles in documents without any prior existing
2013-08-01 20:00:44 +02:00
Friedrich W. H. Kossebau b10f41de7b Rename "OpApplyStyle" to "OpApplyDirectStyling" and its spec elemnt "info" to "setProperties" 2013-07-30 12:05:09 +02:00
Philip Peitsch f25d936355 Removing a cursor will now cause the associated caret to be removed
Removing the local cursor (e.g., calling SessionController.endEditing)
previously left behind an orphaned caret that would continue to receive
focus/blur commands and attempt to remain visible. This would cause an
error to be thrown after most operations.

This change turns CaretFactory into a manager that is responsible for
proper disposal of carets unpon the corresponding cursor's removal from
the document.
2013-07-26 22:26:11 +10:00
Jos van den Oever 64d57c96cf Fix issues exposed by latest JSLint. 2013-07-24 21:41:56 +02:00
Philip Peitsch a790a85cad Clipboard now excludes webodf-related elements from the copied XML and text
This prevents a problem where cutting a modified paragraph from a document
was including the modification date & time in the resulting text.
2013-07-23 16:42:01 +10: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
Philip Peitsch 415ec18ec3 Removed obselete SelectionManager class 2013-06-19 13:43:46 +02:00
Philip Peitsch eca37e6771 Modified Cursor api to allow the selection to be specified directly
This provides better encapsulation and clarifies the usage slightly.
Hopefully, it will decrease the ways to cause the selection & actual
cursor position can get out of sync.

As this was the only use of the Selection stack, the whole class is
now removed
2013-06-12 16:30:48 +10:00
Jos van den Oever 043b8ca360 Add missing Base64.js. 2013-05-15 16:54:37 +02:00
Jos van den Oever 9cdd64ee73 Load scripts explicitly so it's easier to debug. 2013-05-02 11:08:27 +02:00
Jos van den Oever 3884347374 Fix missing , in odf.html css link. 2012-08-22 22:44:47 +02:00
Jos van den Oever bd19d1dd2b Compile webodf.css into webodf.js and webodf-debug.js.
In this way, there is no need to separately add webodf.css when using WebODF. webodf.js is now all that is needed.
2012-05-21 00:27:10 +02:00
Jos van den Oever 65626534fd Add ability to render (load) odf to the command line tool class. 2012-05-20 17:48:08 +02:00
Jos van den Oever 4356f16938 Fixes for IE9. 2011-11-22 15:39:43 +01:00
Jos van den Oever c11690cc97 Fix editability in latest chromium. 2011-09-30 22:29:57 +02:00
Jos van den Oever fd5f851817 Add simple tool to compare webodf rendering to a prerendered png. 2011-09-30 20:42:24 +02:00
Jos van den Oever 0de114c778 Change mechanism for initializing.
Use setTimeout instead of onload="init()" to give the runtime a chance to insert custom function in the Runtime instance.
2011-07-26 12:18:47 +02:00
Jos van den Oever 5e51064a38 Remove website from the repository. 2011-06-07 10:57:36 +02:00
Jos van den Oever 519e12ef59 Make html files valid XHTML 1.0 2011-05-07 10:55:33 +02:00
Jos van den Oever eb92f3dc10 Refactor to use the OdfCanvas class. 2011-02-24 11:03:42 +01:00
Jos van den Oever e486ed427f Refactoring snapshot. Not done yet. 2010-11-09 09:27:29 +01:00
Jos van den Oever 6207ccdac5 Make compiling more strict, move style2css 2010-11-03 15:39:05 +01:00
Jos van den Oever 011dce1a2b Add functionality to convert and odf file to a standalone XML file with CSS transformation that can be viewed in a browser. 2010-07-16 14:09:54 +02:00
Jos van den Oever 53cfb5db62 Some improvements to rendering of draw elements. 2010-07-14 13:41:47 +02:00
Jos van den Oever 0abe964926 Add parts of new OdfContainer API in Qt version. 2010-07-13 08:22:47 +02:00
Jos van den Oever 0edef7914e Refactor javascript implementation to use ODFDocumentElement. 2010-07-12 21:47:55 +02:00
Jos van den Oever be1ace99e1 Implement more of the ODFKit API in javascript. 2010-07-09 10:07:10 +02:00
Jos van den Oever b236161ecf Make presentation mode look at the size of the window, not the size of the screen. 2010-07-07 16:17:28 +02:00
Jos van den Oever fef4916432 Zoom slide to fit the screen. We assume that ppi of 96 is used. Works only for the current fixed slide size. 2010-07-05 15:45:50 +02:00
Jos van den Oever 77037c30ab Improve display of inline images. 2010-07-05 12:00:37 +02:00
Jos van den Oever 57bec30672 Make presentation mode look better. 2010-07-05 09:31:15 +02:00
Jos van den Oever 509fa477d2 Add a presentation mode. 2010-07-05 08:45:18 +02:00
Jos van den Oever f4f3e3be39 Add support for images to webodf. 2010-07-04 16:31:30 +02:00
Jos van den Oever bd202fccf8 Add support for images. works in nativeqtclient so far. 2010-07-03 17:07:53 +02:00
Jos van den Oever cb3fd7400b Fix layout of boxes on slides. 2010-07-02 11:48:45 +02:00
Jos van den Oever 94d4de540f Style improvements for presentations. 2010-07-02 11:17:57 +02:00