From 6feeb066375e6b330e2ce9b3fdbfff6ef3cfdc15 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 7 Jun 2018 17:37:52 +0200 Subject: sw_redlinehide: Add sw::WrongListIterator The simplest way to deal with the problem that wrong-lists are on the SwTextNode is to just take them as-is and iterate over them in a merged SwTextFrame. This may give results that users may disapprove of, but i'm not sure how likely it is in practice to e.g. start a delete redline in the middle of a word and end it in another paragraph. Perhaps it would be better to move the SwWrongLists to the SwTextFrame, but that is probably more work. Also add missing SwTextNode function overloads for "const", so we don't need mutable SwTextNodes. Change-Id: I9742e3793abe090cf58ad3f27b51e89be86a1964 --- sw/inc/ndtxt.hxx | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sw/inc/ndtxt.hxx') diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx index 894f8c078635..d1a8801eb9c7 100644 --- a/sw/inc/ndtxt.hxx +++ b/sw/inc/ndtxt.hxx @@ -194,8 +194,11 @@ public: const SwWrongList* GetWrong() const; void SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete = true ); SwGrammarMarkUp* GetGrammarCheck(); + // return SwWrongList because *function pointer* return values aren't covariant + SwWrongList const* GetGrammarCheck() const; void SetSmartTags( SwWrongList* pNew, bool bDelete = true ); SwWrongList* GetSmartTags(); + SwWrongList const* GetSmartTags() const; void TryCharSetExpandToNum(const SfxItemSet& pCharSet); /// End: Data collected during idle time -- cgit