sc/source/ui/docshell/docfunc.cxx | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
New commits: commit 0d1e0bda6a59f8c87981f87ebc7b89876a00cfb5 Author: Eike Rathke <[email protected]> Date: Thu Dec 7 12:48:43 2017 +0100 Remember ScViewData* and further check ScDrawView* Follow-up on commit 3809655e6d554dbc6c74b11597c540c4a62d4c09 Date: Thu Dec 7 00:06:36 2017 +0100 sc: don't crash on loading comments Seems filters call ShowNote before a view is set or something. Fixup for 25555c50ad2a57c1b2313f39b8132ac5e80a45fd. This "best current view" looks a bit fragile anyway.. Change-Id: I7012e4d0e10128b21ece304507b204976a9e03db diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx index 939c54614d78..430da19d4fa8 100644 --- a/sc/source/ui/docshell/docfunc.cxx +++ b/sc/source/ui/docshell/docfunc.cxx @@ -1216,8 +1216,12 @@ bool ScDocFunc::ShowNote( const ScAddress& rPos, bool bShow ) ScTabView::OnLOKNoteStateChanged(pNote); - if (ScDocShell::GetViewData()) - ScDocShell::GetViewData()->GetScDrawView()->SyncForGrid(pNote->GetCaption()); + if (ScViewData* pViewData = ScDocShell::GetViewData()) + { + if (ScDrawView* pDrawView = pViewData->GetScDrawView()) + pDrawView->SyncForGrid( pNote->GetCaption()); + } + rDocShell.SetDocumentModified(); return true; _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
