summaryrefslogtreecommitdiff
path: root/include/linguistic/lngprophelp.hxx
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/linguistic/lngprophelp.hxx
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/linguistic/lngprophelp.hxx')
-rw-r--r--include/linguistic/lngprophelp.hxx8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linguistic/lngprophelp.hxx b/include/linguistic/lngprophelp.hxx
index 18dfaa60d2e2..85b32b7cec3e 100644
--- a/include/linguistic/lngprophelp.hxx
+++ b/include/linguistic/lngprophelp.hxx
@@ -166,11 +166,15 @@ class UNLESS_MERGELIBS(LNG_DLLPUBLIC) PropertyHelper_Spell final :
bool bIsSpellUpperCase;
bool bIsSpellWithDigits;
bool bIsSpellCapitalization;
+ bool bIsSpellClosedCompound;
+ bool bIsSpellHyphenatedCompound;
// return values, will be set to default value or current temporary value
bool bResIsSpellUpperCase;
bool bResIsSpellWithDigits;
bool bResIsSpellCapitalization;
+ bool bResIsSpellClosedCompound;
+ bool bResIsSpellHyphenatedCompound;
PropertyHelper_Spell( const PropertyHelper_Spell & ) = delete;
PropertyHelper_Spell & operator = ( const PropertyHelper_Spell & ) = delete;
@@ -196,6 +200,8 @@ public:
bool IsSpellUpperCase() const { return bResIsSpellUpperCase; }
bool IsSpellWithDigits() const { return bResIsSpellWithDigits; }
bool IsSpellCapitalization() const { return bResIsSpellCapitalization; }
+ bool IsSpellClosedCompound() const { return bResIsSpellClosedCompound; }
+ bool IsSpellHyphenatedCompound() const { return bResIsSpellHyphenatedCompound; }
};
@@ -219,6 +225,8 @@ public:
bool IsSpellUpperCase() const;
bool IsSpellWithDigits() const;
bool IsSpellCapitalization() const;
+ bool IsSpellClosedCompound() const;
+ bool IsSpellHyphenatedCompound() const;
/// @throws css::uno::RuntimeException
bool addLinguServiceEventListener(
const css::uno::Reference< css::linguistic2::XLinguServiceEventListener >& rxListener );