summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2016-06-17 11:45:02 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2016-06-17 12:47:46 +0000
commit5b5706f41f97998785e1e7ad356580772da80c42 (patch)
tree90fbc80386ed79b12bd5fce299c7a139384d9e0b /sfx2
parente30f3bcd25762236eb739584dc71691123527c9f (diff)
comphelper lok: remove the g_bViewCallback global
Its purpose was to allow incrementally migrate all callers of SdrModel::libreOfficeKitCallback() to use SfxViewShell::libreOfficeKitViewCallback() (which allows notifying only the currently active or all views) instead. That is done by now, so it can go. Change-Id: I521bbbe5c638dfd844ebf025153459a37362d3c3 Reviewed-on: https://gerrit.libreoffice.org/26413 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/dispatch.cxx12
-rw-r--r--sfx2/source/control/unoctitm.cxx12
2 files changed, 4 insertions, 20 deletions
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index da43a7b09290..0d973a911205 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -1992,16 +1992,8 @@ void SfxDispatcher::ExecutePopup( const OUString& rResName, vcl::Window *pWin, c
std::stringstream aStream;
boost::property_tree::write_json(aStream, aRoot, true);
- if (comphelper::LibreOfficeKit::isViewCallback())
- {
- if (SfxViewShell* pViewShell = xImp->pFrame->GetViewShell())
- pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_MENU, aStream.str().c_str());
- }
- else
- {
- const SfxObjectShell* objSh = xImp->pFrame->GetObjectShell();
- objSh->libreOfficeKitCallback(LOK_CALLBACK_CONTEXT_MENU, aStream.str().c_str());
- }
+ if (SfxViewShell* pViewShell = xImp->pFrame->GetViewShell())
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_CONTEXT_MENU, aStream.str().c_str());
}
else
{
diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx
index 7168390229e1..3ade4be41141 100644
--- a/sfx2/source/control/unoctitm.cxx
+++ b/sfx2/source/control/unoctitm.cxx
@@ -1032,16 +1032,8 @@ static void InterceptLOKStateChangeEvent(const SfxViewFrame* pViewFrame, const c
return;
}
OUString payload = aBuffer.makeStringAndClear();
- if (comphelper::LibreOfficeKit::isViewCallback())
- {
- if (const SfxViewShell* pViewShell = pViewFrame->GetViewShell())
- pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, payload.toUtf8().getStr());
- }
- else
- {
- const SfxObjectShell* pObjectShell = pViewFrame->GetObjectShell();
- pObjectShell->libreOfficeKitCallback(LOK_CALLBACK_STATE_CHANGED, payload.toUtf8().getStr());
- }
+ if (const SfxViewShell* pViewShell = pViewFrame->GetViewShell())
+ pViewShell->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED, payload.toUtf8().getStr());
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */