diff options
author | Caolán McNamara <caolanm@redhat.com> | 2016-05-13 13:37:02 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2016-05-13 13:38:39 +0100 |
commit | 833029e751432e9e736c4f38f23654511d26e8f9 (patch) | |
tree | d3069cc3350974b9e4fcd05115269257737397ed /sw | |
parent | eb2da27e0834925d449373593fb650db49671adf (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
Diffstat (limited to 'sw')
-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 91ada90b7358..428303d25b50 100644 --- a/sw/source/uibase/docvw/SidebarWin.cxx +++ b/sw/source/uibase/docvw/SidebarWin.cxx @@ -887,12 +887,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(); |