summaryrefslogtreecommitdiff
path: root/odk/examples/examples.html
diff options
context:
space:
mode:
authorChenxiong Qi <qcxhome@gmail.com>2022-09-18 15:27:31 +0800
committerHossein <hossein@libreoffice.org>2022-12-03 01:48:39 +0000
commit8f34b0d40e149b7274a1aa4ce0b33ddbf825ee52 (patch)
tree59a0066a3f521c34c866dd32e8a544eabfcff834 /odk/examples/examples.html
parentf1eaad31122024034d8e7299780eeb123204b20a (diff)
tdf#143123 Port Text Java examples to Python
The examples inside odk/examples/java/Text are ported to Python: BookmarkInsertion.java -> BookmarkInsertion.py GraphicsInserter.java -> GraphicsInserter.py HardFormatting.java -> HardFormatting.py StyleCreation.java -> StyleCreation.py SWriter.java -> SWriter.py StyleInitialization.java -> StyleInitialization.py TextDocumentStructure.java -> TextDocumentStructure.py TextReplace.java -> TextReplace.py WriterSelector.java -> WriterSelector.py Code format is checked with 'pycodestyle': pycodestyle --ignore=E501,E722 odk/examples/python/Text/*.py Some Java methods are merged when ported to Python. Signed-off-by: Chenxiong Qi <qcxhome@gmail.com> Change-Id: Ic903cfa24ef32f8edaafd7e6e2e0c757b4b1be0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141425 Tested-by: Hossein <hossein@libreoffice.org> Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'odk/examples/examples.html')
-rw-r--r--odk/examples/examples.html48
1 files changed, 48 insertions, 0 deletions
diff --git a/odk/examples/examples.html b/odk/examples/examples.html
index 2b23080961fb..6cfcc045ad1f 100644
--- a/odk/examples/examples.html
+++ b/odk/examples/examples.html
@@ -461,6 +461,54 @@
</tr>
<tr>
<td>
+ <table class="table4">
+ <tbody>
+ <tr class="thead">
+ <td class="cell20">Text Document Examples</td>
+ <td class="cell80">Description</td>
+ </tr>
+ <tr>
+ <td class="cell20"><a href="python/Text/" title="link to the source directory of the Python Text examples">BookmarkInsertion</a></td>
+ <td class="cell80">This application opens an empty text document and enters an example text. Afterwards, some bookmarks will be inserted.</td>
+ </tr>
+ <tr>
+ <td class="cell20"><a href="python/Text/" title="link to the source directory of the Python Text examples">HardFormatting</a></td>
+ <td class="cell80">This program opens an empty text document and enters an example text, some text attributes will be inspected, and the <a href="%DOXYGEN_PREFIX1%/docs/idl/ref/namespacecom_1_1sun_1_1star_1_1beans.html#PropertyState" title="link into the IDL reference to the enum com.sun.star.beans.PropertyState">PropertyState</a> will be checked from the selection.</td>
+ </tr>
+ <tr>
+ <td class="cell20"><a href="python/Text/" title="link to the source directory of the Python Text examples">SWriter</a></td>
+ <td class="cell80">This program opens an empty text document and enters some text, and a text table, a colored text, and text frame will be inserted.</td>
+ </tr>
+ <tr>
+ <td class="cell20"><a href="python/Text/" title="link to the source directory of the Python Text examples">StyleCreation</a></td>
+ <td class="cell80">This program opens an empty text document. Then a new paragraph style will be created, and applied.</td>
+ </tr>
+ <tr>
+ <td class="cell20"><a href="python/Text/" title="link to the source directory of the Python Text examples">StyleInitialization</a></td>
+ <td class="cell80">This program opens an empty text document and enters an example text. The paragraph collection will be used, in order to apply a different paragraph style on the paragraphs.</td>
+ </tr>
+ <tr>
+ <td class="cell20"><a href="python/Text/" title="link to the source directory of the Python Text examples">TextDocumentStructure</a></td>
+ <td class="cell80">This program opens an empty text document and enters an example text. Document structure will be printed out. Looping through the paragraphs and their portions in a more Pythonic way instead of calling the methods of <a href="%DOXYGEN_PREFIX1%/docs/idl/ref/interfacecom_1_1sun_1_1star_1_1container_1_1XEnumeration.html" title="link to the IDL reference to the interface com.sun.star.container.XEnumeration">XEnumeration</a> interface.</td>
+ </tr>
+ <tr>
+ <td class="cell20"><a href="python/Text/" title="link to the source directory of the Python Text examples">TextReplace</a></td>
+ <td class="cell80">The program opens an empty text document and enters an example text, and some English spelled words will be replaced with US spelled words.</td>
+ </tr>
+ <tr>
+ <td class="cell20"><a href="python/Text/" title="link to the source directory of the Python Text examples">GraphicsInserter</a></td>
+ <td class="cell80">The GraphicsInserter creates a graphics object on an empty text document by setting its position, width, height, and URL.</td>
+ </tr>
+ <tr>
+ <td class="cell20"><a href="python/Text/" title="link to the source directory of the Python Text examples">WriterSelector</a></td>
+ <td class="cell80">This program gives you information on the selected objects, e.g. text range, text frame or graphics.</td>
+ </tr>
+ </tbody>
+ </table>
+ </td>
+ </tr>
+ <tr>
+ <td>
<table class="table3">
<tr>
<td colspan="3">