[Libreoffice-commits] core.git: sw/source
Jim Raykowski (via logerrit)
logerrit at kemper.freedesktop.org
Tue Sep 28 00:13:38 UTC 2021
sw/source/uibase/docvw/edtwin.cxx | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
New commits:
commit d57ecadbbbced5ecebe6ede0ef8034d3dc3adae7
Author: Jim Raykowski <raykowj at gmail.com>
AuthorDate: Sun Sep 26 16:54:20 2021 -0800
Commit: Jim Raykowski <raykowj at gmail.com>
CommitDate: Tue Sep 28 02:13:04 2021 +0200
Outline folding: Check saved outline frame is valid
Fixes crash when saved outline frame is no longer an outline node
frame. This happens when the mouse pointer is on an outline node text
frame and the outline paragraph gets merged with another paragraph.
Change-Id: I30902bb51c938844e64169a04a62a79793ac2181
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122669
Tested-by: Jenkins
Reviewed-by: Jim Raykowski <raykowj at gmail.com>
diff --git a/sw/source/uibase/docvw/edtwin.cxx b/sw/source/uibase/docvw/edtwin.cxx
index e93158eb17ba..b75ddcc2a553 100644
--- a/sw/source/uibase/docvw/edtwin.cxx
+++ b/sw/source/uibase/docvw/edtwin.cxx
@@ -3916,11 +3916,15 @@ void SwEditWin::MouseMove(const MouseEvent& _rMEvt)
else if (m_pSavedOutlineFrame && !m_pSavedOutlineFrame->IsInDtor())
{
// current pointer pos is not over an outline frame
- // previous frame was an outline frame
+ // previous pointer pos was over an outline frame
// remove outline content visibility button if showing
- if (rNds.GetOutLineNds().Seek_Entry(static_cast<SwTextFrame*>(m_pSavedOutlineFrame)->GetTextNodeFirst(), &nPos) &&
- rSh.GetAttrOutlineContentVisible(nPos))
- GetFrameControlsManager().RemoveControlsByType(FrameControlType::Outline, m_pSavedOutlineFrame);
+ if (m_pSavedOutlineFrame->isFrameAreaDefinitionValid() &&
+ m_pSavedOutlineFrame->IsTextFrame() &&
+ rNds.GetOutLineNds().Seek_Entry(
+ static_cast<SwTextFrame*>(m_pSavedOutlineFrame)->GetTextNodeFirst(), &nPos)
+ && rSh.GetAttrOutlineContentVisible(nPos))
+ GetFrameControlsManager().RemoveControlsByType(FrameControlType::Outline,
+ m_pSavedOutlineFrame);
m_pSavedOutlineFrame = nullptr;
}
}
More information about the Libreoffice-commits
mailing list