summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-05 15:51:07 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-08 07:37:26 +0100
commit04e7a34a19b3658de57c4f2b3b0fa8445b01f199 (patch)
tree7c7c85944d8172033d58c626b44df6f735e0bc38 /sc
parent72841008bf422dfd8553240b3a78f0474d03523c (diff)
loplugin:refcounting check for one more case
where we might be holding something newly created by pointer instead of by *::Reference Change-Id: Ife6f7acae4252bf56dcdeb95d72e43c523444f97 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112138 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
index aee01834103e..457adf6d0213 100644
--- a/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
+++ b/sc/source/ui/Accessibility/AccessibleSpreadsheet.cxx
@@ -493,8 +493,9 @@ void ScAccessibleSpreadsheet::Notify( SfxBroadcaster& rBC, const SfxHint& rHint
if(aNewCell.Tab() != maActiveCell.Tab())
{
aEvent.EventId = AccessibleEventId::PAGE_CHANGED;
+ auto pAccParent = getAccessibleParent();
ScAccessibleDocument *pAccDoc =
- static_cast<ScAccessibleDocument*>(getAccessibleParent().get());
+ static_cast<ScAccessibleDocument*>(pAccParent.get());
if(pAccDoc)
{
pAccDoc->CommitChange(aEvent);