ODF Support in KWord 2 Girish Ramakrishnan girish@forwardbias.in.

Slides:



Advertisements
Similar presentations
Copyright © 2003 Pearson Education, Inc. Slide 8-1 Created by Cheryl M. Hughes, Harvard University Extension School Cambridge, MA The Web Wizards Guide.
Advertisements

Open Office.Org What is the Open Office.org Source Project? Open source project through which Sun Microsystems is releasing the technology for the popular.
DOCUMENT TYPES. Digital Documents Converting documents to an electronic format will preserve those documents, but how would such a process be organized?
XML: Extensible Markup Language
Adaptability of learning objects by appropriate knowledge representation Anastas Misev Institute of Informatics Faculty of Natural Science and Mathematics.
Presented by IBM developer Works ibm.com/developerworks/ 2006 January – April © 2006 IBM Corporation. Making the most of Creating Eclipse plug-ins.
Performed by:Gidi Getter Svetlana Klinovsky Supervised by:Viktor Kulikov 08/03/2009.
Introduction to XML This material is based heavily on the tutorial by the same name at
User Group 2015 Version 5 Features & Infrastructure Enhancements.
Creating a Simple Page: HTML Overview
DHTML. What is DHTML?  DHTML is the combination of several built-in browser features in fourth generation browsers that enable a web page to be more.
Overview of Previous Lesson(s) Over View  ASP.NET Pages  Modular in nature and divided into the core sections  Page directives  Code Section  Page.
XML Anisha K J Jerrin Thomas. Outline  Introduction  Structure of an XML Page  Well-formed & Valid XML Documents  DTD – Elements, Attributes, Entities.
Working Out with KURL! Shayne Koestler Kinetic Data.
PowerPoint Lesson 9 Importing and Exporting Information Microsoft Office 2010 Advanced Cable / Morrison 1.
OpenDocument Steve Adebayo April 1, Learning Objectives OpenDocument Format Zip Archive Downloading OpenOffice Transform OpenOffice Document.
Max Planck Institute for Psycholinguistics Tool development report H. Brugman MPI Nijmegen.
Data File Access API : Under the Hood Simon Horwith CTO Etrilogy Ltd.
Learning Web Design: Chapter 4. HTML  Hypertext Markup Language (HTML)  Uses tags to tell the browser the start and end of a certain kind of formatting.
Sheet 1XML Technology in E-Commerce 2001Lecture 7 XML Technology in E-Commerce Lecture 7 XSL Formatting Objects, Java Data Binding.
Session IV Chapter 9 – XML Schemas
Copyright © IBM Corp., All rights reserved. This presentation is licensed under Creative Commons Att. Nc Nd 2.5 license. OpenDocument Format.
Chapter 8 Cookies And Security JavaScript, Third Edition.
Chapter 3 – Part 1 Word Processing Writer for Linux CMPF 112 : COMPUTING SKILLS.
© 2005 by IBM; made available under the EPL v1.0 | June 9, 2005 David Williams WTP Source Editing Open House.
XML 2nd EDITION Tutorial 1 Creating An Xml Document.
Visual Linker Prototype presentation.
Introduction to XML This presentation covers introductory features of XML. What XML is and what it is not? What does it do? Put different related technologies.
1 Tutorial 11 Creating an XML Document Developing a Document for a Cooking Web Site.
HTML part 2. HTML File Formats HTML 3.2 HTML 5.0 HTML Transitional HTML Frameset HTML Strict XHTML 1.0 Transitional XHTML 1.0 Frameset.
TOS / TIS Code Architecture Copyright © 2008 Talend. All rights reserved.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 4 1COMP9321, 15s2, Week.
Web Technologies Lecture 4 XML and XHTML. XML Extensible Markup Language Set of rules for encoding a document in a format readable – By humans, and –
When we create.rtf document apart from saving the actual info the tool saves additional info like start of a paragraph, bold, size of the font.. Etc. This.
JAVA BEANS JSP - Standard Tag Library (JSTL) JAVA Enterprise Edition.
Python Documentation Projects Developers Day 8th International Python Conference 27 January 2000.
It consists of two parts: collection of files – stores related data directory structure – organizes & provides information Some file systems may have.
WebODF Jos van den Oever Sponsored by:. Overview  How to use WebODF on your website  How WebODF came to be  ODF and how to put it in HTML  Writing.
Learn more about office users -- Feature usage study by document element statistics Rui SuYing IBM Lotus Symphony.
Made with OpenOffice.org 1 Beyond the Single Page Steve Oualline OpenOffice Writer.
1 Workshop - ODFDOM Lars Behrmann Frank Meies Svante Schubert Sun Microsystems, Hamburg 1.
An OpenDocument Developers Kit (ODDK) What do we need to make Application Developers Productive with ODF? Rob Weir IBM
Improving ODF applications by sharing ODF tests Svante Schubert Software Engineer Sun Microsystems Inc.
1 Niklas Nebel Sun Microsystems NEW FEATURES IN CALC
ODFKit and WebODF Getting up to speed ● ODF ● ODFKit ● WebODF Discussion and brainstorming ● How would you use it? ● Office use-cases in 2010 and beyond.

XHTML. What Is XHTML? XHTML stands for EXtensible HyperText Markup Language XHTML is almost identical to HTML XHTML is stricter than HTML XHTML is HTML.
DHTML.
XML Parsers Overview Types of parsers Using XML parsers SAX DOM
Integrating ArcSight with Enterprise Ticketing Systems
Microsoft Word Objectives: Word processing using Microsoft Word
Integrating ArcSight with Enterprise Ticketing Systems
Designing High Performance BIRT Reports
Objective % Select and utilize tools to design and develop websites.
ODF API - ODFDOM Svante Schubert Software Engineer
Setting Defaults in Microsoft Word for Accessibility
Goals Give you a feeling of what Eclipse is.
Computing Fundamentals
Collaborative Editing on ODF Documents
Application with Cross-Platform GUI
Objective % Select and utilize tools to design and develop websites.
Data File Import / Export
OpenOffice. org Extensions Infrastructure What it is –. What it can –
Learn more about office users Feature usage study by document element statistics
Learn more about office users Feature usage study by document element statistics
XML Parsers Overview Types of parsers Using XML parsers SAX DOM
Word Lesson 7 Working with Documents
Microsoft PowerPoint 2007 – Unit 2
EXTENDING COMPONENTS AND TABLE TRANSFORMATIONS WITH XSL
Exploring Microsoft Word 2003
Presentation transcript:

ODF Support in KWord 2 Girish Ramakrishnan girish@forwardbias.in

About me Girish Ramakrishnan Ex-Troll ForwardBias

Agenda Whirlwind tour of ODF KWord 2 ODF Text Design ODF Testing Framework What's cooking Questions

What is ODF? XML Format for spreadsheets, presentations, word documents Brief history StarOffice (Sun) → OpenOffice.org → OASIS The spec is huge (~800 pages) Cross references many other specs like XML, SVG, XSLT, XFORMS. Surprisingly readable (damn...) For this preso, we care only about text documents

ODT Text documents are stored as .odt Can contain Paragraphs Lists Tables Frames Sections Graphical elements Notes, annotations, ruby text, references, bookmarks, TOC, change log, ... Imagine lots of XML element names and attributes for the above

ODT File Contents Zip file contains the following META-INF/manifest.xml (Contents of the zip file relevant to ODT and the mimetype) meta.xml (Author, Creation date and so on) settings.xml (Application settings) content.xml (The content) styles.xml (The styles i.e how the content looks) Content is kept separate from the style Easy to extract contents Styles can be reused

ODT Styles Classified by type/family Paragraph styles Character styles List styles Outline styles Conditional styles Section styles, Frame styles, ruby styles, note styles, annotation styles...

Styles Classified by concept Default style Used when an entity does not state a style Named style Styles that have ”names” (style manager) Master style Styles for pages, header/footer Automatic style Styles created on the fly Styles can have a parent style Attributes cascade Automatic styles usually have a parent

ODT File contents styles.xml Contains master styles, named styles, default styles Contains automatic styles too... content.xml Contains all the content Automatic styles

KWord – KoStore Task: Unpacking the odt libs/store – Read/Write archives Also handles encrypted stores Queries user for password, if need be Task: Extract contents of the archive KoStore *store = KoStore::createStrore( ”test.odt”, KoStore::Read); store->open(”content.xml”); QIODevice *contentDevice = store->device();

KWord – Parsing XML Task: Parsing XML We have our own DOM parser written for speed & memory usage API identical to QDom (meant to be a drop-in for Qt Dom) Main differences Nodes are loaded on demand Read only No DTD handling

ODF Library - libs/odf Task: Process ODF documents Understands the ODF XML Schema Goal is to make it a library that can be used for processing ODF documents without requiring it to be rendered Use case: document processors, report generators

ODF Library - libs/odf Query style information of the document Push a style and its parents into a stack and query its properties (KoOdfStyleStack) Holds information about a style and query for existing style of the same format (KoGenStyle, KoGenStyles) Far from complete Input/Output is mostly XML. User needs to know ODF

KWord - ODF Text Task: Load the text into a structure that can be drawn Qt 4 brings Qt Scribe (i.e QTextDocument and friends) ODF has lots of features compared to Qt Scribe Extend Qt Scribe

Qt Scribe Central class is QTextDocument A paragraph is a ”block” Blocks are made of fragments A list is set of non-contiguous blocks Blocks, fragments, lists can have formats QTextBlockFormat, QTextCharFormat, QTextListFormat QTextCursor can be used to manipulate text cursor.insertText()

Extending Qt Scribe The formats are nothing but a QMap<int, QVariant> One can store arbitrary values in the formats Store ODF specific properties in the format using custom keys in the QMap

Loading ODF Task: Load ODF into the QTextDocument All styles are parsed Named and default styles are put in Style manager Style manager generates a unique id for each named style

Loading the document (Text) Use QTextCursor to load text Applying styles Convert ODF style to QTextFormat Save the style id into the format's QMap That's it!

Editing the document Edit/make changes to the document using QTextCursor (just like QTextEdit) We throw away the DOM When applying a named style, overwrite the existing format When applying an automatic style, merge with the existing format

Saving the Document Write blocks one after the other Generate automatic styles for each block by Diff'ing against the ”StyleId” style

Lists Lists can be nested and have styles for different levels QTextList does not support nested lists KoListStyle Maintains a QTextList for each level At layout time, we generate the numbering for the list items Complex stuff

Flake Text documents can have embedded content aka frames Frames can be non-text Flake is a ”shape” framework (Very similar to GraphicsView) A flake contains shape(s) that can be placed on a canvas Provides tools to modify the shapes Shapes can load/save ODF It's plugin based Textshape plugin for text handling

Layout Qt Scribe can be provided a custom layouter KWord has a custom layout to accomodate ODF features Allows run around of text (any shape for that matter) along painter paths

ODF Testing Framework Goal: Testsuite that can check if documents are loaded and saved correctly by ODF Test cases from OpenDocument Fellowship Uses the QtScript binding generator (TT labs) Strategy Loading Document using kotext Load document created by a script Compare both documents Does not check if the document is actually rendered correctly

Current Status 1.6 already had good ODT support Qt 3 Text document was forked and extended 2.0, lots of rewritten code Moving to Scribe Flake architecture Lots and lots of code, with very little testing (like KDE 4.0, playing catch up with 1.6. We need help! No plans to keep API BC after 2.0

What's cooking Style manager (Thomas) Headers, lists (Girish, Roop) TOC, Page layout (Peirre, Sebastien) Paragraph tool (Florian) There is a LOT of work to be done Usable but not ready for user testing. There are lots of small bugs. We need developers who can test and fix Tables Many ODF features have no UI KWord Audit has list of tasks TODO.

KWord and ODF spec Constant feedback to Oasis Unfortunately, one needs to pay to be a member of Oasis Channelled through David Faure and Thomas Zander

(With special thanks to NLNet.nl, Thomas, Thorsten, David) Questions? Thank you! (With special thanks to NLNet.nl, Thomas, Thorsten, David)