Misc macros

• SetAncientGreekLanguage Macro

Changes text language to "Greek, Ancient". It works on two modes:

  1. Changes the language of the entire document

When no selection is active (the user has selected no text), the macro will change the language of the entire document paragraph by paragraph. Reverting the changes is limited by the number of Undo steps set in LibreOffice (or OpenOffice) Options. Because of that, before actually performing any alteration, a confirmation dialog is displayed:

language-confirmation-dialog.png
Confirmation dialog (Windows 7)

Using this macro mode will make it difficult to work with Styles on a document, and I strongly advice you not to use it. I still provide this macro mode for those who know nothing about using Styles and just want to quickly edit a document.

  1. Changes the language of a selection

This macro mode is useful in case you have a mixed language paragraph. This means that you have a paragraph which contains text both in Ancient Greek and in your native language (or any other language).

If the paragraph contains Ancient Greek text only, you should consider creating a new paragraph style for this paragraph and similar ones.

This macros is in module AncientGreekLocale.

• UnicodeToHex Macro

This macro will take a string and display the hexadecimal and decimal value of every character it contains. It is very useful in order to understand how a text section is composed (whether it contains precomposed, composite or fullwidth/halfwidth characters, etc.).

I would recommend you not to use a large string for its input; it will take a very long time to analyze and the result may not be very readable.

It will either use the currently selected text, or ask the user to type it (if no selection exists), as seen in the following image.

text-hex-values.jpg

The following image displays the output of the macro, using the currently selected text.

text-hex-values-result.jpg

• IntToUnicode Macro

This macro will take a number and display the character it corresponds to.

The number can either be a decimal or a hexadecimal one; in the later case a "h" must be appended to the actual value.

number-to-unicode.jpg

The output of the function is identical to the one produced by UnicodeToHex; the following image shows the result for an input of "1fc6h", which is the code for small letter eta with perispomeni.

number-to-unicode-result.jpg

×

Info

If a table is truncated, then you can see all its content by scrolling it to the right and back.