OpenTemplate Client

From Apache OpenOffice Wiki
Revision as of 18:31, 9 March 2008 by Jza (Talk | contribs)

Jump to: navigation, search

The opentemplate client is an addon that will work as a downloader and browser of the recent cliparts, extensions and templates of the OpenTemplate.org site. The user will be able to get the latest templates from OT (OpenTemplates) and even filter the retrieval to just get a specific category.

This addon will be able to connect to the Opentemplate.org API and retrieve the data, parse it and store into a listbox. Once the user decide what he want's it will submit the URI and retrieve the content (using cURL). The add-on itself will provide with filters on combolist so that the retrieval can be filtered out before hand.

The main challenges are:

  • the ideal widget would be a grid application as opposed to listbox.
  • Retrieving an image might be challenging.
  • Good OS detection and path manipulation (localization).
  • Load images into a image component.
  • Codewise detect and register each of the types of extensions into OOo.

Ot uml.png


Code snippets

So far there are some useful snippets written in OOoBasic to help us get most out of the content.

Register templates from Basic

com.sun.star.frame.DocumentTemplates service can be used to do that. http://api.openoffice.org/docs/common/ref/com/sun/star/frame/DocumentTemplates.html For instance.

[oobas] oDocTemplates = CreateUnoService("com.sun.star.frame.DocumentTemplates") bResult = oDocTemplates.addTemplate("group","templ","file:///C:/usr/1.ott")

Retrieve data online

[oobas]

Parse XML from Basic

Currently just a SAX model was found. I would want to see miniDom or DOM parsing for REST.

Personal tools