In “CharacterProperties Service Reference” concerning com.sun.star.style.CharacterProperties
some properties are specified as optional, among them CharKerning
and CharKeepTogether
. If I inspect an object supporting the mentioned service I find the Integer (specified: short) property CharKerning
, though specified as optional, and I can assign a value to it. The effect gets visible. The boolean property CharKeepTogether
is missing. Trying to assign a value to it raises an error displaying the expectable message “Property or method not found”.
What’s the reason for the difference?
How to create the optional property?
From searching the LibreOffice source code, it looks like CharKeepTogether
is currently just a placeholder. It is impossible to create because there is no such property. Perhaps in past versions, it provided functionality similar to a non-breaking space.
For a property that doesn’t actually exist, the full description from CharacterProperties.idl sounds interesting.
This optional property marks a range of characters to prevent it from
being broken into two lines.
A line break is applied before the range of characters if
the layout makes a break necessary within the range.
Would it make sense to file a bug that the interface definitions need to be updated to completely remove the property?
I also looked in dialogs such as Format → Character → Position, which shows a checkbox for kerning but nothing regarding keeping together.
Now, Format → Paragraph → Text Flow → Do not split paragraph is ParaKeepTogether, and that functionality is alive and well.
Thank you! I feel a bit sheepish now, because you took that much trouble. My question was not about urgent needs but just for a better understanding of the implications of this question. Concerning that question I had the impression of a mix-up of the usage of any NO-BREAK-SPACE unichar (there are 3) with the absent CharacterProperty. I was wondering about who was entitled to “draw the option”. Developers?