diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-01-22 17:43:45 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-01-24 18:11:56 +0100 |
commit | 33f6848dc5abe71471b08dc6a8946feaa2d75ffc (patch) | |
tree | 32bab7667062e9925c9ffeba42ebdfacb61e1e69 /sw/inc/doc.hxx | |
parent | 1500ec88195466d119d73bdf7b85e8f5526e81fc (diff) |
tdf#86731 Don't show 'spelling complete' when dictionary is missing
To check if dictionary is missing we have to run spelling which
checks used language for each text portion.
When AutoSpelling or manually invoked Spelling is performed SwDoc
receives notification about missing dictionaries. Then it is possible
to not show 'Completed' dialog.
Change-Id: I040ce6565632294796c0206d20c4cd0066ca9643
Reviewed-on: https://gerrit.libreoffice.org/66813
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sw/inc/doc.hxx')
-rw-r--r-- | sw/inc/doc.hxx | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx index 4d1cf10c9010..9dda17de8e8b 100644 --- a/sw/inc/doc.hxx +++ b/sw/inc/doc.hxx @@ -312,6 +312,9 @@ private: bool mbColumnSelection : 1; //< TRUE: this content has been created by a column selection (clipboard docs only) bool mbIsPrepareSelAll : 1; + enum MissingDictionary { False = -1, Undefined = 0, True = 1 }; + MissingDictionary meDictionaryMissing; + // true: Document contains at least one anchored object, which is anchored AT_PAGE with a content position. // Thus, certain adjustment needed during formatting for these kind of anchored objects. bool mbContainsAtPageObjWithContentAnchor : 1; @@ -1635,6 +1638,11 @@ public: */ bool StartGrammarChecking( bool bSkipStart = false ); + /// Use to notify if the dictionary can be found for a single content portion (has to be called for all portions) + void SetMissingDictionaries( bool bIsMissing ); + /// Returns true if no dictionary can be found for any content + bool IsDictionaryMissing() { return meDictionaryMissing == MissingDictionary::True; } + private: // Copies master header to left / first one, if necessary - used by ChgPageDesc(). void CopyMasterHeader(const SwPageDesc &rChged, const SwFormatHeader &rHead, SwPageDesc &pDesc, bool bLeft, bool bFirst); |