SlideShare a Scribd company logo
UNO based  ODF Toolkit API Jürgen Schmidt StarOffice/OpenOffice.org Sun Microsystems, Inc.
UNO based ODF Toolkit API What we have Why UNO What it could be tomorrow Summary Q & A
What we have ODF OpenOffice.org Idea Vision
What we have  —   the vision
OpenOffice.org  —  reference implementation for the standardized Open Document Format (ODF) UNO API to create, manipulate, convert or print ODF documents 3878 UNOIDL types document specific or  user interface and application specific API is closely teethed with the whole office monolithic complete office installation is necessary can run in server mode What we have
Component middleware Platform independent Language independent  (or should i say open) C++, Java, Python, CLI (C#, VBA.Net), Basic, OLE Automation, ooRexx, JavaScript, .... UNO Runtime Environment standalone usable UNO is threadsafe Why UNO
Requirements fast intuitive  well documented well documented and useful examples Focus on pure ODF document creation and manipulation no printing, no conversion Intensive use of UNO ease of use features type safe versus less generic What it could be tomorrow
New API besides the existing office API ODF model API Pure Java reference implementation based on the Java UNO runtime C++ implementation later possible when the office becomes ready What it could be tomorrow
What it could be tomorrow document creation // create an empty TextDocument org.openoffice.uodft.text.XTextDocument xDoc =  org.openoffice.uodft.text.TextDocument.create(xContext); // load an TextDocument try { org.openoffice.uodft.text.XTextDocument xDoc =  org.openoffice.uodft.text.TextDocument.load(xContext, "file:///somewhere/HelloODFToolkit.odt"); } catch (org.openoffice.uodft.document.DocumentError e) { // do some error handling } Fake: this API's does not exist!
What it could be tomorrow document saving try { XTextDocument xDoc = ... // do some manipulation // save a TextDocument xDoc.save(); // save under a new name xDoc.saveAs("file:///somewhere/newname.odt"); } catch (org.openoffice.uodft.document.DocumentError e) { // do some error handling } Fake: this API's does not exist!
What it could be tomorrow adding content try { // append a string at the end xDoc.append("Hello UNO based ODF Toolkit!"); // new line should be interpreted as paragraph end xDoc.append("\nWhen can we use this API?"); // append new a Paragraph Paragraph para = text.Paragraph.createWithString(xContext, "a paragraph can be created directly with a string"); xDoc.appendContent(para); } catch ( ... ) {  // do some error handling  } Fake: this API's does not exist!
What it could be tomorrow adding content try { // create a new ParagraphStyle ParagraphStyle myStyle = text.ParagraphStyle.create( xContext, "MyStyleName"); newStyle.setCategory(ParagrpahStyleCategory.LIST); // set more style specific attribtues newStyle.setXXX(...); // append a new Paragraph Paragraph para = text.Paragraph.createWithStyle( xContext, "some text", myStyle); para.append(" and more text for this paragraph."); xDoc.appendContent(para); } catch ( ... ) {  // do some error handling  } Fake: this API's does not exist!
What it could be tomorrow adding content try { // append a new graphic object TextGraphicObject graphic = text.TextGraphicObject.create( xContext, "file:///somewhere/picture.png", false); // set some attributes graphic.setSize(8000, 5000); graphic.setTransparency(80); graphic.setMargin(5); xDoc.appendContent(graphic); } catch ( ... ) {  // do some error handling  } Fake: this API's does not exist!
What it could be tomorrow manipulate content try { // get navigation cursor XParagraphCursor xCursor = xDoc.getParagraphCursor(); xCursor.gotoStart(false); do { if (xCursor.getParagraph().getText().equals("...")) xCursor.getParagraph().setStyle( xDoc.getStyleManager().getStyleByName("MyStyle")); } while (xCursor.gotoNextParagraph(false); } catch ( ... ) {  // do some error handling  } Fake: this API's does not exist!
What it could be tomorrow manipulate content try { // get navigation cursor XParagraphCursor xCursor = xDoc.getParagraphCursor(); xCursor.gotoStart(false); do { if (xCursor.getParagraph().getText().equals("...")) xCursor.getParagraph().setStyle( xDoc.getStyleManager().getStyleByName("MyStyle")); } while (xCursor.gotoNextParagraph(false); } catch ( ... ) {  // do some error handling  } Fake: this API's does not exist!
What it could be tomorrow manipulate content try { // create a new empty Spreadsheet document XSpreadsheetDocument xDoc =   XSpreadsheetDocument.create(xContext); // insert a new Sheet by index xDoc.insertSheet(3, "MySheet"); // manipulate cells by index xDoc.getCell("B", 50).setString("Result"); xDoc.getCell("B", 51).setFormula("=sum(A1:A45"); } catch ( ... ) {  // do some error handling  } Fake: this API's does not exist!
What it could be tomorrow manipulate content try { long[] data = { 2,4,5,8,89,56 }; long[][] matrix = { { 2,4,5,8,89,56 },   { 5,67,7,8,99,4 } }; // set data array in a row, address Sheet direct  xDoc.setData(1, "B2", data); // set data array in a column, get Sheet first by index  xDoc.getSheet(3).setData("2B", data); // set data array in a column, address Sheet direct xDoc.setDataMatrix(1, "B2", matrix); } catch ( ... ) {  // do some error handling  } Fake: this API's does not exist!
New API versus reuse of the existing office API existing API combines model with UI existing API is partly a mirror of the old office core No compatibility statement from the beginning API should evolve over the time Realization is not 100% ensured vision versus reality Don't underestimate the existing office API really, really feature rich and ready to use usability could be improved  Summary
Q & A
UNO based  ODF Toolkit API Jürgen Schmidt [email_address]

More Related Content

ODP
ODF Toolkit with .NET Support
ODP
Reliable interoperation between OpenOffice & MS office by UOML
ODP
Processing OpenDocument Format
ODP
ODF Template Engine
PPT
Understanding XML DOM
PPT
DOM and SAX
PPTX
Dom parser
PPT
6 311 W
ODF Toolkit with .NET Support
Reliable interoperation between OpenOffice & MS office by UOML
Processing OpenDocument Format
ODF Template Engine
Understanding XML DOM
DOM and SAX
Dom parser
6 311 W

What's hot (19)

PPTX
Intro xml
PDF
XML
PDF
Xml parsing
PDF
SAX, DOM & JDOM parsers for beginners
PDF
Xml And JSON Java
PPS
Xml basics for beginning
PPTX
Namespace in C++ Programming Language
PPTX
Basics of XML
PPT
Introduction to XML
PDF
Introduction to XML
PPT
XML Databases
PDF
Introduction to XML and Databases
ODP
An RDF Metadata Model for OpenDocument Format 1.2
PPT
Xml Presentation-3
PDF
Parsing XML Data
PPTX
Simple xml in .net
PDF
Building XML Based Applications
PDF
JavaScript - Chapter 12 - Document Object Model
Intro xml
XML
Xml parsing
SAX, DOM & JDOM parsers for beginners
Xml And JSON Java
Xml basics for beginning
Namespace in C++ Programming Language
Basics of XML
Introduction to XML
Introduction to XML
XML Databases
Introduction to XML and Databases
An RDF Metadata Model for OpenDocument Format 1.2
Xml Presentation-3
Parsing XML Data
Simple xml in .net
Building XML Based Applications
JavaScript - Chapter 12 - Document Object Model
Ad

Viewers also liked (8)

ODP
Scale O Oo4 Kids
ODP
Marketing OOo in 2011 and beyond
ODP
Documenting OOo
ODP
Learn Linux: Emacs
ODP
XML based filters in OpenOffice.org
ODP
Documentation Future
ODP
Business Case Migration: Invisible Cost
ODP
GStreamer in OpenOffice.org
Scale O Oo4 Kids
Marketing OOo in 2011 and beyond
Documenting OOo
Learn Linux: Emacs
XML based filters in OpenOffice.org
Documentation Future
Business Case Migration: Invisible Cost
GStreamer in OpenOffice.org
Ad

Similar to UNO based ODF Toolkit API (6)

PPT
PHPExcel and OPENXML4J
ODP
Scripting in OpenOffice.org
PDF
The Object Oriented Paradigm in perspective
PDF
Maxbox starter19
PPT
Understanding Framework Architecture using Eclipse
PPT
Day Of Dot Net Ann Arbor 2007
PHPExcel and OPENXML4J
Scripting in OpenOffice.org
The Object Oriented Paradigm in perspective
Maxbox starter19
Understanding Framework Architecture using Eclipse
Day Of Dot Net Ann Arbor 2007

More from Alexandro Colorado (20)

ODP
Bitcuners revolucion blockchain
ODP
Presentacion Krita
ODP
Bitcuners porque bitcoins
ODP
ChamiloCon Enseñando con Tecnología
ODP
Curso de desarrollo web para principiantes
ODP
ChamiloCon: Recursos de Software Libre
ODP
Krita - Tu tambien puedes pintar un arbol Feliz
ODP
Gobernancia y particionacion en comunidades de Software Libre v2
PDF
Blender - FLISOL Cancun 2014
ODP
The Hitchhicker's Guide to Opensource
ODP
OpenERP: El ecosistema de negocios
ODP
Aprendiendo GnuPG
ODP
Catalogo decursos
ODP
Practicas virtuales v2.2
ODP
Introducción al curso de Extensiones de OpenOffice
ODP
Comunidades software libre
ODP
Practicas virtuales v2
ODP
Practicas virtuales
ODP
Economia digital
Bitcuners revolucion blockchain
Presentacion Krita
Bitcuners porque bitcoins
ChamiloCon Enseñando con Tecnología
Curso de desarrollo web para principiantes
ChamiloCon: Recursos de Software Libre
Krita - Tu tambien puedes pintar un arbol Feliz
Gobernancia y particionacion en comunidades de Software Libre v2
Blender - FLISOL Cancun 2014
The Hitchhicker's Guide to Opensource
OpenERP: El ecosistema de negocios
Aprendiendo GnuPG
Catalogo decursos
Practicas virtuales v2.2
Introducción al curso de Extensiones de OpenOffice
Comunidades software libre
Practicas virtuales v2
Practicas virtuales
Economia digital

Recently uploaded (20)

PPTX
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
PDF
Training And Development of Employee .pdf
PDF
MSPs in 10 Words - Created by US MSP Network
PPTX
Amazon (Business Studies) management studies
PPTX
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
PDF
Unit 1 Cost Accounting - Cost sheet
DOCX
Business Management - unit 1 and 2
PPTX
Probability Distribution, binomial distribution, poisson distribution
PDF
Ôn tập tiếng anh trong kinh doanh nâng cao
PDF
20250805_A. Stotz All Weather Strategy - Performance review July 2025.pdf
PDF
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
PPT
340036916-American-Literature-Literary-Period-Overview.ppt
PPTX
ICG2025_ICG 6th steering committee 30-8-24.pptx
DOCX
Euro SEO Services 1st 3 General Updates.docx
PDF
IFRS Notes in your pocket for study all the time
PDF
WRN_Investor_Presentation_August 2025.pdf
PPT
Data mining for business intelligence ch04 sharda
PDF
A Brief Introduction About Julia Allison
PPT
Chapter four Project-Preparation material
PDF
Outsourced Audit & Assurance in USA Why Globus Finanza is Your Trusted Choice
CkgxkgxydkydyldylydlydyldlyddolydyoyyU2.pptx
Training And Development of Employee .pdf
MSPs in 10 Words - Created by US MSP Network
Amazon (Business Studies) management studies
Dragon_Fruit_Cultivation_in Nepal ppt.pptx
Unit 1 Cost Accounting - Cost sheet
Business Management - unit 1 and 2
Probability Distribution, binomial distribution, poisson distribution
Ôn tập tiếng anh trong kinh doanh nâng cao
20250805_A. Stotz All Weather Strategy - Performance review July 2025.pdf
kom-180-proposal-for-a-directive-amending-directive-2014-45-eu-and-directive-...
340036916-American-Literature-Literary-Period-Overview.ppt
ICG2025_ICG 6th steering committee 30-8-24.pptx
Euro SEO Services 1st 3 General Updates.docx
IFRS Notes in your pocket for study all the time
WRN_Investor_Presentation_August 2025.pdf
Data mining for business intelligence ch04 sharda
A Brief Introduction About Julia Allison
Chapter four Project-Preparation material
Outsourced Audit & Assurance in USA Why Globus Finanza is Your Trusted Choice

UNO based ODF Toolkit API

  • 1. UNO based ODF Toolkit API Jürgen Schmidt StarOffice/OpenOffice.org Sun Microsystems, Inc.
  • 2. UNO based ODF Toolkit API What we have Why UNO What it could be tomorrow Summary Q & A
  • 3. What we have ODF OpenOffice.org Idea Vision
  • 4. What we have — the vision
  • 5. OpenOffice.org — reference implementation for the standardized Open Document Format (ODF) UNO API to create, manipulate, convert or print ODF documents 3878 UNOIDL types document specific or user interface and application specific API is closely teethed with the whole office monolithic complete office installation is necessary can run in server mode What we have
  • 6. Component middleware Platform independent Language independent (or should i say open) C++, Java, Python, CLI (C#, VBA.Net), Basic, OLE Automation, ooRexx, JavaScript, .... UNO Runtime Environment standalone usable UNO is threadsafe Why UNO
  • 7. Requirements fast intuitive well documented well documented and useful examples Focus on pure ODF document creation and manipulation no printing, no conversion Intensive use of UNO ease of use features type safe versus less generic What it could be tomorrow
  • 8. New API besides the existing office API ODF model API Pure Java reference implementation based on the Java UNO runtime C++ implementation later possible when the office becomes ready What it could be tomorrow
  • 9. What it could be tomorrow document creation // create an empty TextDocument org.openoffice.uodft.text.XTextDocument xDoc = org.openoffice.uodft.text.TextDocument.create(xContext); // load an TextDocument try { org.openoffice.uodft.text.XTextDocument xDoc = org.openoffice.uodft.text.TextDocument.load(xContext, "file:///somewhere/HelloODFToolkit.odt"); } catch (org.openoffice.uodft.document.DocumentError e) { // do some error handling } Fake: this API's does not exist!
  • 10. What it could be tomorrow document saving try { XTextDocument xDoc = ... // do some manipulation // save a TextDocument xDoc.save(); // save under a new name xDoc.saveAs("file:///somewhere/newname.odt"); } catch (org.openoffice.uodft.document.DocumentError e) { // do some error handling } Fake: this API's does not exist!
  • 11. What it could be tomorrow adding content try { // append a string at the end xDoc.append("Hello UNO based ODF Toolkit!"); // new line should be interpreted as paragraph end xDoc.append("\nWhen can we use this API?"); // append new a Paragraph Paragraph para = text.Paragraph.createWithString(xContext, "a paragraph can be created directly with a string"); xDoc.appendContent(para); } catch ( ... ) { // do some error handling } Fake: this API's does not exist!
  • 12. What it could be tomorrow adding content try { // create a new ParagraphStyle ParagraphStyle myStyle = text.ParagraphStyle.create( xContext, "MyStyleName"); newStyle.setCategory(ParagrpahStyleCategory.LIST); // set more style specific attribtues newStyle.setXXX(...); // append a new Paragraph Paragraph para = text.Paragraph.createWithStyle( xContext, "some text", myStyle); para.append(" and more text for this paragraph."); xDoc.appendContent(para); } catch ( ... ) { // do some error handling } Fake: this API's does not exist!
  • 13. What it could be tomorrow adding content try { // append a new graphic object TextGraphicObject graphic = text.TextGraphicObject.create( xContext, "file:///somewhere/picture.png", false); // set some attributes graphic.setSize(8000, 5000); graphic.setTransparency(80); graphic.setMargin(5); xDoc.appendContent(graphic); } catch ( ... ) { // do some error handling } Fake: this API's does not exist!
  • 14. What it could be tomorrow manipulate content try { // get navigation cursor XParagraphCursor xCursor = xDoc.getParagraphCursor(); xCursor.gotoStart(false); do { if (xCursor.getParagraph().getText().equals("...")) xCursor.getParagraph().setStyle( xDoc.getStyleManager().getStyleByName("MyStyle")); } while (xCursor.gotoNextParagraph(false); } catch ( ... ) { // do some error handling } Fake: this API's does not exist!
  • 15. What it could be tomorrow manipulate content try { // get navigation cursor XParagraphCursor xCursor = xDoc.getParagraphCursor(); xCursor.gotoStart(false); do { if (xCursor.getParagraph().getText().equals("...")) xCursor.getParagraph().setStyle( xDoc.getStyleManager().getStyleByName("MyStyle")); } while (xCursor.gotoNextParagraph(false); } catch ( ... ) { // do some error handling } Fake: this API's does not exist!
  • 16. What it could be tomorrow manipulate content try { // create a new empty Spreadsheet document XSpreadsheetDocument xDoc = XSpreadsheetDocument.create(xContext); // insert a new Sheet by index xDoc.insertSheet(3, "MySheet"); // manipulate cells by index xDoc.getCell("B", 50).setString("Result"); xDoc.getCell("B", 51).setFormula("=sum(A1:A45"); } catch ( ... ) { // do some error handling } Fake: this API's does not exist!
  • 17. What it could be tomorrow manipulate content try { long[] data = { 2,4,5,8,89,56 }; long[][] matrix = { { 2,4,5,8,89,56 }, { 5,67,7,8,99,4 } }; // set data array in a row, address Sheet direct xDoc.setData(1, "B2", data); // set data array in a column, get Sheet first by index xDoc.getSheet(3).setData("2B", data); // set data array in a column, address Sheet direct xDoc.setDataMatrix(1, "B2", matrix); } catch ( ... ) { // do some error handling } Fake: this API's does not exist!
  • 18. New API versus reuse of the existing office API existing API combines model with UI existing API is partly a mirror of the old office core No compatibility statement from the beginning API should evolve over the time Realization is not 100% ensured vision versus reality Don't underestimate the existing office API really, really feature rich and ready to use usability could be improved Summary
  • 19. Q & A
  • 20. UNO based ODF Toolkit API Jürgen Schmidt [email_address]