summaryrefslogtreecommitdiff
path: root/include/unotools
diff options
context:
space:
mode:
authorLászló Németh <nemeth@numbertext.org>2022-12-30 10:26:07 +0100
committerLászló Németh <nemeth@numbertext.org>2022-12-30 11:03:39 +0000
commit57d79744c77eef96b4c2bd3b16e0a04317ffcf9e (patch)
tree7945482864b5be38eb2b88ba2c3fd38a1c21e293 /include/unotools
parentb22bbfa25ab1f0b9cfa1dedc85b8f9874f0a5e5b (diff)
tdf#136306 offapi linguistic: add options to disable rule-based compounding
Add two new spell checking options to disable rule-based closed and hyphenated compound word recognition with Hunspell dictionaries: com::sun::star::linguistic2::XLinguProperties::IsSpellClosedCompound com::sun::star::linguistic2::XLinguProperties::IsSpellHyphenatedCompound For professional proofreaders, it can be more important to avoid of the mistakes of the rule-based compound word recognition, than to speed up proofreading. Disabling the following two new options will report all rule-based closed compound words (default in Dutch, German, Hungarian etc. dictionaries) and rule-based hyphenated compound words (all languages with BREAK usage in their Hunspell dictionaries): - "Accept possible closed compound words" - "Accept possible hyphenated compound words" For example, disabling the second one, dictionary word "scot-free" will be still correct word in English spell checking, but not the previously accepted compound "arbitrary-word-with-hyphen". Note: the second option works with the update to Hunspell 1.7.2. Change-Id: Id879610927d5e8269fda5ad207c1c2fe1f57a0b6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/144875 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
Diffstat (limited to 'include/unotools')
-rw-r--r--include/unotools/lingucfg.hxx8
-rw-r--r--include/unotools/linguprops.hxx8
2 files changed, 10 insertions, 6 deletions
diff --git a/include/unotools/lingucfg.hxx b/include/unotools/lingucfg.hxx
index b4a0b824e127..40797a372f33 100644
--- a/include/unotools/lingucfg.hxx
+++ b/include/unotools/lingucfg.hxx
@@ -85,11 +85,15 @@ struct UNOTOOLS_DLLPUBLIC SvtLinguOptions
// SpellChecker service specific options
bool bIsSpellWithDigits,
bIsSpellUpperCase,
- bIsSpellCapitalization;
+ bIsSpellCapitalization,
+ bIsSpellClosedCompound,
+ bIsSpellHyphenatedCompound;
bool bROIsSpellWithDigits,
bROIsSpellUpperCase,
- bROIsSpellCapitalization;
+ bROIsSpellCapitalization,
+ bROIsSpellClosedCompound,
+ bROIsSpellHyphenatedCompound;
// text conversion specific options
bool bIsIgnorePostPositionalWord;
diff --git a/include/unotools/linguprops.hxx b/include/unotools/linguprops.hxx
index 971c0280444c..7f55a9e74042 100644
--- a/include/unotools/linguprops.hxx
+++ b/include/unotools/linguprops.hxx
@@ -54,8 +54,8 @@ inline constexpr OUStringLiteral UPN_DEFAULT_LOCALE_CTL = u"Default
inline constexpr OUStringLiteral UPN_IS_HYPH_AUTO = u"IsHyphAuto";
inline constexpr OUStringLiteral UPN_IS_HYPH_SPECIAL = u"IsHyphSpecial";
inline constexpr OUStringLiteral UPN_IS_SPELL_AUTO = u"IsSpellAuto";
-inline constexpr OUStringLiteral UPN_IS_SPELL_HIDE = u"IsSpellHide"; /*! deprecated #i91949 !*/
-inline constexpr OUStringLiteral UPN_IS_SPELL_IN_ALL_LANGUAGES = u"IsSpellInAllLanguages"; /*! deprecated #i91949 !*/
+inline constexpr OUStringLiteral UPN_IS_SPELL_CLOSED_COMPOUND = u"IsSpellClosedCompound";
+inline constexpr OUStringLiteral UPN_IS_SPELL_HYPHENATED_COMPOUND = u"IsSpellHyphenatedCompound";
inline constexpr OUStringLiteral UPN_IS_SPELL_SPECIAL = u"IsSpellSpecial";
inline constexpr OUStringLiteral UPN_IS_WRAP_REVERSE = u"IsWrapReverse";
inline constexpr OUStringLiteral UPN_DATA_FILES_CHANGED_CHECK_VALUE = u"DataFilesChangedCheckValue";
@@ -86,8 +86,8 @@ inline constexpr OUStringLiteral UPN_IS_GRAMMAR_INTERACTIVE = u"IsInter
#define UPH_HYPH_MIN_WORD_LENGTH 8
#define UPH_DEFAULT_LOCALE 9
#define UPH_IS_SPELL_AUTO 10
-#define UPH_IS_SPELL_HIDE 11
-#define UPH_IS_SPELL_IN_ALL_LANGUAGES 12
+#define UPH_IS_SPELL_CLOSED_COMPOUND 11
+#define UPH_IS_SPELL_HYPHENATED_COMPOUND 12
#define UPH_IS_SPELL_SPECIAL 13
#define UPH_IS_HYPH_AUTO 14
#define UPH_IS_HYPH_SPECIAL 15