Your SlideShare is downloading. ×
  • Like
ODF Toolkit with .NET Support
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Now you can save presentations on your phone or tablet

Available for both IPhone and Android

Text the download link to your phone

Standard text messaging rates apply

ODF Toolkit with .NET Support

  • 2,984 views
Published

 

Published in Business , Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
2,984
On SlideShare
0
From Embeds
0
Number of Embeds
0

Actions

Shares
Downloads
29
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. ODF Toolkit ODF Support For .NET With AODL Lars Behrmann Sun Microsystems
  • 2. About AODL
    • .NET module of the ODF Toolkit Project
    • ODF implementation in pure C#
    • Designed straight forward
    • Hides the complexity of ODF
    • Supports text and spreadsheet documents
    • Minimum requirement: .NET 1.1 framework
    • Can be used with Mono.
  • 3. ODF Support For .NET Applications
    • Why ?
    • Business applications have to handle documents.
    • A lot of these are developed with .NET.
    • ODF is an accepted ISO standard.
    • ODF is a XML file format.
    • XML guarantees future accessibility.
  • 4. Easy To Use
    • Minimal coding effort.
    • Requires only a basic knowledge of general Document structures like:
      • All documents consists of content and styles.
      • Contents can be tables, paragraphs, ... .
      • Contents could contain other contents.
      • Styles are used to format contents.
    • With AODL these contents and styles got a real name.
  • 5. Supported Document Types
    • OpenDocument Text Documents
      • Create, Open, Modify and Save
    • OpenDocument Spreadsheet Documents
      • Create, Open, Modify and Save
    • All documents shares the contents and styles
      • One implementation for Tables, Paragraphs, Images, ... .
  • 6. Import And Export Filter
    • AODL offers two interfaces for import and export
      • IImport
      • IExport
        • Example implementation: The experimental PDF export.
  • 7. AODL UML Class Diagram
  • 8. Create New Documents //Create a new text document TextDocument document = new TextDocument () ; document.New () ; //Create a standard paragraph using the ParagraphBuilder Paragraph paragraph = ParagraphBuilder.CreateStandardTextParagraph(document); //Add some simple text paragraph.TextContent.Add( new SimpleText ( document, "OpenOffice.org Conference" ) ) ; //Add the paragraph to the document document.Content.Add ( paragraph ) ; //Save document.SaveTo ( "simple.odt" ) ;
  • 9. Modify Existing Documents //Create a new text document object TextDocument document = new TextDocument () ; //Load a text document document.Load (" OOoCon2007.odt" ) ; //Search for a text area control with the id = headline ODFTextArea headlineCtl = document.FindControlById (" headline ") as ODFTextArea; if ( headlineCtl != null) { //Set a new value for the found control headlineCtl.CurrentValue = "OpenOffice.org Conference " ; } //Save modified document document.SaveTo (" OOoCon2007.odt" ) ;
  • 10. A Real World Scenario
    • Assume you already have a shop software.
    • Now, this software should be able to create bills for your customer.
    • What will be the required steps ?
  • 11. A Real World Scenario – Todo's
    • Outside your application:
    • Create an OpenDocument text document as a template.
    • Use placeholder to mark insert positions.
    • Add the document as application resource.
  • 12. A Real World Scenario – Todo's
    • Inside your application:
    • Reference the AODL assembly.
    • Load your “template” file.
    • Find the corresponding placeholder.
    • Replace them with the data from your application.
    • Save the file.
  • 13. A Real World Scenario - Result
  • 14. Future Steps
    • Future steps will be ...
    • Support for presentation and draw documents ...
    • Performance optimization ...
    • Usability optimization ...
    • Synchronization with other modules like odf4j, ...
    • etc.
  • 15. Presentation End Now, Open Discussion ... Lars Behrmann Sun Microsystems