[Libreoffice-commits] core.git: Branch 'libreoffice-5-1' - sw/source
Caolán McNamara
caolanm at redhat.com
Fri May 13 15:58:10 UTC 2016
sw/source/uibase/docvw/SidebarWin.cxx | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit c767b5534eaea688138a49653f51df7bc321181e
Author: Caolán McNamara <caolanm at redhat.com>
Date: Fri May 13 13:37:02 2016 +0100
Resolves: tdf#99692 crash in SwPostItMgr with change tracking
and annotations
presumably since the original
commit 0761f81643a6890457e9ef7d913ab5c88c2593a4
Author: Oliver-Rainer Wittmann <orw at 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 at libreoffice.org>
Reviewed-by: Michael Stahl <mstahl at redhat.com>
Tested-by: Michael Stahl <mstahl at redhat.com>
diff --git a/sw/source/uibase/docvw/SidebarWin.cxx b/sw/source/uibase/docvw/SidebarWin.cxx
index c0ec62d1..400a464 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();
More information about the Libreoffice-commits
mailing list