Kaydet (Commit) 51d957bb authored tarafından Bertram Nolte's avatar Bertram Nolte

Added C++ and OLE links.

üst 19d2c277
...@@ -26,15 +26,17 @@ ...@@ -26,15 +26,17 @@
</TD> </TD>
</TR> </TR>
<TR> <TR>
<TD COLSPAN=3 WIDTH=100%> <A HREF="#Overview">Overview </A><BR> <TD COLSPAN=3 WIDTH=100%> <A HREF="#Overview">Overview </A><br>
<a href="#AdditionalResources">Additional Resources</a><BR>
<A HREF="#Java">Java examples</A><br> <A HREF="#Java">Java examples</A><br>
<A HREF="#CPlusPlus">C++ examples</A><br> <A HREF="#CPlusPlus">C++ examples</A><br>
<a href="#Description"></a><A HREF="#Basic">OpenOffice.org Basic examples</A><BR> <a href="#Description"></a><A HREF="#Basic">OpenOffice.org Basic examples</A><br>
</TD> <a href="#Description"></a><a href="#OLE">Object Linking and Embedding (OLE)
examples</a></TD>
</TR> </TR>
<TR> <TR>
<TD COLSPAN=3 WIDTH=100% BGCOLOR="#666699"> <TD COLSPAN=3 WIDTH=100% BGCOLOR="#666699">
<H3 ALIGN=LEFT STYLE="margin-top: 0cm; text-decoration: none"><A NAME="Overview "></A> <H3 ALIGN=LEFT STYLE="margin-top: 0cm; text-decoration: none"><A NAME="Overview"></A>
<FONT COLOR="#ffffff"><FONT SIZE=4>Overview</FONT></FONT></H3> <FONT COLOR="#ffffff"><FONT SIZE=4>Overview</FONT></FONT></H3>
</TD> </TD>
</TR> </TR>
...@@ -51,7 +53,7 @@ ...@@ -51,7 +53,7 @@
for the OpenOffice.org using the <a href="http://api.openoffice.org/">OpenOffice for the OpenOffice.org using the <a href="http://api.openoffice.org/">OpenOffice
API</a> and the OpenOffice.org component technology <a href="http://udk.openoffice.org/">UNO API</a> and the OpenOffice.org component technology <a href="http://udk.openoffice.org/">UNO
(Universal Network Objects)</a>. Furthermore, the tarballs contain all (Universal Network Objects)</a>. Furthermore, the tarballs contain all
below mentioned examples (C++, Java, and Basic) which demonstrate the below mentioned examples (C++, Java, and Basic), which demonstrate the
UNO technology and the use of the OpenOffice.org API.</p> UNO technology and the use of the OpenOffice.org API.</p>
<p>Further on, the ODK is the basic stuff for external developers to develop <p>Further on, the ODK is the basic stuff for external developers to develop
components <font face="Times New Roman, Times, serif">in any language components <font face="Times New Roman, Times, serif">in any language
...@@ -72,6 +74,78 @@ ...@@ -72,6 +74,78 @@
spreadsheet, presentation software, graphics program, and database software.</font></p> spreadsheet, presentation software, graphics program, and database software.</font></p>
</TD> </TD>
</TR> </TR>
<tr>
<td colspan=3 width=100% bgcolor="#666699">
<h3 align=LEFT style="margin-top: 0cm; text-decoration: none"><a name="AdditionalResources"></a>
<font color="#ffffff"><font size="4">Additional Resources</font></font></h3>
</td>
</tr>
<tr>
<td colspan=3 width=100%>
<table width="100%" cellpadding="4" cellspacing="1" bgcolor="#ffffff">
<tr bgcolor="#f0f0f0">
<td width="24%" valign="top"><b>Example</b></td>
<td width="76%" valign="top"><b>Description</b></td>
</tr>
<tr bgcolor="#f0f0f0">
<td width="24%" valign="top"><a href="http://api.openoffice.org/basic/man/tutorial/tutorial.pdf">Programmer's
Tutorial</a><a href="http://udk.openoffice.org/"></a></td>
<td width="76%" valign="top">This PDF document presents the basic concepts
of the OpenOffice API, the document models (including some UML diagrams)
and a bunch of examples in StarBASIC as well. (Version for StarOffice
5.2) </td>
</tr>
<tr bgcolor="#f0f0f0">
<td width="24%" valign="top"><a href="http://udk.openoffice.org/">UNO
Development Kit Homepage</a></td>
<td width="76%" valign="top">UNO (Universal Network Objects) is an interface
based object model. UNO is a specification for a communication model
among distributed objects. It allows these objects to be implemented
in any language for which a binding exists. Currently there are language
bindings for Java and different C++ compilers on different platforms.</td>
</tr>
<tr bgcolor="#f0f0f0">
<td width="24%" valign="top"><a href="http://api.openoffice.org/">OpenOffice
API Homepage</a></td>
<td width="76%" valign="top">The OpenOffice.org API is based on the
OpenOffice.org component technology and consists of a wide range of
interfaces defined in a CORBA-like IDL. While the component technology
determines how the components or applications communicate with each
other, the OpenOffice.org API defines the interface for accessing
office functionality from different programming languages. The OpenOffice
API reference manual is available from the homepage.</td>
</tr>
<tr bgcolor="#f0f0f0">
<td width="24%" valign="top"><a href="http://udk.openoffice.org/source/browse/udk/www/common/man/draft/Guide_Developing_components_with_UNO.sxw">Developing
components with UNO</a></td>
<td width="76%" valign="top">The tutorial &quot;Developing components
with UNO&quot; explains the fundamental concepts (ODK, UNO), shows
how to access existing services in UNO, and how to write simple UNO
components. The text is enhanced with Java and C++ code.</td>
</tr>
<tr bgcolor="#f0f0f0">
<td width="24%" valign="top"><a href="http://api.openoffice.org/unbranded-source/browse/%7Echeckout%7E/api/odk/examples/OfficeNetBeansIntegration.html?content-type=text/html">NetBeans</a></td>
<td width="76%" valign="top">If you need an integrated development environment
(IDE) you should take NetBeans into account. NetBeans is an open source,
modular IDE, written in the Java programming language.</td>
</tr>
<tr bgcolor="#f0f0f0">
<td width="24%" valign="top"><a href="http://api.openoffice.org/design_guide.html">Guideline
for designing OpenOffice APIs</a></td>
<td width="76%" valign="top">The guideline for designing OpenOffice
APIs describes general design rules and the definition of API elements.</td>
</tr>
<tr bgcolor="#f0f0f0">
<td width="24%" valign="top" bgcolor="#f0f0f0"><a href="http://www.openoffice.org/dev_docs/source/download.html">Office
Development Kit </a>(ODK)</td>
<td width="76%" valign="top">The ODK is a set of tools, libraries, jar
files, header files and idl files which are necessary to develop components
for the OpenOffice.org using the OpenOffice API and the OpenOffice.org
component technology UNO (Universal Network Objects).</td>
</tr>
</table>
</td>
</tr>
<TR> <TR>
<TD COLSPAN=3 WIDTH=100% BGCOLOR="#666699"> <TD COLSPAN=3 WIDTH=100% BGCOLOR="#666699">
<H3><A NAME="Java"></A><FONT COLOR="#ffffff">Java examples</FONT></H3> <H3><A NAME="Java"></A><FONT COLOR="#ffffff">Java examples</FONT></H3>
...@@ -84,183 +158,192 @@ ...@@ -84,183 +158,192 @@
the following command:</p> the following command:</p>
<p>soffice &quot;-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager&quot;</p> <p>soffice &quot;-accept=socket,host=localhost,port=8100;urp;StarOffice.ServiceManager&quot;</p>
<p>You could also customize the mentioned host and port to your needs.</p> <p>You could also customize the mentioned host and port to your needs.</p>
<table width="94%" border="1"> <table width="100%" bgcolor="#ffffff" cellpadding="4" cellspacing="1">
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><b>Example</b></td> <td width="24%" valign="top"><b>Example</b></td>
<td width="76%"><b>Description</b></td> <td width="76%" valign="top"><b>Description</b></td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/CalcAddins/">CalcAddins</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/CalcAddins/">CalcAddins</a></td>
<td width="76%">This component adds new functions to the spreadsheet <td width="76%" valign="top">This component adds new functions to the
application. After registering the component, the inserted functions spreadsheet application. After registering the component, the inserted
can be found with help of the functions autopilot. The new functions functions can be found with help of the functions autopilot. The new
are assigned to the category <i>Add-in</i>.</td> functions are assigned to the category <i>Add-in</i>.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/Car/">Car</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/Car/">Car</a></td>
<td width="76%">The component <i>Car</i> is a very simple, but complete <td width="76%" valign="top">The component <i>Car</i> is a very simple,
component, which simulates the driving, acceleration, and braking but complete component, which simulates the driving, acceleration,
of a car. Moreover, the component demonstrates the use of properties and braking of a car. Moreover, the component demonstrates the use
and their listeners.</td> of properties and their listeners.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/ConverterServlet/">ConverterServlet</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/ConverterServlet/">ConverterServlet</a></td>
<td width="76%">This servlet shows you, how to convert arbitrary documents <td width="76%" valign="top">This servlet shows you, how to convert
on a remote running office server. The converted document will be arbitrary documents on a remote running office server. The converted
pushed from the web server to the client browser.</td> document will be pushed from the web server to the client browser.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"> <a href="http://api.openoffice.org/source/browse/api/odk/examples/java/DocumentConverter/">DocumentConverter</a></td> <td width="24%" valign="top"> <a href="http://api.openoffice.org/source/browse/api/odk/examples/java/DocumentConverter/">DocumentConverter</a></td>
<td width="76%">Here, the program offers a service, which converts arbitrary <td width="76%" valign="top">Here, the program offers a service, which
documents to a favored document type.</td> converts arbitrary documents to a favored document type.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/DocumentLoader/">DocumentLoader</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/DocumentLoader/">DocumentLoader</a></td>
<td width="76%">The <i>DocumentLoader</i> can open a new or an existing <td width="76%" valign="top">The <i>DocumentLoader</i> can open a new
document.</td> or an existing document.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/DocumentPrinter/">DocumentPrinter</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/DocumentPrinter/">DocumentPrinter</a></td>
<td width="76%">The <i>DocumentPrinter</i> allows you to print your <td width="76%" valign="top">The <i>DocumentPrinter</i> allows you to
favored pages of a specified document on your favored printer.</td> print your favored pages of a specified document on your favored printer.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/DocumentSaver/">DocumentSaver</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/DocumentSaver/">DocumentSaver</a></td>
<td width="76%">The DocumentSaver shows you, how to save a document. <td width="76%" valign="top">The DocumentSaver shows you, how to save
Furthermore, you can change the type of your document.</td> a document. Furthermore, you can change the type of your document.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/GraphicsInserter/">GraphicsInserter</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/GraphicsInserter/">GraphicsInserter</a></td>
<td width="76%">The GraphicsInserter creates a graphics object on an <td width="76%" valign="top">The GraphicsInserter creates a graphics
empty text document by setting its position, width, height, and URL.</td> object on an empty text document by setting its position, width, height,
</tr> and URL.</td>
<tr> </tr>
<td width="24%"> <a href="http://api.openoffice.org/source/browse/api/odk/examples/java/Inspector/">Inspector</a></td> <tr bgcolor="#f0f0f0">
<td width="76%">The Instance Inspector is primarily an auxiliary tool <td width="24%" valign="top"> <a href="http://api.openoffice.org/source/browse/api/odk/examples/java/Inspector/">Inspector</a></td>
for developer, which can present information about an object of the <td width="76%" valign="top">The Instance Inspector is primarily an
Star Office API at run-time. Dependent on the object to be inspected auxiliary tool for developer, which can present information about
appropriate methods, interfaces, services, and attributes can be displayed an object of the Star Office API at run-time. Dependent on the object
to the developer. The methods, interfaces, services and attributes to be inspected appropriate methods, interfaces, services, and attributes
are represented in a predictable tree. If the attributes contained can be displayed to the developer. The methods, interfaces, services
in an object are to be examined, the appropriate nodes in the tree and attributes are represented in a predictable tree. If the attributes
can be expanded with the help of the mouse. For each non primitive contained in an object are to be examined, the appropriate nodes in
object five categories are offered to the user, as far as those are the tree can be expanded with the help of the mouse. For each non
available with the object concerned.</td> primitive object five categories are offered to the user, as far as
</tr> those are available with the object concerned.</td>
<tr> </tr>
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/NotesAccess/">NotesAccess</a></td> <tr bgcolor="#f0f0f0">
<td width="76%">This class creates a spreadsheet document and fills <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/NotesAccess/">NotesAccess</a></td>
it with existing values of documents from a Lotus Notes database.</td> <td width="76%" valign="top">This class creates a spreadsheet document
</tr> and fills it with existing values of documents from a Lotus Notes
<tr> database.</td>
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/ToDo/">ToDo</a></td> </tr>
<td width="76%"> For every to-do listed in a spreadsheet document this <tr bgcolor="#f0f0f0">
component calculates the start date, day of week of the start date, <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/ToDo/">ToDo</a></td>
the end date and the day of week of the end date. All calculations <td width="76%" valign="top"> For every to-do listed in a spreadsheet
are dependent on the values of &quot;Needed Days&quot;, &quot;Due document this component calculates the start date, day of week of
Date&quot; and &quot;Status&quot;. The columns &quot;Needed Days&quot; the start date, the end date and the day of week of the end date.
and &quot;Status&quot; are mandatory. The first to-do should be placed All calculations are dependent on the values of &quot;Needed Days&quot;,
in row nine. The date to start the calculation should be placed in &quot;Due Date&quot; and &quot;Status&quot;. The columns &quot;Needed
cell C6. The private holidays should be placed in cell K4/K5 and below.<br> Days&quot; and &quot;Status&quot; are mandatory. The first to-do should
be placed in row nine. The date to start the calculation should be
placed in cell C6. The private holidays should be placed in cell K4/K5
and below.<br>
All rows will be calculated up to the first empty cell in the first All rows will be calculated up to the first empty cell in the first
column. If a cell in the column &quot;Due Date&quot; will be colored column. If a cell in the column &quot;Due Date&quot; will be colored
red, you should take a look at your entries.</td> red, you should take a look at your entries.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/WriterSelector/">WriterSelector</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/WriterSelector/">WriterSelector</a></td>
<td width="76%">This class gives you information on the selected objects <td width="76%" valign="top">This class gives you information on the
(text range, text frame, or graphics) at an OpenOffice.org Server.</td> selected objects (text range, text frame, or graphics) at an OpenOffice.org
</tr> Server.</td>
<tr> </tr>
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/calc/ChartTypeChange/">ChartTypeChange</a></td> <tr bgcolor="#f0f0f0">
<td width="76%">This class loads an OpenOffice.org Calc document and <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/calc/ChartTypeChange/">ChartTypeChange</a></td>
changes the type of the embedded chart.</td> <td width="76%" valign="top">This class loads an OpenOffice.org Calc
</tr> document and changes the type of the embedded chart.</td>
<tr> </tr>
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/calc/">EuroAdaption</a></td> <tr bgcolor="#f0f0f0">
<td width="76%">The application connects to the office server and gets <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/calc/">EuroAdaption</a></td>
the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi <td width="76%" valign="top">The application connects to the office
server and gets the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi
service factory</a>, opens an empty Calc document, enters an example service factory</a>, opens an empty Calc document, enters an example
text, sets the number format to DM, changes the number format to EUR text, sets the number format to DM, changes the number format to EUR
(Euro), and uses the DM/EUR factor on each cell with a content.</td> (Euro), and uses the DM/EUR factor on each cell with a content.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/calc/">SCalc</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/calc/">SCalc</a></td>
<td width="76%">The program connects to the office server and gets the <td width="76%" valign="top">The program connects to the office server
<a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi and gets the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi
service factory</a>. Then an empty calc document will be opened, cell service factory</a>. Then an empty calc document will be opened, cell
styles will be created, some data will be inserted into the sheets, styles will be created, some data will be inserted into the sheets,
and the created cell styles will be applied. Finally, a 3D chart will and the created cell styles will be applied. Finally, a 3D chart will
be inserted.</td> be inserted.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/draw/">SDraw</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/draw/">SDraw</a></td>
<td width="76%">This program connects to the office server and gets <td width="76%" valign="top">This program connects to the office server
the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi and gets the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi
service factory</a>. Afterwards, an empty text document will be created service factory</a>. Afterwards, an empty text document will be created
and some shapes will be inserted on the draw page</td> and some shapes will be inserted on the draw page</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">BookmarkInsertion</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">BookmarkInsertion</a></td>
<td width="76%">This application connects to the office server and gets <td width="76%" valign="top">This application connects to the office
the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi server and gets the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi
service factory</a>. An empty text document will be opened and an service factory</a>. An empty text document will be opened and an
example text will be entered. After all some bookmarks will be inserted.</td> example text will be entered. After all some bookmarks will be inserted.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">HardFormatting</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">HardFormatting</a></td>
<td width="76%">This program connects to the office server and gets <td width="76%" valign="top">This program connects to the office server
the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi and gets the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi
service factory</a>. Furthermore, an empty text document will be opened, service factory</a>. Furthermore, an empty text document will be opened,
an example text will be entered, some text attributes will be inspected, an example text will be entered, some text attributes will be inspected,
and the <a href="http://api.openoffice.org/common/ref/com/sun/star/beans/PropertyState.html">PropertyState</a> and the <a href="http://api.openoffice.org/common/ref/com/sun/star/beans/PropertyState.html">PropertyState</a>
will be checked from the selection.</td> will be checked from the selection.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">SWriter</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">SWriter</a></td>
<td width="76%">The program connects to the office server and gets the <td width="76%" valign="top">The program connects to the office server
<a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi and gets the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi
service factory</a>. An empty text document will be created, some service factory</a>. An empty text document will be created, some
text will be entered, and a text table, a colored text, and text frame text will be entered, and a text table, a colored text, and text frame
will be inserted.</td> will be inserted.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">StyleCreation</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">StyleCreation</a></td>
<td width="76%">The example connects to the office server and gets the <td width="76%" valign="top">The example connects to the office server
<a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi and gets the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi
service factory</a>. An empty text document will be opened, a new service factory</a>. An empty text document will be opened, a new
paragraph style will be created, and applied.</td> paragraph style will be created, and applied.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">StyleInitialization</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">StyleInitialization</a></td>
<td width="76%">The program connects to the office server and gets the <td width="76%" valign="top">The program connects to the office server
<a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi and gets the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi
service factory</a>. Thereafter, an empty text document will be opened service factory</a>. Thereafter, an empty text document will be opened
and an example text will be entered. The paragraph collection will and an example text will be entered. The paragraph collection will
be used, in order to apply a different paragraph style on the paragraphs.</td> be used, in order to apply a different paragraph style on the paragraphs.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">TextDocumentStructure</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">TextDocumentStructure</a></td>
<td width="76%">The application connects to the office server and gets <td width="76%" bgcolor="#f0f0f0" valign="top">The application connects
the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi to the office server and gets the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi
service factory</a>. An empty text document will be opened, an enumeration service factory</a>. An empty text document will be opened, an enumeration
of all paragraphs and an enumeration of all text portions will be of all paragraphs and an enumeration of all text portions will be
created. </td> created. </td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">TextReplace</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/writer/">TextReplace</a></td>
<td width="76%">The example connects to the office server and gets the <td width="76%" valign="top">The example connects to the office server
<a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi and gets the <a href="http://api.openoffice.org/common/ref/com/sun/star/lang/XMultiServiceFactory.html">multi
service factory</a>. An empty text document will be created, an example service factory</a>. An empty text document will be created, an example
text will be inserted, and some English spelled words will be replaced text will be inserted, and some English spelled words will be replaced
with US spelled words.</td> with US spelled words.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/com/sun/star/comp/demo/">DemoComponent</a></td> <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/java/com/sun/star/comp/demo/">DemoComponent</a></td>
<td width="76%">This Java program is a demo component, which exports <td width="76%" valign="top">This Java program is a demo component,
two services.</td> which exports two services.</td>
</tr> </tr>
</table> </table>
<p>Additional informations:</p>
<p><a href="http://udk.openoffice.org/java/man/java_component_howto.html">How
to write a UNO component in Java</a><br>
<a href="http://udk.openoffice.org/java/man/index.html">Java in UNO and
OpenOffice.org</a></p>
</TD> </TD>
</TR> </TR>
<tr> <tr>
...@@ -270,34 +353,48 @@ ...@@ -270,34 +353,48 @@
</tr> </tr>
<tr> <tr>
<td colspan=3 width=100%> <td colspan=3 width=100%>
<table width="94%" border="1"> <table width="100%" cellpadding="4" cellspacing="1" bgcolor="#ffffff">
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><b>Example</b></td> <td width="24%" bgcolor="#f0f0f0" valign="top"><b>Example</b></td>
<td width="76%"><b>Description</b></td> <td width="76%" valign="top"><b>Description</b></td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/cpp/officeclient/">Office <td width="24%" bgcolor="#f0f0f0" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/cpp/officeclient/">Office
client</a></td> client</a></td>
<td width="76%"> This component provides a UNO demo component which <td width="76%" valign="top"> This component provides a UNO demo component
demonstrates the communication with a local office. The component which demonstrates the communication with a local office. The component
will create different document types and close them. </td> will create different document types and close them. </td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%">Counter</td> <td width="24%" bgcolor="#f0f0f0" valign="top"><a href="http://udk.openoffice.org/source/browse/udk/product/examples/cpp/counter/">Counter</a></td>
<td width="76%">&nbsp;</td> <td width="76%" valign="top">This demo shows how to implement a very
simple UNO component and how to access the UNO component from an executable.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%">Remote client</td> <td width="24%" bgcolor="#f0f0f0" valign="top"><a href="http://udk.openoffice.org/source/browse/udk/product/examples/cpp/remoteclient/">Remote
<td width="76%">&nbsp;</td> client</a></td>
</tr> <td width="76%" valign="top">The uno.exe program is used to export an
<tr> arbitrary service to other processes. In this<br>
<td width="24%">Car</td> example the com.sun.star.uno.Pipe service (which is built in io-module)
<td width="76%">The component <i>Car</i> is a very simple, but complete is exported. The client component implements the com.sun.star.lang.XMain
component, which simulates the driving, acceleration, and braking interface. In the run method, it connects to the servers process and
of a car. Moreover, the component demonstrates the use of properties retrieves an instance and does some calls on the instance.</td>
and their listeners.</td> </tr>
<tr bgcolor="#f0f0f0">
<td width="24%" bgcolor="#f0f0f0" valign="top">Car</td>
<td width="76%" valign="top">The component <i>Car</i> is a very simple,
but complete component, which simulates the driving, acceleration,
and braking of a car. Moreover, the component demonstrates the use
of properties and their listeners.</td>
</tr> </tr>
</table> </table>
<p>Additional informations:</p>
<p><a href="http://udk.openoffice.org/cpp/man/component_tutorial.html">Writing
a simple UNO component in C++<br>
</a><a href="http://udk.openoffice.org/cpp/man/tutorial/unointro.html">A
guide to C++ UNO</a><br>
<a href="http://udk.openoffice.org/cpp/ref/cpp-reference-index.html">C++
UNO Reference</a></p>
</td> </td>
</tr> </tr>
<tr> <tr>
...@@ -318,17 +415,17 @@ ...@@ -318,17 +415,17 @@
were ported to Java and you find them above.</p> were ported to Java and you find them above.</p>
<p>These examples are presented in the order in which they appear in Chapter <p>These examples are presented in the order in which they appear in Chapter
5.</p> 5.</p>
<table width="94%" border="1"> <table width="100%" bgcolor="#ffffff" cellpadding="4" cellspacing="1">
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><b>Example</b></td> <td width="24%" valign="top"><b>Example</b></td>
<td width="76%"><b>Description</b></td> <td width="76%" valign="top"><b>Description</b></td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/text/modifying_text_automatically/" target="_blank"><font face="Times New Roman, serif">Changing <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/text/modifying_text_automatically/" target="_blank"><font face="Times New Roman, serif">Changing
Appearance</font></a></td> Appearance</font></a></td>
<td width="76%">To change the style used for certain words, you can <td width="76%" valign="top">To change the style used for certain words,
start with the following example. This code searches for the regular you can start with the following example. This code searches for the
expression <font face="Courier New, Courier, mono">the[a-z]</font> regular expression <font face="Courier New, Courier, mono">the[a-z]</font>
which stands for the text portion the followed by exactly one lowercase which stands for the text portion the followed by exactly one lowercase
letter. All occurrences of these four letters are then changed to letter. All occurrences of these four letters are then changed to
be displayed in bold characters. The same happens in the next part be displayed in bold characters. The same happens in the next part
...@@ -336,10 +433,10 @@ ...@@ -336,10 +433,10 @@
to italic. In order for this example to work, you must execute it to italic. In order for this example to work, you must execute it
from an open text document.</td> from an open text document.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/text/modifying_text_automatically/" target="_blank"><font face="Times New Roman, serif">Replacing <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/text/modifying_text_automatically/" target="_blank"><font face="Times New Roman, serif">Replacing
Text</font></a></td> Text</font></a></td>
<td width="76%"> <td width="76%" valign="top">
<p>If you regularly receive documents from other people for editing, <p>If you regularly receive documents from other people for editing,
you might want to make sure that certain words are always written you might want to make sure that certain words are always written
the same. The next example<br> the same. The next example<br>
...@@ -350,10 +447,10 @@ ...@@ -350,10 +447,10 @@
want to read the words from an external file.</p> want to read the words from an external file.</p>
</td> </td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/text/modifying_text_automatically/" target="_blank"><font face="Times New Roman, serif">Using <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/text/modifying_text_automatically/" target="_blank"><font face="Times New Roman, serif">Using
Regular Expressions</font></a></td> Regular Expressions</font></a></td>
<td width="76%"> <td width="76%" valign="top">
<p>Another application of automatic text modification is related to <p>Another application of automatic text modification is related to
stylistic questions. Suppose your company&#146;s policy is to avoid stylistic questions. Suppose your company&#146;s policy is to avoid
the use of certain words. You want to replace these words, but you the use of certain words. You want to replace these words, but you
...@@ -370,10 +467,10 @@ ...@@ -370,10 +467,10 @@
for the variants of the words (plural, adjective etc.).</p> for the variants of the words (plural, adjective etc.).</p>
</td> </td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/text/modifying_text_automatically/" target="_blank"><font face="Times New Roman, serif">Inserting <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/text/modifying_text_automatically/" target="_blank"><font face="Times New Roman, serif">Inserting
Bookmarks</font></a></td> Bookmarks</font></a></td>
<td width="76%"> <td width="76%" valign="top">
<p>The next example does something very similar. This time, however, <p>The next example does something very similar. This time, however,
we do not<br> we do not<br>
change the color of the words but insert a bookmark at each of them. change the color of the words but insert a bookmark at each of them.
...@@ -389,56 +486,82 @@ ...@@ -389,56 +486,82 @@
inserts this bookmark at the word.</p> inserts this bookmark at the word.</p>
</td> </td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/text/creating_an_index/" target="_blank"><font face="Times New Roman, serif">Creating <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/text/creating_an_index/" target="_blank"><font face="Times New Roman, serif">Creating
an Index</font></a></td> an Index</font></a></td>
<td width="76%">Indices for text documents can be created manually in <td width="76%" valign="top">Indices for text documents can be created
StarWriter by clicking on the words that shall appear in the index. manually in StarWriter by clicking on the words that shall appear
If the document is large or if you have to generate indices for several in the index. If the document is large or if you have to generate
documents, this task should be automated.</td> indices for several documents, this task should be automated.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/sheet/" target="_blank"><font face="Times New Roman, serif">Adapting <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/sheet/" target="_blank"><font face="Times New Roman, serif">Adapting
to Euroland</font></a></td> to Euroland</font></a></td>
<td width="76%">Most of the member of the European Union will abandon <td width="76%" valign="top">Most of the member of the European Union
their old currency in favor of the new Euro in 2001. This requires will abandon their old currency in favor of the new Euro in 2001.
modifications to all programs using the old currencies. Since the This requires modifications to all programs using the old currencies.
exchange rates for the old currencies have been fixed at the end of Since the exchange rates for the old currencies have been fixed at
1999, one can already convert old data. The following program does the end of 1999, one can already convert old data. The following program
this for all values in a table that are formatted with the currency does this for all values in a table that are formatted with the currency
string DM.</td> string DM.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/drawing/" target="_blank"><font face="Times New Roman, serif">Import/Export <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/drawing/" target="_blank"><font face="Times New Roman, serif">Import/Export
of ASCII Files</font></a> </td> of ASCII Files</font></a> </td>
<td width="76%">You can use the drawing facilities of StarOffice API <td width="76%" valign="top">You can use the drawing facilities of StarOffice
to generate a picture from ASCII input. One application would be a API to generate a picture from ASCII input. One application would
hierarchical representation of a directory listing, based on textual be a hierarchical representation of a directory listing, based on
data.</td> textual data.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/stock_quotes_updater/" target="_blank"><font face="Times New Roman, serif">Stock <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/stock_quotes_updater/" target="_blank"><font face="Times New Roman, serif">Stock
Quotes Updater</font></a></td> Quotes Updater</font></a></td>
<td width="76%">If you want to display stock charts for certain companies, <td width="76%" valign="top">If you want to display stock charts for
you can fire up your browser every day, go to Yahoo, look up the quote certain companies, you can fire up your browser every day, go to Yahoo,
and copy it by hand into a table. Or you can use a program that does look up the quote and copy it by hand into a table. Or you can use
all this automatically. The following example relies on the sheet a program that does all this automatically. The following example
module. It uses URLs to obtain the current stock quotes. The quotes relies on the sheet module. It uses URLs to obtain the current stock
are displayed in sheets, one for each company. We show a line diagram quotes. The quotes are displayed in sheets, one for each company.
and the numerical values for this company on every sheet. The functionality We show a line diagram and the numerical values for this company on
is hidden in the three subroutines <font face="Courier New, Courier, mono">GetValue()</font>, every sheet. The functionality is hidden in the three subroutines
<font face="Courier New, Courier, mono">UpdateValue()</font>, and <font face="Courier New, Courier, mono">GetValue()</font>, <font face="Courier New, Courier, mono">UpdateValue()</font>,
<font face="Courier New, Courier, mono">UpdateChart()</font>.</td> and <font face="Courier New, Courier, mono">UpdateChart()</font>.</td>
</tr> </tr>
<tr> <tr bgcolor="#f0f0f0">
<td width="24%"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/forms_and_controls/" target="_blank"><font face="Times New Roman, serif">Forms <td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/basic/forms_and_controls/" target="_blank"><font face="Times New Roman, serif">Forms
and Controls</font></a></td> and Controls</font></a></td>
<td width="76%">The example document Burger Factory offers you some <td width="76%" valign="top">The example document Burger Factory offers
forms and controls, which you can use to order your desired burger you some forms and controls, which you can use to order your desired
type, beverage, topping, and sauce. By hitting the button &quot;Order burger type, beverage, topping, and sauce. By hitting the button &quot;Order
now !&quot;, your order will be placed.</td> now !&quot;, your order will be placed.</td>
</tr> </tr>
</table> </table>
<p>Additional informations:</p>
<p><a href="http://api.openoffice.org/basic/man/tutorial/tutorial.pdf">Programmer's
Tutorial</a></p>
</td>
</tr>
<tr>
<td colspan=3 width=100% bgcolor="#666699">
<h3><a name="OLE"></a><font color="#ffffff">OLE examples</font></h3>
</td>
</tr>
<tr>
<td colspan=3 width=100%>
<table width="100%" cellpadding="4" cellspacing="1" bgcolor="#ffffff">
<tr bgcolor="#f0f0f0">
<td width="24%" valign="top"><b>Example</b></td>
<td width="76%" valign="top"><b>Description</b></td>
</tr>
<tr bgcolor="#f0f0f0">
<td width="24%" valign="top"><a href="http://api.openoffice.org/source/browse/api/odk/examples/OLE/vbscript/">WriterDemo</a></td>
<td width="76%" valign="top">This Visual Basic Script creates an empty
text document and inserts text, a table, and a text frame.</td>
</tr>
</table>
<p>Additional informations:</p>
<p><a href="http://udk.openoffice.org/common/man/spec/ole_bridge.html">The
OLE Bridge</a></p>
</td> </td>
</tr> </tr>
<TR> <TR>
...@@ -450,7 +573,7 @@ ...@@ -450,7 +573,7 @@
<TD WIDTH=50% BGCOLOR="#666699"> <TD WIDTH=50% BGCOLOR="#666699">
<P ALIGN=LEFT><FONT COLOR="#ffffff"> Author: <A HREF="mailto:Bertram.Nolte@sun.com"><FONT COLOR="#ffffff">Bertram <P ALIGN=LEFT><FONT COLOR="#ffffff"> Author: <A HREF="mailto:Bertram.Nolte@sun.com"><FONT COLOR="#ffffff">Bertram
Nolte</FONT></A> ( Nolte</FONT></A> (
<!-- #BeginDate format:IS1a -->2001-10-15 7:24 PM<!-- #EndDate --> <!-- #BeginDate format:IS1a -->2001-10-16 4:07 PM<!-- #EndDate -->
)<BR> )<BR>
<I>Copyright 2001 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto, <I>Copyright 2001 Sun Microsystems, Inc., 901 San Antonio Road, Palo Alto,
CA 94303 USA.</I></FONT> </P> CA 94303 USA.</I></FONT> </P>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment