Resolves: rhbz#1713827 protect against null ViewShell

f41
Caolán McNamara 6 years ago
parent e9abb43448
commit 383923ed57

@ -0,0 +1,84 @@
From ffab9dc94dd82e71586e999175fe5172504df443 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Sun, 26 May 2019 14:18:03 +0100
Subject: [PATCH] Resolves: rhbz#1713827 protect against null ViewShell
like SfxHintId::ScAccCursorChanged does
Change-Id: I75ab2da866a345d817e39536ac966d3edf24b90a
---
.../Accessibility/AccessibleSpreadsheet.cxx | 55 ++++++++++---------
1 file changed, 29 insertions(+), 26 deletions(-)
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index 269379812e6f..adbf5d041d0d 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -651,35 +651,38 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
CommitTableModelChange(maRange.aStart.Row(), maRange.aStart.Col(), maRange.aEnd.Row(), maRange.aEnd.Col(), AccessibleTableModelChangeType::UPDATE);
else
mbDelIns = false;
- ScViewData& rViewData = mpViewShell->GetViewData();
- ScAddress aNewCell = rViewData.GetCurPos();
- if( maActiveCell == aNewCell)
+ if (mpViewShell)
{
- ScDocument* pScDoc= GetDocument(mpViewShell);
- if (pScDoc)
+ ScViewData& rViewData = mpViewShell->GetViewData();
+ ScAddress aNewCell = rViewData.GetCurPos();
+ if( maActiveCell == aNewCell)
{
- OUString valStr(pScDoc->GetString(aNewCell.Col(),aNewCell.Row(),aNewCell.Tab()));
- if(m_strCurCellValue != valStr)
- {
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::VALUE_CHANGED;
- mpAccCell->CommitChange(aEvent);
- m_strCurCellValue=valStr;
- }
- OUString tabName;
- pScDoc->GetName( maActiveCell.Tab(), tabName );
- if( m_strOldTabName != tabName )
+ ScDocument* pScDoc= GetDocument(mpViewShell);
+ if (pScDoc)
{
- AccessibleEventObject aEvent;
- aEvent.EventId = AccessibleEventId::NAME_CHANGED;
- OUString sOldName(ScResId(STR_ACC_TABLE_NAME));
- sOldName = sOldName.replaceFirst("%1", m_strOldTabName);
- aEvent.OldValue <<= sOldName;
- OUString sNewName(ScResId(STR_ACC_TABLE_NAME));
- sOldName = sNewName.replaceFirst("%1", tabName);
- aEvent.NewValue <<= sNewName;
- CommitChange( aEvent );
- m_strOldTabName = tabName;
+ OUString valStr(pScDoc->GetString(aNewCell.Col(),aNewCell.Row(),aNewCell.Tab()));
+ if(m_strCurCellValue != valStr)
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::VALUE_CHANGED;
+ mpAccCell->CommitChange(aEvent);
+ m_strCurCellValue=valStr;
+ }
+ OUString tabName;
+ pScDoc->GetName( maActiveCell.Tab(), tabName );
+ if( m_strOldTabName != tabName )
+ {
+ AccessibleEventObject aEvent;
+ aEvent.EventId = AccessibleEventId::NAME_CHANGED;
+ OUString sOldName(ScResId(STR_ACC_TABLE_NAME));
+ sOldName = sOldName.replaceFirst("%1", m_strOldTabName);
+ aEvent.OldValue <<= sOldName;
+ OUString sNewName(ScResId(STR_ACC_TABLE_NAME));
+ sOldName = sNewName.replaceFirst("%1", tabName);
+ aEvent.NewValue <<= sNewName;
+ CommitChange( aEvent );
+ m_strOldTabName = tabName;
+ }
}
}
}
--
2.21.0

@ -54,7 +54,7 @@ Summary: Free Software Productivity Suite
Name: libreoffice
Epoch: 1
Version: %{libo_version}.2
Release: 4%{?libo_prerelease}%{?dist}
Release: 5%{?libo_prerelease}%{?dist}
License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0
URL: http://www.libreoffice.org/
@ -247,6 +247,7 @@ Patch4: 0001-no-home-as-templates.patch
Patch5: 0001-Resolves-rhbz-1702810-Prepare-for-upcoming-libebook-.patch
Patch6: 0001-Resolves-rhbz-1712823-prefer-help-strings-to-a11y-st.patch
Patch7: 0001-Resolves-tdf-125099-round-duration-results-in-interp.patch
Patch8: 0001-Resolves-rhbz-1713827-protect-against-null-ViewShell.patch
%if 0%{?rhel}
# not upstreamed
@ -2136,6 +2137,9 @@ done
%{_includedir}/LibreOfficeKit
%changelog
* Sun May 26 2019 Caolán McNamara <caolanm@redhat.com> - 1:6.2.3.2-5
- Resolves: rhbz#1713827 protect against null ViewShell
* Thu May 23 2019 Caolán McNamara <caolanm@redhat.com> - 1:6.2.3.2-4
- Resolves: rhbz#1712823 crash in extended tooltips over pattern editor
- Resolves: rhbz#1711143 calc not rounding time calculation correctly

Loading…
Cancel
Save