Request for [API CHANGE] in spell checking: add new options to disable rule-based compounding
Stephan Bergmann
sbergman at redhat.com
Thu Jan 5 09:31:54 UTC 2023
On 04/01/2023 14:18, Németh László wrote:
> I've started to add two new spell checking options to
> css.linguistic2.XLinguProperties
[...]
> Commit:https://git.libreoffice.org/core/+/57d79744c77eef96b4c2bd3b16e0a04317ffcf9e%5E%21 <https://git.libreoffice.org/core/+/57d79744c77eef96b4c2bd3b16e0a04317ffcf9e%5E%21>
So this is about the addition of
> /** defines whether spell checking should be accept rule-based
> closed compounding of dictionary words.
>
> @since LibreOffice 7.6
> */
> [attribute] boolean IsSpellClosedCompound;
>
> /** defines whether spell checking should be accept rule-based
> hyphenated compounding of dictionary words.
>
> @since LibreOffice 7.6
> */
> [attribute] boolean IsSpellHyphenatedCompound;
to the published interface css.linguistic2.XLinguProperties in
<https://git.libreoffice.org/core/+/57d79744c77eef96b4c2bd3b16e0a04317ffcf9e%5E%21>
"tdf#136306 offapi linguistic: add options to disable rule-based
compounding", which is an ABI-breaking change.
But looking closer, when
<https://git.libreoffice.org/core/+/ef0af5032ad283ffb3b4521eb097a118d58f332a%5E!/>
"fdo#46808, Convert linguistic2::LingProperties to new style" introduced
that css.linguistic2.XLinguProperties interface, it gave it various
interface attributes (IsUseDictionaryList, IsIgnoreControlCharacters,
IsSpellUpperCase, etc.) for no compelling reason: XLinguProperties is
meant to be the implementation interface of the service LinguProperties,
which was changed by that commit from an old-style to a new-style
service. The original old-style service implemented XPropertySet and
listed a number of supported properties. The XLinguProperties interface
also inherits from XPropertySet, and that should arguably have been all
that is necessary to make LinguProperties a new-style service. But that
commit also added (some of) the properties of the old-style
LinguProperties service as attributes to XLinguProperties, for no
compelling reason. All those entities should be available through the
XPropertySet interface, so there is no need to also have them available
through attribute getters and setters.
Thus I would suggest to:
* Revert the addition of the two new attributes, instead adding
documentation to offapi/com/sun/star/linguistic2/XLinguProperties.idl
that those two properties are available through the XPropertySet
interface since LibreOffice 7.6.
* Optionally, also mark all the other attributes of XLinguProperties as
deprecated, stating in the documentation that they should instead be
accessed via the XPropertySet interface.
More information about the LibreOffice
mailing list