summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-05-23 20:11:08 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-05-24 08:55:50 +0200
commit42d2b2d55a27f11153ea1713737d93540a19211d (patch)
tree2d15e4c5af211ea6f09fb4cd0f5530d601537ac5 /sw/inc
parentfddef05ea72db3450f95570a17511350cc46016b (diff)
fix leak of wronglist in SwTextNode
Change-Id: Ib388575d60d7cc32829108f70d7900d95fc34121 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/ndtxt.hxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 50986f3daca7..5e189bb1199d 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -187,14 +187,20 @@ public:
void SetGrammarCheckDirty( bool bNew ) const;
void SetSmartTagDirty( bool bNew ) const;
void SetAutoCompleteWordDirty( bool bNew ) const;
- void SetWrong( SwWrongList* pNew, bool bDelete = true );
+ void SetWrong( std::unique_ptr<SwWrongList> pNew );
+ void ClearWrong();
+ std::unique_ptr<SwWrongList> ReleaseWrong();
SwWrongList* GetWrong();
const SwWrongList* GetWrong() const;
- void SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete = true );
+ void SetGrammarCheck( std::unique_ptr<SwGrammarMarkUp> pNew );
+ void ClearGrammarCheck();
+ std::unique_ptr<SwGrammarMarkUp> ReleaseGrammarCheck();
SwGrammarMarkUp* GetGrammarCheck();
// return SwWrongList because *function pointer* return values aren't covariant
SwWrongList const* GetGrammarCheck() const;
- void SetSmartTags( SwWrongList* pNew, bool bDelete = true );
+ void SetSmartTags( std::unique_ptr<SwWrongList> pNew );
+ void ClearSmartTags();
+ std::unique_ptr<SwWrongList> ReleaseSmartTags();
SwWrongList* GetSmartTags();
SwWrongList const* GetSmartTags() const;
void TryCharSetExpandToNum(const SfxItemSet& pCharSet);