summaryrefslogtreecommitdiffstats
path: root/sfx2
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-20 16:42:34 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-20 15:12:54 +0000
commitc544a8b674dd7ac9dd466a84a440ede030942438 (patch)
tree3da18d0b6717c9f50edc1c157c9f5d77b2d0e0a3 /sfx2
parentadd some OpenGL info to the crash reporter (diff)
downloadcore-c544a8b674dd7ac9dd466a84a440ede030942438.tar.gz
core-c544a8b674dd7ac9dd466a84a440ede030942438.zip
sw lok: add LOK_CALLBACK_INVALIDATE_VIEW_CURSOR
So a view can be aware where cursors of other views are. Change-Id: I6133fb55aa2869843c0284b7d76264bab3b3d5da Reviewed-on: https://gerrit.libreoffice.org/26513 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/view/lokhelper.cxx12
1 files changed, 9 insertions, 3 deletions
diff --git a/sfx2/source/view/lokhelper.cxx b/sfx2/source/view/lokhelper.cxx
index 3a306cfbe362..ba42188c178b 100644
--- a/sfx2/source/view/lokhelper.cxx
+++ b/sfx2/source/view/lokhelper.cxx
@@ -60,16 +60,22 @@ void SfxLokHelper::setView(std::uintptr_t nId)
}
-std::uintptr_t SfxLokHelper::getView()
+std::uintptr_t SfxLokHelper::getView(SfxViewShell *pViewShell)
{
- return reinterpret_cast<std::uintptr_t>(SfxViewShell::Current());
+ if (!pViewShell)
+ pViewShell = SfxViewShell::Current();
+ return reinterpret_cast<std::uintptr_t>(pViewShell);
}
std::size_t SfxLokHelper::getViews()
{
std::size_t nRet = 0;
- SfxObjectShell* pObjectShell = SfxViewFrame::Current()->GetObjectShell();
+ SfxViewFrame* pViewFrame = SfxViewFrame::Current();
+ if (!pViewFrame)
+ return nRet;
+
+ SfxObjectShell* pObjectShell = pViewFrame->GetObjectShell();
SfxViewShellArr_Impl& rViewArr = SfxGetpApp()->GetViewShells_Impl();
for (SfxViewShell* i : rViewArr)
{