diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-01 21:24:11 +0200 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-08 21:51:35 +0200 |
commit | 53f4af9cd2c2df2d639bccee03e4433c16baf5f1 (patch) | |
tree | 2816baec2727372082b883e401bf440c46e9d8a0 | |
parent | 72161837b8d73cfc9450954c7181a9f47d2042d6 (diff) |
sw_redlinehide: make GetRegisteredIn() private in SwFrame
Use GetDep() instead, which is a unique identifier in sw.
Change-Id: I66e60a175165673c2962124fdec691b03a5f0e4a
-rw-r--r-- | sw/source/core/inc/frame.hxx | 6 | ||||
-rw-r--r-- | sw/source/core/text/txtfrm.cxx | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/sw/source/core/inc/frame.hxx b/sw/source/core/inc/frame.hxx index 482f60c8dca0..eea4f733bc30 100644 --- a/sw/source/core/inc/frame.hxx +++ b/sw/source/core/inc/frame.hxx @@ -313,6 +313,10 @@ class SW_DLLPUBLIC SwFrame : public SwFrameAreaDefinition, public SwClient, publ SwFrame *mpNext; SwFrame *mpPrev; + // sw_redlinehide: hide these dangerous SwClient functions + using SwClient::GetRegisteredInNonConst; + using SwClient::GetRegisteredIn; + SwFrame *FindNext_(); SwFrame *FindPrev_(); @@ -441,6 +445,8 @@ protected: virtual SwTwips ShrinkFrame( SwTwips, bool bTst = false, bool bInfo = false ) = 0; virtual SwTwips GrowFrame ( SwTwips, bool bTst = false, bool bInfo = false ) = 0; + /// use these so we can grep for SwFrame's GetRegisteredIn accesses + /// beware that SwTextFrame may return sw::WriterMultiListener SwModify *GetDep() { return GetRegisteredInNonConst(); } const SwModify *GetDep() const { return GetRegisteredIn(); } diff --git a/sw/source/core/text/txtfrm.cxx b/sw/source/core/text/txtfrm.cxx index b60a0cc2a5b4..acf37777de30 100644 --- a/sw/source/core/text/txtfrm.cxx +++ b/sw/source/core/text/txtfrm.cxx @@ -1117,7 +1117,7 @@ bool sw_HideObj( const SwTextFrame& _rFrame, _rFrame.IsInDocBody() && !_rFrame.FindNextCnt() ) { SwTextNode const& rNode(*rAnchorPos.nNode.GetNode().GetTextNode()); - assert(_rFrame.GetMergedPara() || &rNode == _rFrame.GetRegisteredIn()); // simple consistency check +// assert(_rFrame.GetMergedPara() || &rNode == _rFrame.GetDep()); // simple consistency check sal_Int32 const nObjAnchorPos(rAnchorPos.nContent.GetIndex()); const sal_Unicode cAnchorChar = nObjAnchorPos < rNode.Len() ? rNode.GetText()[nObjAnchorPos] |