Difference between revisions of "API/Samples"

From Apache OpenOffice Wiki
< API
Jump to: navigation, search
(Samples)
 
(2 intermediate revisions by one other user not shown)
Line 1: Line 1:
UNO allows the usage of the OpenOffice.org API from different programming languages and it is often very useful to find some short examples showing different API use cases for different programming languages. Under this section in the wiki you can find examples of such API use case for the different supported programming languages.
+
UNO allows the usage of the {{AOo}} API from different programming languages, and it is often very useful to find some short examples showing different API use cases for different programming languages. Under this section in the wiki you can find examples of such API use case for the different supported programming languages.
  
==Samples==
+
== Samples ==
  
 
* [[API/Samples/Java]]
 
* [[API/Samples/Java]]
Line 10: Line 10:
 
* [[API/Samples/Any_Language]]
 
* [[API/Samples/Any_Language]]
  
==Guideline==
+
== Where to get the sourcecode? ==
 +
 
 +
You can find some examples described above (and additional stuff) in the {{AOo}} Subversion repository. The directory structure below /contrib/sdk is similar to the one in the wiki:
 +
 
 +
* /contrib/sdk/examples/java contains - as you might expect - Java examples
 +
 
 +
=== Checkout the sourcecode ===
 +
 
 +
You need a working Subversion client to check out the source from the repository. On Unix you can use the following command to retrieve all Java examples:
 +
 
 +
  svn export svn://svn.services.openoffice.org/ooo/contrib/sdk/examples/java java-examples
 +
 
 +
On Windows you can use a graphical client, e.g. [https://tortoisesvn.net/ TortoiseSVN].
 +
 
 +
== Guideline ==
 
This example section follows some rules that should be taken into account when somebody wants to contribute to these example collection. The examples for the different languages are collected dynamically and that is one reason why contributors should follow these rules.
 
This example section follows some rules that should be taken into account when somebody wants to contribute to these example collection. The examples for the different languages are collected dynamically and that is one reason why contributors should follow these rules.
  
 
* select the right programming language and the appropriate sub category (e.g. Writer, Calc, ....)
 
* select the right programming language and the appropriate sub category (e.g. Writer, Calc, ....)
* save your example in an hierarchical structure, e.g API/Samples/Java/Office/MyExample
+
* save your example in a hierarchical structure, e.g API/Samples/Java/Office/MyExample
 
* use always the category '''API''' and '''Samples''' and additionally the category for your language ad sub category. In the example above it is '''Java''' and '''Office'''
 
* use always the category '''API''' and '''Samples''' and additionally the category for your language ad sub category. In the example above it is '''Java''' and '''Office'''
  

Latest revision as of 13:26, 29 January 2021

UNO allows the usage of the Apache OpenOffice API from different programming languages, and it is often very useful to find some short examples showing different API use cases for different programming languages. Under this section in the wiki you can find examples of such API use case for the different supported programming languages.

Samples

Where to get the sourcecode?

You can find some examples described above (and additional stuff) in the Apache OpenOffice Subversion repository. The directory structure below /contrib/sdk is similar to the one in the wiki:

  • /contrib/sdk/examples/java contains - as you might expect - Java examples

Checkout the sourcecode

You need a working Subversion client to check out the source from the repository. On Unix you can use the following command to retrieve all Java examples:

 svn export svn://svn.services.openoffice.org/ooo/contrib/sdk/examples/java java-examples

On Windows you can use a graphical client, e.g. TortoiseSVN.

Guideline

This example section follows some rules that should be taken into account when somebody wants to contribute to these example collection. The examples for the different languages are collected dynamically and that is one reason why contributors should follow these rules.

  • select the right programming language and the appropriate sub category (e.g. Writer, Calc, ....)
  • save your example in a hierarchical structure, e.g API/Samples/Java/Office/MyExample
  • use always the category API and Samples and additionally the category for your language ad sub category. In the example above it is Java and Office

The hierarchical structure can be extended on demand to group examples in a further category!

Personal tools