diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-05-13 13:37:02 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2016-05-13 15:57:41 +0000 |
commit | c767b5534eaea688138a49653f51df7bc321181e (patch) | |
tree | 4e5ab23e7a29190e3345b1ad0ad2de029cecd871 | |
parent | cda827958eefb636a4dbe57e1df7d21b5878171f (diff) |
Resolves: tdf#99692 crash in SwPostItMgr with change tracking
and annotations
presumably since the original
commit 0761f81643a6890457e9ef7d913ab5c88c2593a4
Author: Oliver-Rainer Wittmann <orw@apache.org>
Date: Thu Dec 19 18:50:58 2013 +0000
- rely annotations on text ranges on new annotation marks
- support arbitrary text ranges for annotations
- fix undo/redo regarding annotations an text ranges
- support annotations on overlapping text ranges
- fix *.docx import for annotations on overlapping text ranges
- fix ODF import of annotations on text ranges
Change-Id: If2aa4ba74f03d0af11def55c2bd299211b3d5d77
(cherry picked from commit 833029e751432e9e736c4f38f23654511d26e8f9)
Reviewed-on: https://gerrit.libreoffice.org/24964
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | sw/source/uibase/docvw/SidebarWin.cxx | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx index c0ec62d1acd5..400a46410e12 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -891,12 +891,15 @@ void SwSidebarWin::SetPosAndSize() { const SwTextAnnotationField* pTextAnnotationField = dynamic_cast< const SwTextAnnotationField* >( mrSidebarItem.GetFormatField().GetTextField() ); - if ( pTextAnnotationField != nullptr - && pTextAnnotationField->GetpTextNode() != nullptr ) + SwTextNode* pTextNode = pTextAnnotationField ? pTextAnnotationField->GetpTextNode() : nullptr; + SwContentNode* pContentNd = nullptr; + if (pTextNode) { - SwTextNode* pTextNode = pTextAnnotationField->GetpTextNode(); SwNodes& rNds = pTextNode->GetDoc()->GetNodes(); - SwContentNode* const pContentNd = rNds[mrSidebarItem.maLayoutInfo.mnStartNodeIdx]->GetContentNode(); + pContentNd = rNds[mrSidebarItem.maLayoutInfo.mnStartNodeIdx]->GetContentNode(); + } + if (pContentNd) + { SwPosition aStartPos( *pContentNd, mrSidebarItem.maLayoutInfo.mnStartContent ); SwShellCursor* pTmpCursor = nullptr; const bool bTableCursorNeeded = pTextNode->FindTableBoxStartNode() != pContentNd->FindTableBoxStartNode(); |