Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | Last revisionBoth sides next revision | ||
dev:client_coding:libreoffice_plugin_wire_protocol [2017/11/12 19:53] – external edit 127.0.0.1 | dev:client_coding:libreoffice_plugin_wire_protocol [2020/10/13 03:57] – Add import/export commands and improve/clarify other commands. adomasven | ||
---|---|---|---|
Line 163: | Line 163: | ||
==== Document_getDocumentData ==== | ==== Document_getDocumentData ==== | ||
- | Retrieves data string set by [[# | + | Retrieves data string set by [[# |
=== Parameters === | === Parameters === | ||
Line 171: | Line 171: | ||
=== Returns === | === Returns === | ||
- | (String) The document data string. | + | (String) The document data string |
==== Document_cursorInField ==== | ==== Document_cursorInField ==== | ||
Line 232: | Line 232: | ||
TODO | TODO | ||
+ | |||
+ | |||
+ | ==== Document_importDocument ==== | ||
+ | |||
+ | Called to convert Zotero document transfer format links to fields after Document_getDocumentData returns " | ||
+ | |||
+ | === Parameters === | ||
+ | |||
+ | | 0 | documentID | %%Integer|String%% | The documentID, as originally returned by [[# | ||
+ | | 1 | fieldType | %%String%% | Specifies to what field type the import links should be converted. Should always be " | ||
+ | |||
+ | === Returns === | ||
+ | |||
+ | `true` if field links and document data were found and imported, `false` otherwise | ||
+ | |||
+ | |||
+ | ==== Document_exportDocument ==== | ||
+ | |||
+ | Converts the document to the Zotero transfer document format. The format is: | ||
+ | 1. Insert 4 paragraphs at the beginning of the document, where first one reads " | ||
+ | 2. Convert all citations to links that point to " | ||
+ | 3. At the end of the document insert a link that points to " | ||
+ | |||
+ | === Parameters === | ||
+ | |||
+ | | 0 | documentID | %%Integer|String%% | The documentID, as originally returned by [[# | ||
+ | | 1 | fieldType | %%String%% | The field type that the document stores Zotero citations in. Either " | ||
+ | | 2 | transferDocumentInstructions | %%String%% | A text string to be inserted at the start of the document explaining the document format | | ||
+ | |||
+ | === Returns === | ||
+ | |||
+ | null | ||
==== Document_setBibliographyStyle ==== | ==== Document_setBibliographyStyle ==== | ||
- | TODO | + | Provides parameters for the dedicated bibliography formatting style (usually called " |
+ | |||
+ | === Parameters === | ||
+ | |||
+ | | 0 | documentID | %%Integer|String%% | The documentID, as originally returned by [[# | ||
+ | | 1 | firstLineIndent | %%Integer%% | First line indent in twips | | ||
+ | | 2 | bodyIndent | %%Integer%% | Bibliography body indent in twips. Applies to first line too. First line indent is calculated by < | ||
+ | | 3 | lineSpacing | %%Integer%% | Line spacing in twips | | ||
+ | | 4 | entrySpacing | %%Integer%% | Bibliography entry spacing in twips | | ||
+ | | 5 | tabStops | %%Array(Integer)%% | Tabulator indents | | ||
+ | | 6 | numTabStops | %%Integer%% | Length of tabStops array | | ||
+ | |||
+ | == Example Parameters == | ||
+ | |||
+ | < | ||
+ | [1, -720, 720, 240, 0, [], 0] | ||
+ | [1, -720, 720, 240, 0, [1], 720] | ||
+ | </ | ||
+ | |||
+ | |||
+ | === Returns === | ||
+ | |||
+ | null | ||
==== Document_complete ==== | ==== Document_complete ==== | ||
Line 305: | Line 359: | ||
==== Field_getText ==== | ==== Field_getText ==== | ||
- | Gets the (visible) text of a field. | + | Gets the (visible) text of a field. Note that any RTF information from setText is not returned, just the visible plaintext. |
=== Parameters === | === Parameters === |