[Libreoffice-commits] core.git: sc/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Fri Oct 9 16:09:06 UTC 2020
sc/source/ui/view/editsh.cxx | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
New commits:
commit 7c9a40f7cf996ab2ad15d595a262698435be42e0
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri Oct 9 15:34:27 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Fri Oct 9 18:08:30 2020 +0200
EditView may not have a Window
Change-Id: I0b1a87bab8fbabd24962efd6d42e12a2c922de54
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104124
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 83e4adaf815f..e076c762be1d 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -298,8 +298,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
pTopView->Paste();
}
- if (pTopView)
- pTopView->GetWindow()->GrabFocus();
+ if (vcl::Window* pViewWindow = pTopView ? pTopView->GetWindow() : nullptr)
+ pViewWindow->GrabFocus();
}
break;
@@ -310,7 +310,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
if (pTopView)
{
pTopView->Paste();
- pTopView->GetWindow()->GrabFocus();
+ if (vcl::Window* pViewWindow = pTopView ? pTopView->GetWindow() : nullptr)
+ pViewWindow->GrabFocus();
}
}
break;
@@ -458,8 +459,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
}
- if (pTopView)
- pTopView->GetWindow()->GrabFocus();
+ if (vcl::Window* pViewWindow = pTopView ? pTopView->GetWindow() : nullptr)
+ pViewWindow->GrabFocus();
}
break;
@@ -492,8 +493,8 @@ void ScEditShell::Execute( SfxRequest& rReq )
}
pDlg.disposeAndClear();
- if (pTopView)
- pTopView->GetWindow()->GrabFocus();
+ if (vcl::Window* pViewWindow = pTopView ? pTopView->GetWindow() : nullptr)
+ pViewWindow->GrabFocus();
}
break;
More information about the Libreoffice-commits
mailing list