Ask Your Question

optional character properties [closed]

asked 2017-12-10 00:32:26 +0200

Lupp gravatar image

updated 2017-12-10 00:47:37 +0200

In "CharacterProperties Service Reference" concerning 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?

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Alex Kemp
close date 2020-10-22 19:57:52.516186


A follow-up question from

Jim K gravatar imageJim K ( 2017-12-10 08:56:45 +0200 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-12-10 08:41:52 +0200

Jim K gravatar image

updated 2017-12-10 08:54:41 +0200

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.

edit flag offensive delete link more


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?

Lupp gravatar imageLupp ( 2017-12-10 10:59:08 +0200 )edit

Question Tools

1 follower


Asked: 2017-12-10 00:32:26 +0200

Seen: 185 times

Last updated: Dec 10 '17